NovaActService / Client / create_act

create_act

NovaActService.Client.create_act(**kwargs)

Creates a new AI task (act) within a session that can interact with tools and perform specific actions.

See also: AWS API Documentation

Request Syntax

response = client.create_act(
    workflowDefinitionName='string',
    workflowRunId='string',
    sessionId='string',
    task='string',
    toolSpecs=[
        {
            'name': 'string',
            'description': 'string',
            'inputSchema': {
                'json': {...}|[...]|123|123.4|'string'|True|None
            }
        },
    ],
    clientToken='string'
)
Parameters:
  • workflowDefinitionName (string) –

    [REQUIRED]

    The name of the workflow definition containing the session.

  • workflowRunId (string) –

    [REQUIRED]

    The unique identifier of the workflow run containing the session.

  • sessionId (string) –

    [REQUIRED]

    The unique identifier of the session to create the act in.

  • task (string) –

    [REQUIRED]

    The task description that defines what the act should accomplish.

  • toolSpecs (list) –

    A list of tool specifications that the act can invoke to complete its task.

    • (dict) –

      Specification for a tool that acts can invoke, including its name, description, and input schema.

      • name (string) – [REQUIRED]

        The unique name of the tool that acts will use to invoke it.

      • description (string) – [REQUIRED]

        A description of what the tool does and how it should be used.

      • inputSchema (dict) – [REQUIRED]

        The JSON schema that defines the expected input format for the tool.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: json.

        • json (document) –

          The JSON schema that defines the expected input format for the tool.

  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'actId': 'string',
    'status': 'RUNNING'|'PENDING_CLIENT_ACTION'|'PENDING_HUMAN_ACTION'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'
}

Response Structure

  • (dict) –

    • actId (string) –

      The unique identifier for the created act.

    • status (string) –

      The initial status of the act after creation.

Exceptions

  • NovaActService.Client.exceptions.ServiceQuotaExceededException

  • NovaActService.Client.exceptions.AccessDeniedException

  • NovaActService.Client.exceptions.ConflictException

  • NovaActService.Client.exceptions.ThrottlingException

  • NovaActService.Client.exceptions.ResourceNotFoundException

  • NovaActService.Client.exceptions.InternalServerException

  • NovaActService.Client.exceptions.ValidationException