Overview
The Agents client provides methods for creating, managing, and testing conversational AI agents. Access it viaclient.conversational_ai.agents.
Methods
create
ConversationalConfig
required
Conversation configuration for an agent.
AgentPlatformSettingsRequestModel
Platform settings for the agent that aren’t related to the conversation orchestration and content.
AgentWorkflowRequestModel
Workflow for the agent. This defines the flow of the conversation and how the agent interacts with tools.
str
A name to make the agent easier to find.
Sequence[str]
Tags to help classify and filter the agent.
dict
Coaching settings for the agent.
RequestOptions
Request-specific configuration.
CreateAgentResponseModel with the created agent details.
Example:
get
str
required
The ID of an agent. This is returned on agent creation.
str
The ID of the agent version to use.
str
The ID of the branch to use.
RequestOptions
Request-specific configuration.
GetAgentResponseModel with the agent configuration.
Example:
delete
str
required
The ID of an agent. This is returned on agent creation.
RequestOptions
Request-specific configuration.
update
str
required
The ID of an agent. This is returned on agent creation.
str
The ID of the branch to use.
ConversationalConfig
Conversation configuration for an agent.
AgentPlatformSettingsRequestModel
Platform settings for the agent.
AgentWorkflowRequestModel
Workflow for the agent.
str
A name to make the agent easier to find.
Sequence[str]
Tags to help classify and filter the agent.
dict
Coaching settings for the agent.
str
Description for this version when publishing changes (only applicable for versioned agents).
RequestOptions
Request-specific configuration.
GetAgentResponseModel with the updated agent configuration.
Example:
list
int
How many agents to return at maximum. Cannot exceed 100, defaults to 30.
str
Search by agent name.
bool
Filter agents by archived status.
bool
If set to true, omit agents shared by others and include only the ones you own.
SortDirection
The direction to sort the results (“asc” or “desc”).
AgentSortBy
The field to sort the results by (e.g., “name”, “created_at”).
str
Used for fetching next page. Cursor is returned in the response.
RequestOptions
Request-specific configuration.
GetAgentsPageResponseModel with paginated agent list.
Example:
duplicate
str
required
The ID of an agent. This is returned on agent creation.
str
A name to make the agent easier to find.
RequestOptions
Request-specific configuration.
CreateAgentResponseModel with the duplicated agent details.
Example:
simulate_conversation
str
required
The ID of an agent. This is returned on agent creation.
ConversationSimulationSpecification
required
A specification detailing how the conversation should be simulated.
Sequence[PromptEvaluationCriteria]
A list of evaluation criteria to test.
int
Maximum number of new turns to generate in the conversation simulation.
RequestOptions
Request-specific configuration.
AgentSimulatedChatTestResponseModel with simulation results.
Example:
simulate_conversation_stream
str
required
The ID of an agent.
ConversationSimulationSpecification
required
A specification detailing how the conversation should be simulated.
Sequence[PromptEvaluationCriteria]
A list of evaluation criteria to test.
int
Maximum number of new turns to generate in the conversation simulation.
RequestOptions
Request-specific configuration.
run_tests
str
required
The ID of an agent. This is returned on agent creation.
Sequence[SingleTestRunRequestModel]
required
List of tests to run on the agent.
AdhocAgentConfigOverrideForTestRequestModel
Configuration overrides to use for testing. If not provided, the agent’s default configuration will be used.
str
ID of the branch to run the tests on. If not provided, the tests will be run on the agent default configuration.
RequestOptions
Request-specific configuration.
GetTestSuiteInvocationResponseModel with test results.
Example:
Async Usage
All methods are available onAsyncElevenLabs client with async/await syntax: