Skip to content

BedrockAgentClient.create_agent

rboto-bedrock-agent==0.4.0 · Service index · Types

Model summary (excerpt): Amazon Bedrock Agents (now Amazon Bedrock Agents Classic) is no longer open to new customers. For capabilities similar to Bedrock Agents Classic, explore Amazon Bedrock AgentCore. Existing customers can continue to use the service as normal. For more information, see Amazon Bedrock Agents Classic availability change . Creates an agent that orchestrates interactions between foundation models,...

Install and imports

python -m pip install "rboto[bedrock-agent]==0.4.0"
from rboto import BedrockAgentClient
from rboto_bedrock_agent.types import (
    AgentCollaboration,
    CreateAgentOutput,
    CustomOrchestration,
    GuardrailConfiguration,
    MemoryConfiguration,
    OrchestrationType,
    PromptOverrideConfiguration,
)

Signature

async def create_agent(
    *,
    agent_name: str,
    client_token: str | None = None,
    instruction: str | None = None,
    foundation_model: str | None = None,
    description: str | None = None,
    orchestration_type: OrchestrationType | None = None,
    custom_orchestration: CustomOrchestration | None = None,
    idle_session_ttl_in_seconds: int | None = None,
    agent_resource_role_arn: str | None = None,
    customer_encryption_key_arn: str | None = None,
    tags: dict[str, str] | None = None,
    prompt_override_configuration: PromptOverrideConfiguration | None = None,
    guardrail_configuration: GuardrailConfiguration | None = None,
    memory_configuration: MemoryConfiguration | None = None,
    agent_collaboration: AgentCollaboration | None = None,
) -> CreateAgentOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
agent_name Yes A name for the agent that you create.
client_token No 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 No Instructions that tell the agent what it should do and how it should interact with users.
foundation_model No 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...
description No A description of the agent.
orchestration_type No Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.
custom_orchestration No Contains details of the custom orchestration configured for the agent.
idle_session_ttl_in_seconds No 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.
agent_resource_role_arn No The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
customer_encryption_key_arn No The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.
tags No Any tags that you want to attach to the agent.
prompt_override_configuration No Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts .
guardrail_configuration No The unique Guardrail configuration assigned to the agent when it is created.
memory_configuration No Contains the details of the memory configured for the agent.
agent_collaboration No The agent's collaboration role.

Output

CreateAgentOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
agent AgentOutput | None Always present AgentOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

AgentCollaboration, CreateAgentOutput, CustomOrchestration, GuardrailConfiguration, MemoryConfiguration, OrchestrationType, PromptOverrideConfiguration

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock_agent.exceptions:

AccessDeniedError, ConflictError, InternalServerError, ServiceQuotaExceededError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model