Amazon Q Connect

2025/10/03 - Amazon Q Connect - 17 updated api methods

Changes  Updated Amazon Q in Connect APIs to support Email Contact Recommendations.

CreateAIAgent (updated) Link ¶
Changes (request, response)
Request
{'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                       'value': 'string'}],
                                                                                                                                                                                                    'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                         'value': 'string'}],
                                                                                                                                                                                                                      'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                       'value': 'string'}}],
                                                                                                                                                                                                    'tagCondition': {'key': 'string',
                                                                                                                                                                                                                     'value': 'string'}},
                                                                                                                                                                               'maxResults': 'integer',
                                                                                                                                                                               'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                  '| '
                                                                                                                                                                                                                  'SEMANTIC'}},
                                                                                                'associationId': 'string',
                                                                                                'associationType': 'KNOWLEDGE_BASE'}],
                                                                 'emailGenerativeAnswerAIPromptId': 'string',
                                                                 'emailQueryReformulationAIPromptId': 'string',
                                                                 'locale': 'string'},
                   'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                         'locale': 'string'},
                   'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                               'value': 'string'}],
                                                                                                                                                                                            'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                 'value': 'string'}],
                                                                                                                                                                                                              'tagCondition': {'key': 'string',
                                                                                                                                                                                                                               'value': 'string'}}],
                                                                                                                                                                                            'tagCondition': {'key': 'string',
                                                                                                                                                                                                             'value': 'string'}},
                                                                                                                                                                       'maxResults': 'integer',
                                                                                                                                                                       'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                          '| '
                                                                                                                                                                                                          'SEMANTIC'}},
                                                                                        'associationId': 'string',
                                                                                        'associationType': 'KNOWLEDGE_BASE'}],
                                                         'emailQueryReformulationAIPromptId': 'string',
                                                         'emailResponseAIPromptId': 'string',
                                                         'locale': 'string'}},
 'type': {'EMAIL_GENERATIVE_ANSWER', 'EMAIL_OVERVIEW', 'EMAIL_RESPONSE'}}
Response
{'aiAgent': {'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                   'value': 'string'}],
                                                                                                                                                                                                                'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                     'value': 'string'}],
                                                                                                                                                                                                                                  'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                   'value': 'string'}}],
                                                                                                                                                                                                                'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                 'value': 'string'}},
                                                                                                                                                                                           'maxResults': 'integer',
                                                                                                                                                                                           'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                              '| '
                                                                                                                                                                                                                              'SEMANTIC'}},
                                                                                                            'associationId': 'string',
                                                                                                            'associationType': 'KNOWLEDGE_BASE'}],
                                                                             'emailGenerativeAnswerAIPromptId': 'string',
                                                                             'emailQueryReformulationAIPromptId': 'string',
                                                                             'locale': 'string'},
                               'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                                     'locale': 'string'},
                               'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                        'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                             'value': 'string'}],
                                                                                                                                                                                                                          'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}}],
                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}},
                                                                                                                                                                                   'maxResults': 'integer',
                                                                                                                                                                                   'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                      '| '
                                                                                                                                                                                                                      'SEMANTIC'}},
                                                                                                    'associationId': 'string',
                                                                                                    'associationType': 'KNOWLEDGE_BASE'}],
                                                                     'emailQueryReformulationAIPromptId': 'string',
                                                                     'emailResponseAIPromptId': 'string',
                                                                     'locale': 'string'}},
             'type': {'EMAIL_GENERATIVE_ANSWER',
                      'EMAIL_OVERVIEW',
                      'EMAIL_RESPONSE'}}}

Creates an Amazon Q in Connect AI Agent.

See also: AWS API Documentation

Request Syntax

client.create_ai_agent(
    clientToken='string',
    assistantId='string',
    name='string',
    type='MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
    configuration={
        'manualSearchAIAgentConfiguration': {
            'answerGenerationAIPromptId': 'string',
            'answerGenerationAIGuardrailId': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ],
            'locale': 'string'
        },
        'answerRecommendationAIAgentConfiguration': {
            'intentLabelingGenerationAIPromptId': 'string',
            'queryReformulationAIPromptId': 'string',
            'answerGenerationAIPromptId': 'string',
            'answerGenerationAIGuardrailId': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ],
            'locale': 'string'
        },
        'selfServiceAIAgentConfiguration': {
            'selfServicePreProcessingAIPromptId': 'string',
            'selfServiceAnswerGenerationAIPromptId': 'string',
            'selfServiceAIGuardrailId': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ]
        },
        'emailResponseAIAgentConfiguration': {
            'emailResponseAIPromptId': 'string',
            'emailQueryReformulationAIPromptId': 'string',
            'locale': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ]
        },
        'emailOverviewAIAgentConfiguration': {
            'emailOverviewAIPromptId': 'string',
            'locale': 'string'
        },
        'emailGenerativeAnswerAIAgentConfiguration': {
            'emailGenerativeAnswerAIPromptId': 'string',
            'emailQueryReformulationAIPromptId': 'string',
            'locale': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ]
        }
    },
    visibilityStatus='SAVED'|'PUBLISHED',
    tags={
        'string': 'string'
    },
    description='string'
)
type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..

This field is autopopulated if not provided.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type name:

string

param name:

[REQUIRED]

The name of the AI Agent.

type type:

string

param type:

[REQUIRED]

The type of the AI Agent.

type configuration:

dict

param configuration:

[REQUIRED]

The configuration of the AI Agent.

  • manualSearchAIAgentConfiguration (dict) --

    The configuration for AI Agents of type MANUAL_SEARCH.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

    • locale (string) --

      The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

  • answerRecommendationAIAgentConfiguration (dict) --

    The configuration for AI Agents of type ANSWER_RECOMMENDATION.

    • intentLabelingGenerationAIPromptId (string) --

      The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • queryReformulationAIPromptId (string) --

      The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

    • locale (string) --

      The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

  • selfServiceAIAgentConfiguration (dict) --

    The configuration for AI Agents of type SELF_SERVICE.

    • selfServicePreProcessingAIPromptId (string) --

      The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

    • selfServiceAnswerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

    • selfServiceAIGuardrailId (string) --

      The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

  • emailResponseAIAgentConfiguration (dict) --

    Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

    • emailResponseAIPromptId (string) --

      The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

    • emailQueryReformulationAIPromptId (string) --

      The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

    • locale (string) --

      The locale setting for language-specific email response generation (for example, en_US, es_ES).

    • associationConfigurations (list) --

      Configuration settings for knowledge base associations used by the email response agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

  • emailOverviewAIAgentConfiguration (dict) --

    Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

    • emailOverviewAIPromptId (string) --

      The ID of the System AI prompt used for generating structured email conversation summaries.

    • locale (string) --

      The locale setting for language-specific email overview processing (for example, en_US, es_ES).

  • emailGenerativeAnswerAIAgentConfiguration (dict) --

    Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

    • emailGenerativeAnswerAIPromptId (string) --

      The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

    • emailQueryReformulationAIPromptId (string) --

      The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

    • locale (string) --

      The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

    • associationConfigurations (list) --

      Configuration settings for knowledge base associations used by the email generative answer agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the AI Agent.

type tags:

dict

param tags:

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

type description:

string

param description:

The description of the AI Agent.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiAgentId': 'string',
        'aiAgentArn': 'string',
        'name': 'string',
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
        'configuration': {
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'answerRecommendationAIAgentConfiguration': {
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string',
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'selfServiceAIAgentConfiguration': {
                'selfServicePreProcessingAIPromptId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServiceAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailResponseAIAgentConfiguration': {
                'emailResponseAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailOverviewAIAgentConfiguration': {
                'emailOverviewAIPromptId': 'string',
                'locale': 'string'
            },
            'emailGenerativeAnswerAIAgentConfiguration': {
                'emailGenerativeAnswerAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    }
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the created AI Agent.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • name (string) --

        The name of the AI Agent.

      • type (string) --

        The type of the AI Agent.

      • configuration (dict) --

        Configuration for the AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailResponseAIAgentConfiguration (dict) --

          Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

          • emailResponseAIPromptId (string) --

            The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

          • locale (string) --

            The locale setting for language-specific email response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email response agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailOverviewAIAgentConfiguration (dict) --

          Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

          • emailOverviewAIPromptId (string) --

            The ID of the System AI prompt used for generating structured email conversation summaries.

          • locale (string) --

            The locale setting for language-specific email overview processing (for example, en_US, es_ES).

        • emailGenerativeAnswerAIAgentConfiguration (dict) --

          Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

          • emailGenerativeAnswerAIPromptId (string) --

            The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

          • locale (string) --

            The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email generative answer agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • description (string) --

        The description of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

CreateAIAgentVersion (updated) Link ¶
Changes (response)
{'aiAgent': {'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                   'value': 'string'}],
                                                                                                                                                                                                                'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                     'value': 'string'}],
                                                                                                                                                                                                                                  'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                   'value': 'string'}}],
                                                                                                                                                                                                                'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                 'value': 'string'}},
                                                                                                                                                                                           'maxResults': 'integer',
                                                                                                                                                                                           'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                              '| '
                                                                                                                                                                                                                              'SEMANTIC'}},
                                                                                                            'associationId': 'string',
                                                                                                            'associationType': 'KNOWLEDGE_BASE'}],
                                                                             'emailGenerativeAnswerAIPromptId': 'string',
                                                                             'emailQueryReformulationAIPromptId': 'string',
                                                                             'locale': 'string'},
                               'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                                     'locale': 'string'},
                               'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                        'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                             'value': 'string'}],
                                                                                                                                                                                                                          'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}}],
                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}},
                                                                                                                                                                                   'maxResults': 'integer',
                                                                                                                                                                                   'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                      '| '
                                                                                                                                                                                                                      'SEMANTIC'}},
                                                                                                    'associationId': 'string',
                                                                                                    'associationType': 'KNOWLEDGE_BASE'}],
                                                                     'emailQueryReformulationAIPromptId': 'string',
                                                                     'emailResponseAIPromptId': 'string',
                                                                     'locale': 'string'}},
             'type': {'EMAIL_GENERATIVE_ANSWER',
                      'EMAIL_OVERVIEW',
                      'EMAIL_RESPONSE'}}}

Creates and Amazon Q in Connect AI Agent version.

See also: AWS API Documentation

Request Syntax

client.create_ai_agent_version(
    assistantId='string',
    aiAgentId='string',
    modifiedTime=datetime(2015, 1, 1),
    clientToken='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent.

type modifiedTime:

datetime

param modifiedTime:

The modification time of the AI Agent should be tracked for version creation. This field should be specified to avoid version creation when simultaneous update to the underlying AI Agent are possible. The value should be the modifiedTime returned from the request to create or update an AI Agent so that version creation can fail if an update to the AI Agent post the specified modification time has been made.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiAgentId': 'string',
        'aiAgentArn': 'string',
        'name': 'string',
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
        'configuration': {
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'answerRecommendationAIAgentConfiguration': {
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string',
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'selfServiceAIAgentConfiguration': {
                'selfServicePreProcessingAIPromptId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServiceAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailResponseAIAgentConfiguration': {
                'emailResponseAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailOverviewAIAgentConfiguration': {
                'emailOverviewAIPromptId': 'string',
                'locale': 'string'
            },
            'emailGenerativeAnswerAIAgentConfiguration': {
                'emailGenerativeAnswerAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the AI Agent version.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • name (string) --

        The name of the AI Agent.

      • type (string) --

        The type of the AI Agent.

      • configuration (dict) --

        Configuration for the AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailResponseAIAgentConfiguration (dict) --

          Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

          • emailResponseAIPromptId (string) --

            The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

          • locale (string) --

            The locale setting for language-specific email response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email response agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailOverviewAIAgentConfiguration (dict) --

          Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

          • emailOverviewAIPromptId (string) --

            The ID of the System AI prompt used for generating structured email conversation summaries.

          • locale (string) --

            The locale setting for language-specific email overview processing (for example, en_US, es_ES).

        • emailGenerativeAnswerAIAgentConfiguration (dict) --

          Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

          • emailGenerativeAnswerAIPromptId (string) --

            The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

          • locale (string) --

            The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email generative answer agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • description (string) --

        The description of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

    • versionNumber (integer) --

      The version number of the AI Agent version.

CreateAIPrompt (updated) Link ¶
Changes (request, response)
Request
{'type': {'EMAIL_GENERATIVE_ANSWER',
          'EMAIL_OVERVIEW',
          'EMAIL_QUERY_REFORMULATION',
          'EMAIL_RESPONSE'}}
Response
{'aiPrompt': {'type': {'EMAIL_GENERATIVE_ANSWER',
                       'EMAIL_OVERVIEW',
                       'EMAIL_QUERY_REFORMULATION',
                       'EMAIL_RESPONSE'}}}

Creates an Amazon Q in Connect AI Prompt.

See also: AWS API Documentation

Request Syntax

client.create_ai_prompt(
    clientToken='string',
    assistantId='string',
    name='string',
    type='ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
    templateConfiguration={
        'textFullAIPromptEditTemplateConfiguration': {
            'text': 'string'
        }
    },
    visibilityStatus='SAVED'|'PUBLISHED',
    templateType='TEXT',
    modelId='string',
    apiFormat='ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
    tags={
        'string': 'string'
    },
    description='string'
)
type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..

This field is autopopulated if not provided.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type name:

string

param name:

[REQUIRED]

The name of the AI Prompt.

type type:

string

param type:

[REQUIRED]

The type of this AI Prompt.

type templateConfiguration:

dict

param templateConfiguration:

[REQUIRED]

The configuration of the prompt template for this AI Prompt.

  • textFullAIPromptEditTemplateConfiguration (dict) --

    The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

    • text (string) -- [REQUIRED]

      The YAML text for the AI Prompt template.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the AI Prompt.

type templateType:

string

param templateType:

[REQUIRED]

The type of the prompt template for this AI Prompt.

type modelId:

string

param modelId:

[REQUIRED]

The identifier of the model used for this AI Prompt.

type apiFormat:

string

param apiFormat:

[REQUIRED]

The API Format of the AI Prompt.

Recommended values: MESSAGES | TEXT_COMPLETIONS

type tags:

dict

param tags:

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

type description:

string

param description:

The description of the AI Prompt.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiPromptId': 'string',
        'aiPromptArn': 'string',
        'name': 'string',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
        'templateType': 'TEXT',
        'modelId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    }
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the AI Prompt.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • name (string) --

        The name of the AI Prompt

      • type (string) --

        The type of this AI Prompt.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. The following model Ids are supported:

        • anthropic.claude-3-haiku--v1:0

        • apac.amazon.nova-lite-v1:0

        • apac.amazon.nova-micro-v1:0

        • apac.amazon.nova-pro-v1:0

        • apac.anthropic.claude-3-5-sonnet--v2:0

        • apac.anthropic.claude-3-haiku-20240307-v1:0

        • eu.amazon.nova-lite-v1:0

        • eu.amazon.nova-micro-v1:0

        • eu.amazon.nova-pro-v1:0

        • eu.anthropic.claude-3-7-sonnet-20250219-v1:0

        • eu.anthropic.claude-3-haiku-20240307-v1:0

        • us.amazon.nova-lite-v1:0

        • us.amazon.nova-micro-v1:0

        • us.amazon.nova-pro-v1:0

        • us.anthropic.claude-3-5-haiku-20241022-v1:0

        • us.anthropic.claude-3-7-sonnet-20250219-v1:0

        • us.anthropic.claude-3-haiku-20240307-v1:0

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • description (string) --

        The description of the AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

CreateAIPromptVersion (updated) Link ¶
Changes (response)
{'aiPrompt': {'type': {'EMAIL_GENERATIVE_ANSWER',
                       'EMAIL_OVERVIEW',
                       'EMAIL_QUERY_REFORMULATION',
                       'EMAIL_RESPONSE'}}}

Creates an Amazon Q in Connect AI Prompt version.

See also: AWS API Documentation

Request Syntax

client.create_ai_prompt_version(
    assistantId='string',
    aiPromptId='string',
    modifiedTime=datetime(2015, 1, 1),
    clientToken='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI prompt.

type modifiedTime:

datetime

param modifiedTime:

The time the AI Prompt was last modified.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiPromptId': 'string',
        'aiPromptArn': 'string',
        'name': 'string',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
        'templateType': 'TEXT',
        'modelId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the AI Prompt version.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • name (string) --

        The name of the AI Prompt

      • type (string) --

        The type of this AI Prompt.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. The following model Ids are supported:

        • anthropic.claude-3-haiku--v1:0

        • apac.amazon.nova-lite-v1:0

        • apac.amazon.nova-micro-v1:0

        • apac.amazon.nova-pro-v1:0

        • apac.anthropic.claude-3-5-sonnet--v2:0

        • apac.anthropic.claude-3-haiku-20240307-v1:0

        • eu.amazon.nova-lite-v1:0

        • eu.amazon.nova-micro-v1:0

        • eu.amazon.nova-pro-v1:0

        • eu.anthropic.claude-3-7-sonnet-20250219-v1:0

        • eu.anthropic.claude-3-haiku-20240307-v1:0

        • us.amazon.nova-lite-v1:0

        • us.amazon.nova-micro-v1:0

        • us.amazon.nova-pro-v1:0

        • us.anthropic.claude-3-5-haiku-20241022-v1:0

        • us.anthropic.claude-3-7-sonnet-20250219-v1:0

        • us.anthropic.claude-3-haiku-20240307-v1:0

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • description (string) --

        The description of the AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

    • versionNumber (integer) --

      The version number of the AI Prompt version.

CreateSession (updated) Link ¶
Changes (request)
{'contactArn': 'string'}

Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Amazon Q in Connect session for each contact on which Amazon Q in Connect is enabled.

See also: AWS API Documentation

Request Syntax

client.create_session(
    clientToken='string',
    assistantId='string',
    name='string',
    description='string',
    tags={
        'string': 'string'
    },
    tagFilter={
        'tagCondition': {
            'key': 'string',
            'value': 'string'
        },
        'andConditions': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'orConditions': [
            {
                'andConditions': [
                    {
                        'key': 'string',
                        'value': 'string'
                    },
                ],
                'tagCondition': {
                    'key': 'string',
                    'value': 'string'
                }
            },
        ]
    },
    aiAgentConfiguration={
        'string': {
            'aiAgentId': 'string'
        }
    },
    contactArn='string'
)
type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

This field is autopopulated if not provided.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type name:

string

param name:

[REQUIRED]

The name of the session.

type description:

string

param description:

The description.

type tags:

dict

param tags:

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

type tagFilter:

dict

param tagFilter:

An object that can be used to specify Tag conditions.

  • tagCondition (dict) --

    A leaf node condition which can be used to specify a tag condition.

    • key (string) -- [REQUIRED]

      The tag key in the tag condition.

    • value (string) --

      The tag value in the tag condition.

  • andConditions (list) --

    A list of conditions which would be applied together with an AND condition.

    • (dict) --

      A leaf node condition which can be used to specify a tag condition.

      • key (string) -- [REQUIRED]

        The tag key in the tag condition.

      • value (string) --

        The tag value in the tag condition.

  • orConditions (list) --

    A list of conditions which would be applied together with an OR condition.

    • (dict) --

      A list of conditions which would be applied together with an OR condition.

      • andConditions (list) --

        A list of conditions which would be applied together with an AND condition.

        • (dict) --

          A leaf node condition which can be used to specify a tag condition.

          • key (string) -- [REQUIRED]

            The tag key in the tag condition.

          • value (string) --

            The tag value in the tag condition.

      • tagCondition (dict) --

        A leaf node condition which can be used to specify a tag condition.

        • key (string) -- [REQUIRED]

          The tag key in the tag condition.

        • value (string) --

          The tag value in the tag condition.

type aiAgentConfiguration:

dict

param aiAgentConfiguration:

The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.

  • (string) --

    • (dict) --

      A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

      • aiAgentId (string) -- [REQUIRED]

        The ID of the AI Agent to be configured.

type contactArn:

string

param contactArn:

The Amazon Resource Name (ARN) of the email contact in Amazon Connect. Used to retrieve email content and establish session context for AI-powered email assistance.

rtype:

dict

returns:

Response Syntax

{
    'session': {
        'sessionArn': 'string',
        'sessionId': 'string',
        'name': 'string',
        'description': 'string',
        'tags': {
            'string': 'string'
        },
        'integrationConfiguration': {
            'topicIntegrationArn': 'string'
        },
        'tagFilter': {
            'tagCondition': {
                'key': 'string',
                'value': 'string'
            },
            'andConditions': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'orConditions': [
                {
                    'andConditions': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ],
                    'tagCondition': {
                        'key': 'string',
                        'value': 'string'
                    }
                },
            ]
        },
        'aiAgentConfiguration': {
            'string': {
                'aiAgentId': 'string'
            }
        },
        'origin': 'SYSTEM'|'CUSTOMER'
    }
}

Response Structure

  • (dict) --

    • session (dict) --

      The session.

      • sessionArn (string) --

        The Amazon Resource Name (ARN) of the session.

      • sessionId (string) --

        The identifier of the session.

      • name (string) --

        The name of the session.

      • description (string) --

        The description of the session.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • integrationConfiguration (dict) --

        The configuration information for the session integration.

        • topicIntegrationArn (string) --

          The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

      • tagFilter (dict) --

        An object that can be used to specify Tag conditions.

        • tagCondition (dict) --

          A leaf node condition which can be used to specify a tag condition.

          • key (string) --

            The tag key in the tag condition.

          • value (string) --

            The tag value in the tag condition.

        • andConditions (list) --

          A list of conditions which would be applied together with an AND condition.

          • (dict) --

            A leaf node condition which can be used to specify a tag condition.

            • key (string) --

              The tag key in the tag condition.

            • value (string) --

              The tag value in the tag condition.

        • orConditions (list) --

          A list of conditions which would be applied together with an OR condition.

          • (dict) --

            A list of conditions which would be applied together with an OR condition.

            • andConditions (list) --

              A list of conditions which would be applied together with an AND condition.

              • (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) --

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • tagCondition (dict) --

              A leaf node condition which can be used to specify a tag condition.

              • key (string) --

                The tag key in the tag condition.

              • value (string) --

                The tag value in the tag condition.

      • aiAgentConfiguration (dict) --

        The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.

        • (string) --

          • (dict) --

            A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

            • aiAgentId (string) --

              The ID of the AI Agent to be configured.

      • origin (string) --

        The origin of the Session to be listed. SYSTEM for a default Session created by Amazon Q in Connect or CUSTOMER for a Session created by calling CreateSession API.

GetAIAgent (updated) Link ¶
Changes (response)
{'aiAgent': {'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                   'value': 'string'}],
                                                                                                                                                                                                                'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                     'value': 'string'}],
                                                                                                                                                                                                                                  'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                   'value': 'string'}}],
                                                                                                                                                                                                                'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                 'value': 'string'}},
                                                                                                                                                                                           'maxResults': 'integer',
                                                                                                                                                                                           'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                              '| '
                                                                                                                                                                                                                              'SEMANTIC'}},
                                                                                                            'associationId': 'string',
                                                                                                            'associationType': 'KNOWLEDGE_BASE'}],
                                                                             'emailGenerativeAnswerAIPromptId': 'string',
                                                                             'emailQueryReformulationAIPromptId': 'string',
                                                                             'locale': 'string'},
                               'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                                     'locale': 'string'},
                               'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                        'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                             'value': 'string'}],
                                                                                                                                                                                                                          'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}}],
                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}},
                                                                                                                                                                                   'maxResults': 'integer',
                                                                                                                                                                                   'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                      '| '
                                                                                                                                                                                                                      'SEMANTIC'}},
                                                                                                    'associationId': 'string',
                                                                                                    'associationType': 'KNOWLEDGE_BASE'}],
                                                                     'emailQueryReformulationAIPromptId': 'string',
                                                                     'emailResponseAIPromptId': 'string',
                                                                     'locale': 'string'}},
             'type': {'EMAIL_GENERATIVE_ANSWER',
                      'EMAIL_OVERVIEW',
                      'EMAIL_RESPONSE'}}}

Gets an Amazon Q in Connect AI Agent.

See also: AWS API Documentation

Request Syntax

client.get_ai_agent(
    assistantId='string',
    aiAgentId='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent (with or without a version qualifier). Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiAgentId': 'string',
        'aiAgentArn': 'string',
        'name': 'string',
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
        'configuration': {
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'answerRecommendationAIAgentConfiguration': {
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string',
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'selfServiceAIAgentConfiguration': {
                'selfServicePreProcessingAIPromptId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServiceAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailResponseAIAgentConfiguration': {
                'emailResponseAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailOverviewAIAgentConfiguration': {
                'emailOverviewAIPromptId': 'string',
                'locale': 'string'
            },
            'emailGenerativeAnswerAIAgentConfiguration': {
                'emailGenerativeAnswerAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the AI Agent.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • name (string) --

        The name of the AI Agent.

      • type (string) --

        The type of the AI Agent.

      • configuration (dict) --

        Configuration for the AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailResponseAIAgentConfiguration (dict) --

          Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

          • emailResponseAIPromptId (string) --

            The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

          • locale (string) --

            The locale setting for language-specific email response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email response agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailOverviewAIAgentConfiguration (dict) --

          Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

          • emailOverviewAIPromptId (string) --

            The ID of the System AI prompt used for generating structured email conversation summaries.

          • locale (string) --

            The locale setting for language-specific email overview processing (for example, en_US, es_ES).

        • emailGenerativeAnswerAIAgentConfiguration (dict) --

          Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

          • emailGenerativeAnswerAIPromptId (string) --

            The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

          • locale (string) --

            The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email generative answer agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • description (string) --

        The description of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

    • versionNumber (integer) --

      The version number of the AI Agent version (returned if an AI Agent version was specified via use of a qualifier for the aiAgentId on the request).

GetAIPrompt (updated) Link ¶
Changes (response)
{'aiPrompt': {'type': {'EMAIL_GENERATIVE_ANSWER',
                       'EMAIL_OVERVIEW',
                       'EMAIL_QUERY_REFORMULATION',
                       'EMAIL_RESPONSE'}}}

Gets and Amazon Q in Connect AI Prompt.

See also: AWS API Documentation

Request Syntax

client.get_ai_prompt(
    assistantId='string',
    aiPromptId='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI prompt.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiPromptId': 'string',
        'aiPromptArn': 'string',
        'name': 'string',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
        'templateType': 'TEXT',
        'modelId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the AI Prompt.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • name (string) --

        The name of the AI Prompt

      • type (string) --

        The type of this AI Prompt.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. The following model Ids are supported:

        • anthropic.claude-3-haiku--v1:0

        • apac.amazon.nova-lite-v1:0

        • apac.amazon.nova-micro-v1:0

        • apac.amazon.nova-pro-v1:0

        • apac.anthropic.claude-3-5-sonnet--v2:0

        • apac.anthropic.claude-3-haiku-20240307-v1:0

        • eu.amazon.nova-lite-v1:0

        • eu.amazon.nova-micro-v1:0

        • eu.amazon.nova-pro-v1:0

        • eu.anthropic.claude-3-7-sonnet-20250219-v1:0

        • eu.anthropic.claude-3-haiku-20240307-v1:0

        • us.amazon.nova-lite-v1:0

        • us.amazon.nova-micro-v1:0

        • us.amazon.nova-pro-v1:0

        • us.anthropic.claude-3-5-haiku-20241022-v1:0

        • us.anthropic.claude-3-7-sonnet-20250219-v1:0

        • us.anthropic.claude-3-haiku-20240307-v1:0

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • description (string) --

        The description of the AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

    • versionNumber (integer) --

      The version number of the AI Prompt version (returned if an AI Prompt version was specified via use of a qualifier for the aiPromptId on the request).

GetRecommendations (updated) Link ¶
Changes (response)
{'recommendations': {'data': {'details': {'emailGenerativeAnswerChunkData': {'completion': 'string',
                                                                             'nextChunkToken': 'string',
                                                                             'references': [{'details': {'contentData': {'rankingData': {'relevanceLevel': 'HIGH '
                                                                                                                                                           '| '
                                                                                                                                                           'MEDIUM '
                                                                                                                                                           '| '
                                                                                                                                                           'LOW',
                                                                                                                                         'relevanceScore': 'double'},
                                                                                                                         'textData': {'excerpt': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                                  'endOffsetExclusive': 'integer'}],
                                                                                                                                                  'text': 'string'},
                                                                                                                                      'title': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                                'endOffsetExclusive': 'integer'}],
                                                                                                                                                'text': 'string'}}},
                                                                                                         'emailGenerativeAnswerChunkData': (),
                                                                                                         'emailOverviewChunkData': {'completion': 'string',
                                                                                                                                    'nextChunkToken': 'string'},
                                                                                                         'emailResponseChunkData': {'completion': 'string',
                                                                                                                                    'nextChunkToken': 'string'},
                                                                                                         'generativeChunkData': {'completion': 'string',
                                                                                                                                 'nextChunkToken': 'string',
                                                                                                                                 'references': ()},
                                                                                                         'generativeData': {'completion': 'string',
                                                                                                                            'rankingData': {'relevanceLevel': 'HIGH '
                                                                                                                                                              '| '
                                                                                                                                                              'MEDIUM '
                                                                                                                                                              '| '
                                                                                                                                                              'LOW',
                                                                                                                                            'relevanceScore': 'double'},
                                                                                                                            'references': ()},
                                                                                                         'intentDetectedData': {'intent': 'string',
                                                                                                                                'intentId': 'string'},
                                                                                                         'sourceContentData': {'citationSpan': {'beginOffsetInclusive': 'integer',
                                                                                                                                                'endOffsetExclusive': 'integer'},
                                                                                                                               'id': 'string',
                                                                                                                               'rankingData': {'relevanceLevel': 'HIGH '
                                                                                                                                                                 '| '
                                                                                                                                                                 'MEDIUM '
                                                                                                                                                                 '| '
                                                                                                                                                                 'LOW',
                                                                                                                                               'relevanceScore': 'double'},
                                                                                                                               'textData': {'excerpt': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                                        'endOffsetExclusive': 'integer'}],
                                                                                                                                                        'text': 'string'},
                                                                                                                                            'title': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                                      'endOffsetExclusive': 'integer'}],
                                                                                                                                                      'text': 'string'}},
                                                                                                                               'type': 'KNOWLEDGE_CONTENT'}},
                                                                                             'reference': {'contentReference': {'contentArn': 'string',
                                                                                                                                'contentId': 'string',
                                                                                                                                'knowledgeBaseArn': 'string',
                                                                                                                                'knowledgeBaseId': 'string',
                                                                                                                                'referenceType': 'WEB_CRAWLER '
                                                                                                                                                 '| '
                                                                                                                                                 'KNOWLEDGE_BASE',
                                                                                                                                'sourceURL': 'string'},
                                                                                                           'generativeReference': {'generationId': 'string',
                                                                                                                                   'modelId': 'string'}}}]},
                                          'emailOverviewChunkData': {'completion': 'string',
                                                                     'nextChunkToken': 'string'},
                                          'emailResponseChunkData': {'completion': 'string',
                                                                     'nextChunkToken': 'string'}}},
                     'type': {'EMAIL_GENERATIVE_ANSWER_CHUNK',
                              'EMAIL_OVERVIEW_CHUNK',
                              'EMAIL_RESPONSE_CHUNK'}}}

Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

See also: AWS API Documentation

Request Syntax

client.get_recommendations(
    assistantId='string',
    sessionId='string',
    maxResults=123,
    waitTimeSeconds=123,
    nextChunkToken='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type sessionId:

string

param sessionId:

[REQUIRED]

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type waitTimeSeconds:

integer

param waitTimeSeconds:

The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list.

type nextChunkToken:

string

param nextChunkToken:

The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.

rtype:

dict

returns:

Response Syntax

{
    'recommendations': [
        {
            'recommendationId': 'string',
            'document': {
                'contentReference': {
                    'knowledgeBaseArn': 'string',
                    'knowledgeBaseId': 'string',
                    'contentArn': 'string',
                    'contentId': 'string',
                    'sourceURL': 'string',
                    'referenceType': 'WEB_CRAWLER'|'KNOWLEDGE_BASE'
                },
                'title': {
                    'text': 'string',
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ]
                },
                'excerpt': {
                    'text': 'string',
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ]
                }
            },
            'relevanceScore': 123.0,
            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
            'type': 'KNOWLEDGE_CONTENT'|'GENERATIVE_RESPONSE'|'GENERATIVE_ANSWER'|'DETECTED_INTENT'|'GENERATIVE_ANSWER_CHUNK'|'BLOCKED_GENERATIVE_ANSWER_CHUNK'|'INTENT_ANSWER_CHUNK'|'BLOCKED_INTENT_ANSWER_CHUNK'|'EMAIL_RESPONSE_CHUNK'|'EMAIL_OVERVIEW_CHUNK'|'EMAIL_GENERATIVE_ANSWER_CHUNK',
            'data': {
                'reference': {
                    'contentReference': {
                        'knowledgeBaseArn': 'string',
                        'knowledgeBaseId': 'string',
                        'contentArn': 'string',
                        'contentId': 'string',
                        'sourceURL': 'string',
                        'referenceType': 'WEB_CRAWLER'|'KNOWLEDGE_BASE'
                    },
                    'generativeReference': {
                        'modelId': 'string',
                        'generationId': 'string'
                    }
                },
                'details': {
                    'contentData': {
                        'textData': {
                            'title': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            },
                            'excerpt': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            }
                        },
                        'rankingData': {
                            'relevanceScore': 123.0,
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW'
                        }
                    },
                    'generativeData': {
                        'completion': 'string',
                        'references': [
                            {'... recursive ...'},
                        ],
                        'rankingData': {
                            'relevanceScore': 123.0,
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW'
                        }
                    },
                    'intentDetectedData': {
                        'intent': 'string',
                        'intentId': 'string'
                    },
                    'sourceContentData': {
                        'id': 'string',
                        'type': 'KNOWLEDGE_CONTENT',
                        'textData': {
                            'title': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            },
                            'excerpt': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            }
                        },
                        'rankingData': {
                            'relevanceScore': 123.0,
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW'
                        },
                        'citationSpan': {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        }
                    },
                    'generativeChunkData': {
                        'completion': 'string',
                        'references': [
                            {'... recursive ...'},
                        ],
                        'nextChunkToken': 'string'
                    },
                    'emailResponseChunkData': {
                        'completion': 'string',
                        'nextChunkToken': 'string'
                    },
                    'emailOverviewChunkData': {
                        'completion': 'string',
                        'nextChunkToken': 'string'
                    },
                    'emailGenerativeAnswerChunkData': {
                        'completion': 'string',
                        'references': [
                            {'... recursive ...'},
                        ],
                        'nextChunkToken': 'string'
                    }
                }
            }
        },
    ],
    'triggers': [
        {
            'id': 'string',
            'type': 'QUERY'|'GENERATIVE',
            'source': 'ISSUE_DETECTION'|'RULE_EVALUATION'|'OTHER',
            'data': {
                'query': {
                    'text': 'string'
                }
            },
            'recommendationIds': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • recommendations (list) --

      The recommendations.

      • (dict) --

        Information about the recommendation.

        • recommendationId (string) --

          The identifier of the recommendation.

        • document (dict) --

          The recommended document.

          • contentReference (dict) --

            A reference to the content resource.

            • knowledgeBaseArn (string) --

              The Amazon Resource Name (ARN) of the knowledge base.

            • knowledgeBaseId (string) --

              The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base.

            • contentArn (string) --

              The Amazon Resource Name (ARN) of the content.

            • contentId (string) --

              The identifier of the content.

            • sourceURL (string) --

              The web URL of the source content.

            • referenceType (string) --

              The type of reference content.

          • title (dict) --

            The title of the document.

            • text (string) --

              Text in the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

          • excerpt (dict) --

            The excerpt from the document.

            • text (string) --

              Text in the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

        • relevanceScore (float) --

          The relevance score of the recommendation.

        • relevanceLevel (string) --

          The relevance level of the recommendation.

        • type (string) --

          The type of recommendation.

        • data (dict) --

          Summary of the recommended content.

          • reference (dict) --

            Reference information about the content.

            • contentReference (dict) --

              Reference information about the content.

              • knowledgeBaseArn (string) --

                The Amazon Resource Name (ARN) of the knowledge base.

              • knowledgeBaseId (string) --

                The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base.

              • contentArn (string) --

                The Amazon Resource Name (ARN) of the content.

              • contentId (string) --

                The identifier of the content.

              • sourceURL (string) --

                The web URL of the source content.

              • referenceType (string) --

                The type of reference content.

            • generativeReference (dict) --

              Reference information about the generative content.

              • modelId (string) --

                The identifier of the LLM model.

              • generationId (string) --

                The identifier of the LLM model.

          • details (dict) --

            Details about the data.

            • contentData (dict) --

              Details about the content data.

              • textData (dict) --

                Details about the content text data.

                • title (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                • excerpt (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

              • rankingData (dict) --

                Details about the content ranking data.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

                • relevanceLevel (string) --

                  The relevance score of the content.

            • generativeData (dict) --

              Details about the generative data.

              • completion (string) --

                The LLM response.

              • references (list) --

                The references used to generative the LLM response.

                • (dict) --

                  Summary of the data.

              • rankingData (dict) --

                Details about the generative content ranking data.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

                • relevanceLevel (string) --

                  The relevance score of the content.

            • intentDetectedData (dict) --

              Details about the intent data.

              • intent (string) --

                The detected intent.

              • intentId (string) --

                The identifier of the detected intent.

            • sourceContentData (dict) --

              Details about the content data.

              • id (string) --

                The identifier of the source content.

              • type (string) --

                The type of the source content.

              • textData (dict) --

                Details about the source content text data.

                • title (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                • excerpt (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

              • rankingData (dict) --

                Details about the source content ranking data.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

                • relevanceLevel (string) --

                  The relevance score of the content.

              • citationSpan (dict) --

                Contains information about where the text with a citation begins and ends in the generated output.

                • beginOffsetInclusive (integer) --

                  Where the text with a citation starts in the generated output.

                • endOffsetExclusive (integer) --

                  Where the text with a citation ends in the generated output.

            • generativeChunkData (dict) --

              Details about the generative chunk data.

              • completion (string) --

                A chunk of the LLM response.

              • references (list) --

                The references used to generate the LLM response.

                • (dict) --

                  Summary of the data.

              • nextChunkToken (string) --

                The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.

            • emailResponseChunkData (dict) --

              Streaming chunk data for email response generation containing partial response content.

              • completion (string) --

                The partial or complete professional email response text with appropriate greetings and closings.

              • nextChunkToken (string) --

                Token for retrieving the next chunk of streaming response data, if available.

            • emailOverviewChunkData (dict) --

              Streaming chunk data for email overview containing partial overview content.

              • completion (string) --

                The partial or complete overview text content in structured HTML format with customer issues, resolutions, and next steps.

              • nextChunkToken (string) --

                Token for retrieving the next chunk of streaming overview data, if available.

            • emailGenerativeAnswerChunkData (dict) --

              Streaming chunk data for email generative answers containing partial knowledge-based response content.

              • completion (string) --

                The partial or complete text content of the generative answer response.

              • references (list) --

                Source references and citations from knowledge base articles used to generate the answer.

                • (dict) --

                  Summary of the data.

              • nextChunkToken (string) --

                Token for retrieving the next chunk of streaming response data, if available.

    • triggers (list) --

      The triggers corresponding to recommendations.

      • (dict) --

        A recommendation trigger provides context on the event that produced the referenced recommendations. Recommendations are only referenced in recommendationIds by a single RecommendationTrigger.

        • id (string) --

          The identifier of the recommendation trigger.

        • type (string) --

          The type of recommendation trigger.

        • source (string) --

          The source of the recommendation trigger.

          • ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens issue.

          • RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens rule.

        • data (dict) --

          A union type containing information related to the trigger.

          • query (dict) --

            Data associated with the QUERY RecommendationTriggerType.

            • text (string) --

              The text associated with the recommendation trigger.

        • recommendationIds (list) --

          The identifiers of the recommendations.

          • (string) --

ListAIAgentVersions (updated) Link ¶
Changes (response)
{'aiAgentVersionSummaries': {'aiAgentSummary': {'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                                      'value': 'string'}],
                                                                                                                                                                                                                                                   'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                                                        'value': 'string'}],
                                                                                                                                                                                                                                                                     'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                                                      'value': 'string'}}],
                                                                                                                                                                                                                                                   'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                                    'value': 'string'}},
                                                                                                                                                                                                                              'maxResults': 'integer',
                                                                                                                                                                                                                              'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                                                                 '| '
                                                                                                                                                                                                                                                                 'SEMANTIC'}},
                                                                                                                                               'associationId': 'string',
                                                                                                                                               'associationType': 'KNOWLEDGE_BASE'}],
                                                                                                                'emailGenerativeAnswerAIPromptId': 'string',
                                                                                                                'emailQueryReformulationAIPromptId': 'string',
                                                                                                                'locale': 'string'},
                                                                  'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                                                                        'locale': 'string'},
                                                                  'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                              'value': 'string'}],
                                                                                                                                                                                                                                           'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                                                'value': 'string'}],
                                                                                                                                                                                                                                                             'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                                              'value': 'string'}}],
                                                                                                                                                                                                                                           'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                            'value': 'string'}},
                                                                                                                                                                                                                      'maxResults': 'integer',
                                                                                                                                                                                                                      'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                                                         '| '
                                                                                                                                                                                                                                                         'SEMANTIC'}},
                                                                                                                                       'associationId': 'string',
                                                                                                                                       'associationType': 'KNOWLEDGE_BASE'}],
                                                                                                        'emailQueryReformulationAIPromptId': 'string',
                                                                                                        'emailResponseAIPromptId': 'string',
                                                                                                        'locale': 'string'}},
                                                'type': {'EMAIL_GENERATIVE_ANSWER',
                                                         'EMAIL_OVERVIEW',
                                                         'EMAIL_RESPONSE'}}}}

List AI Agent versions.

See also: AWS API Documentation

Request Syntax

client.list_ai_agent_versions(
    assistantId='string',
    aiAgentId='string',
    nextToken='string',
    maxResults=123,
    origin='SYSTEM'|'CUSTOMER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent for which versions are to be listed.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type origin:

string

param origin:

The origin of the AI Agent versions to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiAgentVersionSummaries': [
        {
            'aiAgentSummary': {
                'name': 'string',
                'assistantId': 'string',
                'assistantArn': 'string',
                'aiAgentId': 'string',
                'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
                'aiAgentArn': 'string',
                'modifiedTime': datetime(2015, 1, 1),
                'visibilityStatus': 'SAVED'|'PUBLISHED',
                'configuration': {
                    'manualSearchAIAgentConfiguration': {
                        'answerGenerationAIPromptId': 'string',
                        'answerGenerationAIGuardrailId': 'string',
                        'associationConfigurations': [
                            {
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE',
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ]
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                }
                            },
                        ],
                        'locale': 'string'
                    },
                    'answerRecommendationAIAgentConfiguration': {
                        'intentLabelingGenerationAIPromptId': 'string',
                        'queryReformulationAIPromptId': 'string',
                        'answerGenerationAIPromptId': 'string',
                        'answerGenerationAIGuardrailId': 'string',
                        'associationConfigurations': [
                            {
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE',
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ]
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                }
                            },
                        ],
                        'locale': 'string'
                    },
                    'selfServiceAIAgentConfiguration': {
                        'selfServicePreProcessingAIPromptId': 'string',
                        'selfServiceAnswerGenerationAIPromptId': 'string',
                        'selfServiceAIGuardrailId': 'string',
                        'associationConfigurations': [
                            {
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE',
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ]
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                }
                            },
                        ]
                    },
                    'emailResponseAIAgentConfiguration': {
                        'emailResponseAIPromptId': 'string',
                        'emailQueryReformulationAIPromptId': 'string',
                        'locale': 'string',
                        'associationConfigurations': [
                            {
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE',
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ]
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                }
                            },
                        ]
                    },
                    'emailOverviewAIAgentConfiguration': {
                        'emailOverviewAIPromptId': 'string',
                        'locale': 'string'
                    },
                    'emailGenerativeAnswerAIAgentConfiguration': {
                        'emailGenerativeAnswerAIPromptId': 'string',
                        'emailQueryReformulationAIPromptId': 'string',
                        'locale': 'string',
                        'associationConfigurations': [
                            {
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE',
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ]
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                }
                            },
                        ]
                    }
                },
                'origin': 'SYSTEM'|'CUSTOMER',
                'description': 'string',
                'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
                'tags': {
                    'string': 'string'
                }
            },
            'versionNumber': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiAgentVersionSummaries (list) --

      The summaries of AI Agent versions.

      • (dict) --

        The summary of the AI Agent version.

        • aiAgentSummary (dict) --

          The data for the summary of the AI Agent version.

          • name (string) --

            The name of the AI Agent.

          • assistantId (string) --

            The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

          • assistantArn (string) --

            The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

          • aiAgentId (string) --

            The identifier of the AI Agent.

          • type (string) --

            The type of the AI Agent.

          • aiAgentArn (string) --

            The Amazon Resource Name (ARN) of the AI agent.

          • modifiedTime (datetime) --

            The time the AI Agent was last modified.

          • visibilityStatus (string) --

            The visibility status of the AI Agent.

          • configuration (dict) --

            The configuration for the AI Agent.

            • manualSearchAIAgentConfiguration (dict) --

              The configuration for AI Agents of type MANUAL_SEARCH.

              • answerGenerationAIPromptId (string) --

                The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

              • answerGenerationAIGuardrailId (string) --

                The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

              • associationConfigurations (list) --

                The association configurations for overriding behavior on this AI Agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • locale (string) --

                The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

            • answerRecommendationAIAgentConfiguration (dict) --

              The configuration for AI Agents of type ANSWER_RECOMMENDATION.

              • intentLabelingGenerationAIPromptId (string) --

                The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

              • queryReformulationAIPromptId (string) --

                The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

              • answerGenerationAIPromptId (string) --

                The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

              • answerGenerationAIGuardrailId (string) --

                The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

              • associationConfigurations (list) --

                The association configurations for overriding behavior on this AI Agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • locale (string) --

                The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

            • selfServiceAIAgentConfiguration (dict) --

              The configuration for AI Agents of type SELF_SERVICE.

              • selfServicePreProcessingAIPromptId (string) --

                The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

              • selfServiceAnswerGenerationAIPromptId (string) --

                The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

              • selfServiceAIGuardrailId (string) --

                The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

              • associationConfigurations (list) --

                The association configurations for overriding behavior on this AI Agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

            • emailResponseAIAgentConfiguration (dict) --

              Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

              • emailResponseAIPromptId (string) --

                The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

              • emailQueryReformulationAIPromptId (string) --

                The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

              • locale (string) --

                The locale setting for language-specific email response generation (for example, en_US, es_ES).

              • associationConfigurations (list) --

                Configuration settings for knowledge base associations used by the email response agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

            • emailOverviewAIAgentConfiguration (dict) --

              Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

              • emailOverviewAIPromptId (string) --

                The ID of the System AI prompt used for generating structured email conversation summaries.

              • locale (string) --

                The locale setting for language-specific email overview processing (for example, en_US, es_ES).

            • emailGenerativeAnswerAIAgentConfiguration (dict) --

              Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

              • emailGenerativeAnswerAIPromptId (string) --

                The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

              • emailQueryReformulationAIPromptId (string) --

                The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

              • locale (string) --

                The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

              • associationConfigurations (list) --

                Configuration settings for knowledge base associations used by the email generative answer agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • origin (string) --

            The origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

          • description (string) --

            The description of the AI Agent.

          • status (string) --

            The status of the AI Agent.

          • tags (dict) --

            The tags used to organize, track, or control access for this resource.

            • (string) --

              • (string) --

        • versionNumber (integer) --

          The version number for this AI Agent version.

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

ListAIAgents (updated) Link ¶
Changes (response)
{'aiAgentSummaries': {'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                            'value': 'string'}],
                                                                                                                                                                                                                         'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                              'value': 'string'}],
                                                                                                                                                                                                                                           'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                            'value': 'string'}}],
                                                                                                                                                                                                                         'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                          'value': 'string'}},
                                                                                                                                                                                                    'maxResults': 'integer',
                                                                                                                                                                                                    'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                                       '| '
                                                                                                                                                                                                                                       'SEMANTIC'}},
                                                                                                                     'associationId': 'string',
                                                                                                                     'associationType': 'KNOWLEDGE_BASE'}],
                                                                                      'emailGenerativeAnswerAIPromptId': 'string',
                                                                                      'emailQueryReformulationAIPromptId': 'string',
                                                                                      'locale': 'string'},
                                        'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                                              'locale': 'string'},
                                        'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                    'value': 'string'}],
                                                                                                                                                                                                                 'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                      'value': 'string'}],
                                                                                                                                                                                                                                   'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                    'value': 'string'}}],
                                                                                                                                                                                                                 'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                  'value': 'string'}},
                                                                                                                                                                                            'maxResults': 'integer',
                                                                                                                                                                                            'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                               '| '
                                                                                                                                                                                                                               'SEMANTIC'}},
                                                                                                             'associationId': 'string',
                                                                                                             'associationType': 'KNOWLEDGE_BASE'}],
                                                                              'emailQueryReformulationAIPromptId': 'string',
                                                                              'emailResponseAIPromptId': 'string',
                                                                              'locale': 'string'}},
                      'type': {'EMAIL_GENERATIVE_ANSWER',
                               'EMAIL_OVERVIEW',
                               'EMAIL_RESPONSE'}}}

Lists AI Agents.

See also: AWS API Documentation

Request Syntax

client.list_ai_agents(
    assistantId='string',
    nextToken='string',
    maxResults=123,
    origin='SYSTEM'|'CUSTOMER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type origin:

string

param origin:

The origin of the AI Agents to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiAgentSummaries': [
        {
            'name': 'string',
            'assistantId': 'string',
            'assistantArn': 'string',
            'aiAgentId': 'string',
            'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
            'aiAgentArn': 'string',
            'modifiedTime': datetime(2015, 1, 1),
            'visibilityStatus': 'SAVED'|'PUBLISHED',
            'configuration': {
                'manualSearchAIAgentConfiguration': {
                    'answerGenerationAIPromptId': 'string',
                    'answerGenerationAIGuardrailId': 'string',
                    'associationConfigurations': [
                        {
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE',
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ]
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            }
                        },
                    ],
                    'locale': 'string'
                },
                'answerRecommendationAIAgentConfiguration': {
                    'intentLabelingGenerationAIPromptId': 'string',
                    'queryReformulationAIPromptId': 'string',
                    'answerGenerationAIPromptId': 'string',
                    'answerGenerationAIGuardrailId': 'string',
                    'associationConfigurations': [
                        {
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE',
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ]
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            }
                        },
                    ],
                    'locale': 'string'
                },
                'selfServiceAIAgentConfiguration': {
                    'selfServicePreProcessingAIPromptId': 'string',
                    'selfServiceAnswerGenerationAIPromptId': 'string',
                    'selfServiceAIGuardrailId': 'string',
                    'associationConfigurations': [
                        {
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE',
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ]
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            }
                        },
                    ]
                },
                'emailResponseAIAgentConfiguration': {
                    'emailResponseAIPromptId': 'string',
                    'emailQueryReformulationAIPromptId': 'string',
                    'locale': 'string',
                    'associationConfigurations': [
                        {
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE',
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ]
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            }
                        },
                    ]
                },
                'emailOverviewAIAgentConfiguration': {
                    'emailOverviewAIPromptId': 'string',
                    'locale': 'string'
                },
                'emailGenerativeAnswerAIAgentConfiguration': {
                    'emailGenerativeAnswerAIPromptId': 'string',
                    'emailQueryReformulationAIPromptId': 'string',
                    'locale': 'string',
                    'associationConfigurations': [
                        {
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE',
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ]
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            }
                        },
                    ]
                }
            },
            'origin': 'SYSTEM'|'CUSTOMER',
            'description': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiAgentSummaries (list) --

      The summaries of AI Agents.

      • (dict) --

        The summary of the AI Agent.

        • name (string) --

          The name of the AI Agent.

        • assistantId (string) --

          The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

        • assistantArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

        • aiAgentId (string) --

          The identifier of the AI Agent.

        • type (string) --

          The type of the AI Agent.

        • aiAgentArn (string) --

          The Amazon Resource Name (ARN) of the AI agent.

        • modifiedTime (datetime) --

          The time the AI Agent was last modified.

        • visibilityStatus (string) --

          The visibility status of the AI Agent.

        • configuration (dict) --

          The configuration for the AI Agent.

          • manualSearchAIAgentConfiguration (dict) --

            The configuration for AI Agents of type MANUAL_SEARCH.

            • answerGenerationAIPromptId (string) --

              The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

            • answerGenerationAIGuardrailId (string) --

              The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

            • associationConfigurations (list) --

              The association configurations for overriding behavior on this AI Agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

            • locale (string) --

              The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

          • answerRecommendationAIAgentConfiguration (dict) --

            The configuration for AI Agents of type ANSWER_RECOMMENDATION.

            • intentLabelingGenerationAIPromptId (string) --

              The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

            • queryReformulationAIPromptId (string) --

              The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

            • answerGenerationAIPromptId (string) --

              The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

            • answerGenerationAIGuardrailId (string) --

              The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

            • associationConfigurations (list) --

              The association configurations for overriding behavior on this AI Agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

            • locale (string) --

              The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

          • selfServiceAIAgentConfiguration (dict) --

            The configuration for AI Agents of type SELF_SERVICE.

            • selfServicePreProcessingAIPromptId (string) --

              The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

            • selfServiceAnswerGenerationAIPromptId (string) --

              The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

            • selfServiceAIGuardrailId (string) --

              The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

            • associationConfigurations (list) --

              The association configurations for overriding behavior on this AI Agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • emailResponseAIAgentConfiguration (dict) --

            Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

            • emailResponseAIPromptId (string) --

              The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

            • emailQueryReformulationAIPromptId (string) --

              The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

            • locale (string) --

              The locale setting for language-specific email response generation (for example, en_US, es_ES).

            • associationConfigurations (list) --

              Configuration settings for knowledge base associations used by the email response agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • emailOverviewAIAgentConfiguration (dict) --

            Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

            • emailOverviewAIPromptId (string) --

              The ID of the System AI prompt used for generating structured email conversation summaries.

            • locale (string) --

              The locale setting for language-specific email overview processing (for example, en_US, es_ES).

          • emailGenerativeAnswerAIAgentConfiguration (dict) --

            Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

            • emailGenerativeAnswerAIPromptId (string) --

              The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

            • emailQueryReformulationAIPromptId (string) --

              The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

            • locale (string) --

              The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

            • associationConfigurations (list) --

              Configuration settings for knowledge base associations used by the email generative answer agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • origin (string) --

          The origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

        • description (string) --

          The description of the AI Agent.

        • status (string) --

          The status of the AI Agent.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

ListAIPromptVersions (updated) Link ¶
Changes (response)
{'aiPromptVersionSummaries': {'aiPromptSummary': {'type': {'EMAIL_GENERATIVE_ANSWER',
                                                           'EMAIL_OVERVIEW',
                                                           'EMAIL_QUERY_REFORMULATION',
                                                           'EMAIL_RESPONSE'}}}}

Lists AI Prompt versions.

See also: AWS API Documentation

Request Syntax

client.list_ai_prompt_versions(
    assistantId='string',
    aiPromptId='string',
    nextToken='string',
    maxResults=123,
    origin='SYSTEM'|'CUSTOMER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI prompt for which versions are to be listed.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type origin:

string

param origin:

The origin of the AI Prompt versions to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiPromptVersionSummaries': [
        {
            'aiPromptSummary': {
                'name': 'string',
                'assistantId': 'string',
                'assistantArn': 'string',
                'aiPromptId': 'string',
                'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
                'aiPromptArn': 'string',
                'modifiedTime': datetime(2015, 1, 1),
                'templateType': 'TEXT',
                'modelId': 'string',
                'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
                'visibilityStatus': 'SAVED'|'PUBLISHED',
                'origin': 'SYSTEM'|'CUSTOMER',
                'description': 'string',
                'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
                'tags': {
                    'string': 'string'
                }
            },
            'versionNumber': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiPromptVersionSummaries (list) --

      The summaries of the AI Prompt versions.

      • (dict) --

        The summary of the AI Prompt version.

        • aiPromptSummary (dict) --

          The date for the summary of the AI Prompt version.

          • name (string) --

            The name of the AI Prompt.

          • assistantId (string) --

            The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

          • assistantArn (string) --

            The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

          • aiPromptId (string) --

            The identifier of the Amazon Q in Connect AI prompt.

          • type (string) --

            The type of this AI Prompt.

          • aiPromptArn (string) --

            The Amazon Resource Name (ARN) of the AI Prompt.

          • modifiedTime (datetime) --

            The time the AI Prompt was last modified.

          • templateType (string) --

            The type of the prompt template for this AI Prompt.

          • modelId (string) --

            The identifier of the model used for this AI Prompt. Model Ids supported are: anthropic.claude-3-haiku-20240307-v1:0.

          • apiFormat (string) --

            The API format used for this AI Prompt.

          • visibilityStatus (string) --

            The visibility status of the AI Prompt.

          • origin (string) --

            The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

          • description (string) --

            The description of the AI Prompt.

          • status (string) --

            The status of the AI Prompt.

          • tags (dict) --

            The tags used to organize, track, or control access for this resource.

            • (string) --

              • (string) --

        • versionNumber (integer) --

          The version number for this AI Prompt version.

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

ListAIPrompts (updated) Link ¶
Changes (response)
{'aiPromptSummaries': {'type': {'EMAIL_GENERATIVE_ANSWER',
                                'EMAIL_OVERVIEW',
                                'EMAIL_QUERY_REFORMULATION',
                                'EMAIL_RESPONSE'}}}

Lists the AI Prompts available on the Amazon Q in Connect assistant.

See also: AWS API Documentation

Request Syntax

client.list_ai_prompts(
    assistantId='string',
    nextToken='string',
    maxResults=123,
    origin='SYSTEM'|'CUSTOMER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type origin:

string

param origin:

The origin of the AI Prompts to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiPromptSummaries': [
        {
            'name': 'string',
            'assistantId': 'string',
            'assistantArn': 'string',
            'aiPromptId': 'string',
            'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
            'aiPromptArn': 'string',
            'modifiedTime': datetime(2015, 1, 1),
            'templateType': 'TEXT',
            'modelId': 'string',
            'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
            'visibilityStatus': 'SAVED'|'PUBLISHED',
            'origin': 'SYSTEM'|'CUSTOMER',
            'description': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiPromptSummaries (list) --

      The summaries of the AI Prompts.

      • (dict) --

        The summary of the AI Prompt.

        • name (string) --

          The name of the AI Prompt.

        • assistantId (string) --

          The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

        • assistantArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

        • aiPromptId (string) --

          The identifier of the Amazon Q in Connect AI prompt.

        • type (string) --

          The type of this AI Prompt.

        • aiPromptArn (string) --

          The Amazon Resource Name (ARN) of the AI Prompt.

        • modifiedTime (datetime) --

          The time the AI Prompt was last modified.

        • templateType (string) --

          The type of the prompt template for this AI Prompt.

        • modelId (string) --

          The identifier of the model used for this AI Prompt. Model Ids supported are: anthropic.claude-3-haiku-20240307-v1:0.

        • apiFormat (string) --

          The API format used for this AI Prompt.

        • visibilityStatus (string) --

          The visibility status of the AI Prompt.

        • origin (string) --

          The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

        • description (string) --

          The description of the AI Prompt.

        • status (string) --

          The status of the AI Prompt.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

QueryAssistant (updated) Link ¶
Changes (response)
{'results': {'data': {'details': {'emailGenerativeAnswerChunkData': {'completion': 'string',
                                                                     'nextChunkToken': 'string',
                                                                     'references': [{'details': {'contentData': {'rankingData': {'relevanceLevel': 'HIGH '
                                                                                                                                                   '| '
                                                                                                                                                   'MEDIUM '
                                                                                                                                                   '| '
                                                                                                                                                   'LOW',
                                                                                                                                 'relevanceScore': 'double'},
                                                                                                                 'textData': {'excerpt': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                          'endOffsetExclusive': 'integer'}],
                                                                                                                                          'text': 'string'},
                                                                                                                              'title': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                        'endOffsetExclusive': 'integer'}],
                                                                                                                                        'text': 'string'}}},
                                                                                                 'emailGenerativeAnswerChunkData': (),
                                                                                                 'emailOverviewChunkData': {'completion': 'string',
                                                                                                                            'nextChunkToken': 'string'},
                                                                                                 'emailResponseChunkData': {'completion': 'string',
                                                                                                                            'nextChunkToken': 'string'},
                                                                                                 'generativeChunkData': {'completion': 'string',
                                                                                                                         'nextChunkToken': 'string',
                                                                                                                         'references': ()},
                                                                                                 'generativeData': {'completion': 'string',
                                                                                                                    'rankingData': {'relevanceLevel': 'HIGH '
                                                                                                                                                      '| '
                                                                                                                                                      'MEDIUM '
                                                                                                                                                      '| '
                                                                                                                                                      'LOW',
                                                                                                                                    'relevanceScore': 'double'},
                                                                                                                    'references': ()},
                                                                                                 'intentDetectedData': {'intent': 'string',
                                                                                                                        'intentId': 'string'},
                                                                                                 'sourceContentData': {'citationSpan': {'beginOffsetInclusive': 'integer',
                                                                                                                                        'endOffsetExclusive': 'integer'},
                                                                                                                       'id': 'string',
                                                                                                                       'rankingData': {'relevanceLevel': 'HIGH '
                                                                                                                                                         '| '
                                                                                                                                                         'MEDIUM '
                                                                                                                                                         '| '
                                                                                                                                                         'LOW',
                                                                                                                                       'relevanceScore': 'double'},
                                                                                                                       'textData': {'excerpt': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                                'endOffsetExclusive': 'integer'}],
                                                                                                                                                'text': 'string'},
                                                                                                                                    'title': {'highlights': [{'beginOffsetInclusive': 'integer',
                                                                                                                                                              'endOffsetExclusive': 'integer'}],
                                                                                                                                              'text': 'string'}},
                                                                                                                       'type': 'KNOWLEDGE_CONTENT'}},
                                                                                     'reference': {'contentReference': {'contentArn': 'string',
                                                                                                                        'contentId': 'string',
                                                                                                                        'knowledgeBaseArn': 'string',
                                                                                                                        'knowledgeBaseId': 'string',
                                                                                                                        'referenceType': 'WEB_CRAWLER '
                                                                                                                                         '| '
                                                                                                                                         'KNOWLEDGE_BASE',
                                                                                                                        'sourceURL': 'string'},
                                                                                                   'generativeReference': {'generationId': 'string',
                                                                                                                           'modelId': 'string'}}}]},
                                  'emailOverviewChunkData': {'completion': 'string',
                                                             'nextChunkToken': 'string'},
                                  'emailResponseChunkData': {'completion': 'string',
                                                             'nextChunkToken': 'string'}}},
             'type': {'EMAIL_GENERATIVE_ANSWER_CHUNK',
                      'EMAIL_OVERVIEW_CHUNK',
                      'EMAIL_RESPONSE_CHUNK'}}}

Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use GetRecommendations.

See also: AWS API Documentation

Request Syntax

client.query_assistant(
    assistantId='string',
    queryText='string',
    nextToken='string',
    maxResults=123,
    sessionId='string',
    queryCondition=[
        {
            'single': {
                'field': 'RESULT_TYPE',
                'comparator': 'EQUALS',
                'value': 'string'
            }
        },
    ],
    queryInputData={
        'queryTextInputData': {
            'text': 'string'
        },
        'intentInputData': {
            'intentId': 'string'
        }
    },
    overrideKnowledgeBaseSearchType='HYBRID'|'SEMANTIC'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type queryText:

string

param queryText:

The text to search for.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type sessionId:

string

param sessionId:

The identifier of the Amazon Q in Connect session. Can be either the ID or the ARN. URLs cannot contain the ARN.

type queryCondition:

list

param queryCondition:

Information about how to query content.

  • (dict) --

    Information about how to query content.

    • single (dict) --

      The condition for the query.

      • field (string) -- [REQUIRED]

        The name of the field for query condition to query on.

      • comparator (string) -- [REQUIRED]

        The comparison operator for query condition to query on.

      • value (string) -- [REQUIRED]

        The value for the query condition to query on.

type queryInputData:

dict

param queryInputData:

Information about the query.

  • queryTextInputData (dict) --

    Input information for the query.

    • text (string) -- [REQUIRED]

      The text to search for.

  • intentInputData (dict) --

    Input information for the intent.

    • intentId (string) -- [REQUIRED]

      The identifier of the Amazon Q intent.

type overrideKnowledgeBaseSearchType:

string

param overrideKnowledgeBaseSearchType:

The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text.

rtype:

dict

returns:

Response Syntax

{
    'results': [
        {
            'resultId': 'string',
            'document': {
                'contentReference': {
                    'knowledgeBaseArn': 'string',
                    'knowledgeBaseId': 'string',
                    'contentArn': 'string',
                    'contentId': 'string',
                    'sourceURL': 'string',
                    'referenceType': 'WEB_CRAWLER'|'KNOWLEDGE_BASE'
                },
                'title': {
                    'text': 'string',
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ]
                },
                'excerpt': {
                    'text': 'string',
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ]
                }
            },
            'relevanceScore': 123.0,
            'data': {
                'reference': {
                    'contentReference': {
                        'knowledgeBaseArn': 'string',
                        'knowledgeBaseId': 'string',
                        'contentArn': 'string',
                        'contentId': 'string',
                        'sourceURL': 'string',
                        'referenceType': 'WEB_CRAWLER'|'KNOWLEDGE_BASE'
                    },
                    'generativeReference': {
                        'modelId': 'string',
                        'generationId': 'string'
                    }
                },
                'details': {
                    'contentData': {
                        'textData': {
                            'title': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            },
                            'excerpt': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            }
                        },
                        'rankingData': {
                            'relevanceScore': 123.0,
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW'
                        }
                    },
                    'generativeData': {
                        'completion': 'string',
                        'references': [
                            {'... recursive ...'},
                        ],
                        'rankingData': {
                            'relevanceScore': 123.0,
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW'
                        }
                    },
                    'intentDetectedData': {
                        'intent': 'string',
                        'intentId': 'string'
                    },
                    'sourceContentData': {
                        'id': 'string',
                        'type': 'KNOWLEDGE_CONTENT',
                        'textData': {
                            'title': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            },
                            'excerpt': {
                                'text': 'string',
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ]
                            }
                        },
                        'rankingData': {
                            'relevanceScore': 123.0,
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW'
                        },
                        'citationSpan': {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        }
                    },
                    'generativeChunkData': {
                        'completion': 'string',
                        'references': [
                            {'... recursive ...'},
                        ],
                        'nextChunkToken': 'string'
                    },
                    'emailResponseChunkData': {
                        'completion': 'string',
                        'nextChunkToken': 'string'
                    },
                    'emailOverviewChunkData': {
                        'completion': 'string',
                        'nextChunkToken': 'string'
                    },
                    'emailGenerativeAnswerChunkData': {
                        'completion': 'string',
                        'references': [
                            {'... recursive ...'},
                        ],
                        'nextChunkToken': 'string'
                    }
                }
            },
            'type': 'KNOWLEDGE_CONTENT'|'INTENT_ANSWER'|'GENERATIVE_ANSWER'|'GENERATIVE_ANSWER_CHUNK'|'BLOCKED_GENERATIVE_ANSWER_CHUNK'|'INTENT_ANSWER_CHUNK'|'BLOCKED_INTENT_ANSWER_CHUNK'|'EMAIL_RESPONSE_CHUNK'|'EMAIL_OVERVIEW_CHUNK'|'EMAIL_GENERATIVE_ANSWER_CHUNK'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • results (list) --

      The results of the query.

      • (dict) --

        Information about the result.

        • resultId (string) --

          The identifier of the result data.

        • document (dict) --

          The document.

          • contentReference (dict) --

            A reference to the content resource.

            • knowledgeBaseArn (string) --

              The Amazon Resource Name (ARN) of the knowledge base.

            • knowledgeBaseId (string) --

              The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base.

            • contentArn (string) --

              The Amazon Resource Name (ARN) of the content.

            • contentId (string) --

              The identifier of the content.

            • sourceURL (string) --

              The web URL of the source content.

            • referenceType (string) --

              The type of reference content.

          • title (dict) --

            The title of the document.

            • text (string) --

              Text in the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

          • excerpt (dict) --

            The excerpt from the document.

            • text (string) --

              Text in the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

        • relevanceScore (float) --

          The relevance score of the results.

        • data (dict) --

          Summary of the recommended content.

          • reference (dict) --

            Reference information about the content.

            • contentReference (dict) --

              Reference information about the content.

              • knowledgeBaseArn (string) --

                The Amazon Resource Name (ARN) of the knowledge base.

              • knowledgeBaseId (string) --

                The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base.

              • contentArn (string) --

                The Amazon Resource Name (ARN) of the content.

              • contentId (string) --

                The identifier of the content.

              • sourceURL (string) --

                The web URL of the source content.

              • referenceType (string) --

                The type of reference content.

            • generativeReference (dict) --

              Reference information about the generative content.

              • modelId (string) --

                The identifier of the LLM model.

              • generationId (string) --

                The identifier of the LLM model.

          • details (dict) --

            Details about the data.

            • contentData (dict) --

              Details about the content data.

              • textData (dict) --

                Details about the content text data.

                • title (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                • excerpt (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

              • rankingData (dict) --

                Details about the content ranking data.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

                • relevanceLevel (string) --

                  The relevance score of the content.

            • generativeData (dict) --

              Details about the generative data.

              • completion (string) --

                The LLM response.

              • references (list) --

                The references used to generative the LLM response.

                • (dict) --

                  Summary of the data.

              • rankingData (dict) --

                Details about the generative content ranking data.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

                • relevanceLevel (string) --

                  The relevance score of the content.

            • intentDetectedData (dict) --

              Details about the intent data.

              • intent (string) --

                The detected intent.

              • intentId (string) --

                The identifier of the detected intent.

            • sourceContentData (dict) --

              Details about the content data.

              • id (string) --

                The identifier of the source content.

              • type (string) --

                The type of the source content.

              • textData (dict) --

                Details about the source content text data.

                • title (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                • excerpt (dict) --

                  The text of the document.

                  • text (string) --

                    Text in the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

              • rankingData (dict) --

                Details about the source content ranking data.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

                • relevanceLevel (string) --

                  The relevance score of the content.

              • citationSpan (dict) --

                Contains information about where the text with a citation begins and ends in the generated output.

                • beginOffsetInclusive (integer) --

                  Where the text with a citation starts in the generated output.

                • endOffsetExclusive (integer) --

                  Where the text with a citation ends in the generated output.

            • generativeChunkData (dict) --

              Details about the generative chunk data.

              • completion (string) --

                A chunk of the LLM response.

              • references (list) --

                The references used to generate the LLM response.

                • (dict) --

                  Summary of the data.

              • nextChunkToken (string) --

                The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.

            • emailResponseChunkData (dict) --

              Streaming chunk data for email response generation containing partial response content.

              • completion (string) --

                The partial or complete professional email response text with appropriate greetings and closings.

              • nextChunkToken (string) --

                Token for retrieving the next chunk of streaming response data, if available.

            • emailOverviewChunkData (dict) --

              Streaming chunk data for email overview containing partial overview content.

              • completion (string) --

                The partial or complete overview text content in structured HTML format with customer issues, resolutions, and next steps.

              • nextChunkToken (string) --

                Token for retrieving the next chunk of streaming overview data, if available.

            • emailGenerativeAnswerChunkData (dict) --

              Streaming chunk data for email generative answers containing partial knowledge-based response content.

              • completion (string) --

                The partial or complete text content of the generative answer response.

              • references (list) --

                Source references and citations from knowledge base articles used to generate the answer.

                • (dict) --

                  Summary of the data.

              • nextChunkToken (string) --

                Token for retrieving the next chunk of streaming response data, if available.

        • type (string) --

          The type of the query result.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

RemoveAssistantAIAgent (updated) Link ¶
Changes (request)
{'aiAgentType': {'EMAIL_GENERATIVE_ANSWER', 'EMAIL_OVERVIEW', 'EMAIL_RESPONSE'}}

Removes the AI Agent that is set for use by default on an Amazon Q in Connect Assistant.

See also: AWS API Documentation

Request Syntax

client.remove_assistant_ai_agent(
    assistantId='string',
    aiAgentType='MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiAgentType:

string

param aiAgentType:

[REQUIRED]

The type of the AI Agent being removed for use by default from the Amazon Q in Connect Assistant.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdateAIAgent (updated) Link ¶
Changes (request, response)
Request
{'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                       'value': 'string'}],
                                                                                                                                                                                                    'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                         'value': 'string'}],
                                                                                                                                                                                                                      'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                       'value': 'string'}}],
                                                                                                                                                                                                    'tagCondition': {'key': 'string',
                                                                                                                                                                                                                     'value': 'string'}},
                                                                                                                                                                               'maxResults': 'integer',
                                                                                                                                                                               'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                  '| '
                                                                                                                                                                                                                  'SEMANTIC'}},
                                                                                                'associationId': 'string',
                                                                                                'associationType': 'KNOWLEDGE_BASE'}],
                                                                 'emailGenerativeAnswerAIPromptId': 'string',
                                                                 'emailQueryReformulationAIPromptId': 'string',
                                                                 'locale': 'string'},
                   'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                         'locale': 'string'},
                   'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                               'value': 'string'}],
                                                                                                                                                                                            'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                 'value': 'string'}],
                                                                                                                                                                                                              'tagCondition': {'key': 'string',
                                                                                                                                                                                                                               'value': 'string'}}],
                                                                                                                                                                                            'tagCondition': {'key': 'string',
                                                                                                                                                                                                             'value': 'string'}},
                                                                                                                                                                       'maxResults': 'integer',
                                                                                                                                                                       'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                          '| '
                                                                                                                                                                                                          'SEMANTIC'}},
                                                                                        'associationId': 'string',
                                                                                        'associationType': 'KNOWLEDGE_BASE'}],
                                                         'emailQueryReformulationAIPromptId': 'string',
                                                         'emailResponseAIPromptId': 'string',
                                                         'locale': 'string'}}}
Response
{'aiAgent': {'configuration': {'emailGenerativeAnswerAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                   'value': 'string'}],
                                                                                                                                                                                                                'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                     'value': 'string'}],
                                                                                                                                                                                                                                  'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                   'value': 'string'}}],
                                                                                                                                                                                                                'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                 'value': 'string'}},
                                                                                                                                                                                           'maxResults': 'integer',
                                                                                                                                                                                           'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                              '| '
                                                                                                                                                                                                                              'SEMANTIC'}},
                                                                                                            'associationId': 'string',
                                                                                                            'associationType': 'KNOWLEDGE_BASE'}],
                                                                             'emailGenerativeAnswerAIPromptId': 'string',
                                                                             'emailQueryReformulationAIPromptId': 'string',
                                                                             'locale': 'string'},
                               'emailOverviewAIAgentConfiguration': {'emailOverviewAIPromptId': 'string',
                                                                     'locale': 'string'},
                               'emailResponseAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                        'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                             'value': 'string'}],
                                                                                                                                                                                                                          'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}}],
                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}},
                                                                                                                                                                                   'maxResults': 'integer',
                                                                                                                                                                                   'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                      '| '
                                                                                                                                                                                                                      'SEMANTIC'}},
                                                                                                    'associationId': 'string',
                                                                                                    'associationType': 'KNOWLEDGE_BASE'}],
                                                                     'emailQueryReformulationAIPromptId': 'string',
                                                                     'emailResponseAIPromptId': 'string',
                                                                     'locale': 'string'}},
             'type': {'EMAIL_GENERATIVE_ANSWER',
                      'EMAIL_OVERVIEW',
                      'EMAIL_RESPONSE'}}}

Updates an AI Agent.

See also: AWS API Documentation

Request Syntax

client.update_ai_agent(
    clientToken='string',
    assistantId='string',
    aiAgentId='string',
    visibilityStatus='SAVED'|'PUBLISHED',
    configuration={
        'manualSearchAIAgentConfiguration': {
            'answerGenerationAIPromptId': 'string',
            'answerGenerationAIGuardrailId': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ],
            'locale': 'string'
        },
        'answerRecommendationAIAgentConfiguration': {
            'intentLabelingGenerationAIPromptId': 'string',
            'queryReformulationAIPromptId': 'string',
            'answerGenerationAIPromptId': 'string',
            'answerGenerationAIGuardrailId': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ],
            'locale': 'string'
        },
        'selfServiceAIAgentConfiguration': {
            'selfServicePreProcessingAIPromptId': 'string',
            'selfServiceAnswerGenerationAIPromptId': 'string',
            'selfServiceAIGuardrailId': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ]
        },
        'emailResponseAIAgentConfiguration': {
            'emailResponseAIPromptId': 'string',
            'emailQueryReformulationAIPromptId': 'string',
            'locale': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ]
        },
        'emailOverviewAIAgentConfiguration': {
            'emailOverviewAIPromptId': 'string',
            'locale': 'string'
        },
        'emailGenerativeAnswerAIAgentConfiguration': {
            'emailGenerativeAnswerAIPromptId': 'string',
            'emailQueryReformulationAIPromptId': 'string',
            'locale': 'string',
            'associationConfigurations': [
                {
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE',
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                },
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ]
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    }
                },
            ]
        }
    },
    description='string'
)
type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..

This field is autopopulated if not provided.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visbility status of the Amazon Q in Connect AI Agent.

type configuration:

dict

param configuration:

The configuration of the Amazon Q in Connect AI Agent.

  • manualSearchAIAgentConfiguration (dict) --

    The configuration for AI Agents of type MANUAL_SEARCH.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

    • locale (string) --

      The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

  • answerRecommendationAIAgentConfiguration (dict) --

    The configuration for AI Agents of type ANSWER_RECOMMENDATION.

    • intentLabelingGenerationAIPromptId (string) --

      The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • queryReformulationAIPromptId (string) --

      The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

    • locale (string) --

      The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

  • selfServiceAIAgentConfiguration (dict) --

    The configuration for AI Agents of type SELF_SERVICE.

    • selfServicePreProcessingAIPromptId (string) --

      The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

    • selfServiceAnswerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

    • selfServiceAIGuardrailId (string) --

      The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

  • emailResponseAIAgentConfiguration (dict) --

    Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

    • emailResponseAIPromptId (string) --

      The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

    • emailQueryReformulationAIPromptId (string) --

      The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

    • locale (string) --

      The locale setting for language-specific email response generation (for example, en_US, es_ES).

    • associationConfigurations (list) --

      Configuration settings for knowledge base associations used by the email response agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

  • emailOverviewAIAgentConfiguration (dict) --

    Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

    • emailOverviewAIPromptId (string) --

      The ID of the System AI prompt used for generating structured email conversation summaries.

    • locale (string) --

      The locale setting for language-specific email overview processing (for example, en_US, es_ES).

  • emailGenerativeAnswerAIAgentConfiguration (dict) --

    Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

    • emailGenerativeAnswerAIPromptId (string) --

      The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

    • emailQueryReformulationAIPromptId (string) --

      The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

    • locale (string) --

      The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

    • associationConfigurations (list) --

      Configuration settings for knowledge base associations used by the email generative answer agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

type description:

string

param description:

The description of the Amazon Q in Connect AI Agent.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiAgentId': 'string',
        'aiAgentArn': 'string',
        'name': 'string',
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
        'configuration': {
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'answerRecommendationAIAgentConfiguration': {
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string',
                'answerGenerationAIPromptId': 'string',
                'answerGenerationAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ],
                'locale': 'string'
            },
            'selfServiceAIAgentConfiguration': {
                'selfServicePreProcessingAIPromptId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServiceAIGuardrailId': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailResponseAIAgentConfiguration': {
                'emailResponseAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            },
            'emailOverviewAIAgentConfiguration': {
                'emailOverviewAIPromptId': 'string',
                'locale': 'string'
            },
            'emailGenerativeAnswerAIAgentConfiguration': {
                'emailGenerativeAnswerAIPromptId': 'string',
                'emailQueryReformulationAIPromptId': 'string',
                'locale': 'string',
                'associationConfigurations': [
                    {
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE',
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        }
                    },
                ]
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    }
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the updated Amazon Q in Connect AI Agent.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • name (string) --

        The name of the AI Agent.

      • type (string) --

        The type of the AI Agent.

      • configuration (dict) --

        Configuration for the AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

          • locale (string) --

            The locale to which specifies the language and region settings that determine the response language for QueryAssistant.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailResponseAIAgentConfiguration (dict) --

          Configuration for the EMAIL_RESPONSE AI agent that generates professional email responses using knowledge base content.

          • emailResponseAIPromptId (string) --

            The ID of the System AI prompt used for generating professional email responses based on knowledge base content.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation.

          • locale (string) --

            The locale setting for language-specific email response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email response agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • emailOverviewAIAgentConfiguration (dict) --

          Configuration for the EMAIL_OVERVIEW AI agent that generates structured overview of email conversations.

          • emailOverviewAIPromptId (string) --

            The ID of the System AI prompt used for generating structured email conversation summaries.

          • locale (string) --

            The locale setting for language-specific email overview processing (for example, en_US, es_ES).

        • emailGenerativeAnswerAIAgentConfiguration (dict) --

          Configuration for the EMAIL_GENERATIVE_ANSWER AI agent that provides comprehensive knowledge-based answers for customer queries.

          • emailGenerativeAnswerAIPromptId (string) --

            The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries.

          • emailQueryReformulationAIPromptId (string) --

            The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results.

          • locale (string) --

            The locale setting for language-specific email processing and response generation (for example, en_US, es_ES).

          • associationConfigurations (list) --

            Configuration settings for knowledge base associations used by the email generative answer agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • description (string) --

        The description of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

UpdateAIPrompt (updated) Link ¶
Changes (response)
{'aiPrompt': {'type': {'EMAIL_GENERATIVE_ANSWER',
                       'EMAIL_OVERVIEW',
                       'EMAIL_QUERY_REFORMULATION',
                       'EMAIL_RESPONSE'}}}

Updates an AI Prompt.

See also: AWS API Documentation

Request Syntax

client.update_ai_prompt(
    clientToken='string',
    assistantId='string',
    aiPromptId='string',
    visibilityStatus='SAVED'|'PUBLISHED',
    templateConfiguration={
        'textFullAIPromptEditTemplateConfiguration': {
            'text': 'string'
        }
    },
    description='string',
    modelId='string'
)
type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..

This field is autopopulated if not provided.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Prompt.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the Amazon Q in Connect AI prompt.

type templateConfiguration:

dict

param templateConfiguration:

The configuration of the prompt template for this AI Prompt.

  • textFullAIPromptEditTemplateConfiguration (dict) --

    The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

    • text (string) -- [REQUIRED]

      The YAML text for the AI Prompt template.

type description:

string

param description:

The description of the Amazon Q in Connect AI Prompt.

type modelId:

string

param modelId:

The identifier of the model used for this AI Prompt.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'aiPromptId': 'string',
        'aiPromptArn': 'string',
        'name': 'string',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION',
        'templateType': 'TEXT',
        'modelId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS',
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'modifiedTime': datetime(2015, 1, 1),
        'description': 'string',
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'tags': {
            'string': 'string'
        },
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'
    }
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the updated Amazon Q in Connect AI Prompt.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • name (string) --

        The name of the AI Prompt

      • type (string) --

        The type of this AI Prompt.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. The following model Ids are supported:

        • anthropic.claude-3-haiku--v1:0

        • apac.amazon.nova-lite-v1:0

        • apac.amazon.nova-micro-v1:0

        • apac.amazon.nova-pro-v1:0

        • apac.anthropic.claude-3-5-sonnet--v2:0

        • apac.anthropic.claude-3-haiku-20240307-v1:0

        • eu.amazon.nova-lite-v1:0

        • eu.amazon.nova-micro-v1:0

        • eu.amazon.nova-pro-v1:0

        • eu.anthropic.claude-3-7-sonnet-20250219-v1:0

        • eu.anthropic.claude-3-haiku-20240307-v1:0

        • us.amazon.nova-lite-v1:0

        • us.amazon.nova-micro-v1:0

        • us.amazon.nova-pro-v1:0

        • us.anthropic.claude-3-5-haiku-20241022-v1:0

        • us.anthropic.claude-3-7-sonnet-20250219-v1:0

        • us.anthropic.claude-3-haiku-20240307-v1:0

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • description (string) --

        The description of the AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

UpdateAssistantAIAgent (updated) Link ¶
Changes (request)
{'aiAgentType': {'EMAIL_GENERATIVE_ANSWER', 'EMAIL_OVERVIEW', 'EMAIL_RESPONSE'}}

Updates the AI Agent that is set for use by default on an Amazon Q in Connect Assistant.

See also: AWS API Documentation

Request Syntax

client.update_assistant_ai_agent(
    assistantId='string',
    aiAgentType='MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER',
    configuration={
        'aiAgentId': 'string'
    }
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type aiAgentType:

string

param aiAgentType:

[REQUIRED]

The type of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.

type configuration:

dict

param configuration:

[REQUIRED]

The configuration of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.

  • aiAgentId (string) -- [REQUIRED]

    The ID of the AI Agent to be configured.

rtype:

dict

returns:

Response Syntax

{
    'assistant': {
        'assistantId': 'string',
        'assistantArn': 'string',
        'name': 'string',
        'type': 'AGENT',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'description': 'string',
        'tags': {
            'string': 'string'
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyId': 'string'
        },
        'integrationConfiguration': {
            'topicIntegrationArn': 'string'
        },
        'capabilityConfiguration': {
            'type': 'V1'|'V2'
        },
        'aiAgentConfiguration': {
            'string': {
                'aiAgentId': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • assistant (dict) --

      The assistant data.

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

      • name (string) --

        The name.

      • type (string) --

        The type of assistant.

      • status (string) --

        The status of the assistant.

      • description (string) --

        The description.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • serverSideEncryptionConfiguration (dict) --

        The configuration information for the customer managed key used for encryption.

        This KMS key must have a policy that allows kms:CreateGrant, kms:DescribeKey, kms:Decrypt, and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q in Connect. To use Amazon Q in Connect with chat, the key policy must also allow kms:Decrypt, kms:GenerateDataKey*, and kms:DescribeKey permissions to the connect.amazonaws.com service principal.

        For more information about setting up a customer managed key for Amazon Q in Connect, see Enable Amazon Q in Connect for your instance.

      • integrationConfiguration (dict) --

        The configuration information for the Amazon Q in Connect assistant integration.

        • topicIntegrationArn (string) --

          The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

      • capabilityConfiguration (dict) --

        The configuration information for the Amazon Q in Connect assistant capability.

        • type (string) --

          The type of Amazon Q in Connect assistant capability.

      • aiAgentConfiguration (dict) --

        The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that is set on the Amazon Q in Connect Assistant.

        • (string) --

          • (dict) --

            A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

            • aiAgentId (string) --

              The ID of the AI Agent to be configured.