QuickSight / Client / create_agent

create_agent

QuickSight.Client.create_agent(**kwargs)

Creates an agent in Amazon QuickSight.

See also: AWS API Documentation

Request Syntax

response = client.create_agent(
    Spaces=[
        'string',
    ],
    ActionConnectors=[
        'string',
    ],
    AwsAccountId='string',
    AgentId='string',
    Name='string',
    Description='string',
    IconId='string',
    StarterPrompts=[
        'string',
    ],
    WelcomeMessage='string',
    AgentLifecycle='PREVIEW'|'PUBLISHED',
    CustomPromptInput={
        'ExistingPrompt': {
            'ModelProfileId': 'string',
            'SubscriptionId': 'string',
            'QbsAwsAccountId': 'string'
        },
        'NewPrompt': {
            'ResponseLength': 'string',
            'OutputStyle': 'string',
            'Identity': 'string',
            'Tone': 'string',
            'CustomInstructions': 'string'
        }
    }
)
Parameters:
  • Spaces (list) –

    The Amazon Resource Names (ARNs) of the spaces to attach to the agent.

    • (string) –

  • ActionConnectors (list) –

    The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.

    • (string) –

  • AwsAccountId (string) –

    [REQUIRED]

    The ID of the Amazon Web Services account that contains the agent.

  • AgentId (string) –

    [REQUIRED]

    A unique identifier for the agent.

  • Name (string) –

    [REQUIRED]

    The name of the agent.

  • Description (string) – A description of the agent.

  • IconId (string) – The icon identifier for the agent.

  • StarterPrompts (list) –

    A list of starter prompts that are displayed to users when they begin interacting with the agent.

    • (string) –

  • WelcomeMessage (string) – The welcome message that is displayed when a user starts a conversation with the agent.

  • AgentLifecycle (string) – The lifecycle state of the agent. Valid values are PREVIEW and PUBLISHED.

  • CustomPromptInput (dict) –

    The custom prompt configuration for the agent.

    Note

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

    • ExistingPrompt (dict) –

      An existing custom prompt profile to use for the agent.

      • ModelProfileId (string) – [REQUIRED]

        The identifier of the model profile.

      • SubscriptionId (string) – [REQUIRED]

        The subscription identifier.

      • QbsAwsAccountId (string) – [REQUIRED]

        The Amazon Web Services account ID for the Q Business service.

    • NewPrompt (dict) –

      New custom prompt parameters to configure for the agent.

      • ResponseLength (string) –

        Instructions for the desired response length.

      • OutputStyle (string) –

        Instructions for the desired output style.

      • Identity (string) –

        Instructions that define the agent’s identity and persona.

      • Tone (string) –

        Instructions for the desired tone of responses.

      • CustomInstructions (string) –

        Custom instructions for the agent’s behavior.

Return type:

dict

Returns:

Response Syntax

{
    'Arn': 'string',
    'AgentId': 'string',
    'AgentStatus': 'ACTIVE'|'UPDATING'|'FAILED'|'CREATING',
    'AgentName': 'string',
    'RequestId': 'string'
}

Response Structure

  • (dict) –

    • Arn (string) –

      The Amazon Resource Name (ARN) of the agent.

    • AgentId (string) –

      The unique identifier for the agent.

    • AgentStatus (string) –

      The status of the agent.

    • AgentName (string) –

      The name of the agent.

    • RequestId (string) –

      The Amazon Web Services request ID for this operation.

Exceptions