{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-agent-request-schema.json",
  "title": "CreateAgentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-agents-api-openapi.yml#/components/schemas/CreateAgentRequest",
  "type": "object",
  "properties": {
    "agentName": {
      "type": "string",
      "description": "A name for the agent that you create."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency."
    },
    "instruction": {
      "type": "string",
      "description": "Instructions that tell the agent what it should do and how it should interact with users."
    },
    "foundationModel": {
      "type": "string",
      "description": "The identifier for the model that you want to be used for orchestration by the agent you create. The modelId to provide depends on the type of model or throughput that you use: If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide. If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for cross-region inference in the Amazon Bedrock User Guide. If you use a provisioned"
    },
    "description": {
      "type": "string",
      "description": "A description of the agent."
    },
    "orchestrationType": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "CUSTOM_ORCHESTRATION"
      ],
      "description": "Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default."
    },
    "customOrchestration": {
      "$ref": "#/$defs/CustomOrchestration"
    },
    "idleSessionTTLInSeconds": {
      "type": "integer",
      "description": "The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout."
    },
    "agentResourceRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent."
    },
    "customerEncryptionKeyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Any tags that you want to attach to the agent."
    },
    "promptOverrideConfiguration": {
      "$ref": "#/$defs/PromptOverrideConfiguration"
    },
    "guardrailConfiguration": {
      "$ref": "#/$defs/BedrockAgentGuardrailConfiguration"
    },
    "memoryConfiguration": {
      "$ref": "#/$defs/MemoryConfiguration"
    },
    "agentCollaboration": {
      "type": "string",
      "enum": [
        "SUPERVISOR",
        "SUPERVISOR_ROUTER",
        "DISABLED"
      ],
      "description": "The agent's collaboration role."
    }
  },
  "required": [
    "agentName"
  ],
  "$defs": {
    "BedrockAgentGuardrailConfiguration": {
      "type": "object",
      "properties": {
        "guardrailIdentifier": {
          "type": "string",
          "description": "The unique identifier of the guardrail."
        },
        "guardrailVersion": {
          "type": "string",
          "description": "The version of the guardrail."
        }
      }
    },
    "BedrockAgentInferenceConfiguration": {
      "type": "object",
      "properties": {
        "temperature": {
          "type": "number",
          "description": "The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options."
        },
        "topP": {
          "type": "number",
          "description": "While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for Top P determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topP to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens."
        },
        "topK": {
          "type": "integer",
          "description": "While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK to 50, the model selects the next token from among the top 50 most likely choices."
        },
        "maximumLength": {
          "type": "integer",
          "description": "The maximum number of tokens to allow in the generated response."
        },
        "stopSequences": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response."
        }
      }
    },
    "CustomOrchestration": {
      "type": "object",
      "properties": {
        "executor": {
          "$ref": "#/$defs/OrchestrationExecutor"
        }
      }
    },
    "MemoryConfiguration": {
      "type": "object",
      "properties": {
        "enabledMemoryTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "SESSION_SUMMARY"
            ]
          },
          "description": "The type of memory that is stored."
        },
        "storageDays": {
          "type": "integer",
          "description": "The number of days the agent is configured to retain the conversational context."
        },
        "sessionSummaryConfiguration": {
          "$ref": "#/$defs/SessionSummaryConfiguration"
        }
      },
      "required": [
        "enabledMemoryTypes"
      ]
    },
    "OrchestrationExecutor": {
      "type": "object",
      "properties": {
        "lambda": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action."
        }
      },
      "description": "Exactly one member is set."
    },
    "PromptConfiguration": {
      "type": "object",
      "properties": {
        "promptType": {
          "type": "string",
          "enum": [
            "PRE_PROCESSING",
            "ORCHESTRATION",
            "POST_PROCESSING",
            "KNOWLEDGE_BASE_RESPONSE_GENERATION",
            "MEMORY_SUMMARIZATION"
          ],
          "description": "The step in the agent sequence that this prompt configuration applies to."
        },
        "promptCreationMode": {
          "type": "string",
          "enum": [
            "DEFAULT",
            "OVERRIDDEN"
          ],
          "description": "Specifies whether to override the default prompt template for this promptType. Set this value to OVERRIDDEN to use the prompt that you provide in the basePromptTemplate. If you leave it as DEFAULT, the agent uses a default prompt template."
        },
        "promptState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Specifies whether to allow the agent to carry out the step specified in the promptType. If you set this value to DISABLED, the agent skips that step. The default state for each promptType is as follows. PRE_PROCESSING – DISABLED ORCHESTRATION – ENABLED KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED POST_PROCESSING – DISABLED"
        },
        "basePromptTemplate": {
          "type": "string",
          "description": "Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates."
        },
        "inferenceConfiguration": {
          "$ref": "#/$defs/BedrockAgentInferenceConfiguration"
        },
        "parserMode": {
          "type": "string",
          "enum": [
            "DEFAULT",
            "OVERRIDDEN"
          ],
          "description": "Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType. If you set the field as OVERRIDDEN, the overrideLambda field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function."
        },
        "foundationModel": {
          "type": "string",
          "description": "The agent's foundation model."
        },
        "additionalModelRequestFields": {
          "type": "object",
          "description": "If the Converse or ConverseStream operations support the model, additionalModelRequestFields contains additional inference parameters, beyond the base set of inference parameters in the inferenceConfiguration field. For more information, see Inference request parameters and response fields for foundation models in the Amazon Bedrock user guide."
        }
      }
    },
    "PromptOverrideConfiguration": {
      "type": "object",
      "properties": {
        "promptConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PromptConfiguration"
          },
          "description": "Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts."
        },
        "overrideLambda": {
          "type": "string",
          "description": "The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the promptConfigurations must contain a parserMode value that is set to OVERRIDDEN. For more information, see Parser Lambda function in Amazon Bedrock Agents."
        }
      },
      "required": [
        "promptConfigurations"
      ]
    },
    "SessionSummaryConfiguration": {
      "type": "object",
      "properties": {
        "maxRecentSessions": {
          "type": "integer",
          "description": "Maximum number of recent session summaries to include in the agent's prompt context."
        }
      }
    }
  }
}