Skip to content

prepare_agent

Operation

prepare_agent

prepare_agent(request: PrepareAgentInput | PrepareAgentInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PrepareAgentInputDict]) -> PrepareAgentOutput

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

Parameters:

Name Type Description Default
request PrepareAgentInput | PrepareAgentInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[PrepareAgentInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PrepareAgentOutput

An instance of PrepareAgentOutput.

prepare_agent async

prepare_agent(request: PrepareAgentInput | PrepareAgentInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PrepareAgentInputDict]) -> PrepareAgentOutput

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

Parameters:

Name Type Description Default
request PrepareAgentInput | PrepareAgentInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[PrepareAgentInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PrepareAgentOutput

An instance of PrepareAgentOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

PrepareAgentInputDict

Bases: TypedDict

Dictionary form of PrepareAgentInput.

Attributes

agent_id instance-attribute
agent_id: Required[str]

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

PrepareAgentInput dataclass

Bases: _SerdeShape

Dataclass for PrepareAgentInput structure.

Attributes

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

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

Output

PrepareAgentOutput dataclass

Bases: _SerdeShape

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: str

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.