> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 模拟对话

POST https://api.elevenlabs.io/v1/convai/agents/{agent_id}/simulate-conversation
Content-Type: application/json

已弃用。此端点将于 2026 年 10 月 31 日移除。请使用 `/v1/convai/agent-testing/create` 和 `/v1/convai/agents/:agent_id/run-tests` 端点创建并运行模拟。运行智能体与模拟用户之间的对话。

Reference: https://elevenlabs.io/docs/api-reference/agents/simulate-conversation

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `agent_id` (string, required) — 智能体 ID。创建智能体时返回此值。

### Body (application/json)

This endpoint expects a Body_Simulates_a_conversation_v1_convai_agents__agent_id__simulate_conversation_post.

- `simulation_specification` (ConversationSimulationSpecification, required) — 详细说明如何模拟对话的规范
- `extra_evaluation_criteria` (list of PromptEvaluationCriteria, optional, nullable) — 要测试的评估标准列表。
- `new_turns_limit` (integer, optional, default: 100) — 对话模拟中要生成的最大新轮数

## Response

### 200

成功响应

- `simulated_conversation` (list of ConversationHistoryTranscriptResponseModel, required)
- `analysis` (ConversationHistoryAnalysisCommonModel, required)

## Errors

### 422 Unprocessable Entity Error

验证错误。

- `detail` (list of ValidationError, optional)

## Types

### ConversationSimulationSpecification

用于模拟智能体与 AI 用户之间对话的规范。

- `simulated_user_config` (AgentConfigAPIModel-Input, required)
- `tool_mock_config` (map from string to ToolMockConfig, optional)
- `partial_conversation_history` (list of ConversationHistoryTranscriptCommonModel-Input, optional) — 用于开始模拟的部分对话历史记录。若为空，则从头开始模拟。
- `dynamic_variables` (map from string to any, optional)

### PromptEvaluationCriteria

使用转录文本和提示词评估是否达成目标，并返回是/否答案

- `id` (string, required) — 评估标准的唯一标识符
- `name` (string, required)
- `conversation_goal_prompt` (string, required) — 智能体用于评估对话的提示词
- `type` ("prompt", optional, default: prompt) — 评估标准类型
- `use_knowledge_base` (boolean, optional, default: false) — 评估提示词时是否使用智能体的知识库。
- `scope` (enum, optional, default: conversation) — 评估此条件时使用的转录文本上下文范围。'conversation' 使用完整转录文本；'agent' 仅使用定义该智能体处于活跃状态的部分。
  - Allowed values: `conversation`, `agent`
- `llm` (enum, optional, nullable) — 用于此评估标准的 LLM 模型。未设置时，使用智能体的 analysis_llm 默认值。
  - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`
- `scoring_mode` (enum, optional, default: binary) — 此标准的评分方式。'binary' 会得到成功、失败或未知；'numeric_uniform' 会在 [0, max_score] 范围内返回数值，并将其归一化为汇总对话成功率。
  - Allowed values: `binary`, `numeric_uniform`
- `max_score` (integer, optional, default: 100) — 数值评分范围的最大值（最小值始终为 0）。仅在 scoring_mode 为 'numeric_uniform' 时使用。
- `score_instructions` (string, optional, nullable) — 可选的自由文本说明，用于描述如何在数值量表上赋值。仅当 scoring_mode 为 'numeric_uniform' 时使用。

### ConversationHistoryTranscriptResponseModel

- `role` (enum, required)
  - Allowed values: `user`, `agent`
- `time_in_call_secs` (integer, required)
- `agent_metadata` (AgentMetadata, optional, nullable)
- `message` (string, optional, nullable)
- `multivoice_message` (ConversationHistoryMultivoiceMessageModel, optional, nullable) — 表示来自多音色智能体的消息。
- `tool_calls` (list of ConversationHistoryTranscriptToolCallCommonModel-Output, optional)
- `tool_results` (list of ConversationHistoryTranscriptResponseModelToolResultsItems, optional)
- `feedback` (UserFeedback, optional, nullable)
- `llm_override` (string, optional, nullable)
- `producing_llm` (string, optional, nullable)
- `conversation_turn_metrics` (ConversationTurnMetrics, optional, nullable)
- `rag_retrieval_info` (RagRetrievalInfo, optional, nullable)
- `llm_usage` (LLMUsage-Output, optional, nullable)
- `interrupted` (boolean, optional, default: false)
- `ignored_as_backchannel` (boolean, optional, default: false)
- `platform_event` (enum, optional, nullable)
  - Allowed values: `user_turn_timeout`, `skip_turn_wait_elapsed`
- `original_message` (string, optional, nullable)
- `reasoning` (list of ConversationReasoningModel, optional)
- `source_medium` (enum, optional, nullable)
  - Allowed values: `audio`, `dtmf`, `text`, `image`, `file`
- `source_event_id` (integer, optional, nullable)
- `used_static_kb_document_ids` (list of string, optional)
- `user_identifier` (string, optional, nullable)
- `id` (string, optional, nullable)
- `triggered_guardrails` (list of TriggeredGuardrailCommonModel, optional)
- `file_input` (ConversationHistoryTranscriptFileInputResponseModel, optional, nullable) — 已弃用：此轮的第一个附件。请使用 `file_inputs` 查看所有附件。
- `file_inputs` (list of ConversationHistoryTranscriptFileInputResponseModel, optional) — 此轮对话附加的所有文件，按用户添加顺序排列。
- `contextual_update_info` (ContextualUpdateInfo, optional, nullable)
- `reasoned` (boolean, optional, default: false)

### ConversationHistoryAnalysisCommonModel

- `call_successful` (enum, required)
  - Allowed values: `success`, `failure`, `unknown`
- `transcript_summary` (string, required)
- `evaluation_criteria_results` (map from string to ConversationHistoryEvaluationCriteriaResultCommonModel, optional)
- `data_collection_results` (map from string to DataCollectionResultCommonModel, optional)
- `evaluation_criteria_results_list` (list of ConversationHistoryEvaluationCriteriaResultCommonModel, optional)
- `data_collection_results_list` (list of DataCollectionResultCommonModel, optional)
- `call_success_score` (double, optional, nullable)
- `call_summary_title` (string, optional, nullable)
- `scoped` (list of ScopedAnalysisResult, optional)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### AgentConfigAPIModel-Input

- `first_message` (string, optional, default: ) — 非空时，为智能体首先说出的消息。为空时，智能体会等待用户发起对话。
- `language` (string, optional, default: en) — 智能体语言，用于 ASR 和 TTS
- `hinglish_mode` (boolean, optional, default: false) — 启用后，智能体会在印地语、马拉雅拉姆语、泰卢固语或卡纳达语回复中混用英语单词和短语。
- `dynamic_variables` (any, optional) — Configuration for dynamic variables
- `disable_first_message_interruptions` (boolean, optional, default: false) — 如果为 true，在发送第一条消息期间，用户无法打断智能体。
- `max_conversation_duration_message` (string, optional, default: ) — 非空时，为达到最长对话时长后智能体发送的消息。
- `text_behavior_overrides` (map from string to BehaviorOverride, optional, nullable) — 文本对话的每个渠道响应行为覆盖选项。未设置时使用内置渠道默认值。
- `prompt` (PromptAgentAPIModel-Input, optional) — 智能体的提示词

### ToolMockConfig

- `default_return_value` (string, optional, default: Tool Called.)
- `default_is_error` (boolean, optional, default: false)

### ConversationHistoryTranscriptCommonModel-Input

- `role` (enum, required)
  - Allowed values: `user`, `agent`
- `time_in_call_secs` (integer, required)
- `agent_metadata` (AgentMetadata, optional, nullable)
- `message` (string, optional, nullable)
- `multivoice_message` (ConversationHistoryMultivoiceMessageModel, optional, nullable) — 表示来自多音色智能体的消息。
- `tool_calls` (list of ConversationHistoryTranscriptToolCallCommonModel-Input, optional)
- `tool_results` (list of ConversationHistoryTranscriptCommonModelInputToolResultsItems, optional)
- `feedback` (UserFeedback, optional, nullable)
- `llm_override` (string, optional, nullable)
- `producing_llm` (string, optional, nullable)
- `conversation_turn_metrics` (ConversationTurnMetrics, optional, nullable)
- `rag_retrieval_info` (RagRetrievalInfo, optional, nullable)
- `llm_usage` (LLMUsage-Input, optional, nullable)
- `interrupted` (boolean, optional, default: false)
- `ignored_as_backchannel` (boolean, optional, default: false)
- `platform_event` (enum, optional, nullable)
  - Allowed values: `user_turn_timeout`, `skip_turn_wait_elapsed`
- `original_message` (string, optional, nullable)
- `reasoning` (list of ConversationReasoningModel, optional)
- `source_medium` (enum, optional, nullable)
  - Allowed values: `audio`, `dtmf`, `text`, `image`, `file`
- `source_event_id` (integer, optional, nullable)
- `used_static_kb_document_ids` (list of string, optional)
- `user_identifier` (string, optional, nullable)
- `id` (string, optional, nullable)
- `triggered_guardrails` (list of TriggeredGuardrailCommonModel, optional)

### AgentMetadata

- `agent_id` (string, required)
- `branch_id` (string, optional, nullable)
- `workflow_node_id` (string, optional, nullable)
- `version_id` (string, optional, nullable)

### ConversationHistoryMultivoiceMessageModel

表示来自多音色智能体的消息。

- `parts` (list of ConversationHistoryMultivoiceMessagePartModel, required)

### ConversationHistoryTranscriptToolCallCommonModel-Output

- `request_id` (string, required)
- `tool_name` (string, required)
- `params_as_json` (string, required)
- `tool_has_been_called` (boolean, required)
- `type` (enum, optional, nullable)
  - Allowed values: `system`, `webhook`, `client`, `mcp`, `workflow`, `api_integration_webhook`, `smb`
- `tool_id` (string, optional, nullable) — 所调用工具的 ID。对于没有 ID 的工具（如系统工具），不会设置此项。
- `tool_details` (ConversationHistoryTranscriptToolCallCommonModelOutputToolDetails, optional, nullable)

### ConversationHistoryTranscriptResponseModelToolResultsItems

- ConversationHistoryTranscriptOtherToolsResultCommonModel: ConversationHistoryTranscriptOtherToolsResultCommonModel
- ConversationHistoryTranscriptSystemToolResultCommonModel: ConversationHistoryTranscriptSystemToolResultCommonModel-Output
- ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel: ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output
- ConversationHistoryTranscriptWorkflowToolsResultCommonModel: ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output

### UserFeedback

- `score` (enum, required)
  - Allowed values: `like`, `dislike`
- `time_in_call_secs` (integer, required)

### ConversationTurnMetrics

- `metrics` (map from string to MetricRecord, optional)
- `convai_asr_provider` (string, optional, nullable)
- `convai_tts_model` (string, optional, nullable)
- `convai_tts_cascade` (string, optional, nullable)
- `voice_id` (string, optional, nullable)

### RagRetrievalInfo

- `chunks` (list of RagChunkMetadata, required)
- `embedding_model` (enum, required, default: e5_mistral_7b_instruct)
  - Allowed values: `e5_mistral_7b_instruct`, `multilingual_e5_large_instruct`
- `retrieval_query` (string, required)
- `rag_latency_secs` (double, required)
- `used_chunk_ids` (list of string, optional)

### LLMUsage-Output

- `model_usage` (map from string to LLMInputOutputTokensUsage, optional)

### ConversationReasoningModel

- `summary` (string, optional, nullable)
- `provider_redact` (boolean, optional, default: false)

### TriggeredGuardrailCommonModel

- `guardrail_type` (enum, required)
  - Allowed values: `custom`, `prompt_injection`, `self_harm_intent`, `violence_graphic`, `sexual`, `violence`, `harassment`, `sexual_minors`, `self_harm`, `self_harm_instructions`, `harassment_threatening`, `hate`, `hate_threatening`, `profanity`, `religion_or_politics`, `medical_and_legal`, `guardrail`
- `guardrail_name` (string, optional, nullable)

### ConversationHistoryTranscriptFileInputResponseModel

- `file_id` (string, required)
- `original_filename` (string, required)
- `mime_type` (string, required)
- `file_url` (string, required)

### ContextualUpdateInfo

- `context_id` (string, required) — Client-supplied identifier grouping related contextual updates.
- `is_superseded` (boolean, optional, default: false) — 当此上下文更新已被具有相同 context_id 的较新更新替代时为 True。

### ConversationHistoryEvaluationCriteriaResultCommonModel

- `criteria_id` (string, required)
- `result` (enum, required)
  - Allowed values: `success`, `failure`, `unknown`
- `rationale` (string, required)
- `scoring_mode` (enum, optional, nullable, default: binary)
  - Allowed values: `binary`, `numeric_uniform`
- `score` (integer, optional, nullable)
- `max_score` (integer, optional, nullable)

### DataCollectionResultCommonModel

- `data_collection_id` (string, required)
- `rationale` (string, required)
- `name` (string, optional, nullable)
- `value` (any, optional)
- `json_schema` (LiteralJsonSchemaProperty, optional, nullable) — 字面量 JSON 类型的 Schema 属性。重要提示：以下字段只能设置其中一个：description（LLM 提供值）、dynamic_variable（来自变量的值）、is_system_provided（系统提供值）、constant_value（固定值）或 is_omitted（省略参数）。这些字段互斥。

### ScopedAnalysisResult

- `scope` (enum, required, default: conversation) — 分析范围。'conversation' 使用完整转录文本；'agent' 仅使用定义该智能体处于活跃状态的部分。
  - Allowed values: `conversation`, `agent`
- `source_agent_id` (string, required)
- `successful` (enum, required)
  - Allowed values: `success`, `failure`, `unknown`
- `source_branch_id` (string, optional, nullable) — Branch of the agent for this scoped block; disambiguates repeated agent_id.
- `evaluation_criteria_results` (map from string to ConversationHistoryEvaluationCriteriaResultCommonModel, optional)
- `data_collection_results` (map from string to DataCollectionResultCommonModel, optional)
- `success_score` (double, optional, nullable)

### ValidationErrorLocItems

- string
- integer

### BehaviorOverride

- `verbosity` (enum, optional, nullable) — 详细程度覆盖设置。未设置时使用底层默认值。
  - Allowed values: `auto`, `concise`, `thorough`
- `output_format` (enum, optional, nullable) — 输出格式覆盖值。未设置时使用底层默认值。
  - Allowed values: `mp3_22050_32`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_44100`, `ulaw_8000`
- `interaction_budget` (enum, optional, nullable) — 交互预算覆盖设置。未设置时使用底层默认值。
  - Allowed values: `realtime`, `5_minutes`, `10_minutes`, `1_hour`

### PromptAgentAPIModel-Input

- `prompt` (string, optional, default: ) — 智能体的提示词
- `llm` (enum, optional) — 用于结合提示词和聊天记录进行查询的 LLM。使用数据驻留时，该 LLM 必须受数据驻留环境支持
  - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`
- `reasoning_effort` (enum, optional, nullable) — 模型的推理强度。仅部分模型支持。
  - Allowed values: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`
- `thinking_budget` (integer, optional, nullable) — 用于思考的最大 token 数。模型支持时，设为 0 可关闭。
- `enable_reasoning_summary` (boolean, optional, default: false) — 启用模型推理摘要。禁用后，如可行，将不向提供商请求摘要，以加快 TTFB。不兼容 ZRM。
- `temperature` (double, optional, nullable, default: 0) — LLM 的 temperature。默认为 0。设为 null 可从 LLM 请求中完全省略此参数（适用于拒绝 temperature 字段的自定义 LLM）。
- `max_tokens` (integer, optional, default: -1) — 若大于 0，则为 LLM 可预测的最大 token 数
- `tool_ids` (list of string, optional) — 智能体使用的工具 ID 列表。
- `tool_ids_strict` (boolean, optional, default: false) — 仅作为对话覆盖项生效，在允许覆盖 tool_ids 时均可使用。为 true 时，覆盖后的 tool_ids 是对话中允许使用的完整工具列表，包括 workflow 节点上的工具。在智能体上设置时会被忽略。
- `built_in_tools` (BuiltInTools-Input, optional) — Built-in system tools to be used by the agent
- `enable_parallel_tool_calls` (boolean, optional, default: true) — 启用并行工具调用。启用后，智能体可在单个轮次中并行执行多个工具。并非所有模型都支持。
- `mcp_server_ids` (list of string, optional) — 供智能体使用的 MCP 服务器 ID 列表
- `native_mcp_server_ids` (list of string, optional) — 供智能体使用的原生 MCP 服务器 ID 列表
- `knowledge_base` (list of KnowledgeBaseLocator, optional) — 供智能体使用的知识库列表
- `custom_llm` (CustomLLM, optional, nullable) — 当 LLM 字段设为 'CUSTOM_LLM' 时，自定义 LLM 的定义
- `ignore_default_personality` (boolean, optional, nullable, default: true) — 是否从系统提示词中移除默认人格描述
- `rag` (RagConfig-Input, optional) — Configuration for RAG
- `timezone` (string, optional, nullable) — 用于在系统提示词中显示当前时间的时区。设置后，系统提示词会按此时区包含当前时间。必须是有效的时区名称（如 'America/New_York'、'Europe/London'、'UTC'）。建议设置以获得准确的时间感知回复；否则，除非通过动态变量或工具提供，智能体不会知道当前日期和时间，可能导致时间引用错误或幻觉。
- `backup_llm_config` (PromptAgentApiModelInputBackupLlmConfig, optional) — Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order.
- `cascade_timeout_seconds` (double, optional, default: 4) — 切换至备用 LLM 前等待的秒数。必须介于 2 至 15 秒。
- `tools` (list of PromptAgentApiModelInputToolsItems, optional, deprecated) — 智能体在对话过程中可使用的工具列表，请改用 tool_ids。

### ConversationHistoryTranscriptToolCallCommonModel-Input

- `request_id` (string, required)
- `tool_name` (string, required)
- `params_as_json` (string, required)
- `tool_has_been_called` (boolean, required)
- `type` (enum, optional, nullable)
  - Allowed values: `system`, `webhook`, `client`, `mcp`, `workflow`, `api_integration_webhook`, `smb`
- `tool_id` (string, optional, nullable) — 所调用工具的 ID。对于没有 ID 的工具（如系统工具），不会设置此项。
- `tool_details` (ConversationHistoryTranscriptToolCallCommonModelInputToolDetails, optional, nullable)

### ConversationHistoryTranscriptCommonModelInputToolResultsItems

- ConversationHistoryTranscriptOtherToolsResultCommonModel: ConversationHistoryTranscriptOtherToolsResultCommonModel
- ConversationHistoryTranscriptSystemToolResultCommonModel: ConversationHistoryTranscriptSystemToolResultCommonModel-Input
- ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel: ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input
- ConversationHistoryTranscriptWorkflowToolsResultCommonModel: ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input

### LLMUsage-Input

- `model_usage` (map from string to LLMInputOutputTokensUsage, optional)

### ConversationHistoryMultivoiceMessagePartModel

表示多音色消息中的单个音色部分。

- `text` (string, required)
- `voice_label` (string, required, nullable)
- `time_in_call_secs` (integer, required, nullable)

### ConversationHistoryTranscriptToolCallCommonModelOutputToolDetails

- `type`: `api_integration_webhook` (ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails)
  - `credential_id` (string, required, default: )
  - `integration_connection_id` (string, required, default: )
  - `integration_id` (string, required, default: )
  - `webhook_details` (ConversationHistoryTranscriptToolCallWebhookDetails, required)
- `type`: `client` (ConversationHistoryTranscriptToolCallClientDetails)
  - `parameters` (string, required)
- `type`: `mcp` (ConversationHistoryTranscriptToolCallMCPDetails)
  - `approval_policy` (string, required)
  - `integration_type` (string, required)
  - `mcp_server_id` (string, required)
  - `mcp_server_name` (string, required)
  - `mcp_tool_description` (string, optional, default: )
  - `mcp_tool_name` (string, optional, default: )
  - `parameters` (map from string to string, optional)
  - `requires_approval` (boolean, optional, default: false)
- `type`: `webhook` (ConversationHistoryTranscriptToolCallWebhookDetails)
  - `method` (string, required)
  - `url` (string, required)
  - `body` (string, optional, nullable)
  - `headers` (map from string to string, optional)
  - `path_params` (map from string to string, optional)
  - `query_params` (map from string to string, optional)

### ConversationHistoryTranscriptOtherToolsResultCommonModel

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `type` (enum, optional, nullable)
  - Allowed values: `client`, `webhook`, `mcp`, `code`

### ConversationHistoryTranscriptSystemToolResultCommonModel-Output

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("system", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (ConversationHistoryTranscriptSystemToolResultCommonModelOutputResult, optional, nullable)

### ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `is_blocked` (boolean, required, default: false)
- `tool_has_been_called` (boolean, required)
- `tool_latency_secs` (double, required, default: 0)
- `error_type` (string, required, default: )
- `raw_error_message` (string, required, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, required)
- `type` ("api_integration_webhook", required)
- `integration_id` (string, required, default: )
- `credential_id` (string, required, default: )
- `integration_connection_id` (string, required, default: )

### ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("workflow", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (WorkflowToolResponseModel-Output, optional, nullable) — workflow 工具响应的通用模型。

### MetricRecord

- `elapsed_time` (double, required)

### RagChunkMetadata

- `document_id` (string, required)
- `chunk_id` (string, required)
- `vector_distance` (double, required)

### LLMInputOutputTokensUsage

- `input` (LLMTokensCategoryUsage, optional)
- `input_cache_read` (LLMTokensCategoryUsage, optional)
- `input_cache_write` (LLMTokensCategoryUsage, optional)
- `output_total` (LLMTokensCategoryUsage, optional)

### LiteralJsonSchemaProperty

字面量 JSON 类型的 Schema 属性。重要提示：以下字段只能设置其中一个：description（LLM 提供值）、dynamic_variable（来自变量的值）、is_system_provided（系统提供值）、constant_value（固定值）或 is_omitted（省略参数）。这些字段互斥。

- `type` (LiteralJsonSchemaPropertyType, required)
- `description` (string, optional, default: ) — 属性描述。设置后，LLM 将根据此描述提供值。不能与 dynamic_variable、is_system_provided、constant_value 和 is_omitted 同时使用。
- `enum` (list of string, optional, nullable) — List of allowed string values for string type parameters
- `is_system_provided` (boolean, optional, default: false) — 如果为 true，该值将在运行时由系统填充。供 API Integration Webhook 工具用于模板化。与 description、dynamic_variable、constant_value 和 is_omitted 互斥。
- `dynamic_variable` (string, optional, default: ) — 用于此属性值的动态变量名称。不能与 description、is_system_provided、constant_value 和 is_omitted 同时使用。
- `allowed_values` (AllowedValues, optional, nullable) — 针对 LLM 提供值的服务端拒绝保护：运行时会拒绝此对象指定的允许集合以外的任何值，且不会将该集合以枚举形式提供给 LLM。仅当值来源为 `description` 时支持；与 dynamic_variable、is_system_provided、constant_value 或 is_omitted 结合使用会被拒绝。
- `constant_value` (LiteralJsonSchemaPropertyConstantValue, optional, nullable, default: ) — 用于此属性的常量值。与 description、dynamic_variable、is_system_provided 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable、is_system_provided 和 constant_value 互斥。
- `allowed_values_dynamic_variable` (string, optional, default: , deprecated) — 已弃用：请改用 `allowed_values`。设置后，LLM 会提供值，但运行时会拒绝此动态变量持有的列表中不存在的任何值（必须是 JSON 数组，例如 ["ws_alpha", "ws_beta"]）。用于让 LLM 从服务器验证的集合中选择（例如当前用户允许访问的 ID）。需要 description；不能与 dynamic_variable、is_system_provided、constant_value 和 is_omitted 同时使用。

### BuiltInTools-Input

可提供给对话式智能体的系统工具。 特意未命名为 ConversationalBuiltInTools：BuiltInToolsInput 和 BuiltInToolsOutput 是公开 API 规范和生成的 SDK 的一部分。

- `transfer_to_agent` (SystemToolConfig, optional, nullable) — 转接至智能体工具
- `end_call` (SystemToolConfig, optional, nullable) — 结束通话工具
- `language_detection` (SystemToolConfig, optional, nullable) — 语言检测工具
- `transfer_to_number` (SystemToolConfig, optional, nullable) — 转接至号码工具
- `skip_turn` (SystemToolConfig, optional, nullable) — 跳过回合工具
- `play_keypad_touch_tone` (SystemToolConfig, optional, nullable) — 播放 DTMF 工具
- `voicemail_detection` (SystemToolConfig, optional, nullable) — 语音信箱检测工具。

### KnowledgeBaseLocator

- `type` (enum, required) — 知识库类型
  - Allowed values: `file`, `url`, `text`, `folder`
- `name` (string, required) — 知识库名称
- `id` (string, required) — 知识库的 ID
- `usage_mode` (enum, optional, default: auto) — 知识库使用模式
  - Allowed values: `prompt`, `auto`

### CustomLLM

- `url` (string, required) — 兼容 Chat Completions 的端点 URL
- `model_id` (string, optional, nullable) — 当 URL 提供多个模型时使用的模型 ID
- `api_key` (CustomLlmApiKey, optional, nullable) — 用于身份验证的 API 密钥。可以是工作区密钥引用 \{'secret\_id': '...'}，也可以是环境变量引用 \{'env\_var\_label': '...'}。
- `auth_connection` (CustomLlmAuthConnection, optional, nullable) — 用于认证的可选工作区身份验证连接。仅支持生成 Authorization Bearer 令牌的身份验证连接；不支持 Basic 认证、mTLS、自定义标头和 URL 密钥认证连接。
- `request_headers` (map from string to CustomLlmRequestHeaders, optional) — 请求中应包含的请求头
- `api_version` (string, optional, nullable) — 请求使用的 API 版本
- `api_type` (enum, optional, default: chat_completions) — 要使用的 API 类型（chat_completions、responses 或 websocket）
  - Allowed values: `chat_completions`, `responses`, `websocket`

### RagConfig-Input

- `enabled` (boolean, optional, default: false)
- `embedding_model` (enum, optional, default: e5_mistral_7b_instruct)
  - Allowed values: `e5_mistral_7b_instruct`, `multilingual_e5_large_instruct`
- `max_vector_distance` (double, optional, default: 0.6) — 检索文档块的最大向量距离。
- `max_documents_length` (integer, optional, default: 50000) — 从 RAG 检索的文档块最大总长度。
- `max_retrieved_rag_chunks_count` (integer, optional, default: 20) — 初始从向量存储中检索的最大 RAG 文档块数。随后会按向量距离和总长度进一步筛选。
- `num_candidates` (integer, optional, nullable) — ANN 向量搜索中评估的候选项数量。数值越高，结果越好，但延迟也越高。建议最小值为 100。禁用时使用默认值。
- `query_rewrite_prompt_override` (string, optional, nullable) — 在 RAG 检索前改写用户查询的自定义提示词。对话历史将自动附加在末尾。未设置时将使用默认提示词。
- `knowledge_base_tool_info` (KnowledgeBaseToolInfo, optional, nullable) — 设置后，智能体将使用 knowledge_base 工具，而非旧版 knowledge_base_rag 工具。None 表示智能体未启用此功能。

### PromptAgentApiModelInputBackupLlmConfig

Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order.

- `preference`: `default` (BackupLLMDefault)
- `preference`: `disabled` (BackupLLMDisabled)
- `preference`: `override` (BackupLLMOverride)
  - `order` (list of enum, required)
    - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`

### PromptAgentApiModelInputToolsItems

工具类型

- `type`: `api_integration_webhook` (ApiIntegrationWebhookToolConfig)
  - `api_integration_connection_id` (string, required)
  - `api_integration_id` (string, required)
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `api_schema_overrides` (ApiIntegrationWebhookOverrides, optional, nullable) — 应用于基础 api_schema 之上的用户覆盖项。
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。必须介于 5 秒和 300 秒之间（含）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `tool_version` (string, optional, default: 1.0.0) — API 集成工具的版本。
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `client` (ClientToolConfig)
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `expects_response` (boolean, optional, default: false) — 如果为 true，调用此工具会阻塞对话，直到客户端返回响应并传递给 llm。如果为 false，则不会等待客户端响应，而是继续对话。这适合向用户展示内容而不阻塞对话。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `parameters` (ObjectJsonSchemaProperty-Input, optional, nullable) — 传递给客户端的所有参数的 Schema
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间（秒）。必须介于 1 到 120 秒之间（含），或设为 -1 以无限期等待客户端响应（需要 expects_response）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `mcp` (mcp)
- `type`: `smb` (smb)
- `type`: `system` (SystemToolConfig)
  - `name` (string, required)
  - `params` (ToolRequestModelToolConfigDiscriminatorMappingSystemParams, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `description` (string, optional, default: ) — 说明何时应使用该工具及其功能。留空则使用针对该工具类型优化的默认说明。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `webhook` (WebhookToolConfig)
  - `api_schema` (WebhookToolApiSchemaConfig-Input, required) — 出站 webhook 的架构，包括参数和 URL 规范。
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `follow_redirects` (boolean, optional, default: false) — 是否解析端点重定向并返回最终响应。会跟随 1 次重定向，并以不带请求体的 GET 请求访问；此工具中配置的任何内容（标头、身份验证、客户端证书）都不会发送到重定向目标。端点和重定向目标均必须使用 HTTPS。不支持 API 集成工具。
  - `follow_redirects_allowed_domains` (list of string, optional) — 重定向可能指向的域名，例如 'test.example.com'。跟随重定向时必填，列表外的目标将被拒绝。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。必须介于 5 秒和 300 秒之间（含）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。

### ConversationHistoryTranscriptToolCallCommonModelInputToolDetails

- `type`: `api_integration_webhook` (ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails)
  - `webhook_details` (ConversationHistoryTranscriptToolCallWebhookDetails, required)
  - `credential_id` (string, optional, default: )
  - `integration_connection_id` (string, optional, default: )
  - `integration_id` (string, optional, default: )
- `type`: `client` (ConversationHistoryTranscriptToolCallClientDetails)
  - `parameters` (string, required)
- `type`: `mcp` (ConversationHistoryTranscriptToolCallMCPDetails)
  - `approval_policy` (string, required)
  - `integration_type` (string, required)
  - `mcp_server_id` (string, required)
  - `mcp_server_name` (string, required)
  - `mcp_tool_description` (string, optional, default: )
  - `mcp_tool_name` (string, optional, default: )
  - `parameters` (map from string to string, optional)
  - `requires_approval` (boolean, optional, default: false)
- `type`: `webhook` (ConversationHistoryTranscriptToolCallWebhookDetails)
  - `method` (string, required)
  - `url` (string, required)
  - `body` (string, optional, nullable)
  - `headers` (map from string to string, optional)
  - `path_params` (map from string to string, optional)
  - `query_params` (map from string to string, optional)

### ConversationHistoryTranscriptSystemToolResultCommonModel-Input

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("system", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (ConversationHistoryTranscriptSystemToolResultCommonModelInputResult, optional, nullable)

### ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("api_integration_webhook", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `integration_id` (string, optional, default: )
- `credential_id` (string, optional, default: )
- `integration_connection_id` (string, optional, default: )

### ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("workflow", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (WorkflowToolResponseModel-Input, optional, nullable) — workflow 工具响应的通用模型。

### ConversationHistoryTranscriptToolCallWebhookDetails

- `method` (string, required)
- `url` (string, required)
- `headers` (map from string to string, optional)
- `path_params` (map from string to string, optional)
- `query_params` (map from string to string, optional)
- `body` (string, optional, nullable)

### DynamicVariableUpdateCommonModel

跟踪工具执行期间发生的动态变量更新。

- `variable_name` (string, required)
- `old_value` (string, required, nullable)
- `new_value` (string, required)
- `updated_at` (double, required)
- `tool_name` (string, required)
- `tool_request_id` (string, required)

### ConversationHistoryTranscriptSystemToolResultCommonModelOutputResult

- `result_type`: `dummy` (DummyToolResultModel)
- `result_type`: `end_call_success` (EndCallToolResultModel)
  - `message` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `end_procedure_error` (EndProcedureToolResultErrorModel)
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_id`
  - `procedure_id` (string, optional, nullable)
- `result_type`: `end_procedure_success` (EndProcedureToolResultSuccessModel)
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: )
  - `status` ("success", optional, default: success)
- `result_type`: `knowledge_base_rag_success` (KnowledgeBaseRagToolResultModel)
  - `chunk_count` (integer, optional, default: 0) — 检索到的相关块数量
  - `chunks` (list of KnowledgeBaseRagChunkModel, optional) — 检索到的分块；仅在 rag-result-in-tool-result 模式下填充。
  - `message` (string, optional, default: Referenced knowledge base.) — 供 LLM 使用的搜索结果人类可读状态
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_documents`, `no_results`
- `result_type`: `knowledge_base_success` (KnowledgeBaseToolResultModel)
  - `chunk_count` (integer, optional, default: 0)
  - `message` (string, optional, default: Referenced knowledge base.)
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_matching_documents`, `no_results`
- `result_type`: `language_detection_success` (LanguageDetectionToolResultModel)
  - `language` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `play_dtmf_error` (PlayDTMFResultErrorModel)
  - `error` (string, required)
  - `details` (string, optional, nullable)
  - `status` ("error", optional, default: error)
- `result_type`: `play_dtmf_success` (PlayDTMFResultSuccessModel)
  - `dtmf_tones` (string, required)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `skip_turn_success` (SkipTurnToolResponseModel)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `start_procedure_error` (StartProcedureToolResultErrorModel)
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_name`, `already_active`
  - `procedure_id` (string, optional, nullable)
- `result_type`: `start_procedure_success` (StartProcedureToolResultSuccessModel)
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: Procedure is now started. Follow its instructions from the <active-procedures> section of your system prompt.)
  - `procedure_entry_workflow_node` (string, optional, nullable)
  - `procedure_return_workflow_node` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `testing_tool_result` (TestToolResultModel)
  - `reason` (string, optional, default: Skipping tool call in test mode)
  - `status` ("success", optional, default: success)
  - `to_agent` (string, optional, nullable)
  - `to_node` (string, optional, nullable)
- `result_type`: `transfer_to_agent_error` (TransferToAgentToolResultErrorModel)
  - `error` (string, required)
  - `from_agent` (string, required)
  - `status` ("error", optional, default: error)
- `result_type`: `transfer_to_agent_success` (TransferToAgentToolResultSuccessModel)
  - `condition` (string, required)
  - `from_agent` (string, required)
  - `to_agent` (string, required)
  - `branch_info` (TransferToAgentToolResultSuccessModelOutputBranchInfo, optional, nullable)
  - `delay_ms` (integer, optional, default: 0)
  - `enable_transferred_agent_first_message` (boolean, optional, default: false)
  - `preserve_client_tts_overrides` (boolean, optional, default: false)
  - `preserve_voice_settings` (boolean, optional, default: false)
  - `status` ("success", optional, default: success)
  - `to_node` (string, optional, nullable)
  - `transfer_message` (string, optional, nullable)
- `result_type`: `transfer_to_number_amazon_connect_success` (TransferToNumberResultAmazonConnectSuccessModel)
  - `client_message` (string, optional, nullable) — 将会话交还给 Amazon Connect 前向来电者播放的消息。
  - `note` (string, optional, nullable) — 当智能体复述无效选项且已使用唯一配置的选项时设置。
  - `reason` (string, optional, nullable) — 智能体升级的原因，会随 Escalate 结果发送至 Amazon Connect。
  - `status` ("success", optional, default: success)
- `result_type`: `transfer_to_number_error` (TransferToNumberResultErrorModel)
  - `error` (string, required)
  - `details` (string, optional, nullable)
  - `status` ("error", optional, default: error)
- `result_type`: `transfer_to_number_exotel_success` (TransferToNumberResultExotelSuccessModel)
  - `transfer_number` (string, required)
  - `agent_message` (string, optional, nullable)
  - `note` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `transfer_to_number_sip_success` (TransferToNumberResultSipSuccessModel)
  - `transfer_number` (string, required)
  - `note` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `transfer_to_number_twilio_success` (TransferToNumberResultTwilioSuccessModel)
  - `agent_message` (string, required)
  - `conference_name` (string, required)
  - `transfer_number` (string, required)
  - `client_message` (string, optional, nullable)
  - `note` (string, optional, nullable)
  - `post_dial_digits` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `voicemail_detection_success` (VoiceMailDetectionResultSuccessModel)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
  - `voicemail_message` (string, optional, nullable)

### WorkflowToolResponseModel-Output

workflow 工具响应的通用模型。

- `steps` (list of WorkflowToolResponseModelOutputStepsItems, optional)

### LLMTokensCategoryUsage

- `tokens` (integer, optional, default: 0)
- `price` (double, optional, default: 0)

### LiteralJsonSchemaPropertyType

- enum
  - Allowed values: `boolean`, `string`, `integer`, `number`
- list of string

### AllowedValues

- `dynamic_variable` (string, required) — 动态变量名称，必须解析为包含允许值的 JSON 数组，例如 ["ws_alpha", "ws_beta"]。系统变量仅在解析为列表时有效。

### LiteralJsonSchemaPropertyConstantValue

用于此属性的常量值。与 description、dynamic_variable、is_system_provided 和 is_omitted 互斥。

- string
- integer
- double
- boolean

### SystemToolConfig

系统工具是用于调用服务器系统方法的工具

- `name` (string, required)
- `params` (ToolRequestModelToolConfigDiscriminatorMappingSystemParams, required)
- `description` (string, optional, default: ) — 说明何时应使用该工具及其功能。留空则使用针对该工具类型优化的默认说明。
- `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。
- `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
  - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
- `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
  - Allowed values: `auto`, `force`, `off`
- `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
- `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
  - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
- `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
  - Allowed values: `auto`, `always`
- `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
  - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
- `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
- `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。

### CustomLlmApiKey

用于身份验证的 API 密钥。可以是工作区密钥引用 \{'secret\_id': '...'}，也可以是环境变量引用 \{'env\_var\_label': '...'}。

- ConvAISecretLocator: ConvAISecretLocator
- ConvAIEnvVarLocator: ConvAIEnvVarLocator

### CustomLlmAuthConnection

用于认证的可选工作区身份验证连接。仅支持生成 Authorization Bearer 令牌的身份验证连接；不支持 Basic 认证、mTLS、自定义标头和 URL 密钥认证连接。

- AuthConnectionLocator: AuthConnectionLocator
- EnvironmentAuthConnectionLocator: EnvironmentAuthConnectionLocator

### CustomLlmRequestHeaders

- string
- ConvAISecretLocator: ConvAISecretLocator
- ConvAIDynamicVariable: ConvAIDynamicVariable
- ConvAIEnvVarLocator: ConvAIEnvVarLocator

### KnowledgeBaseToolInfo

- `enabled_strategies` (list of enum, optional) — 向模型公开的搜索策略。不能为空。
  - Allowed values: `cat`, `keyword`, `semantic`, `ls`

### ApiIntegrationWebhookOverrides

- `schema_overrides` (map from string to ApiIntegrationWebhookOverridesSchemaOverrides, optional, nullable)
- `response_filter_mode` (enum, optional, nullable, default: all) — 控制工具响应在对智能体可见前的过滤方式。
  - Allowed values: `all`, `allow`, `hide_all`
- `response_filters` (list of string, optional, nullable)
- `request_headers` (map from string to ApiIntegrationWebhookOverridesRequestHeaders, optional, nullable)

### DynamicVariableAssignment

Configuration for extracting values from tool responses and assigning them to dynamic variables.

- `dynamic_variable` (string, required) — 要分配提取值的动态变量名称
- `value_path` (string, required) — 用于从源中提取值的点表示法路径（例如 'user.name' 或 'data.0.id'）
- `source` ("response", optional, default: response) — 提取值的来源。目前仅支持 'response'。
- `sanitize` (boolean, optional, default: false) — 如果为 true，此赋值的值会在发送给 LLM 和转录文本前从工具响应中移除，但仍会用于变量赋值处理。
- `preserve_native_type` (boolean, optional, default: false) — 如果为 true，从工具响应中提取的非标量值（列表、对象）将以原生类型存储，而非转换为 JSON 字符串。启用后，可将提取的数组直接用作列表动态变量。

### DynamicVariablesConfig

- `dynamic_variable_placeholders` (map from string to any, optional) — 动态变量占位符及其值的字典。

### ObjectJsonSchemaProperty-Input

- `property_kind` (enum, optional, default: object)
  - Allowed values: `array`, `object`
- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 设置后，整个参数将在运行时从此动态变量填充。与 description（由 LLM 提供的值）、constant_value 和 is_omitted 互斥。
- `constant_value` (map from string to any, optional, nullable) — 设置后，整个对象将在运行时使用此常量 JSON 值。与 description（由 LLM 提供的对象）、dynamic_variable 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable 和 constant_value 互斥。
- `type` ("object", optional, default: object)
- `required` (list of string, optional)
- `properties` (map from string to ObjectJsonSchemaPropertyInput, optional)
- `required_constraints` (RequiredConstraints, optional, nullable) — 适用于必填字段的 anyOf/allOf 组合约束包装器。

### ToolRequestModelToolConfigDiscriminatorMappingSystemParams

- `system_tool_type`: `end_call` (EndCallToolConfig)
- `system_tool_type`: `end_procedure` (EndProcedureToolConfig)
  - `procedures` (map from string to ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingEndProcedureProcedures, optional)
- `system_tool_type`: `knowledge_base` (KnowledgeBaseToolConfig)
  - `enabled_strategies` (list of enum, optional)
    - Allowed values: `cat`, `keyword`, `semantic`, `ls`
- `system_tool_type`: `knowledge_base_rag` (KnowledgeBaseRagToolConfig)
- `system_tool_type`: `language_detection` (LanguageDetectionToolConfig)
  - `only_at_conversation_start` (boolean, optional, default: false) — 如果前 2 轮用户发言未发生语言切换，之后的切换尝试将失败，对话将保持当前语言。如果在这几轮中发生语言切换，之后仍可切换。启用此项可降低错误切换的可能性。
- `system_tool_type`: `play_keypad_touch_tone` (PlayDTMFToolConfig)
  - `suppress_turn_after_dtmf` (boolean, optional, default: false) — 如果为 true，智能体播放 DTMF 音后不会继续生成语音。这可防止智能体语音干扰 IVR 系统。
  - `use_out_of_band_dtmf` (boolean, optional, default: true) — 将 DTMF 音作为带外 RTP 事件（RFC 4733）发送，而非带内音频。仅对通过 SIP 中继导入的号码生效。
- `system_tool_type`: `skip_turn` (SkipTurnToolConfig)
  - `wait_timeout_secs` (double, optional, default: -1) — 调用 skip_turn 后，智能体生成上下文跟进前的等待秒数。等待期间，"静默后结束对话"计时器会暂停。-1 可禁用等待：调用 skip_turn 后，智能体会保持静默，直到调用方发言，且该计时器会继续运行。仅适用于语音对话。
- `system_tool_type`: `start_procedure` (StartProcedureToolConfig)
  - `procedures` (map from string to ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingStartProcedureProcedures, optional)
- `system_tool_type`: `transfer_to_agent` (TransferToAgentToolConfig)
  - `transfers` (list of AgentTransfer-Input, required)
- `system_tool_type`: `transfer_to_number` (TransferToNumberToolConfig)
  - `transfers` (list of PhoneNumberTransfer, required)
  - `enable_client_message` (boolean, optional, default: true) — 是否在客户等待转接时播放消息。为保持向后兼容，默认为 true。
- `system_tool_type`: `voicemail_detection` (VoicemailDetectionToolConfig)
  - `voicemail_message` (string, optional, nullable) — 检测到语音信箱时留下的可选消息。未提供时，检测到语音信箱后将立即结束通话。支持动态变量（例如 \{\{system\_\_time}}、\{\{system\_\_call\_duration\_secs}}、\{\{custom\_variable}}）。

### WebhookToolApiSchemaConfig-Input

- `url` (string, required) — 将发送 webhook 的 URL。可包含路径参数，例如 [https://example.com/agents/\{agent\_id}](https://example.com/agents/\{agent_id})
- `request_headers` (map from string to WebhookToolApiSchemaConfigInputRequestHeaders, optional) — 请求中应包含的请求头
- `method` (enum, optional, default: GET) — webhook 使用的 HTTP 方法
  - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
- `path_params_schema` (map from string to LiteralJsonSchemaProperty, optional) — 路径参数的 Schema（如有）。键应与 URL 中的占位符匹配。
- `query_params_schema` (QueryParamsJsonSchema-Input, optional, nullable) — 查询参数的 Schema（如有）。这些参数将作为查询参数添加到 URL 末尾。注意：查询参数中的属性必须全部为字面量类型。
- `request_body_schema` (ObjectJsonSchemaProperty-Input, optional, nullable) — 请求正文参数的 Schema（如有）。用于 POST/PATCH/PUT 请求。该 Schema 应为作为 JSON 正文发送的对象。
- `response_body_schema` (ObjectJsonSchemaProperty-Input, optional, nullable) — 描述预期响应正文结构的 Schema。仅用于文档，不会提供给 LLM。
- `response_filter` (ResponseFilter, optional, nullable) — 在 LLM 查看回复前应用的可选允许列表过滤器，避免大型回复污染上下文。默认为完整回复。
- `content_type` (enum, optional, default: application/json) — Content type for the request body. Only applies to POST/PUT/PATCH requests.
  - Allowed values: `application/json`, `application/x-www-form-urlencoded`
- `auth_resolved_params` (list of string, optional) — 从身份验证连接而非 path_params_schema 解析的 URL 占位符（例如通过 UrlSecretAuthConnection 注入的密钥）。
- `auth_connection` (WebhookToolApiSchemaConfigInputAuthConnection, optional, nullable) — 用于向此 webhook 进行身份验证的可选认证连接

### ConversationHistoryTranscriptSystemToolResultCommonModelInputResult

- `result_type`: `dummy` (DummyToolResultModel)
- `result_type`: `end_call_success` (EndCallToolResultModel)
  - `message` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `end_procedure_error` (EndProcedureToolResultErrorModel)
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_id`
  - `procedure_id` (string, optional, nullable)
- `result_type`: `end_procedure_success` (EndProcedureToolResultSuccessModel)
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: )
  - `status` ("success", optional, default: success)
- `result_type`: `knowledge_base_rag_success` (KnowledgeBaseRagToolResultModel)
  - `chunk_count` (integer, optional, default: 0) — 检索到的相关块数量
  - `chunks` (list of KnowledgeBaseRagChunkModel, optional) — 检索到的分块；仅在 rag-result-in-tool-result 模式下填充。
  - `message` (string, optional, default: Referenced knowledge base.) — 供 LLM 使用的搜索结果人类可读状态
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_documents`, `no_results`
- `result_type`: `knowledge_base_success` (KnowledgeBaseToolResultModel)
  - `chunk_count` (integer, optional, default: 0)
  - `message` (string, optional, default: Referenced knowledge base.)
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_matching_documents`, `no_results`
- `result_type`: `language_detection_success` (LanguageDetectionToolResultModel)
  - `language` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `play_dtmf_error` (PlayDTMFResultErrorModel)
  - `error` (string, required)
  - `details` (string, optional, nullable)
  - `status` ("error", optional, default: error)
- `result_type`: `play_dtmf_success` (PlayDTMFResultSuccessModel)
  - `dtmf_tones` (string, required)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `skip_turn_success` (SkipTurnToolResponseModel)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `start_procedure_error` (StartProcedureToolResultErrorModel)
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_name`, `already_active`
  - `procedure_id` (string, optional, nullable)
- `result_type`: `start_procedure_success` (StartProcedureToolResultSuccessModel)
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: Procedure is now started. Follow its instructions from the <active-procedures> section of your system prompt.)
  - `procedure_entry_workflow_node` (string, optional, nullable)
  - `procedure_return_workflow_node` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `testing_tool_result` (TestToolResultModel)
  - `reason` (string, optional, default: Skipping tool call in test mode)
  - `status` ("success", optional, default: success)
  - `to_agent` (string, optional, nullable)
  - `to_node` (string, optional, nullable)
- `result_type`: `transfer_to_agent_error` (TransferToAgentToolResultErrorModel)
  - `error` (string, required)
  - `from_agent` (string, required)
  - `status` ("error", optional, default: error)
- `result_type`: `transfer_to_agent_success` (TransferToAgentToolResultSuccessModel)
  - `condition` (string, required)
  - `from_agent` (string, required)
  - `to_agent` (string, required)
  - `branch_info` (TransferToAgentToolResultSuccessModelInputBranchInfo, optional, nullable)
  - `delay_ms` (integer, optional, default: 0)
  - `enable_transferred_agent_first_message` (boolean, optional, default: false)
  - `preserve_client_tts_overrides` (boolean, optional, default: false)
  - `preserve_voice_settings` (boolean, optional, default: false)
  - `status` ("success", optional, default: success)
  - `to_node` (string, optional, nullable)
  - `transfer_message` (string, optional, nullable)
- `result_type`: `transfer_to_number_amazon_connect_success` (TransferToNumberResultAmazonConnectSuccessModel)
  - `client_message` (string, optional, nullable) — 将会话交还给 Amazon Connect 前向来电者播放的消息。
  - `note` (string, optional, nullable) — 当智能体复述无效选项且已使用唯一配置的选项时设置。
  - `reason` (string, optional, nullable) — 智能体升级的原因，会随 Escalate 结果发送至 Amazon Connect。
  - `status` ("success", optional, default: success)
- `result_type`: `transfer_to_number_error` (TransferToNumberResultErrorModel)
  - `error` (string, required)
  - `details` (string, optional, nullable)
  - `status` ("error", optional, default: error)
- `result_type`: `transfer_to_number_exotel_success` (TransferToNumberResultExotelSuccessModel)
  - `transfer_number` (string, required)
  - `agent_message` (string, optional, nullable)
  - `note` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `transfer_to_number_sip_success` (TransferToNumberResultSipSuccessModel)
  - `transfer_number` (string, required)
  - `note` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `transfer_to_number_twilio_success` (TransferToNumberResultTwilioSuccessModel)
  - `agent_message` (string, required)
  - `conference_name` (string, required)
  - `transfer_number` (string, required)
  - `client_message` (string, optional, nullable)
  - `note` (string, optional, nullable)
  - `post_dial_digits` (string, optional, nullable)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
- `result_type`: `voicemail_detection_success` (VoiceMailDetectionResultSuccessModel)
  - `reason` (string, optional, nullable)
  - `status` ("success", optional, default: success)
  - `voicemail_message` (string, optional, nullable)

### WorkflowToolResponseModel-Input

workflow 工具响应的通用模型。

- `steps` (list of WorkflowToolResponseModelInputStepsItems, optional)

### KnowledgeBaseRagChunkModel

- `chunk_id` (string, required)
- `document_id` (string, required)
- `content` (string, required)

### TransferToAgentToolResultSuccessModelOutputBranchInfo

- `branch_reason`: `configured` (TransferBranchInfoConfigured)
  - `branch_id` (string, required)
- `branch_reason`: `defaulting_to_main` (TransferBranchInfoDefaultingToMain)
  - `branch_id` (string, required)
- `branch_reason`: `traffic_split` (TransferBranchInfoTrafficSplit)
  - `branch_id` (string, required)
  - `traffic_percentage` (double, required)

### WorkflowToolResponseModelOutputStepsItems

- `type`: `edge` (WorkflowToolEdgeStepModel)
  - `edge_id` (string, required)
  - `step_latency_secs` (double, required)
  - `target_node_id` (string, required)
- `type`: `max_iterations_exceeded` (WorkflowToolMaxIterationsExceededStepModel)
  - `max_iterations` (integer, required)
  - `step_latency_secs` (double, required)
- `type`: `nested_tools` (WorkflowToolNestedToolsStepModel)
  - `is_successful` (boolean, required)
  - `node_id` (string, required)
  - `requests` (list of ConversationHistoryTranscriptToolCallCommonModel-Output, required)
  - `results` (list of WorkflowToolResponseModelOutputStepsItemsDiscriminatorMappingNestedToolsResultsItems, required)
  - `step_latency_secs` (double, required)

### ConvAISecretLocator

用于引用智能体密钥存储中的密钥。

- `secret_id` (string, required)

### ConvAIEnvVarLocator

用于通过标签引用环境变量。

- `env_var_label` (string, required)

### AuthConnectionLocator

用于引用工作区身份验证连接存储中的身份验证连接。

- `auth_connection_id` (string, required)

### EnvironmentAuthConnectionLocator

通过标签引用类型为 'auth_connection' 的环境变量。 运行时会解析为当前环境的认证连接， 并回退到默认环境。

- `env_var_label` (string, required)

### ConvAIDynamicVariable

用于引用动态变量。

- `variable_name` (string, required)

### ApiIntegrationWebhookOverridesSchemaOverrides

- `source`: `constant` (ConstantSchemaOverride)
  - `constant_value` (WorkflowToolLocatorSchemaOverridesDiscriminatorMappingConstantConstantValue, required, nullable) — 要使用的常量值
- `source`: `dynamic_variable` (DynamicVariableSchemaOverride)
  - `dynamic_variable` (string, required) — 要使用的动态变量名称
- `source`: `llm` (LLMSchemaOverride)
  - `prompt` (string, optional, nullable) — LLM 的提示词覆盖内容。未提供时，使用原始架构描述。
- `source`: `omit` (OmitSchemaOverride)

### ApiIntegrationWebhookOverridesRequestHeaders

- string
- ConvAIDynamicVariable: ConvAIDynamicVariable

### ObjectJsonSchemaPropertyInput

- LiteralJsonSchemaProperty: LiteralJsonSchemaProperty
- ObjectJsonSchemaProperty: ObjectJsonSchemaProperty-Input
- ArrayJsonSchemaProperty: ArrayJsonSchemaProperty-Input

### RequiredConstraints

适用于必填字段的 anyOf/allOf 组合约束包装器。

- `any_of` (list of RequiredConstraint, optional)
- `all_of` (list of RequiredConstraint, optional)

### ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingEndProcedureProcedures

- ProcedureVersionRef: ProcedureVersionRef
- ProcedureDraftRef: ProcedureDraftRef

### ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingStartProcedureProcedures

- ProcedureVersionRef: ProcedureVersionRef
- ProcedureDraftRef: ProcedureDraftRef

### AgentTransfer-Input

- `condition` (string, required)
- `agent_id` (string, optional, nullable)
- `branch_id` (string, optional, nullable)
- `node_id` (string, optional, nullable)
- `delay_ms` (integer, optional, default: 0)
- `transfer_message` (string, optional, nullable)
- `enable_transferred_agent_first_message` (boolean, optional, default: false)
- `is_workflow_node_transfer` (boolean, optional, default: false)
- `preserve_client_tts_overrides` (boolean, optional, default: false) — 定义是否将 TTS 客户端覆盖设置沿用至被转接的智能体。
- `preserve_voice_settings` (boolean, optional, default: false) — 定义是否将基础音色、TTS 模型和音色设置沿用至被转接的智能体。

### PhoneNumberTransfer

- `transfer_destination` (PhoneNumberTransferTransferDestination, required)
- `condition` (string, required)
- `custom_sip_headers` (list of PhoneNumberTransferCustomSipHeadersItems, optional) — 转接通话时包含的自定义 SIP 请求头。每个请求头可以是静态值或动态变量引用。
- `transfer_type` (enum, optional, default: conference)
  - Allowed values: `blind`, `conference`, `sip_refer`
- `sip_refer_play_dialtone` (boolean, optional, default: true) — 设为 True 时，在 SIP REFER 转接完成期间，原始通话线路会播放回铃音。该音调会通过 RTP 传输给执行 REFER 的 SIP 对端，因此如果接收系统（如 SBC 或呼叫中心）不应听到该音调，请禁用此项。禁用后，呼叫方在转接完成前将听到静音。仅适用于 SIP REFER 转接。
- `uui` (UUITransferConfig, optional, nullable) — 附加到 SIP REFER 转接的用户间信息（User-to-User Information，RFC 7433）。可在转接过程中携带 CRM 标识符或升级原因等通话上下文。
- `post_dial_digits` (PhoneNumberTransferPostDialDigits, optional, nullable) — 通话接通后发送的 DTMF 按键（例如，分机号使用 'ww1234'）。可以是静态值或动态变量引用。使用 'w' 表示暂停 0.5 秒。仅支持 Twilio 转接。
- `phone_number` (string, optional, nullable, deprecated)

### WebhookToolApiSchemaConfigInputRequestHeaders

- string
- ConvAISecretLocator: ConvAISecretLocator
- ConvAIDynamicVariable: ConvAIDynamicVariable
- ConvAIEnvVarLocator: ConvAIEnvVarLocator

### QueryParamsJsonSchema-Input

- `properties` (map from string to LiteralJsonSchemaProperty, required)
- `required` (list of string, optional)

### ResponseFilter

Configuration for filtering tool responses before they are visible to the agent.

- `mode` (enum, optional, default: all) — 控制工具响应的过滤方式。'all' 返回完整响应，'allow' 仅返回指定路径，'hide_all' 隐藏整个响应。
  - Allowed values: `all`, `allow`, `hide_all`
- `filters` (list of string, optional) — 当 mode 为 'allow' 时要包含的点表示法路径（例如 ['ticket.id', 'ticket.status']）。
- `content_type` ("application/json", optional, default: application/json) — Content type for response filtering. Only 'application/json' responses are filtered.

### WebhookToolApiSchemaConfigInputAuthConnection

用于向此 webhook 进行身份验证的可选认证连接

- AuthConnectionLocator: AuthConnectionLocator
- EnvironmentAuthConnectionLocator: EnvironmentAuthConnectionLocator

### TransferToAgentToolResultSuccessModelInputBranchInfo

- `branch_reason`: `configured` (TransferBranchInfoConfigured)
  - `branch_id` (string, required)
- `branch_reason`: `defaulting_to_main` (TransferBranchInfoDefaultingToMain)
  - `branch_id` (string, required)
- `branch_reason`: `traffic_split` (TransferBranchInfoTrafficSplit)
  - `branch_id` (string, required)
  - `traffic_percentage` (double, required)

### WorkflowToolResponseModelInputStepsItems

- `type`: `edge` (WorkflowToolEdgeStepModel)
  - `edge_id` (string, required)
  - `step_latency_secs` (double, required)
  - `target_node_id` (string, required)
- `type`: `max_iterations_exceeded` (WorkflowToolMaxIterationsExceededStepModel)
  - `max_iterations` (integer, required)
  - `step_latency_secs` (double, required)
- `type`: `nested_tools` (WorkflowToolNestedToolsStepModel)
  - `is_successful` (boolean, required)
  - `node_id` (string, required)
  - `requests` (list of ConversationHistoryTranscriptToolCallCommonModel-Input, required)
  - `results` (list of WorkflowToolResponseModelInputStepsItemsDiscriminatorMappingNestedToolsResultsItems, required)
  - `step_latency_secs` (double, required)

### WorkflowToolResponseModelOutputStepsItemsDiscriminatorMappingNestedToolsResultsItems

- ConversationHistoryTranscriptOtherToolsResultCommonModel: ConversationHistoryTranscriptOtherToolsResultCommonModel
- ConversationHistoryTranscriptSystemToolResultCommonModel: ConversationHistoryTranscriptSystemToolResultCommonModel-Output
- ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel: ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output
- ConversationHistoryTranscriptWorkflowToolsResultCommonModel: ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output

### WorkflowToolLocatorSchemaOverridesDiscriminatorMappingConstantConstantValue

要使用的常量值

- string
- integer
- double
- boolean
- list of any
- map from string to any

### ArrayJsonSchemaProperty-Input

- `property_kind` (enum, optional, default: array)
  - Allowed values: `array`, `object`
- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 设置后，整个参数将在运行时从此动态变量填充。与 description（由 LLM 提供的值）、constant_value 和 is_omitted 互斥。
- `constant_value` (list of any, optional, nullable) — 设置后，整个数组将在运行时使用此常量值。与 description（由 LLM 提供的数组）、dynamic_variable 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable 和 constant_value 互斥。
- `type` ("array", optional, default: array)
- `items` (ArrayJsonSchemaPropertyInputItems, optional, default: {"allowed_values_dynamic_variable":"","constant_value":"","description":"Array element","dynamic_variable":"","is_omitted":false,"is_system_provided":false,"type":"string"}) — 数组元素的 Schema。

### RequiredConstraint

必须全部存在才能满足此约束的一组字段。

- `required` (list of string, required)

### ProcedureVersionRef

- `procedure_id` (string, required) — 流程 ID
- `version_id` (string, required) — 过程版本的版本 ID。

### ProcedureDraftRef

- `procedure_id` (string, required) — 流程 ID
- `version_id` (any, optional)

### PhoneNumberTransferTransferDestination

- `type`: `phone` (PhoneNumberTransferDestination)
  - `phone_number` (string, required)
- `type`: `phone_dynamic_variable` (PhoneNumberDynamicVariableTransferDestination)
  - `phone_number` (string, required)
- `type`: `sip_uri` (SIPUriTransferDestination)
  - `sip_uri` (string, required)
- `type`: `sip_uri_dynamic_variable` (SIPUriDynamicVariableTransferDestination)
  - `sip_uri` (string, required)

### PhoneNumberTransferCustomSipHeadersItems

- `type`: `dynamic` (CustomSIPHeaderWithDynamicVariable)
  - `key` (string, required) — SIP 请求头名称（例如 'X-Customer-ID'）
  - `value` (string, required) — 要解析的动态变量名称
- `type`: `static` (CustomSIPHeader)
  - `key` (string, required) — SIP 请求头名称（例如 'X-Customer-ID'）
  - `value` (string, required) — 标头值

### UUITransferConfig

用于 SIP REFER 转接的用户间信息（User-to-User Information）封装（RFC 7433）。 出站载荷采用十六进制编码（RFC 7433 唯一规定的编码）。协议判别维度允许通过配置表达各平台格式（Talkdesk、Genesys 等），而非分散使用转接标记。还可在此添加更多维度（ASCII 编码、标头名称、用途/内容参数），无需修改转接模型。

- `data` (string, required) — 在 SIP REFER 转接中发送的 UUI 载荷。支持内联动态变量，并会在转接时进行十六进制编码。
- `protocol_discriminator` (string, optional, nullable) — 可选的单八位组协议区分符（2 个十六进制数字，例如 '00'）。Genesys Cloud 等平台需要此项，否则会剥离有效负载的第一个八位组。对于需要纯十六进制有效负载的 Talkdesk 等平台，请留空。
- `protocol_discriminator_mode` (enum, optional, default: prefix) — 如何附加 protocol\_discriminator。'prefix' 会将该字节前置到十六进制载荷（User-to-User=XX\<hex>;encoding=hex）；'pd\_parameter' 会将其作为单独参数发送（User-to-User=\<hex>;pd=XX;encoding=hex）。未设置 protocol\_discriminator 时将忽略此项。
  - Allowed values: `prefix`, `pd_parameter`

### PhoneNumberTransferPostDialDigits

通话接通后发送的 DTMF 按键（例如，分机号使用 'ww1234'）。可以是静态值或动态变量引用。使用 'w' 表示暂停 0.5 秒。仅支持 Twilio 转接。

- `type`: `dynamic` (PostDialDigitsDynamicVariable)
  - `value` (string, required) — 要解析的动态变量名称
- `type`: `static` (PostDialDigitsStatic)
  - `value` (string, required) — 通话接通后发送的 DTMF 按键（例如，分机号使用 'ww1234'）

### WorkflowToolResponseModelInputStepsItemsDiscriminatorMappingNestedToolsResultsItems

- ConversationHistoryTranscriptOtherToolsResultCommonModel: ConversationHistoryTranscriptOtherToolsResultCommonModel
- ConversationHistoryTranscriptSystemToolResultCommonModel: ConversationHistoryTranscriptSystemToolResultCommonModel-Input
- ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel: ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input
- ConversationHistoryTranscriptWorkflowToolsResultCommonModel: ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input

### ArrayJsonSchemaPropertyInputItems

数组元素的 Schema。

- LiteralJsonSchemaProperty: LiteralJsonSchemaProperty
- ObjectJsonSchemaProperty: ObjectJsonSchemaProperty-Input
- ArrayJsonSchemaProperty: ArrayJsonSchemaProperty-Input

## Examples

**Request**

```json
{
  "simulation_specification": {
    "simulated_user_config": {
      "first_message": "Hello, how can I help you today?",
      "language": "en",
      "disable_first_message_interruptions": false
    }
  }
}
```

**Response**

```json
{
  "simulated_conversation": [
    {
      "role": "user",
      "time_in_call_secs": 1,
      "agent_metadata": {
        "agent_id": "string",
        "branch_id": "string",
        "workflow_node_id": "string",
        "version_id": "string"
      },
      "message": "string",
      "multivoice_message": {
        "parts": [
          {
            "text": "string",
            "voice_label": "string",
            "time_in_call_secs": 1
          }
        ]
      },
      "tool_calls": [
        {
          "request_id": "string",
          "tool_name": "string",
          "params_as_json": "string",
          "tool_has_been_called": true,
          "type": "system",
          "tool_id": "string",
          "tool_details": {
            "type": "webhook",
            "method": "string",
            "url": "string",
            "body": "string",
            "headers": {},
            "path_params": {},
            "query_params": {}
          }
        }
      ],
      "tool_results": [
        {
          "dynamic_variable_updates": [
            {
              "new_value": "string",
              "old_value": "string",
              "tool_name": "string",
              "tool_request_id": "string",
              "updated_at": 1.1,
              "variable_name": "string"
            }
          ],
          "error_type": "",
          "is_blocked": false,
          "is_error": true,
          "raw_error_message": "",
          "request_id": "string",
          "result_value": "string",
          "tool_has_been_called": true,
          "tool_latency_secs": 0,
          "tool_name": "string",
          "type": "client"
        }
      ],
      "feedback": {
        "score": "like",
        "time_in_call_secs": 1
      },
      "llm_override": "string",
      "producing_llm": "string",
      "conversation_turn_metrics": {
        "metrics": {},
        "convai_asr_provider": "string",
        "convai_tts_model": "string",
        "convai_tts_cascade": "string",
        "voice_id": "string"
      },
      "rag_retrieval_info": {
        "chunks": [
          {
            "document_id": "string",
            "chunk_id": "string",
            "vector_distance": 1.1
          }
        ],
        "embedding_model": "e5_mistral_7b_instruct",
        "retrieval_query": "string",
        "rag_latency_secs": 1.1,
        "used_chunk_ids": [
          "string"
        ]
      },
      "llm_usage": {
        "model_usage": {}
      },
      "interrupted": false,
      "ignored_as_backchannel": false,
      "platform_event": "user_turn_timeout",
      "original_message": "string",
      "reasoning": [
        {
          "summary": "string",
          "provider_redact": false
        }
      ],
      "source_medium": "audio",
      "source_event_id": 1,
      "used_static_kb_document_ids": [
        "string"
      ],
      "user_identifier": "string",
      "id": "string",
      "triggered_guardrails": [
        {
          "guardrail_type": "custom",
          "guardrail_name": "string"
        }
      ],
      "file_input": {
        "file_id": "string",
        "original_filename": "string",
        "mime_type": "string",
        "file_url": "string"
      },
      "file_inputs": [
        {
          "file_id": "string",
          "original_filename": "string",
          "mime_type": "string",
          "file_url": "string"
        }
      ],
      "contextual_update_info": {
        "context_id": "string",
        "is_superseded": false
      },
      "reasoned": false
    }
  ],
  "analysis": {
    "call_successful": "success",
    "transcript_summary": "string",
    "evaluation_criteria_results": {},
    "data_collection_results": {},
    "evaluation_criteria_results_list": [
      {
        "criteria_id": "string",
        "result": "success",
        "rationale": "string",
        "scoring_mode": "binary",
        "score": 1,
        "max_score": 1
      }
    ],
    "data_collection_results_list": [
      {
        "data_collection_id": "string",
        "rationale": "string",
        "name": "string",
        "value": null,
        "json_schema": {
          "type": "string",
          "description": "A user-provided message"
        }
      }
    ],
    "call_success_score": 1.1,
    "call_summary_title": "string",
    "scoped": [
      {
        "scope": "conversation",
        "source_agent_id": "string",
        "successful": "success",
        "source_branch_id": "string",
        "evaluation_criteria_results": {},
        "data_collection_results": {},
        "success_score": 1.1
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation"

payload = { "simulation_specification": { "simulated_user_config": {
            "first_message": "Hello, how can I help you today?",
            "language": "en",
            "disable_first_message_interruptions": False
        } } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"simulation_specification":{"simulated_user_config":{"first_message":"Hello, how can I help you today?","language":"en","disable_first_message_interruptions":false}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation"

	payload := strings.NewReader("{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation")
  .header("Content-Type", "application/json")
  .body("{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation', [
  'body' => '{
  "simulation_specification": {
    "simulated_user_config": {
      "first_message": "Hello, how can I help you today?",
      "language": "en",
      "disable_first_message_interruptions": false
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["simulation_specification": ["simulated_user_config": [
      "first_message": "Hello, how can I help you today?",
      "language": "en",
      "disable_first_message_interruptions": false
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```