{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-aiagent-request-schema.json",
  "title": "CreateAIAgentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-aiagents-api-openapi.yml#/components/schemas/CreateAIAgentRequest",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "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.."
    },
    "assistantId": {
      "type": "string",
      "description": "The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN."
    },
    "name": {
      "type": "string",
      "description": "The name of the AI Agent."
    },
    "type": {
      "type": "string",
      "description": "The type of the AI Agent."
    },
    "configuration": {
      "$ref": "#/$defs/AIAgentConfiguration"
    },
    "visibilityStatus": {
      "type": "string",
      "description": "The visibility status of the AI Agent."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    },
    "description": {
      "type": "string",
      "description": "The description of the AI Agent."
    }
  },
  "required": [
    "assistantId",
    "name",
    "type",
    "configuration",
    "visibilityStatus"
  ],
  "$defs": {
    "AIAgentConfiguration": {
      "type": "object",
      "properties": {
        "manualSearchAIAgentConfiguration": {
          "$ref": "#/$defs/ManualSearchAIAgentConfiguration"
        },
        "answerRecommendationAIAgentConfiguration": {
          "$ref": "#/$defs/AnswerRecommendationAIAgentConfiguration"
        },
        "selfServiceAIAgentConfiguration": {
          "$ref": "#/$defs/SelfServiceAIAgentConfiguration"
        },
        "emailResponseAIAgentConfiguration": {
          "$ref": "#/$defs/EmailResponseAIAgentConfiguration"
        },
        "emailOverviewAIAgentConfiguration": {
          "$ref": "#/$defs/EmailOverviewAIAgentConfiguration"
        },
        "emailGenerativeAnswerAIAgentConfiguration": {
          "$ref": "#/$defs/EmailGenerativeAnswerAIAgentConfiguration"
        },
        "orchestrationAIAgentConfiguration": {
          "$ref": "#/$defs/OrchestrationAIAgentConfiguration"
        },
        "noteTakingAIAgentConfiguration": {
          "$ref": "#/$defs/NoteTakingAIAgentConfiguration"
        },
        "caseSummarizationAIAgentConfiguration": {
          "$ref": "#/$defs/CaseSummarizationAIAgentConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "AgentTarget": {
      "type": "object",
      "properties": {
        "aiAgentId": {
          "type": "string",
          "description": "The identifier of an Amazon Connect AI Agent to use as the collaborator agent."
        },
        "applicationId": {
          "type": "string",
          "description": "The identifier of a third-party agent to use as the collaborator agent."
        }
      },
      "description": "Exactly one member is set."
    },
    "Annotation": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the annotation."
        },
        "destructiveHint": {
          "type": "boolean",
          "description": "A hint indicating that the annotation contains potentially destructive content."
        }
      }
    },
    "AnswerRecommendationAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "intentLabelingGenerationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent."
        },
        "queryReformulationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent."
        },
        "answerGenerationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent."
        },
        "answerGenerationAIGuardrailId": {
          "type": "string",
          "description": "The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent."
        },
        "associationConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssociationConfiguration"
          },
          "description": "The association configurations for overriding behavior on this AI Agent."
        },
        "locale": {
          "type": "string",
          "description": "The locale to which specifies the language and region settings that determine the response language for QueryAssistant. For more information on supported locales, see Language support for Amazon Q in Connect."
        },
        "suggestedMessages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The suggested messages configuration for the Answer Recommendation AI Agent."
        }
      }
    },
    "AssociationConfiguration": {
      "type": "object",
      "properties": {
        "associationId": {
          "type": "string",
          "description": "The identifier of the association for this Association Configuration."
        },
        "associationType": {
          "type": "string",
          "description": "The type of the association for this Association Configuration."
        },
        "associationConfigurationData": {
          "$ref": "#/$defs/AssociationConfigurationData"
        }
      }
    },
    "AssociationConfigurationData": {
      "type": "object",
      "properties": {
        "knowledgeBaseAssociationConfigurationData": {
          "$ref": "#/$defs/KnowledgeBaseAssociationConfigurationData"
        }
      },
      "description": "Exactly one member is set."
    },
    "CaseSummarizationAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "caseSummarizationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier used by the Case Summarization AI Agent."
        },
        "caseSummarizationAIGuardrailId": {
          "type": "string",
          "description": "The AI Guardrail identifier used by the Case Summarization AI Agent."
        },
        "locale": {
          "type": "string",
          "description": "The locale setting for the Case Summarization AI Agent."
        }
      }
    },
    "DelegateAgentConfiguration": {
      "type": "object",
      "properties": {
        "agentTarget": {
          "$ref": "#/$defs/AgentTarget"
        },
        "instruction": {
          "$ref": "#/$defs/MultiAgentInstruction"
        }
      },
      "required": [
        "agentTarget"
      ]
    },
    "EmailGenerativeAnswerAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "emailGenerativeAnswerAIPromptId": {
          "type": "string",
          "description": "The ID of the System AI prompt used for generating comprehensive knowledge-based answers from email queries."
        },
        "emailQueryReformulationAIPromptId": {
          "type": "string",
          "description": "The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search results."
        },
        "locale": {
          "type": "string",
          "description": "The locale setting for language-specific email processing and response generation (for example, en_US, es_ES)."
        },
        "associationConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssociationConfiguration"
          },
          "description": "Configuration settings for knowledge base associations used by the email generative answer agent."
        }
      }
    },
    "EmailOverviewAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "emailOverviewAIPromptId": {
          "type": "string",
          "description": "The ID of the System AI prompt used for generating structured email conversation summaries."
        },
        "locale": {
          "type": "string",
          "description": "The locale setting for language-specific email overview processing (for example, en_US, es_ES)."
        }
      }
    },
    "EmailResponseAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "emailResponseAIPromptId": {
          "type": "string",
          "description": "The ID of the System AI prompt used for generating professional email responses based on knowledge base content."
        },
        "emailQueryReformulationAIPromptId": {
          "type": "string",
          "description": "The ID of the System AI prompt used for reformulating email queries to optimize knowledge base search for response generation."
        },
        "locale": {
          "type": "string",
          "description": "The locale setting for language-specific email response generation (for example, en_US, es_ES)."
        },
        "associationConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssociationConfiguration"
          },
          "description": "Configuration settings for knowledge base associations used by the email response agent."
        }
      }
    },
    "HandoffAgentConfiguration": {
      "type": "object",
      "properties": {
        "agentTarget": {
          "$ref": "#/$defs/AgentTarget"
        },
        "instruction": {
          "$ref": "#/$defs/MultiAgentInstruction"
        },
        "audioStreamingEnabled": {
          "type": "boolean",
          "description": "Specifies whether the caller's audio is streamed directly to the collaborator agent and the collaborator's audio response is played back during the handoff. This applies only to voice handoffs."
        },
        "immediateHandoff": {
          "type": "boolean",
          "description": "Specifies whether the conversation is handed off to this collaborator agent immediately on the first turn, without any orchestration reasoning. At most one handoff in an AI Agent's configuration can set this to true."
        }
      },
      "required": [
        "agentTarget"
      ]
    },
    "KnowledgeBaseAssociationConfigurationData": {
      "type": "object",
      "properties": {
        "contentTagFilter": {
          "$ref": "#/$defs/TagFilter"
        },
        "maxResults": {
          "type": "integer",
          "description": "The maximum number of results to return per page."
        },
        "overrideKnowledgeBaseSearchType": {
          "type": "string",
          "description": "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"
        }
      }
    },
    "ManualSearchAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "answerGenerationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent."
        },
        "answerGenerationAIGuardrailId": {
          "type": "string",
          "description": "The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent."
        },
        "associationConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssociationConfiguration"
          },
          "description": "The association configurations for overriding behavior on this AI Agent."
        },
        "locale": {
          "type": "string",
          "description": "The locale to which specifies the language and region settings that determine the response language for QueryAssistant. For more information on supported locales, see Language support for Amazon Q in Connect."
        }
      }
    },
    "MultiAgentConfiguration": {
      "type": "object",
      "properties": {
        "delegateAgentConfiguration": {
          "$ref": "#/$defs/DelegateAgentConfiguration"
        },
        "handoffAgentConfiguration": {
          "$ref": "#/$defs/HandoffAgentConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "MultiAgentInstruction": {
      "type": "object",
      "properties": {
        "instruction": {
          "type": "string",
          "description": "The natural-language instruction that tells the Orchestration AI Agent when and how to engage the collaborator agent."
        }
      }
    },
    "NoteTakingAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "noteTakingAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier used by the Note Taking AI Agent."
        },
        "noteTakingAIGuardrailId": {
          "type": "string",
          "description": "The AI Guardrail identifier used by the Note Taking AI Agent."
        },
        "locale": {
          "type": "string",
          "description": "The locale setting for language-specific case summarization generation (for example, en_US, es_ES)."
        }
      }
    },
    "OrCondition": {
      "type": "object",
      "properties": {
        "andConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagCondition"
          },
          "description": "A list of conditions which would be applied together with an AND condition."
        },
        "tagCondition": {
          "$ref": "#/$defs/TagCondition"
        }
      },
      "description": "Exactly one member is set."
    },
    "OrchestrationAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "orchestrationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier used by the Orchestration AI Agent."
        },
        "orchestrationAIGuardrailId": {
          "type": "string",
          "description": "The AI Guardrail identifier used by the Orchestration AI Agent."
        },
        "toolConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ToolConfiguration"
          },
          "description": "The tool configurations used by the Orchestration AI Agent."
        },
        "multiAgentConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiAgentConfiguration"
          },
          "description": "The collaborator agents that the Orchestration AI Agent can work with. Each entry defines another agent that the orchestrator either delegates to or hands the conversation off to."
        },
        "connectInstanceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Connect instance used by the Orchestration AI Agent."
        },
        "locale": {
          "type": "string",
          "description": "The locale setting for the Orchestration AI Agent."
        },
        "inputSchemas": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "The JSON schemas that define the structure of the structured data input accepted by the Orchestration AI Agent. The data in a DATA message sent to the agent is validated against these schemas. You can specify at most one schema."
        },
        "outputSchemas": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "The JSON schemas that define the structure of the structured output generated by the Orchestration AI Agent. You can specify at most one schema."
        }
      }
    },
    "SelfServiceAIAgentConfiguration": {
      "type": "object",
      "properties": {
        "selfServicePreProcessingAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent"
        },
        "selfServiceAnswerGenerationAIPromptId": {
          "type": "string",
          "description": "The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent"
        },
        "selfServiceAIGuardrailId": {
          "type": "string",
          "description": "The AI Guardrail identifier used by the SELF_SERVICE AI Agent."
        },
        "associationConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssociationConfiguration"
          },
          "description": "The association configurations for overriding behavior on this AI Agent."
        }
      }
    },
    "TagCondition": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The tag key in the tag condition."
        },
        "value": {
          "type": "string",
          "description": "The tag value in the tag condition."
        }
      },
      "required": [
        "key"
      ]
    },
    "TagFilter": {
      "type": "object",
      "properties": {
        "tagCondition": {
          "$ref": "#/$defs/TagCondition"
        },
        "andConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagCondition"
          },
          "description": "A list of conditions which would be applied together with an AND condition."
        },
        "orConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrCondition"
          },
          "description": "A list of conditions which would be applied together with an OR condition."
        }
      },
      "description": "Exactly one member is set."
    },
    "ToolConfiguration": {
      "type": "object",
      "properties": {
        "toolName": {
          "type": "string",
          "description": "The name of the tool."
        },
        "toolType": {
          "type": "string",
          "description": "The type of the tool."
        },
        "title": {
          "type": "string",
          "description": "The title of the tool configuration."
        },
        "toolId": {
          "type": "string",
          "description": "The identifier of the tool, for example toolName from Model Context Provider server."
        },
        "description": {
          "type": "string",
          "description": "The description of the tool configuration."
        },
        "instruction": {
          "$ref": "#/$defs/ToolInstruction"
        },
        "overrideInputValues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ToolOverrideInputValue"
          },
          "description": "Override input values for the tool configuration."
        },
        "outputFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ToolOutputFilter"
          },
          "description": "Output filters applies to the tool result."
        },
        "inputSchema": {
          "type": "object",
          "description": "The input schema for the tool configuration."
        },
        "outputSchema": {
          "type": "object",
          "description": "The output schema for the tool configuration."
        },
        "annotations": {
          "$ref": "#/$defs/Annotation"
        },
        "userInteractionConfiguration": {
          "$ref": "#/$defs/UserInteractionConfiguration"
        }
      },
      "required": [
        "toolName",
        "toolType"
      ]
    },
    "ToolInstruction": {
      "type": "object",
      "properties": {
        "instruction": {
          "type": "string",
          "description": "The instruction text for the tool."
        }
      }
    },
    "ToolOutputConfiguration": {
      "type": "object",
      "properties": {
        "outputVariableNameOverride": {
          "type": "string",
          "description": "Override the tool output results to different variable name."
        },
        "sessionDataNamespace": {
          "type": "string",
          "description": "The session data namespace for tool output."
        }
      }
    },
    "ToolOutputFilter": {
      "type": "object",
      "properties": {
        "jsonPath": {
          "type": "string",
          "description": "The JSON path for filtering tool output."
        },
        "outputConfiguration": {
          "$ref": "#/$defs/ToolOutputConfiguration"
        }
      },
      "required": [
        "jsonPath"
      ]
    },
    "ToolOverrideConstantInputValue": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Override tool input value with constant values"
        },
        "value": {
          "type": "string",
          "description": "The constant input override value."
        }
      },
      "required": [
        "type",
        "value"
      ]
    },
    "ToolOverrideInputValue": {
      "type": "object",
      "properties": {
        "jsonPath": {
          "type": "string",
          "description": "The JSON path for the input value override."
        },
        "value": {
          "$ref": "#/$defs/ToolOverrideInputValueConfiguration"
        }
      },
      "required": [
        "jsonPath",
        "value"
      ]
    },
    "ToolOverrideInputValueConfiguration": {
      "type": "object",
      "properties": {
        "constant": {
          "$ref": "#/$defs/ToolOverrideConstantInputValue"
        }
      },
      "description": "Exactly one member is set."
    },
    "UserInteractionConfiguration": {
      "type": "object",
      "properties": {
        "isUserConfirmationRequired": {
          "type": "boolean",
          "description": "Indicates whether user confirmation is required for the interaction."
        }
      }
    }
  }
}