OpenMontage 语音 Agent 配置完全手册:从 conversation_config 到 platform_settings 的实时语音智能体实践指南
本文以 OpenMontage 仓库中的 Agent Configuration 参考文档为主体,系统讲解如何基于 ElevenLabs Conversational AI 平台配置一个可上线的实时语音 Agent:你会掌握 conversation_config(agent / tts / asr / turn / conversation / prompt)与 platform_settings(auth / call_limits / guardrails / privacy / widget)两大配置块的完整字段、默认值与取值范围,并学会用 CLI、Python/JavaScript SDK 与 cURL 完成 Agent 的创建、更新、删除与 CI/CD 推送,以及知识增强(RAG)、Custom LLM 接入等进阶能力。
该文档位于 OpenMontage 的 Agent 技能包 agents 技能 的 references 目录下,是整个"ElevenLabs Agents Platform"技能中配置参考的核心文件——技能入口文档在讲工具、Widget 嵌入、外呼等主题时都会指回这篇配置参考。技能声明的运行前提是网络访问与一个 ELEVENLABS_API_KEY 环境变量(见 SKILL.md 的 front-matter 中 requires.env 声明)。
前置准备:CLI、SDK 与 API Key
配置操作前需要完成安装与认证。OpenMontage 仓库的 .env.example 中已列出 ELEVENLABS_API_KEY= 变量位,说明该密钥是项目环境配置的一部分。安装方式(来自配套的 Installation 参考):
- CLI(推荐):
npm install -g @elevenlabs/cli(或 pnpm/yarn 全局安装),要求 Node.js 16.0.0+;API Key 安全存放在~/.agents/api_keys.json。 - Python SDK:
pip install elevenlabs,ElevenLabs()会自动读取环境变量ELEVENLABS_API_KEY。 - JavaScript/TypeScript SDK:
npm install @elevenlabs/elevenlabs-js(旧版elevenlabsnpm 包 v1.x 已弃用,浏览器端另装@elevenlabs/client、@elevenlabs/react)。 - cURL / REST:所有请求通过
xi-api-key请求头携带 API Key。
补充说明:OpenMontage 自身的 TTS 工具链(如 fal_elevenlabs_tts.py、elevenlabs_tts.py)面向的是"生成配音音频"这一批处理场景,与本文的 Conversational AI Agent(实时语音对话)属于同一厂商生态下两条不同产品线,本文聚焦后者。
配置结构总览
创建一个 Agent 时,整个配置由顶层 name、conversation_config 与 platform_settings 三块组成,完整结构如下:
agent = client.conversational_ai.agents.create(
name="My Agent",
conversation_config={
"agent": {
"first_message": "Hello!",
"language": "en",
"prompt": { # LLM、system prompt、工具与知识库
"prompt": "You are helpful.",
"llm": "gemini-2.0-flash",
"tools": [...],
"built_in_tools": {...}
}
},
"tts": {...}, # 语音与 TTS 模型设置
"asr": {...}, # 语音识别设置
"turn": {...}, # 轮次交互行为
"conversation": {...}, # 时长、事件、监控
"vad": {...}, # 语音活动检测配置
"language_presets": {...} # 语言级覆盖
},
platform_settings={...} # 认证、通话限额
)
其中 conversation_config 控制实时对话行为,platform_settings 控制平台层的安全、限额与 Widget 行为。下面按小节逐一展开每个字段。
conversation_config 详解
agent:开场白与语言
conversation_config={
"agent": {
"first_message": "Hello! How can I help you today?",
"language": "en",
"disable_first_message_interruptions": False,
"prompt": {
"prompt": "You are a helpful assistant.",
"llm": "gemini-2.0-flash",
"temperature": 0.7
}
}
}
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
first_message |
string | "" |
会话开始时 Agent 说的第一句话 |
language |
string | "en" |
ISO 639-1 语言码(en、es、fr 等) |
disable_first_message_interruptions |
bool | false |
禁止用户打断开场白 |
hinglish_mode |
bool | false |
开启且语言为印地语时,Agent 以 Hinglish(印地语+英语混合)应答 |
dynamic_variables |
object | - | 含 dynamic_variable_placeholders 键值对的配置 |
prompt |
object | - | LLM 配置(见下文 prompt 小节) |
tts:语音合成
conversation_config={
"tts": {
"voice_id": "JBFqnCBsd6RMkjVDRZzb",
"model_id": "eleven_flash_v2_5",
"stability": 0.5,
"similarity_boost": 0.8,
"speed": 1.0,
"optimize_streaming_latency": 3,
"expressive_mode": True
}
}
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
voice_id |
string | "cjVigY5qzO86Huf0OWal" |
使用的音色 ID |
model_id |
string | - | TTS 模型(见下表) |
stability |
float | 0.5 |
0-1,越低表现力越强 |
similarity_boost |
float | 0.8 |
0-1,越高越贴近原声 |
speed |
float | 1.0 |
0.7-1.2,语速倍率 |
optimize_streaming_latency |
int | - | 0-4,越高延迟越低但质量略降 |
expressive_mode |
bool | true |
启用富表现力语音生成 |
agent_output_audio_format |
string | - | 输出音频编码格式 |
pronunciation_dictionary_locators |
array | - | 发音覆盖词典 |
可用的 Agent TTS 模型:
| 模型 ID | 语言数 | 延迟 |
|---|---|---|
eleven_flash_v2_5 |
32 | ~75ms(推荐) |
eleven_flash_v2 |
英语 | ~75ms |
eleven_turbo_v2_5 |
32 | ~250-300ms |
eleven_turbo_v2 |
英语 | ~250-300ms |
eleven_multilingual_v2 |
29 | 标准 |
eleven_v3_conversational |
70+ | 标准 |
从延迟数据看,实时对话场景应优先选择 eleven_flash_v2_5(~75ms),并在对响应速度极其敏感时配合 optimize_streaming_latency: 4 使用(见文末"低延迟助手"示例)。
asr:自动语音识别
conversation_config={
"asr": {
"quality": "high",
"keywords": ["ElevenLabs", "TechCorp"],
"user_input_audio_format": "pcm_16000"
}
}
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
quality |
string | "high" |
转写质量等级 |
provider |
string | "elevenlabs" |
ASR 提供方(elevenlabs 或 scribe_realtime) |
keywords |
array | - | 需要提升识别准确率的词表(如品牌名、产品名) |
user_input_audio_format |
string | - | 输入音频格式(如 pcm_16000、ulaw_8000) |
keywords 对业务场景很有价值:客服 Agent 常把公司名、产品线名放进词表以提升专有名词转写准确率。
turn:轮次交互(Turn-Taking)
conversation_config={
"turn": {
"turn_timeout": 7,
"turn_eagerness": "normal",
"silence_end_call_timeout": -1
}
}
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
turn_timeout |
number | 7 |
用户长时间未接话时,Agent 再次主动发起交互的等待秒数 |
turn_eagerness |
string | "normal" |
Agent 抢话积极度:patient(等用户说完)/ normal / eager(快速响应) |
silence_end_call_timeout |
number | -1 |
静默多久后结束通话(-1 表示禁用) |
initial_wait_time |
number | - | 等待用户开始说话的秒数 |
spelling_patience |
string | "auto" |
实体拼读耐心:auto 或 off |
speculative_turn |
bool | false |
启用投机性轮次检测 |
soft_timeout_config |
object | - | 用户静默时触发的软超时消息(见下表) |
soft_timeout_config 子字段:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
timeout_seconds |
number | -1 |
触发软超时的秒数(-1 禁用) |
message |
string | "Hhmmmm...yeah." |
超时时 Agent 说的话 |
use_llm_generated_message |
bool | false |
让 LLM 动态生成超时提示语 |
conversation:会话级控制
conversation_config.conversation 控制会话时长与监控:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
max_duration_seconds |
int | 600 |
会话最长时长(秒) |
text_only |
bool | false |
纯文本模式(规避音频计费) |
monitoring_enabled |
bool | false |
启用 WebSocket 实时监控 |
另外,conversation_config 顶层还支持 vad(语音活动检测)与 language_presets(语言级覆盖)两块配置,按具体接入方式取值。
prompt:LLM 行为配置
prompt 对象嵌套在 conversation_config.agent.prompt,是决定 Agent"大脑"的核心:
conversation_config={
"agent": {
"prompt": {
"prompt": "You are a helpful customer service agent...",
"llm": "gemini-2.0-flash",
"temperature": 0.7,
"max_tokens": 500,
"tools": [...],
"built_in_tools": {...},
"knowledge_base": [...]
}
}
}
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
prompt |
string | "" |
定义 Agent 行为的系统提示词 |
llm |
string | - | 模型 ID(见 LLM 提供方表) |
temperature |
float | 0 |
0-1,越高越有创造性 |
max_tokens |
int | -1 |
LLM 回复最大 token 数(-1 不限制) |
reasoning_effort |
string | - | 推理深度:none/minimal/low/medium/high(依赖模型) |
thinking_budget |
int | - | 推理模型的最大思考 token 数 |
tools |
array | - | Webhook 与 client 工具定义 |
built_in_tools |
object | - | 系统工具(end_call、transfer 等) |
tool_ids |
array | - | 引用预配置的工具 |
knowledge_base |
array | - | RAG 文档 |
custom_llm |
object | - | 自定义 LLM 端点配置 |
timezone |
string | - | IANA 时区(如 America/New_York) |
backup_llm_config |
object | - | 备用 LLM 配置 |
cascade_timeout_seconds |
number | 8 |
级联切换到备用 LLM 前的等待秒数(2-15) |
mcp_server_ids |
array | - | 要连接的 MCP 服务 ID |
native_mcp_server_ids |
array | - | 原生 MCP 服务 ID |
ignore_default_personality |
bool | - | 跳过默认人格指令 |
LLM 提供方与模型目录
| 提供方 | 模型 ID |
|---|---|
| OpenAI | gpt-5、gpt-5-mini、gpt-5-nano、gpt-4.1、gpt-4.1-mini、gpt-4.1-nano、gpt-4o、gpt-4o-mini、gpt-4-turbo |
| Anthropic | claude-sonnet-4-6、claude-sonnet-4-5、claude-sonnet-4、claude-haiku-4-5、claude-3-7-sonnet、claude-3-5-sonnet、claude-3-haiku |
gemini-3.1-flash-lite-preview、gemini-3-pro-preview、gemini-3-flash-preview、gemini-2.5-flash、gemini-2.5-flash-lite、gemini-2.0-flash、gemini-2.0-flash-lite |
|
| ElevenLabs 托管 | glm-45-air-fp8、qwen3-30b-a3b、gpt-oss-120b(超低延迟) |
| 自定义 | custom-llm(需配合 custom_llm 配置) |
模型目录会随平台更新,可通过 GET /v1/convai/llm/list 接口查询当前目录,包含弃用状态、token/上下文上限与能力标志(如是否支持图像输入)。
Workspace 环境变量:一份配置跨多环境部署
工作区(Workspace)级环境变量可以让同一份 Agent 配置跨多个部署环境复用:
- 在 server tool 与 MCP server 的 URL 中使用
{{system_env__label}}占位符; - 在需要密钥的工具请求头中使用
{ "env_var_label": "orders_api_key" },运行时解析为对应环境的密钥; - 在
auth_connection中使用{ "env_var_label": "orders_oauth" },运行时解析对应环境的授权连接。
这意味着 staging 与 production 可以共用同一份 agent 配置文件,仅在各自 Workspace 中维护不同的环境变量值。
Custom LLM:接入自己的推理端点
custom_llm 字段嵌套在 conversation_config.agent.prompt 内:
conversation_config={
"agent": {
"prompt": {
"prompt": "You are helpful.",
"llm": "custom-llm",
"custom_llm": {
"url": "https://your-llm-endpoint.com/v1/chat/completions",
"model_id": "your-model-id",
"api_key": {"secret_id": "your-secret-id"},
"api_type": "chat_completions" # 或 "responses"
}
}
}
}
配合 backup_llm_config + cascade_timeout_seconds(默认 8 秒,取值 2-15),可以为自建端点或第三方 LLM 建立超时级联容灾。
platform_settings:平台层安全、限额与 Widget
platform_settings={
"summary_language": "en",
"widget": {
"show_agent_status": True,
"show_conversation_id": True
},
"auth": {
"enable_auth": True,
"allowlist": [{"hostname": "example.com"}]
},
"call_limits": {
"agent_concurrency_limit": 10,
"daily_limit": 100
}
}
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
summary_language |
string | 摘要、标题、评估理由等分析输出的语言;省略时由 ElevenLabs 从会话内容推断 |
widget |
object | 托管 Widget 与可分享页配置 |
auth |
object | 认证与来源限制 |
call_limits |
object | 并发与每日用量限制 |
guardrails |
object | 内置安全与策略控制 |
privacy |
object | 录音、留存与对话历史脱敏设置 |
auth
| 字段 | 类型 | 说明 |
|---|---|---|
enable_auth |
bool | 要求使用签名 URL/token 建立连接 |
allowlist |
array | CORS 允许的来源 |
shareable_token |
string | 公开会话 token |
call_limits
| 字段 | 类型 | 说明 |
|---|---|---|
agent_concurrency_limit |
int | 最大并发会话数(默认 -1 不限制) |
daily_limit |
int | 每日最大会话数(默认 100000) |
bursting_enabled |
bool | 允许以 2 倍成本突破限额(默认 true) |
guardrails:内置安全护栏
platform_settings.guardrails 用于配置用户输入与 Agent 行为的内置安全控制。当前 schema 的关键字段:
| 字段 | 类型 | 说明 |
|---|---|---|
version |
string | 护栏配置版本,当前 schema 使用 "1" |
focus |
object | 让 Agent 保持话题、贴合配置的任务 |
prompt_injection |
object | 检测提示注入与指令覆盖尝试 |
custom |
object | 用户自定义的响应校验护栏 |
content |
object | 按类别的内容审核护栏 |
focus / prompt_injection 均通过 is_enabled(bool)开关启用。content 护栏的字段:
| 字段 | 类型 | 说明 |
|---|---|---|
execution_mode |
string | streaming 或 blocking |
config |
object | 分类别阈值设置 |
content.config 支持七个类别,每个类别均为对象:sexual、violence、harassment、self_harm、profanity、religion_or_politics、medical_and_legal_information。每个类别对象的字段:
| 字段 | 类型 | 说明 |
|---|---|---|
is_enabled |
bool | 是否启用该类别审核 |
threshold |
number 或 string | 类别阈值,可为数值分数,也可为 low / medium / high |
阻塞式(blocking)内容护栏与自定义护栏支持 trigger_action:要么立即结束会话,要么重试响应。重试机制会移除被拦截的回复、把你的反馈注入为 system message 并重新生成,最多重试 3 次,之后平台回退为结束会话。反馈模板可使用 {{trigger_reason}} 与 {{agent_message}} 占位符。
privacy:脱敏
platform_settings.privacy 控制录音、留存与脱敏行为,其中脱敏相关字段为 conversation_history_redaction:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
enabled |
bool | false |
是否启用对话历史脱敏 |
entities |
array | - | 要脱敏的实体类型。可用父类型如 name,或更具体的 name.name_given、email_address、contact_number、dob、age 等 |
脱敏作用于存储的转录文本、音频与分析结果,对处理 PII 的场景(客服、医疗)是必备配置。
widget:托管嵌入组件
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
dismissible |
bool | false |
用户是否可关闭 Widget |
show_agent_status |
bool | false |
工具运行期间是否展示 working/done/error 状态 |
show_conversation_id |
bool | true |
断开后是否显示会话 ID |
strip_audio_tags |
bool | true |
是否从消息中剥离音频标记 |
syntax_highlight_theme |
string | auto | 代码块高亮主题(light 或 dark),省略则自动检测 |
Widget 的前端嵌入属性(avatar-image-url、action-text 等)见同目录的 Widget Embedding 参考。
附加顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
tags |
array | 用于筛选的分类标签(如 ["production"]、["test"]) |
workflow |
object | 会话流程定义与工具交互序列 |
tags 在多 Agent 管理时非常实用:用 tags: ["test"] 标记实验性 Agent,tags: ["production"] 标记线上 Agent,配合 CLI 的 list 输出即可快速过滤。
Knowledge Base / RAG:知识增强
知识库同样配置在 conversation_config.agent.prompt 内:
agent = client.conversational_ai.agents.create(
name="Support Agent",
conversation_config={
"agent": {
"prompt": {
"prompt": "You are a support agent. Use the knowledge base to answer questions.",
"llm": "gemini-2.0-flash",
"knowledge_base": [
{"type": "file", "id": "doc-id", "name": "Product Guide", "usage_mode": "auto"}
],
"rag": {
"enabled": True,
"embedding_model": "qwen3_embedding_4b",
"max_documents_length": 50000,
"max_retrieved_rag_chunks_count": 20
}
}
},
"tts": {"voice_id": "JBFqnCBsd6RMkjVDRZzb"}
}
)
rag.embedding_model 支持三种嵌入模型:e5_mistral_7b_instruct、multilingual_e5_large_instruct 与 qwen3_embedding_4b。max_documents_length(单文档最大长度)与 max_retrieved_rag_chunks_count(每次检索最大 chunk 数)决定了检索召回的上限——客服知识库文档较长时应调大前者,问答需要更宽上下文时应调大后者。
CRUD 操作:CLI、SDK 与 REST
CLI 工作流(推荐)
# 初始化项目
elevenlabs agents init
# 从模板创建 Agent
elevenlabs agents add "My Agent" --template complete
elevenlabs agents add "Support Bot" --template customer-service
# 列出 Agent
elevenlabs agents list
# 查看状态
elevenlabs agents status
# 推送本地修改到平台
elevenlabs agents push
elevenlabs agents push --dry-run # 先预览变更
# 从平台导入 Agent
elevenlabs agents pull # 导入全部
elevenlabs agents pull --agent <agent-id> # 导入指定 Agent
elevenlabs agents pull --update # 覆盖本地配置
# 查看可用模板
elevenlabs agents templates list
elevenlabs agents templates show <template-name>
# 添加工具
elevenlabs tools add-webhook "API Tool"
elevenlabs tools add-client "UI Tool"
# 生成 Widget 嵌入代码
elevenlabs agents widget <agent-id>
技能入口文档列出的可用模板为:complete、minimal、voice-only、text-only、customer-service、assistant。CLI 在项目下会生成 agents.json、tools.json、tests.json 与 agent_configs/、tool_configs/、test_configs/ 目录结构,Agent 配置因此可以像普通代码一样进入版本控制。
SDK:列出与获取 Agent
# Python
agents = client.conversational_ai.agents.list()
for agent in agents.agents:
print(f"{agent.name}: {agent.agent_id}")
agent = client.conversational_ai.agents.get(agent_id="your-agent-id")
// JavaScript
const agents = await client.conversationalAi.agents.list();
const agent = await client.conversationalAi.agents.get("your-agent-id");
# REST
curl -X GET "https://api.elevenlabs.io/v1/convai/agents" \
-H "xi-api-key: $ELEVENLABS_API_KEY"
curl -X GET "https://api.elevenlabs.io/v1/convai/agents/your-agent-id" \
-H "xi-api-key: $ELEVENLABS_API_KEY"
SDK:更新 Agent(部分更新语义)
更新接口只包含你要改的字段,其余设置保持不变:
# 更新名称
client.conversational_ai.agents.update(agent_id="id", name="New Name")
# 更新 TTS 音色
client.conversational_ai.agents.update(agent_id="id", conversation_config={
"tts": {"voice_id": "EXAVITQu4vr4xnSDxMaL", "model_id": "eleven_flash_v2_5"}
})
# 更新 prompt/LLM(嵌套在 agent 下)
client.conversational_ai.agents.update(agent_id="id", conversation_config={
"agent": {"prompt": {"prompt": "New instructions.", "llm": "claude-sonnet-4", "temperature": 0.8}}
})
# 更新开场白
client.conversational_ai.agents.update(agent_id="id", conversation_config={
"agent": {"first_message": "Welcome back!"}
})
# 更新平台设置
client.conversational_ai.agents.update(agent_id="id", platform_settings={
"auth": {"enable_auth": True, "allowlist": [{"hostname": "myapp.com"}]}
})
// JavaScript
await client.conversationalAi.agents.update("id", { name: "New Name" });
await client.conversationalAi.agents.update("id", {
conversationConfig: { tts: { voiceId: "EXAVITQu4vr4xnSDxMaL" } }
});
await client.conversationalAi.agents.update("id", {
conversationConfig: { agent: { prompt: { prompt: "New instructions.", llm: "claude-sonnet-4" } } }
});
# cURL(PATCH 语义)
curl -X PATCH "https://api.elevenlabs.io/v1/convai/agents/your-agent-id" \
-H "xi-api-key: $ELEVENLABS_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "New Name"}'
可更新字段速查表:
| 配置区 | 字段 |
|---|---|
| 根 | name、tags |
conversation_config.agent |
first_message、language、disable_first_message_interruptions、dynamic_variables |
conversation_config.agent.prompt |
prompt、llm、temperature、max_tokens、reasoning_effort、tools、built_in_tools、knowledge_base、custom_llm、timezone |
conversation_config.tts |
voice_id、model_id、stability、similarity_boost、speed、optimize_streaming_latency、expressive_mode |
conversation_config.asr |
quality、provider、keywords、user_input_audio_format |
conversation_config.turn |
turn_timeout、turn_eagerness、silence_end_call_timeout、soft_timeout_config |
conversation_config.conversation |
max_duration_seconds、text_only、monitoring_enabled |
platform_settings |
summary_language、guardrails、privacy |
platform_settings.widget |
dismissible、show_agent_status、show_conversation_id、strip_audio_tags、syntax_highlight_theme |
platform_settings.auth |
enable_auth、allowlist |
platform_settings.call_limits |
agent_concurrency_limit、daily_limit、bursting_enabled |
注意 turn_eagerness 的三档语义(来自 agents 技能入口文档):patient 更长时间等待用户说完、normal 均衡、eager 快速抢话响应。
SDK:删除 Agent
client.conversational_ai.agents.delete(agent_id="your-agent-id")
await client.conversationalAi.agents.delete("your-agent-id");
curl -X DELETE "https://api.elevenlabs.io/v1/convai/agents/your-agent-id" \
-H "xi-api-key: $ELEVENLABS_API_KEY"
错误处理方面,技能入口文档列出常见状态码:401(密钥无效)、404(资源不存在)、422(配置非法)、429(限流),建议在 create/update 调用外层统一捕获。
CI/CD 集成
把 CLI 放入部署流水线,让 Agent 配置随代码一起发布:
# 将 API Key 设置为环境变量
export ELEVENLABS_API_KEY="your-api-key"
# 非交互模式推送变更
elevenlabs agents push
配合 agents push --dry-run 可先在 CI 中做变更预演。由于 CLI 生成的项目结构(agents.json + 各 *_configs/ 目录)是纯文本文件,Agent 配置与工具定义可以随 Git 提交走完整的评审与回滚流程。
完整示例配置
客服 Agent
agent = client.conversational_ai.agents.create(
name="Support Agent",
conversation_config={
"agent": {
"first_message": "Hi! Thanks for calling TechCorp support.",
"language": "en",
"prompt": {
"prompt": "You are a customer support agent. Be helpful, professional, concise.",
"llm": "gemini-2.0-flash",
"temperature": 0.5,
"built_in_tools": {
"end_call": {},
"transfer_to_number": {
"transfers": [{"transfer_destination": {"type": "phone", "phone_number": "+1234567890"}, "condition": "User asks for human support"}]
}
}
}
},
"tts": {"voice_id": "XB0fDUnXU5powFXDhCwa", "model_id": "eleven_flash_v2_5"},
"turn": {"turn_eagerness": "normal", "turn_timeout": 7},
"conversation": {"max_duration_seconds": 900}
}
)
要点:temperature: 0.5 保持客服回复稳定收敛;transfer_to_number 内置工具实现"用户要求人工时转接电话";max_duration_seconds: 900 把单次通话上限从默认 600 秒放宽到 15 分钟。
低延迟助手
agent = client.conversational_ai.agents.create(
name="Quick Assistant",
conversation_config={
"agent": {
"first_message": "Hey! What do you need?",
"prompt": {
"prompt": "Fast, efficient assistant. Brief answers.",
"llm": "gemini-2.0-flash",
"temperature": 0.3,
"max_tokens": 100
}
},
"tts": {"voice_id": "JBFqnCBsd6RMkjVDRZzb", "model_id": "eleven_flash_v2_5", "optimize_streaming_latency": 4},
"turn": {"turn_eagerness": "eager", "turn_timeout": 3}
}
)
这个示例把延迟压到了最低:max_tokens: 100 限制 LLM 输出长度、optimize_streaming_latency: 4 牺牲少量音质换取最快出音、turn_eagerness: "eager" + turn_timeout: 3 让轮次节奏更快。适合语音快捷指令类场景。
相关文档与延伸阅读
| 文档 | 路径 | 内容 |
|---|---|---|
| 技能入口 | .agents/skills/agents/SKILL.md | 会话启动、Widget 嵌入、外呼、错误处理速览 |
| 安装指南 | .agents/skills/agents/references/installation.md | CLI/SDK 安装、认证与迁移 |
| 工具参考 | .agents/skills/agents/references/client-tools.md | Webhook / Client / System 三类工具的定义与请求响应格式 |
| Widget 嵌入 | .agents/skills/agents/references/widget-embedding.md | 网页嵌入与可分享页属性 |
| 外呼电话 | .agents/skills/agents/references/outbound-calls.md | Twilio 外呼集成与动态变量 |
| 环境模板 | .env.example | 包含 ELEVENLABS_API_KEY 等环境变量位 |
从文档结构看,agent-configuration.md 是 agents 技能包中唯一的"全量配置参考",其余四个 reference 文档(安装、工具、Widget、外呼)分别横向展开一个主题。实际开发中建议的查阅路径是:先用 agents 技能入口 的 Quick Start 跑通一个模板 Agent,再回到本文按需修改 conversation_config 与 platform_settings 各区块,最后用 elevenlabs agents push --dry-run 预览、push 上线,形成"本地配置 → 预览 → 推送"的闭环。
atomcodeClaude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get StartedRust0623
Hy4-previewHy4 preview 是由腾讯混元团队研发的新一代混合专家(MoE)旗舰模型。模型总参数量 770B,每个 token 激活 49B,主干共包含78层,第一层采用标准 FFN,其余 77 层均为 MoE 结构,每层包含 256 个路由专家与 1 个共享专家,每个 token 激活 top-8 路由专家及共享专家。主干之外原生内置 1 层 MTP(总参数量 10B,激活 0.7B)以支持投机解码。Python00
GLM-5.3GLM-5.3 与 GLM-5.2 使用相同的基座模型——所有提升均来自后训练。与 GLM-5.2 相比,它在复杂编程和长程任务上的表现显著提升。Jinja00
GLM-5.3-FlashGLM-5.3-Flash (320B-A18B),是GLM-5系列的首个原生多模态模型。320B总参数,能力超过GLM-5.2Jinja00
Spark-X2.5-4BSpark-X2.5-4B 旨在让强大的 AI 更实用、更高效、更易获得。在广泛日常任务中表现强劲,涵盖对话、写作、翻译、推理、编码、工具调用以及智能体工作流,并在同等规模的开源模型中取得领先成绩。Spark-X2.5 将面向效率的架构与最高 1M tokens 的原生上下文窗口相结合,并支持 200 多种语言。Python00
Spark-X2.5-1.7BSpark-X2.5-1.7B 旨在让强大的 AI 更加实用、高效且易于获取。这些模型在广泛的日常任务中表现出色,涵盖对话、写作、翻译、推理、编程、工具调用和智能体工作流,并在同等规模的开源模型中取得领先结果。Spark-X2.5 将面向效率的架构与最高 1M tokens 的原生上下文窗口相结合,并支持 200 多种语言。Python00