Skip to content

Bedrock Agent  >  Operations  >  prepare_agent

prepare_agent

Operation

prepare_agent async

prepare_agent(input: PrepareAgentInput, plugins: list[Plugin] | None = None) -> PrepareAgentOutput

Creates a DRAFT version of the agent that can be used for internal testing.

Parameters:

Name Type Description Default
input PrepareAgentInput

An instance of PrepareAgentInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
PrepareAgentOutput

An instance of PrepareAgentOutput.

Input

PrepareAgentInput dataclass

Dataclass for PrepareAgentInput structure.

Attributes

agent_id class-attribute instance-attribute
agent_id: str | None = None

The unique identifier of the agent for which to create a DRAFT version.

Output

PrepareAgentOutput dataclass

Dataclass for PrepareAgentOutput structure.

Attributes

agent_id instance-attribute
agent_id: str

The unique identifier of the agent for which the DRAFT version was created.

agent_status instance-attribute
agent_status: AgentStatus

The status of the DRAFT version and whether it is ready for use.

agent_version instance-attribute
agent_version: str

The version of the agent.

prepared_at instance-attribute
prepared_at: datetime

The time at which the DRAFT version of the agent was last prepared.