· 1 observation
Technical updates · 1
Package or technical metadata updated
View technical comparison →Eleven Labs Inc. v1.0.0
Voice agents and media
From the developer
Not specified in the available declarations: capabilities, limitations, pricing & account requirements.
Developer declarations; not independently tested. Listing last checked Nov 23, 2026. Package observed Nov 23, 2026.
From the marketplace listing
ElevenLabs helps users create and manage voice agents, review conversations, manage knowledge and tools, and generate speech, images, video and custom voices.
Language: English · Automatically detected from descriptions.
· 1 observation
Package or technical metadata updated
View technical comparison →· 2 observations
Package or technical metadata updated
View technical comparison →Finding similar plugins… Results will appear here automatically.
Browse plugins →---
name: agents
description: Build voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice conversation experience, and when configuring an agent's tools, workflows, or procedures, including creating, editing, compiling, and publishing procedure drafts on an agent branch over the SDKs or REST API.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Agents Platform
Build voice AI agents with natural conversations, multiple LLM providers, custom tools, and easy web embedding.
> **Setup:** See [Installation Guide](references/installation.md) for CLI and SDK setup.
## Quick Start with CLI
The ElevenLabs CLI is the recommended way to create and manage agents:
```bash
# Install CLI and authenticate
npm install -g @elevenlabs/cli
elevenlabs auth login
# Initialize project and create an agent
elevenlabs agents init
elevenlabs agents add "My Assistant" --template complete
# Push to ElevenLabs platform
elevenlabs agents push
```
**Available templates:** `complete`, `minimal`, `voice-only`, `text-only`, `customer-service`, `assistant`
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
agent = client.conversational_ai.agents.create(
name="My Assistant",
conversation_config={
"agent": {
"first_message": "Hello! How can I help?",
"language": "en",
"prompt": {
"prompt": "You are a helpful assistant. Be concise and friendly.",
"llm": "gemini-2.0-flash",
"temperature": 0.7
}
},
"tts": {"voice_id": "JBFqnCBsd6RMkjVDRZzb"}
}
)
```
### JavaScript
```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient();
const agent = await client.conversationalAi.agents.create({
name: "My Assistant",
conversationConfig: {
agent: {
firstMessage: "Hello! How can I help?",
language: "en",
prompt: {
prompt: "You are a helpful assistant.",
llm: "gemini-2.0-flash",
temperature: 0.7
}
},
tts: { voiceId: "JBFqnCBsd6RMkjVDRZzb" }
}
});
```
### CLI
The CLI reads `ELEVENLABS_API_KEY` from the environment automatically:
```bash
elevenlabs agents create \
--json '{"name": "My Assistant", "conversation_config": {"agent": {"first_message": "Hello!", "language": "en", "prompt": {"prompt": "You are helpful.", "llm": "gemini-2.0-flash"}}, "tts": {"voice_id": "JBFqnCBsd6RMkjVDRZzb"}}}'
```
## Starting Conversations
### Temporary LiveKit WebSocket Pin
Until the ElevenLabs LiveKit server supports `/rtc/v1`, browser clients using WebRTC can fail or stall during the underlying LiveKit WebSocket handshake with `livekit-client` versions newer than `2.16.1`. For React, Next.js, Electron, or other `@elevenlabs/client` / `@elevenlabs/react` integrations that use `connectionType: "webrtc"` or hit `wss://livekit.rtc.elevenlabs.io/rtc/v1`, add this temporary pin to `package.json`:
```json
{
"overrides": {
"livekit-client": "2.16.1"
}
}
```
Use the pin when the app logs `/rtc/v1` 404s, `v1 RTC path not found`, or `could not establish pc connection` during session startup. This is a LiveKit server compatibility workaround for WebRTC sessions, not the ElevenLabs `connectionType: "websocket"` transport. Remove it after the upstream LiveKit server or SDK issue is fixed.
**Authenticated WebRTC:** Request a session token from your backend. The response includes both
the token and the conversation ID:
```python
session = client.conversational_ai.conversations.get_webrtc_token(
agent_id="your-agent-id",
)
print(session.token, session.conversation_id)
```
**Server-side (Python):** Get signed URL for client connection:
```python
sigPreview of the first 4,000 characters. Read full instructions →
Referenced files: 7 — file references are metadata, not package contents.
---
name: agent-simplification
description: "Simplify a complex ElevenLabs voice agent (typically a large workflow agent) into a leaner architecture — fewer workflow nodes, deduplicated prompts, procedures where they help — while PROVING with a ground-truth test suite that every behaviour of the original is preserved or improved. Use when the user says things like 'simplify this agent', 'flatten this workflow', 'this agent is too complex', 'consolidate these nodes', 'rebuild this agent with fewer nodes', 'can we replace this workflow with procedures', or asks whether a big workflow agent can be made easier to maintain without losing behaviour."
---
# ElevenLabs Agent Simplification
Turn a complex agent (usually a many-node workflow) into a simpler one that is **provably at least
as good**. The core loop: understand everything the complex agent does → encode it as a test suite
(ground truth) → build the simpler agent → iterate until it matches or beats the original on every
test → A/B on branches → hand over with an honest report.
The output is never just a simpler agent. It is a simpler agent **plus the test suite that proves
equivalence**, attached natively in the platform so the client can re-run it.
## Non-negotiable safety rails
- **Never edit the production agent, global tools, the knowledge base, or shared tests.** Work on a
duplicate agent or a branch. Tools and KB documents are workspace-global — editing them changes
prod. Procedures are per-agent (cloned on duplicate), so a copy's procedures are safe to edit.
- Before any PATCH, verify you are targeting the copy/branch (`agent_id` / `branch_id` check in the
script). Make every write script refuse to run against anything else.
- Snapshot the full agent JSON before the first change (rollback + later diffing).
- **PII hygiene:** real transcripts contain names/numbers. Keep them in scratch space, never commit
them, and delete them when done. Scrub any dynamic-variable seed derived from a real call
(replace the client name, activation date, etc.). Conversation IDs are fine to reference.
## Phase 1 — Understand the complex agent completely
Pull the agent JSON (`GET /v1/convai/agents/{id}`) and map every layer:
1. **Base prompt** (`conversation_config.agent.prompt.prompt`).
2. **Workflow nodes — read `additional_prompt`, not just `prompt.prompt`.** This is the #1 trap:
an `override_agent` node's real instructions live in `additional_prompt` (the studio
"Conversation goal" box, APPENDED to the base prompt). `conversation_config.agent.prompt.prompt`
on a node is only set when the "Override prompt" toggle is ON. A node whose `prompt.prompt` is
empty is NOT an empty node. Extract every node's `additional_prompt` to a file — in a real case
16 "empty-looking" nodes carried ~100k chars of specialized business logic.
3. **Edges** — routing conditions (`forward_condition.label`), in/out degrees. The only **dead
nodes** are orphans (no incoming edge = unreachable) and fully disconnected nodes (no edges at
all). Anything with edges is a live decision point — every node has an LLM choosing among its
outgoing edges, even a tool node with an empty tool list — so it cannot be considered for
removal unless genuine logic duplication is proven.
4. **Per-node scoping** — `additional_knowledge_base` / `additional_tool_ids`. Check whether the
base agent already exposes the same KB (folders in RAG `auto` mode = every doc) and tools; if so
the scoping is redundant, not behaviour.
5. **Say nodes** — fixed messages the client wants said verbatim (goodbyes, transfer preambles,
mandated phrases). These become wording-parity tests later.
6. **Transfer machinery** — compare workflow `phone_number` node destinations against the base
`transfer_to_number` system tool (destination SIP/number + its `condition` text). Often
identical → the workflow transfer scaffolding is redundant. Check real usage: count tool fires
across recent conversations (wPreview of the first 4,000 characters. Read full instructions →
--- name: agents-platform description: Manage ElevenLabs voice agents through the connected ElevenLabs MCP server. Use when the user asks to create, configure, test, deploy, or inspect agents, knowledge bases, agent tools, tests, or conversations directly on their ElevenLabs account — rather than writing application code. Requires the ElevenLabs MCP server bundled with this plugin. license: MIT --- # ElevenLabs Agents Platform (via MCP) Workflow guidance for the `agents_*` tools on the ElevenLabs MCP server. Every tool takes a `context` parameter — briefly state the user's goal in it. For building agents in the user's own codebase (SDK, CLI, widget embedding), use the general `agents` skill instead. ## Creating and updating agents - Create with `agents_create` using the top-level fields (`name`, `prompt`, `first_message`, `voice_id`, `language`, `tags`). Only reach for the raw `body` escape hatch when a field has no top-level equivalent. `voice_id` is optional — the workspace default voice is used if omitted. - Before changing an existing agent, read it: `agents_list` to find it, `agents_get` to see its current config, then `agents_update` with only the fields that should change. - `agents_duplicate` clones an existing agent — prefer it over recreating a config by hand. - Get a shareable/test link with `agents_get_link`; inspect widget config with `agents_get_widget`. ## Knowledge base - Add documents with `agents_create_kb_url` (supports auto-sync for pages that change) or `agents_create_kb_text`; organize with `agents_create_kb_folder`. - Before deleting a document, check `agents_get_kb_dependents` — other agents may use it. Confirm with the user before `agents_bulk_delete_knowledge_base`. - Verify retrieval quality with `agents_query_knowledge_base_rag` or `agents_search_knowledge_base` after adding documents. ## Testing and deployment - Create tests with `agents_create_test`: an LLM response test (`success_condition` prompt plus success/failure examples), a tool-call test (verify a tool was or wasn't called with expected parameters), or a simulation test (`simulation_scenario` persona plus `success_conditions`). - Run and inspect with `agents_list_test_runs` / `agents_get_test_run`. - For staged changes, branch: `agents_create_branch`, make edits, preview with `agents_merge_branch_preview`, then `agents_merge_branch` and `agents_create_deployment`. ## Conversations - `agents_list_conversations` and `agents_get_conversation` inspect call history and transcripts; `agents_search_conversation_messages` finds specific exchanges. Use these to debug agent behavior before editing prompts. ## Safety - Confirm with the user before destructive calls: `agents_delete`, `agents_delete_tool`, `agents_delete_phone_number`, knowledge-base bulk deletes. Deletions are not reversible. - IDs (agent, document, tool, branch) only ever come from tool results — never guess or reconstruct them.
---
name: architect-agent-memory
description: Use when the user wants the agent to remember, learn, save, or memorize a fact, or reports a one-off "the agent said X but should say Y" correction. There is no memory endpoint over REST; this covers the durable alternatives (system prompt or knowledge base) and when to use them.
---
# Teach an agent a fact (there is no memory endpoint over REST)
The web Architect has a `create_memory_entry` action for ad-hoc, agent-global facts. Over the ConvAI REST API there is NO memory endpoint. Say this plainly to the user rather than implying you saved a memory. Instead, persist the fact one of two durable, branch-scoped ways below (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`; you need `$AGENT_ID` and `$BRANCH_ID`).
## First, sanity-check the request
- Confirm the correction is scoped and factual: a discrete fact or rule ("In v3, only the Stability slider is supported"), not a broad behavioral change. Broad, recurring, or procedural changes belong in the system prompt or a new procedure, not a one-off fact.
- Confirm the fact genuinely cannot come from a crawled knowledge base (which can re-sync) or an API call (which stays current). If it can, prefer those sources.
- If the request is a broad behavioral change, escalate to editing the system prompt or creating a procedure instead.
## Option A: a durable fact in the system prompt
Add the fact as a short, self-contained line the agent can recall verbatim. Read the current prompt scoped to the branch, append the line, and PATCH the whole string back:
- Read: `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`, take `conversation_config.agent.prompt.prompt`.
- Write: `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` with `{"conversation_config":{"agent":{"prompt":{"prompt":"<full edited prompt>"}}}}`.
This commits to the branch HEAD and returns a new version. Keep the fact short so it does not bloat the prompt.
## Option B: a knowledge base document
For a fact better kept as recallable knowledge than a prompt line, create a KB text doc and attach it to the agent:
- `POST /v1/convai/knowledge-base/text` with the fact as the document body.
- Attach the returned document to the agent (add its id to the agent's knowledge base config via `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`).
## Timing matters: both options are branch-scoped
Unlike the web memory feature (which is agent-global and goes live immediately), both the prompt line and the KB doc are branch-scoped. They only reach the production agent when the branch is merged. This is usually what you want: it lets the user stage the fact for a launch or embargo and merge at go-live. Tell the user the change is staged on the branch and ships on merge.
If the user explicitly wants a fact live on production right now and is comfortable with that, note that the durable options here still require a merge; there is no REST path to an immediate agent-global memory. Make that limitation explicit rather than pretending otherwise.
## Confirm
After writing, briefly confirm to the user what was saved, where (prompt line or KB doc), on which branch, and that it goes live on merge. Keep it to one or two short sentences.
---
name: architect-branches-versions-merge
description: Use when working with agent branches, versions, drafts, traffic splits, or merges. Fires on "make a copy to test on", "create a branch", "switch to my test branch", "send 10% of traffic to the new version", "roll it out gradually", "merge my branch back to main", or when a branch operation errored.
---
# Branches, versions, and merging
Branches are versioned snapshots of an agent's config (prompts, voices, tools, workflows) that let you test changes without touching live production. Main is the default branch and receives 100% of traffic unless a split is configured. Drafts are work-in-progress edits on a branch that are not committed to a version until published. Traffic splitting distributes a share of live conversations deterministically across branches (by conversation id) for A/B testing. Merging folds a source branch's changes into its parent (usually main), creating a new version on the target.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY` and `$AGENT_ID`.
Branch operations fail most often on stale state: a wrong branch id, a traffic allocation that does not total 100, or an operation blocked by branch protection. Read current branch state first, then route to the exact operation.
## HARD GATE: resolve the id before any write
Never write to a branch id you have not just confirmed. If the user names a branch ("switch to angelo/test-switch", "go to my test branch"), that name is not a ready-to-use id. Resolve it by listing branches and matching on `name` first, in the same task, before the first write. Do not reuse an id from earlier context, memory, or a guess. If no exact name match exists, say so and ask the user to confirm rather than picking the closest-looking one.
## 1. Read current branch state first
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/branches" \
-H "xi-api-key: $API_KEY"
```
This is the source of truth. For each branch note the exact `id` (agtbrch_...), `current_live_percentage`, `protection_status` (admin_perms_required vs writer_perms_required), `parent_branch_id`, `main_branch_id`, and `draft_exists`. Get one branch's true HEAD version from `.most_recent_versions[0].id`.
Also get the agent to confirm which branch is currently active and the agent id:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID" -H "xi-api-key: $API_KEY"
```
## 2. Route to the exact operation
- **Create a copy to experiment on** -> `POST /v1/convai/agents/$AGENT_ID/branches` with `{name, description, parent_version_id}`. Use the parent branch's HEAD version id (from `.most_recent_versions[0].id`). New branches start at 0% live traffic, so creation alone sends no live traffic.
- **Edit config on a different branch** -> scope every read and write to that branch with `?branch_id=<id>`. `PATCH /v1/convai/agents/$AGENT_ID?branch_id=<id>` commits to that branch's HEAD, never main.
- **Send a share of live traffic to a branch** -> set the traffic split. This is the operation most likely to fail; see the constraints below.
- **Fold a branch's changes back into its parent** -> merge. Preview first, then merge; the merge is destructive on the target.
## 3. Constraints that cause the failures
1. **Traffic split must total exactly 100% across all active branches.** Setting a split declares the whole allocation, not one branch. If you raise a new branch to 10%, lower another (usually main) by the same 10% in the same call. Sum every branch's `current_live_percentage` from the branch list, apply the delta, and confirm the new set sums to 100 before sending. A partial set that does not total 100 is the top validation failure.
2. **Only include active (non-archived) branches** in the split. An archived branch or a stale id triggers not_found or validation. Rebuild the allocation strictly from the current branch list.
3. **Protection status blocks writes.** Main typically has `Preview of the first 4,000 characters. Read full instructions →
---
name: architect-create-client-tool
description: Use when the user wants the agent to trigger something in their own browser, app, or SDK during a call (navigate a page, open or close a dialog, read on-screen context, run client-side code), or asks "how do I add a client tool", "make the agent do something in my app", or reports a client tool that won't save or where the agent never gets a response back. For a server API tool see the create-webhook-tool skill; for editing an existing tool see the edit-existing-tool skill.
---
A client tool runs in the caller's browser or app via the widget or SDK, not on ElevenLabs' servers. The agent emits a call over the event stream and the customer's own code executes it. This is different from a webhook tool (ElevenLabs calls an HTTP endpoint). All API calls use `xi-api-key: $API_KEY` against `https://api.elevenlabs.io`.
## 1. Gather current state first
Before creating, make these reads (in parallel where independent):
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` to confirm the agent, its LLM, and whether it is a workflow agent (workflow agents scope tools per node via `additional_tool_ids`, so where you attach the new tool matters; the workflow is in this config).
- `GET /v1/convai/tools` to avoid creating a duplicate and to reuse an existing client tool if one fits.
## 2. Create the tool
```
POST /v1/convai/tools
```
with the tool config discriminated by the client type. The fields that cause failures:
- `name`: stable snake_case identifier the SDK matches on. Keep it identical to what the client code listens for; renaming later breaks the integration.
- `description`: the LLM uses this to decide WHEN to call the tool. Be specific ("Navigate the user to the billing settings page", not "navigation"). Vague descriptions are the top cause of "the agent never calls it".
- `parameters`: an ARRAY of parameter objects (not a JSON-Schema object with a `properties` map). Each item needs: `id` (snake_case, non-empty), `type` as a BARE string (`"string"`|`"number"`|`"integer"`|`"boolean"`; nullable uses a 2-element array like `["string","null"]`, never `{"type":"string"}`), `description`, `value_type` (`"llm_prompt"`|`"dynamic_variable"`|`"constant"`), `dynamic_variable` (empty string unless bound), `constant_value` (always a string/number/boolean, NEVER null or omitted), and `required` (boolean). Exactly one value source must be populated: a non-empty `description` (llm_prompt), OR `dynamic_variable`, OR a non-empty `constant_value`, OR `is_system_provided: true`. Zero sources is invalid and is the top cause of `invalid_union` / `schema_mismatch` on `parameters.0`. A working llm_prompt item: `{"id":"city","type":"string","description":"The city to look up.","value_type":"llm_prompt","dynamic_variable":"","constant_value":"","required":true}`. For no inputs send `parameters: []`. Array-typed params also need an `items` schema.
- `expects_response`: the single most important decision.
- `true`: the agent PAUSES and waits for the client to send a result back (bounded by `response_timeout_secs`, default 20, max 120). Use when the return value feeds the conversation ("read the current page and tell me what the user is looking at").
- `false`: fire-and-forget; the agent does not wait. Use for pure side effects (navigate, close dialog). Setting `true` for a side-effect-only tool is a common mistake; the agent then hangs until timeout because the client never sends a result.
- `execution_mode`: `immediate` runs right away; `post_tool_speech` lets the agent speak first. Async / fire-and-forget maps to `expects_response: false`. Only set `response_timeout_secs` when `expects_response: true`, and keep it <= 120.
### Client event contract (tell the user; this is where their end breaks)
The tool only works if the client handles the call. On invocation the client receives a `ClientToolCall` event carrying `tool_call_id`, `tool_name`, and `parameters`. If `expects_response: true`, tPreview of the first 4,000 characters. Read full instructions →
---
name: architect-create-llm-test
description: Use when the user wants a single-turn test that checks WHAT the agent says for a given turn. Fires on "add a test that the agent greets the caller", "test that it always reads the disclosure", "make sure it refuses off-topic questions", "write an eval for this reply", or "add a pass/fail check on the agent's answer". Not a multi-turn simulation and not a tool-call check.
---
# Create an LLM response test
Use this when the user wants to assert that the agent's reply to a turn matches a natural-language success condition. This is a single-turn response judgement. If they instead want to verify which tool fires, use the tool-test skill; if they want a multi-turn role-played conversation, use the simulation-test skill. For a DOM or Architect-style agent whose first action is almost always starting a procedure, prefer a simulation test instead, since a single-turn LLM test only grades that first action and returns useless verdicts.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, and `$BRANCH_ID` where relevant.
## 1. Gather context first
Read only what you need to ground the test, in parallel where independent:
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` - to ground the success condition in the agent's actual behavior: its first message, system prompt, and any required disclosures. A condition like "greets the user" is worthless if you do not know what the greeting is supposed to be.
- List existing tests to avoid a near-duplicate and to copy the naming convention already in use.
If the user is turning a real bad call into a regression test, read the conversation (`GET /v1/convai/conversations?agent_id=$AGENT_ID`, then `GET /v1/convai/conversations/{conversation_id}`) and lift the transcript into `chat_history`. Conversation reads carry customer PII; do not copy them into other systems or logs, and respect zero-retention-mode accounts.
## 2. Create the test
```bash
curl -s -X POST "https://api.elevenlabs.io/v1/convai/agent-testing/create" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{
"type": "llm",
"name": "Greets caller by name on open",
"success_condition": "The reply welcomes the caller and offers help. Mark SUCCESS only if it does both.",
"chat_history": [{"role": "user", "message": "Hi"}]
}'
```
An LLM test needs exactly three fields:
- `name` - non-empty string. Reuse the naming style from the existing tests.
- `success_condition` - natural-language description of what makes the reply correct.
- `chat_history` - array of `{role, message}` where `role` is `"user"` or `"agent"` only, and the array must end on the `user` turn the agent is supposed to respond to.
## 3. Schema gotchas that cause failures
1. **Empty or missing `chat_history`.** It is required and must be non-empty, ending on a `user` turn. An empty array fails with "Chat history is required for llm tests".
2. **Wrong `role` value.** The enum is strictly `"user"` or `"agent"`. Do not use `"assistant"`, `"system"`, `"bot"`, or `"human"`.
3. **Blank `success_condition`.** A whitespace-only string also fails. Write a concrete criterion.
4. **Vague `success_condition`.** It validates but produces a flaky test. Phrase it as an evaluation question with an explicit pass bar ("Mark SUCCESS only if the agent reads the disclosure starting with X"), not as an instruction ("The agent should read the disclosure").
5. **Wrong test type for the intent.** If the user wants to check a tool call, `success_condition` has no effect; use the tool-test skill. If they want a multi-turn role-play, use the simulation-test skill (`chat_history` is not used there). Sending simulation fields to an LLM test is a common schema mismatch.
6. **Putting the expected answer in `chat_history`.** The final turn must be the user prompt. Do not add a trailing `agent` message with the "right" answer; the agent generates tPreview of the first 4,000 characters. Read full instructions →
---
name: architect-create-simulation-test
description: Use when the user wants a full multi-turn conversation test where a simulated user talks to the agent across many turns. Fires on "test the whole flow", "simulate a caller", "write a scenario test", "test that the agent handles an upset customer / a full booking / a multi-step call", or when a simulation-test creation attempt failed. For single-response checks use the LLM-test skill; for one tool call use the tool-test skill.
---
# Create a simulation test
A simulation test drives a full multi-turn conversation: a simulated user (defined by a persona and scenario) talks to the agent, then the transcript is judged against success conditions. It is the highest-value test type and empirically the most failure-prone, almost always because of a schema or wrong-type mistake, not a bad idea. This skill gets it right first time.
**Always use a simulation test for DOM or Architect-style agents.** Their first action is almost always starting a procedure, so LLM and tool tests grade only that first action and return useless verdicts. Only the multi-turn simulation exercises the real flow.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, and `$BRANCH_ID` where relevant.
## 1. Read the agent first
So the persona and success conditions match reality, read these in parallel where independent:
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` - the system prompt, first message, language, and LLM. The persona and success conditions must reflect what the agent is actually instructed to do. Confirm the agent language so the simulated-user prose is in a language the agent handles. If the agent has a workflow (in this same config), write the scenario to walk the simulated user through the node transitions you want exercised.
- List the agent's tools for the ids you need in `tool_mock_config` and to name a specific tool in a success condition.
- List existing tests to extend coverage instead of duplicating, and read a nearby existing simulation test to copy its exact field shape. Mirroring a working example is the single most reliable way to avoid a schema mismatch.
## 2. Create the test
```bash
curl -s -X POST "https://api.elevenlabs.io/v1/convai/agent-testing/create" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{
"type": "simulation",
"name": "Upset customer, surprise charge, de-escalate then retain",
"simulation_scenario": "You are Diane, a loyal customer upset about a surprise $45 charge. Acknowledge the greeting, ask why you were charged, then ask for a refund. Once resolved, say you are done.",
"success_conditions": ["The agent verified the account before discussing the charge", "The agent de-escalated before quoting policy", "The agent offered a retention option"],
"simulation_max_turns": 20,
"tool_mock_config": {"mocking_strategy": "all", "fallback_strategy": "raise_error", "mocked_tool_ids": []},
"dynamic_variables": {"tier": "enterprise"},
"chat_history": []
}'
```
Keep the two prose fields distinct:
- `simulation_scenario` - instructions to the simulated user (the persona plus what they do, in second person). This drives the other side of the conversation. Give the simulated user a clear stop cue so the conversation ends.
- `success_conditions` - plain strings, the pass/fail rubric judged against the agent's behavior, written as evaluation statements, not instructions. Enumerate concrete checkable clauses. Reference a tool by its real name if success requires a tool call. Vague conditions make the test flaky.
Other fields:
- `type` must be exactly `"simulation"`.
- `simulation_max_turns` - cap the conversation (existing tests use around 20-24). Too low and the flow cannot complete; too high wastes runs. For a DOM or Architect-style agent set it to at least 2, or the run comes back inconclusive.
- `tool_mock_config` - an object, not a list.Preview of the first 4,000 characters. Read full instructions →
---
name: architect-create-tool-test
description: Use when the user wants a test asserting the agent CALLS a specific tool (with specific parameters, or does NOT call it). Fires on "test that it calls my booking tool", "verify it passes the right customer_id", "make sure it never calls transfer here", "add a tool test", "check it uses save_result at the end", or when a tool-test creation attempt errored.
---
# Create a tool-call test
This is the reliability drill-down for the tool-call test type. It fails often, almost always on the `tool_call_parameters` shape (wrong `eval` type, wrong `referenced_tool`, bracket paths). A tool test replays your `chat_history` turns, then checks whether the agent's next action is the expected tool call. For a single agent reply use the LLM-test skill; for a multi-turn role-play use the simulation-test skill.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, and `$BRANCH_ID` where relevant.
## 1. Gather context first
You cannot write a correct `referenced_tool` without the target tool's real `id` and `type`, and you cannot write a realistic `chat_history` without knowing what the agent is supposed to do. Read these first, in parallel where independent:
- List the agent's tools (`GET /v1/convai/tools`, or the tool ids from `conversation_config.agent.prompt.tool_ids` on the agent config, then `GET /v1/convai/tools/{tool_id}`). Required: this is where you get the target tool's `id` and `type` (`webhook`, `client`, `code`, or `system`). `referenced_tool` needs both, and the type must match the tool's real executor type or creation fails.
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` - the prompt and first message, so the `chat_history` is a plausible lead-up to the tool call, and the base `tool_ids` so you know the tool is available to the agent. For a workflow agent, the workflow in this config tells you whether the tool is scoped to a node via `additional_tool_ids`.
- List existing tests to reuse the naming scheme and avoid a duplicate.
If grounding the test in a real call, read that conversation (`GET /v1/convai/conversations/{conversation_id}`) to lift the exact tool name and parameters the agent actually used. Conversation reads carry customer PII; do not copy them elsewhere and respect zero-retention-mode accounts.
## 2. Create the test
```bash
curl -s -X POST "https://api.elevenlabs.io/v1/convai/agent-testing/create" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{
"type": "tool",
"name": "Saves result via save_coaching_result at end of feedback",
"chat_history": [
{"role": "agent", "message": "Great work today. Let me save this so it shows on your dashboard."},
{"role": "user", "message": "Perfect, go ahead and save it."}
],
"tool_call_parameters": {
"referenced_tool": {"id": "tool_5801k...", "type": "client"},
"parameters": [
{"path": "scenario_id", "eval": {"type": "anything"}},
{"path": "overall_score", "eval": {"type": "exact", "expected_value": "6"}}
],
"verify_absence": false
}
}'
```
## 3. Schema gotchas and how to avoid each
1. **`chat_history` role values and shape.** Each turn is `{role, message}` where `role` is exactly `"user"` or `"agent"`. The history must end on the turn just before the expected tool call, usually a `user` turn that should trigger it. An empty or agent-final history makes the assertion meaningless.
2. **`referenced_tool` needs the real `id` and `type` together.** `type` is one of `webhook` / `client` / `code` / `system` and must match the actual tool. A made-up id, or the right id with the wrong type, fails as not_found or validation.
3. **`parameters` is an array of `{path, eval}`, not a flat key/value object.** A common mistake is `parameters: {customer_id: "123"}`. The correct form is `parameters: [{"path": "customer_id", "eval": {"type": "exact", "expected_value": "1Preview of the first 4,000 characters. Read full instructions →
---
name: architect-create-webhook-tool
description: Use when the user wants to give an agent a NEW webhook / server / HTTP tool so it can call an external API (look up a customer, create a ticket, check inventory, hit their backend). Fires on "add a webhook tool", "connect my agent to my API", "make a tool that calls my endpoint", or when a webhook-tool create fails with schema_mismatch / validation. For editing an existing tool see the edit-existing-tool skill; for a tool that saves but misbehaves at runtime see the troubleshoot-tool-errors skill.
---
Creating a webhook tool is the most common way to connect an agent to an external API, and it fails a lot, almost all from schema mistakes in `api_schema.request_body_schema`. This skill gets it right on the first write.
All calls use `xi-api-key: $API_KEY` against `https://api.elevenlabs.io`.
## 1. Gather current state first
Before writing anything, make these reads (in parallel where independent):
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` to confirm the agent and whether it is a single-node agent or a workflow (the workflow is in this config; it changes where you attach the tool later).
- `GET /v1/convai/tools` to check the tool does not already exist and to match the naming style already in use.
Get the endpoint URL, method, auth method, and request/response shape from the user before you construct the tool. If any are missing, ask for them or the API docs first.
## 2. Create the tool
```
POST /v1/convai/tools
```
with the tool config discriminated by type (webhook/server). The webhook config lives under `api_schema`, not at the top level.
## 3. Schema gotchas (the specific things that cause failures)
1. STATIC URL. `api_schema.url` must be a static string. Do NOT put `{{variables}}` in the path. Dynamic values go into `request_body_schema` (or `path_params_schema` / `query_params_schema`), never interpolated into the URL.
2. EXACTLY ONE value source per property. Every property in `request_body_schema.properties` gets its value from exactly one of: a non-empty `description` (LLM fills it), `dynamic_variable` (e.g. `"user_phone_number"` or a system var like `"system__conversation_id"`), `constant_value` (a fixed literal), or `is_system_provided: true`. Two sources on one property is the most common validation failure; ZERO sources is equally invalid. A bare `{"type":"string"}` or a property whose only non-type field is an empty `constant_value` has zero sources and is rejected. `constant_value: ""` does NOT count as a constant.
3. path_params_schema / query_params_schema are ARRAYS of parameter objects, NOT a `{properties:{...}}` object. Each item needs: `id`, `type` as a BARE string (`"string"`|`"number"`|`"integer"`|`"boolean"`; nullable uses a 2-element array like `["string","null"]`, never `{"type":"string"}`), `description`, `value_type` (`"llm_prompt"`|`"dynamic_variable"`|`"constant"`), `dynamic_variable` (empty string unless bound), `constant_value` (always a string/number/boolean, NEVER null or omitted), and `required` (boolean). A working llm_prompt item: `{"id":"city","type":"string","description":"The city to look up.","value_type":"llm_prompt","dynamic_variable":"","constant_value":"","required":true}`.
4. ARRAY properties REQUIRE an `items` schema and MUST NOT carry `constant_value`.
5. `required` must reference only property names that exist in `properties`.
6. `request_headers` is an OBJECT, not an array. For secret API keys, reference a workspace secret by id (`{"secret_id": "..."}`, list existing via `GET /v1/convai/secrets`) rather than pasting the key.
7. `response_timeout_secs` defaults to 20, max 120. Raise it only for genuinely slow APIs; high timeouts hurt voice latency.
8. Name and description drive INVOCATION. Make the description specific ("Look up a customer by phone number", not "Customer lookup"); a vague description is the top reason a correctly-saved tool never gets called.
## 4. Extract response values into the convPreview of the first 4,000 characters. Read full instructions →
---
name: architect-edit-existing-tool
description: Use when the user wants to change an existing tool on their agent (rename it, fix its description, change a webhook URL/headers/auth, add or edit a request-body parameter or response assignment, adjust the timeout, or flip a client tool's expects_response / execution mode), or when a tool edit won't save or throws schema_mismatch / validation / not_found.
---
Editing a tool fails a lot, almost always because the patch violated a per-type schema rule or dropped a field the caller never read. The fix: read the current tool first, send a minimal but complete-per-object patch. All calls use `xi-api-key: $API_KEY` against `https://api.elevenlabs.io`.
## 1. Read the current tool first
Do not edit blind; the failures come from patching a shape you never read.
- `GET /v1/convai/tools` to get the exact tool id and its TYPE (webhook / client / code). The type determines the config shape.
- `GET /v1/convai/tools/{tool_id}` to read the tool's CURRENT saved config: name, description, `request_body_schema` properties, `request_headers`, auth, response `assignments`, `response_timeout_secs`, and (for client tools) `expects_response` / `execution_mode`.
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` to confirm the tool is attached (`tool_ids` / per-node `additional_tool_ids`) and to see which nodes reference it before you rename anything.
## 2. Update with the full config
```
PATCH /v1/convai/tools/{tool_id}
```
`PATCH` REPLACES the config, so send the config for the type you read in step 1 with your changes applied. Change only what the user asked, but include the FULL object for any nested field you touch: if you edit one property in `request_body_schema`, resend the whole `request_body_schema`, not just the one property. Partial nested objects are the usual source of silent drops and validation errors.
A SYSTEM tool (`transfer_to_number`, `end_call`, `language_detection`, `skip_turn`, `update_state`, etc.) is NOT edited this way; its config lives in the agent config, so edit it via `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` targeting the relevant path.
## 3. Schema gotchas
Webhook / code tools (`request_body_schema`):
- Each property needs EXACTLY ONE of: a non-empty `description`, `constant_value`, `dynamic_variable`, or `is_system_provided`. Two (or zero) is a validation error. When editing, do not leave the old `dynamic_variable` while adding a `description`.
- Array properties REQUIRE an `items` schema and MUST NOT carry `constant_value`.
- URLs must be STATIC, no `{{variables}}` in the path; move dynamic values into `request_body_schema`.
- `request_headers` is an OBJECT, not an array. For secrets use `{"secret_id": "..."}` (list via `GET /v1/convai/secrets`); do not paste a raw key when the original used a secret id.
- Response `assignments` use dot-notation `value_path` (`data.items.0.id`, NOT `data.items[0].id`; bracket indexing silently returns null).
- `response_timeout_secs`: default 20, max 120.
Client tools:
- `expects_response` (bool) and `execution_mode` (`immediate` / `post_tool_speech` / `async`) are the two fields people edit and get wrong. If `execution_mode` is `async`, the tool is fire-and-forget and `expects_response` must be false.
- Parameters follow the same one-of-four value-source rule.
All types:
- Renaming: the tool `name` is referenced by the LLM and by any node prompts or edge conditions that call it by name. After a rename, prompts still using the old name will not fire the tool. Flag this and offer to update the referencing prompts in the same pass via the agent config.
- Do not invent new schema keys.
## 4. Recovery
- `schema_mismatch`: the patch shape does not match. Re-`GET` the tool, diff against what you sent, and resend the full nested object for the field you touched. Do not retry the identical body.
- `validation`: a per-field rule above was broken (two-of-four on a property, array with `constant_value`, asyPreview of the first 4,000 characters. Read full instructions →
---
name: architect-edit-string-fields
description: Use when changing wording inside a long text field on an agent (system prompt, first message / greeting, tool description, workflow node prompt, or procedure content) - "add this to the prompt", "change this line", "append a rule", "reword the greeting", "fix the tool description" - or when a previous edit clobbered or failed to save the field.
---
# Edit large string fields
Change one long text field by reading it, editing the whole string locally, and writing it back. Do not resend a big multi-field config blob to change wording. Broad config PATCHes are the high-failure path, and resending a big blob risks silently dropping the rest of the field.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, and `$BRANCH_ID`.
The general move is read, modify, write: GET the field, produce the full new string (append a line, replace a passage, or rewrite wholesale), then PATCH the whole field back. There is no browser find/replace and no read-before-edit gate here. You always have the current text because you just fetched it, so compute the exact new string yourself and never edit from memory.
## System prompt and first message
Read the field from the branch-scoped agent:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID" -H "xi-api-key: $API_KEY" \
| jq -r '.conversation_config.agent.prompt.prompt' > prompt.txt
```
Edit `prompt.txt` to the full intended text (append your rule, replace the passage, or rewrite it), then PATCH the whole string back. A partial-merge PATCH commits to branch HEAD and returns a new `version_id`:
```bash
curl -s -X PATCH "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID&version_description=prompt-edit" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d "{\"conversation_config\":{\"agent\":{\"prompt\":{\"prompt\":$(jq -Rs . < prompt.txt)}}}}"
```
`jq -Rs .` JSON-encodes the whole file, so quotes, arrows, dashes, and newlines are handled for you. For the first message, read and write `conversation_config.agent.first_message` the same way.
## Tool description
The description lives on the tool, not the agent. Get the tool, edit its `description`, and PATCH the full tool config back (the PATCH replaces the tool):
```bash
curl -s "https://api.elevenlabs.io/v1/convai/tools/$TOOL_ID" -H "xi-api-key: $API_KEY" > tool.json
# edit the description field in tool.json to the full new string
curl -s -X PATCH "https://api.elevenlabs.io/v1/convai/tools/$TOOL_ID" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
--data-binary @tool.json
```
## Workflow node prompt
The node prompt lives in the workflow inside the agent config. Only `override_agent` nodes and prompt-type `say` nodes have an editable prompt. Read `workflow` from the branch-scoped agent, find the node by id, set its prompt string to the full new text, and PATCH the workflow back through the config. If you cannot find an editable prompt on the node, you have the wrong node id or a non-editable node type.
## Procedure content
Procedure content does not go through the agent-config PATCH. It goes through the procedure draft, then a publish. This is two steps, and there is no direct PATCH on a procedure (that returns 405).
```bash
# 1. Read the current procedure body.
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures/$PROCEDURE_ID" \
-H "xi-api-key: $API_KEY"
# 2. Stage the full new content as a draft (send name, content, type, trigger).
curl -s -X PATCH \
"https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures/$PROCEDURE_ID/draft" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{"name":"...","content":"...","type":"free_form","trigger":"..."}'
# 3. Publish pending drafts by committing the agent with any partial-merge body.
# RePreview of the first 4,000 characters. Read full instructions →
---
name: architect-edit-workflows
description: Use when the user wants to build or change an agent's workflow or a specific node ("add a node", "connect these nodes", "route to a phone transfer", "add a condition/edge", "delete this node", "why does deploy say duplicate edge"), or a workflow change is failing validation.
---
An agent's workflow (its nodes and edges) lives inside the agent config. Over REST you read it from `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` (the `workflow` object) and write whole-config changes with `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`. There is NO granular per-node/per-edge endpoint from the API. If the user needs interactive node-by-node editing on a canvas, that is only in the web app; say so plainly and either make the whole-config edit here or point them there. All calls use `xi-api-key: $API_KEY`.
Workflow writes are error-prone. Go slow, change one thing at a time, and read the current graph before every write.
## 1. Read the current graph first, always
`GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` and read the `workflow` object. Nodes and edges are keyed maps (not arrays): every node has a `type`, a `position`, and an `edge_order`; the graph always contains `start_node`. You need existing node ids to connect, update, or delete, and you need to see which pairs already have an edge. Also `GET /v1/convai/tools` for the real tool ids: expression edges and tool nodes reference tool ids, and a guessed id fails validation.
## 2. Make one change at a time
Take the workflow you read, apply a single change, and PATCH the whole `workflow` back. Do not hand-build a partial workflow from memory and do not drop nodes, edges, or nested config you did not mean to change: omissions are treated as deletions and cause `schema_mismatch`. After each successful write, re-read the config to confirm the change landed before the next one.
## 3. Cross-node constraints (each is a common failure)
1. ONE edge per node pair. Two edges between the same pair cause a "Duplicate edge found" error on deploy. For a bidirectional transition, put `forward_condition` (A to B) and `backward_condition` (B to A) on the SAME single edge. Never create a second edge for the return direction. This is the most common failure.
2. Terminal nodes have NO outgoing edges. `end` and `phone_number` (phone transfer) nodes are terminal; an edge out of one, or a `forward_condition` from one, fails validation. A phone_number transfer that fails just ends the call; if the user wants retry or fallback, recommend the `transfer_to_number` system tool instead.
3. Expression edges vs LLM conditions. Use an expression edge for deterministic routing off a tool result or dynamic variable (route on whether a lookup returned a match, or on `{{account_type}}`). Use an LLM/prompt condition only for genuine judgment. Vague LLM conditions cause wrong-node routing; write tight conditions that reference concrete signals ("lookup returned a matching record", not "customer is identified").
4. Conditions must be mutually exclusive. Overlapping conditions on a node's outgoing edges make the model fire the wrong one. Keep each outgoing condition disjoint.
5. Node ids and positions are required and consistent. A connection needs source and target ids that already exist in the current graph (why step 1 is mandatory). A new node needs a `position` ({x, y}); omitting it or reusing an existing id causes validation errors.
6. A transfer (`standalone_agent`) node keeps `agent_id` and `node_id` as FLAT fields, siblings of `type`/`position`; there is no `transfer_destination` wrapper. Set `agent_id` (and leave `node_id` null) to transfer to a different agent; set `node_id` (and leave `agent_id` null) to transfer within the same agent. The "a target must be selected" error fires only when both are empty. The node also needs `delay_ms` (int >= 0), `transfer_message` (string or null), and `enable_transferred_agent_first_message` (bool)Preview of the first 4,000 characters. Read full instructions →
---
name: architect-explain-test-runs
description: Use when the user asks why a test or test run passed or failed, why one run in a repeat set differs, which procedures or tools were used during a run, or wants a summary of test suite history. Fires on "why did 1 of the 3 runs fail", "why is this test failing", "which procedures were used in that run", "explain this simulation test result", or "summarize my test suite history".
---
# Explain why a test run passed or failed
The user wants for a test run what they already get for a conversation: which procedures fired, which tools were called, and what actually happened turn by turn. Read the test invocation, find the divergence, and answer with it.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY` and `$AGENT_ID`.
## Order of investigation
1. **List recent runs.** Fetch recent suite invocations, optionally filtered by agent, to find the invocation in question and to compare runs across time. To surface "frequent offenders", compare recent invocations and identify which specific tests fail repeatedly; those need fixing most.
2. **Read the invocation.** `GET /v1/convai/test-invocations/{suite_id}` returns `test_runs[]`, each with `status`, `condition_result.result`, and `condition_result.rationale`. The rationale per run is often specific enough on its own. For most "why did X fail" questions this is enough; stop here if the rationale already names the divergence.
3. **Read the full transcript only when the rationale is too vague.** The invocation also carries the turn-by-turn transcript per run: messages, tool calls (including the procedure-start calls, so you can see which procedures fired), and tool errors. This is what answers "why did it fail" or "which procedures ran in each pass and fail run". On a suite with many tests and a `repeat_count` above 1, this payload can be large enough to overflow context. Check the test and run count first; if it covers more than a handful of tests or repeats, do not dump the full detail. Instead tell the user the suite is too large and offer to (a) look at just the failing test's rationale, or (b) point them to the Tests tab in the UI.
4. **Read the test definition** for the criteria, scenario, and mocking config when you need to see exactly what was asserted.
5. **For a repeat set, compare a passing run against a failing run of the same test.** The divergence is the answer: if the runs called different procedures, that is a routing problem; if they called the same procedures and tools, that is an eval or non-determinism problem.
## Answer with the divergence, not the criterion
"It failed because it did not meet criterion X" restates what the user can already see and answers nothing. Instead:
- Name the specific turn where the failing run differs and what it did differently. "In the failing run the agent updated the ticket to solved before the customer-facing reply; in the passing runs it replied first."
- Quote the clause of the criterion that was violated, not the criterion's name.
- Lead with the answer in the first sentence and keep the whole explanation under about six lines of prose.
## When the config is identical
Same config and input, different outcome, is the most common version of this question. Say so directly: the model made a different choice on that run, which is LLM non-determinism, not a config bug. Then give the actionable fix: tighten the criterion if it is ambiguous at that boundary, or move the requirement into a deterministic procedure if the ordering must be guaranteed. Never present a sampling difference as though the failing run had a distinct root cause.
## Summarizing suite history
When the user wants a history summary, present the overall pass/fail counts, a dedicated section for critical issues (critical tests are often tagged in the title, otherwise infer from context and content), and a section for recurring failures (tests that failed across multiple Preview of the first 4,000 characters. Read full instructions →
---
name: architect-explore-agent
description: Use when starting a task that needs an agent's current setup, or when another skill tells you to explore the agent first, before making recommendations or changes to a ConvAI agent.
---
# Explore an agent's context
Before recommending or changing anything, gather just enough of the agent's current configuration to act. Fetch narrowly. Do not pull the whole config every time.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, and `$BRANCH_ID` where relevant.
## 1. Read only what the task needs
Get the agent scoped to the branch:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID" \
-H "xi-api-key: $API_KEY"
```
This one response carries the whole config: `name`, `conversation_config.agent.prompt.prompt` (system prompt), `conversation_config.agent.prompt.llm`, `conversation_config.agent.language`, `conversation_config.tts.model_id` and `voice_id`, `conversation_config.agent.prompt.tool_ids`, guardrails, and the workflow. Read the fields the task needs and ignore the rest. The whole config is large, so do not re-fetch it to read one leaf you already have.
## 2. Add narrow follow-up reads only when the task touches them
- To inspect a specific tool, take its id from `conversation_config.agent.prompt.tool_ids` and get just that tool: `GET /v1/convai/tools/{tool_id}`. Do not re-fetch the agent to read one tool.
- For procedures, list names and triggers with `GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures`, then get one body by id with `GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures/{procedure_id}`.
- For past conversations, `GET /v1/convai/conversations?agent_id=$AGENT_ID`, then `GET /v1/convai/conversations/{conversation_id}` for a transcript. These carry customer PII and analysis. Do not copy them into other systems or logs, and respect zero-retention-mode accounts. For anything beyond a glance at one or two calls — pagination, which fields the list payload actually carries, aggregating a window, sampling — use `architect-review-live-calls`, which owns that pattern.
Make independent reads in parallel where they do not depend on each other, each still narrowly scoped.
## 3. Identify the active setup
From what you fetched, note the active LLM, voice, TTS model, language, and any configured tools or custom guardrails.
## 4. Summarize, then ask
State the current setup in one concise sentence, then ask what the engineer wants to improve before pulling anything more. An empty workflow (only the start node with no edges) is the default state, not a custom configuration. If the agent has procedures but no workflow nodes, describe it as a procedure-driven agent with no workflow configured.
---
name: architect-generate-agent
description: Use when the user asks to generate, build, or create a new agent from a description ("create an agent for X", "build a chatbot that does Y"). There is no one-shot generate endpoint over REST; ask clarifying questions, then build via create and refine via patch.
---
# Generate a new agent (there is no one-shot generate endpoint)
The web Architect has a `generate_agent` action. Over the ConvAI REST API there is NO one-shot generate endpoint. Do not pretend there is. Instead, gather requirements, create a starter agent with `POST /v1/convai/agents/create`, then refine it with `PATCH` (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`).
## Step 1: pause and ask clarifying questions
Before creating anything, understand what the user actually needs. Ask targeted questions to gather:
- Use case and context: what specific problem does this agent solve? Who are the end users?
- Scope and capabilities: what should the agent do, and what should it NOT do?
- Tone and personality: how should it sound (formal, friendly, technical)?
- Integration needs: does it need to call external APIs, access a knowledge base, or trigger workflows?
- Success criteria: how will the user know it is working well?
- Constraints: any compliance, language, or channel requirements?
## Step 2: synthesize and confirm
Summarize your understanding back to the user in 2-3 sentences and ask "Is this what you're looking for?" This prevents building the wrong agent.
## Step 3: create the agent
Once aligned, create the agent with `POST /v1/convai/agents/create`. Set the name and an initial `conversation_config` built from the synthesized requirements: a system prompt capturing the use case, scope, tone, and constraints, a suitable first message, and an LLM chosen for the task (see the `architect-llm-selection` skill for region/compliance/latency tradeoffs). The response returns the new `agent_id`.
## Step 4: refine
Iterate with `PATCH /v1/convai/agents/{agent_id}?branch_id={b}` partial-merge bodies to tighten the prompt, add tools, or adjust config. For step-by-step behavior, add procedures (see the `architect-manage-procedures` skill). For knowledge, attach knowledge base documents via `POST /v1/convai/knowledge-base/text` or `.../url`. For post-call extraction and grading, see the `architect-post-call-data` skill.
## Step 5: review and next steps
Tell the user the agent is created and offer next steps: review the system prompt, set up procedures, test with a simulation, secure it for production, or customize the workflow.
---
name: architect-get-agent-ci-green
description: Use when an agent's test suite is red and needs to be driven to green. Fires on "get CI green", "the test suite is failing", "run the tests and fix them", "triage these test failures", "why is my agent suite red", or after attaching tests when many runs fail at once. Covers running a suite, polling it, classifying failures by cause, and fixing the ones that are test bugs rather than agent bugs.
---
# Get an agent's test suite green
A red suite is usually not one bug. It is several unrelated causes stacked together, and most of them are broken *tests*, not a broken agent. Triage by cause first; fixing blind wastes whole runs, since each simulation takes minutes.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, `$BRANCH_ID`.
## 1. Establish a baseline before changing anything
You cannot tell a fix from noise without a starting number.
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID" \
-H "xi-api-key: $API_KEY" > agent.json
```
The suite is at `platform_settings.testing.attached_tests` — a mix of individual `test_` ids and `tfld_` folder ids. **Only these are this agent's CI.**
That distinction matters more than it looks. On a real Architect suite, 56 tests ran but only 3 were attached to the agent; the other 53 came from inherited folders and belonged to entirely different agents (a Zendesk support agent, a delivery agent, a sales agent). They failed because they asserted another agent's behavior. No amount of fixing makes them pass here, and "fixing" them means editing another team's tests.
So before triaging, split failures into:
- tests attached to **this** agent — your problem
- tests that arrived via a shared folder and target another agent — not your problem; report them and leave them alone
Fetch each test body with `GET /v1/convai/agent-testing/{test_id}`. A 404 on an attached id means a stale attachment pointing at a deleted test — worth reporting, and it cannot pass.
## 2. Run the suite and poll
```bash
curl -s -X POST "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/run-tests" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{"tests": [{"test_id": "test_abc"}], "branch_id": "'"$BRANCH_ID"'", "repeat_count": 1}'
```
The response `id` is the suite id. Poll it, counting statuses:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/test-invocations/$SUITE_ID" -H "xi-api-key: $API_KEY"
```
Poll in the **background** on a 20-30s interval, not a foreground sleep. Simulations take minutes and a large suite takes far longer; a foreground wait blocks the session and times out. Stop when no `test_runs[].status` is `pending`.
To find a run started from the UI, list recent invocations (note this is a top-level endpoint; the `/agents/{id}/test-invocations` form does not exist):
```bash
curl -s "https://api.elevenlabs.io/v1/convai/test-invocations?agent_id=$AGENT_ID&page_size=10" \
-H "xi-api-key: $API_KEY"
```
## 3. Classify every failure before fixing any
Read `condition_result.rationale.messages` plus the transcript at `agent_responses[]`. Sort each failure into one of four buckets — they have different fixes and very different costs.
**A. Unmocked tool call.** Transcript shows `Error: no mock matched for tool 'X'`. A test bug, and normally the largest bucket. In one real triage this was 32 of the failures, all from a single tool. Fix per the `architect-mock-all-tools` skill: mocks key on **tool ID**, and the ID must be one on this agent. Name keys and stale IDs are silently ignored.
**B. 60s timeout.** `Timed out after 60s waiting for the agent to produce its next turn`, with an empty transcript. This is a hang, not a verdict — the agent never got started. For DOM/Architect-style agents the usual cause is an empty `chat_history`. Seed one agent turn and raise `simulation_max_turns` to at least 6.
If seeding does not Preview of the first 4,000 characters. Read full instructions →
--- name: architect-llm-selection description: Use when choosing or recommending an LLM for an ElevenLabs agent, or answering "which model should this agent use", questions about region-restricted models, HIPAA/PCI/ZRM model eligibility, or latency/intelligence/cost tradeoffs between models. --- # LLM selection for agents Resolve constraints in this sequence. Each step narrows the candidate set; never widen it later. Everything is over the ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`). 1. Explore the agent. Read the current LLM, workflow, and tools with `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` first. 2. Region (infrastructural, non-negotiable). Determine deployment topology. EU and India customers hit isolated deployments with restricted model lists that apply to all tiers. A model hidden by region cannot be enabled; do not offer to. 3. Compliance entitlements (contract-gated). If the workspace requires HIPAA, PCI, or ZRM, filter to compliant models only. These are workspace-level flags managed by sales/CSMs, never self-serve. 4. Capability fit (intelligence / latency / cost). Within whatever survives steps 1-3, recommend on task requirements. If a constraint in step 2 or 3 eliminates the model the user wanted, say so plainly and route to their CSM or a support form. Do not present a capability recommendation that violates a hard constraint. ## Step 1: region gate | Region | Rule | | --- | --- | | US / default | Full model catalog, subject to compliance gates. | | EU-isolated | Restricted list. Preview Gemini models and several others are hidden. | | India-isolated | Heavily restricted: only `custom-llm`, `glm-45-air-fp8`, `gpt-4o`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `speech-engine`. | Restriction is by deployment topology, not a toggle. Never offer to enable a region-hidden model. ## Step 2: compliance gate Only relevant if the workspace has the corresponding entitlement. You cannot see workspace flags, so never assert an entitlement is active; the safe line is "your CSM can confirm this for your workspace." Never offer to enable HIPAA, PCI, or ZRM; they require contract changes. - HIPAA requires all three: enterprise tier with `force_logging_disabled=true`, an LLM in the HIPAA-compliant set, and a signed BAA (a contract artifact you cannot verify; route BAA questions to sales). Approved families include Claude 3.5/3.7 Sonnet, Claude 3 Haiku, Claude Haiku 4.5, Claude Opus 4.7, Claude Sonnet 4 / 4.5 / 4.6, `custom-llm`, Gemini 1.5/2.0/2.5 flash and pro variants, `gemini-3.1-flash-lite`, and `speech-engine`. Models outside the list are not HIPAA-eligible regardless of tier; preview/GA-pending Gemini models are excluded. - PCI is deny-by-default when on (`pci_compliance_required`). Only pre-approved telephony providers, webhook domains, MCP URLs, and integration IDs work. Adding an integration requires CSM review; offer a support form, do not promise self-serve. - ZRM disables audio/transcript storage; effective only when `force_logging_disabled=true`. Custom LLM plus ZRM additionally needs `is_convai_custom_llm_with_zrm_allowed`. No Stripe SKU; part of the enterprise contract. ## Step 3: capability fit Recommend within the surviving candidate set. Weigh three axes against the agent's job. - Latency matters most for voice. In an STT to LLM to TTS loop, LLM time-to-first-token sits on the critical path and is the dominant lever on perceived delay. For real-time agents, bias toward the fastest tier that clears the quality bar. - Lowest latency: `gemini-3.1-flash-lite` / `nano` / small `qwen` / `*-mini` tiers and `speech-engine`. - Balanced: `gemini-3.5-flash`, `gpt-4o`, `gpt-5-mini`, `claude-haiku-4-5`. - Highest capability, higher latency: `claude-sonnet-4-6`, `claude-opus-4-7`, `gpt-5.x`, `gemini-3.x-pro` (where region/compliance permits). - Intelligence. Reserve the top tier for genuinely hard reasoning, complex multi-tool orchestration, or nuanced instruction
Preview of the first 4,000 characters. Read full instructions →
---
name: architect-manage-procedures
description: Use when you want to add, edit, rename, inspect, or list an agent's procedures, or when a procedure create/edit call fails with schema_mismatch, validation, not_found, a 405, or a 422 missing `type`. Also use when a newly created procedure comes back empty or 404s on read. Covers the list/get/create/edit-draft/publish flow over the ConvAI REST API.
---
# Manage agent procedures reliably (list / get / create / edit / publish)
Procedures are their own data, not part of the agent config. There is no agent-config path for them and no way to reach them by patching `conversation_config`. Everything here is branch-scoped and goes through the ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`). You need `$AGENT_ID` and the branch id `$BRANCH_ID` you are working on.
For the craft of writing a good trigger and clear steps, see the `architect-structured-procedures` skill and the procedure-authoring guidance. This skill is about calling the endpoints correctly.
## 1. Read current state first
Before creating or editing anything, read what exists:
- List every procedure on the branch: `GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures`. Each entry carries `procedure_id`, `version_id`, `name`, `type` (`free_form` or `deterministic`), `trigger`, and `has_draft`. It does NOT include `content` — the list is an index, not a way to read bodies. Do not measure a procedure's content length from this response; an absent `content` field will read as empty for every procedure and look like data loss when nothing is wrong. You cannot edit a procedure without its `procedure_id` from here.
- Read one procedure's body with `GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures/$PROCEDURE_ID`. This is the only way to get `content`, and you need it before an edit so you do not blow away the rest. If a draft exists for that procedure, this GET returns the DRAFT content, not the published content.
- This GET returns 404 for a procedure whose content has never been published, even when the id is correct and the procedure appears in the list. That is the expected state right after a create (see section 2), not a wrong id. Use the list to confirm the procedure exists and check `has_draft`.
- Confirm the branch you are on with `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`, since procedures are per-branch.
If the user asked to edit "the X procedure", match X against the `name` values from the list and confirm the exact `procedure_id` before writing. Do not assume an id.
## 2. Create vs edit: the draft then publish model
Writes stage a DRAFT on the branch. A draft is not live until a separate publish step commits it into a new version.
- CREATE a new procedure: `POST /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures` with `name` and `content`. `type` defaults to `free_form`; pass `type: "deterministic"` only when writing the JSON flow form.
**Creating is two calls, not one.** The POST registers the procedure and stores the `name`, but the `content` you send does not persist — it returns 200 with a body containing only `procedure_id` (`name` and `type` come back null), and the procedure lands with an empty body. You must follow it immediately with the draft PATCH below, resending the same `content`, or you will leave a named, empty procedure on the branch. Verify with the single-procedure GET after publishing, not with the POST response.
- EDIT or RENAME an existing procedure, and complete a create: `PATCH /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures/$PROCEDURE_ID/draft`. This writes to the branch draft. There is no direct `PATCH .../procedures/$PROCEDURE_ID` (no `/draft` suffix); that returns 405.
This endpoint requires `name`, `content`, AND `type` — all three. Omitting `type` fails with a 422 `{"type":"missing","loc":["body","type"]}` even on a plain body edit. This is the opposite of the create endpoint's behaviorPreview of the first 4,000 characters. Read full instructions →
--- name: architect-migrate-from-competitor description: Use when the user wants to move a voice agent onto ElevenLabs Conversational AI from another platform — Retell AI, Vapi, or Bland — or hands over an export from one of them to work from. Fires on "migrate my Retell agent", "convert this Vapi assistant", "move from Bland to ElevenLabs", "port my agent to ElevenLabs", "here is my agent JSON", or when the user pastes a JSON blob containing response_engine, squadId, transportConfigurations, or pathway. Not for unrelated database, codebase, or framework moves. --- # Migrate a voice agent from another platform to ElevenLabs ## What this skill is for The user has an agent built on Retell, Vapi, or Bland and wants it running on ElevenLabs. This skill owns the parts of that job specific to *importing*: identifying the export, handling credentials inside it, mapping foreign constructs onto ElevenLabs ones, naming what genuinely has no equivalent, and sequencing the work. It does **not** re-teach ElevenLabs authoring. This plugin has ~30 skills that own that, and they are more detailed and better maintained than a summary here would be. Your job is to translate and to route. **What counts as finished: an agent that demonstrably runs.** Not an optimal one — a conversion that starts, resolves its variables, calls a tool successfully and reaches an end. Aim to get there in one pass and one round of fixes, which means the checking in step 5 is part of the work rather than something offered afterwards. The finish line is a run, never a re-read of your own config, and "I converted everything" is not a status report. Assume an authenticated EL workspace with `$API_KEY` set, as every skill in this plugin does. ## What to delegate, and to whom Route each step rather than reimplementing it. Most migrations touch six or seven of these; read one when you reach its step, not up front. | Step | Skill | |---|---| | Read the target agent's current state | `architect-explore-agent` | | Choose the model | `architect-llm-selection` | | Port prompt text and first message | `architect-edit-string-fields` | | Build the workflow graph, nodes, edges | `architect-edit-workflows` | | Author step-by-step logic as procedures | `architect-structured-procedures`, `architect-manage-procedures` | | Recreate tools | `architect-create-webhook-tool`, `architect-create-client-tool`, `code-tools` | | Fix a tool that misbehaves | `architect-edit-existing-tool`, `architect-troubleshoot-tool-errors` | | Post-call fields and evaluation criteria | `architect-post-call-data` | | Remaining config, turn-taking, latency | `architect-update-config-safely`, `architect-turn-taking-latency` | | Auth, guardrails, retention | `architect-secure-for-production` | | Stage and ramp the rollout | `architect-branches-versions-merge`, `architect-schedule-launch` | | Mock tools before any test run | `architect-mock-all-tools` | | The smoke run that proves it works (step 5) | `architect-create-simulation-test` | | Parity tests, CI | `-llm-test`, `-tool-test`, `architect-get-agent-ci-green` | | Score the agent — only once asked, see step 6 | `agent-review`, then `agent-simplification` | | Check it once real calls exist (step 6) | `architect-review-live-calls` | **Do not create the agent through `architect-generate-agent`.** Its own documentation warns that its flow regenerates the prompt instead of installing the one you just converted. Create the shell directly with `POST /v1/convai/agents/create`, then install the converted content. **Reading a sibling skill is not the same as routing to it, and the difference costs you at write time.** The temptation is to skim the two or three you think you need and hand-roll the rest, which is faster right up to the first rejected payload — a real migration reimplemented tool creation, post-call data, model selection and all testing inline, and hit its schema surprises while writing to the live workspace rather than while reading. Each of thes
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 9 — file references are metadata, not package contents.
--- name: architect-migrate-to-procedures description: Use when the user wants to migrate a system-prompt-driven agent to a procedure-driven setup, pull step-by-step logic out of a heavy system prompt, or "convert my prompt into procedures". --- # Migrate a system-prompt agent to procedures Guide the user through moving a prompt-heavy agent to a procedure-driven setup. Everything is branch-scoped over the ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`). You need `$AGENT_ID` and the `$BRANCH_ID` you are working on. Procedure creates and edits follow the draft then publish model; see the `architect-manage-procedures` skill for the exact endpoint mechanics. ## 1. Check current agent state Read the agent with `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`. Verify it is effectively system-prompt-only: an empty workflow with no custom nodes or edges, and no existing custom procedures beyond default system ones (list via `GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures`). If it already has custom workflow nodes or existing procedures, flag this to the user, but do not stop the migration. ## 2. Analyze the system prompt for candidates Read the system prompt (`conversation_config.agent.prompt.prompt` off the agent GET). Identify good procedure candidates: sequential step-by-step instructions, and conditional logic or branching paths (for example, "if the user asks for X, do Y"). ## 3. Survey for clarity If any part of the system prompt is unclear or needs more detail to become a procedure, ask specific clarifying questions. Resolve all ambiguities before proceeding. ## 4. Propose suggested procedures Present a Markdown table with columns: - Name: a concise, human-readable name. - Trigger: the user intent or phrase that should activate it. - Brief content: a short summary of the steps or logic to capture. Reflect any clarifications from step 3 in the proposal. Ask the user if they are happy with the plan. ## 5. Create procedures one at a time Once the user approves and all questions are resolved, create the approved procedures one by one: `POST /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures` per procedure (this writes a draft). Do not create them all in a single turn. Create one, confirm it succeeded, then proceed to the next. For content shape and the free-form vs deterministic choice, see the `architect-manage-procedures` and `architect-structured-procedures` skills. Publish the pending drafts into a version when the set is complete via `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`. ## 6. Review and test Invite the user to review the new procedures and try them out. Once trimmed logic has moved into procedures, you can slim the system prompt with a `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` on the prompt field, keeping the changes on the branch until the user is ready to merge.
---
name: architect-mock-all-tools
description: Use when a simulation test needs every tool call mocked so runs are deterministic and never hit live systems. Fires on "mock all tools", "mock the tools in this test", "the test says no mock matched", "tool returned an error in my test run", "stop my test calling the real API", or when a run fails because a tool errored rather than because the agent misbehaved. Also use before running a suite for a DOM/Architect-style agent.
---
# Mock all tools in a simulation test
A simulation test that hits live tools is not a test, it is a flaky integration run. Mock every tool the agent can reach so a failure means the agent behaved wrong, not that a dependency moved.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, `$BRANCH_ID`.
## The one mistake that breaks almost every mock
**Mocks match on tool ID, never on tool name.** An override keyed by a name, or by an ID that is not on *this* agent, is silently ignored. The tool then runs unmocked and you see this in the transcript:
```
Error: no mock matched for tool 'open_support_form'
```
That message means "your key did not match", not "mocking is off". It is the single largest cause of red simulation suites.
Two ways to get the key wrong, both common:
1. **A tool name as the key.** `{"open_support_form": [...]}` never matches. Verified directly: a test with seven name-keyed overrides had all seven miss.
2. **A stale ID.** Tool IDs are not stable across agents or workspaces. An ID copied from another agent, or left behind after a tool was recreated, resolves to nothing. A suite can carry a full set of overrides where *not one* ID exists on the agent under test.
Both fail the same silent way: config saves fine, `mocked_tool_ids` looks populated, every call still errors.
## 1. Resolve real tool IDs first
Never hand-write an ID. Derive the name-to-ID map from the agent you are testing.
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID" \
-H "xi-api-key: $API_KEY" > agent.json
```
The IDs are at `conversation_config.agent.prompt.tool_ids`. Resolve each to a name via the workspace tool list:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/tools?page_size=100" -H "xi-api-key: $API_KEY"
```
Three traps when resolving:
- **Page to the end.** `has_more`/`next_cursor` paginate. A workspace can hold thousands of tools; stopping at the first page or an arbitrary cap makes real IDs look unresolvable and sends you chasing a bug that does not exist.
- **Duplicate names are normal.** The same tool name often exists under several IDs from earlier copies. Never pick by name from the workspace list. Map name to ID **only across the agent's own `tool_ids`**, so you pick the one this agent actually calls.
- **Not every callable tool is in `tool_ids`.** System tools (`start_procedure`, `end_procedure`, `load_memory_entry`, `transfer_to_agent`) and RAG run unmocked no matter what. Do not try to mock them; expect them live in the transcript and let success conditions tolerate them.
## 2. Write the mock config
`tool_mock_config` is an object, not a list:
```json
{
"tool_mock_config": {
"mocking_strategy": "all",
"fallback_strategy": "raise_error",
"mocked_tool_ids": ["tool_exampleplaceholder00000001"]
},
"tool_mock_overrides": {
"tool_exampleplaceholder00000001": [
{"parameter_conditions": [], "mock_result": "{\"result\":\"ok\"}", "is_error": false}
]
}
}
```
- `mocking_strategy` is exactly one of `all`, `selected`, `none`.
- **With correct IDs, `all` and `selected` both apply overrides.** Verified with paired runs that differed only in strategy: both passed and both returned the override payload. If an override is not landing, the cause is the key, not the strategy.
- `fallback_strategy: "raise_error"` is what surfaces an unmocked call as a loud error instead of a silent live call. Keep it: it is how youPreview of the first 4,000 characters. Read full instructions →
---
name: architect-post-call-data
description: Use when the user wants to extract structured fields from finished calls (data collection) or define success/failure evaluation criteria for post-call analysis. Covers field types, enums, the independent-extraction rule, writing criteria as questions, UNKNOWN for early termination, and the 2000-character limit.
---
# Set up post-call data collection and evaluation criteria
Two related but separate post-call configs. Data collection answers "what facts were in the call?"; evaluation criteria answer "was the call good?". Both are written with `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`), branch-scoped, live on merge.
## Ground the design in real calls first
Before proposing fields or criteria, read the agent and a representative sample of its conversations (in parallel where independent):
- `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`: read the system prompt and `first_message` to see what the agent is positioned to gather, and read the existing `platform_settings.evaluation.criteria` and `conversation_config.platform_settings.data_collection` so you extend rather than clobber.
- `GET /v1/convai/conversations?agent_id=$AGENT_ID`: recent call volume and a sample to inspect.
- `GET /v1/convai/conversations/{cid}` on 2-3 of those: confirm the target data actually appears in transcripts, and note the exact phrasing the agent uses and where calls terminate early. These payloads carry customer PII; do not copy transcripts into other systems or logs, and respect zero-retention-mode accounts.
## Part 1: Data collection (structured extraction)
An independent post-call LLM extraction runs over the transcript for each field. Config lives at `conversation_config.platform_settings.data_collection`, an object keyed by field name. Each field has `type`, `description` (the extraction prompt), an optional `enum`, and value-source flags.
Design each field against these rules:
- `description` IS the extraction prompt. Be specific: "The caller's full legal name as confirmed during the call", not "Customer name". Keep it under ~500 characters; long descriptions dilute the instruction.
- Pick the type by the data: `boolean` for yes/no facts, `string` with an `enum` for categories (for example `call_outcome` with `["completed","declined","transferred"]`), `integer`/`number` for amounts. Using `string` for a yes/no fact yields "yes"/"no" text instead of a real boolean.
- Use `enum` liberally. Even a large enum (50+ values) gives stronger guidance than prose and prevents free-text drift. Cover every realistic outcome; a missing value comes back null.
- Fields are extracted independently, one LLM call each. A field's description cannot reference another field. "Only if coverage_active is yes..." will not work, because this extraction never sees another field's result. Bake any needed condition into this field's own description.
- Scalar values only, no comma-separated multi-value answers. If you need several values, split into a primary `enum` field plus a secondary free-text `string` field.
- Design for null. If the caller hangs up early, most fields will be null. That is expected, not an error; tell the user null means "not discussed".
Write it: `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` with body `{"conversation_config":{"platform_settings":{"data_collection":{...}}}}`. Merge with the existing fields you read above; do not replace the whole `data_collection` object unless the user explicitly wants a reset.
## Part 2: Evaluation criteria
Each criterion is a separate post-call LLM call scored SUCCESS / FAILURE / UNKNOWN. Its `conversation_goal_prompt` is capped at 2000 characters. Aim for 3-5 criteria, not an exhaustive list. Write each one against these rules:
- Write as a question, not an instruction. "Evaluate whether the agent collected all required fields", not "The agent should collect aPreview of the first 4,000 characters. Read full instructions →
---
name: architect-review-live-calls
description: "Review an agent's recent finished conversations to find what is actually going wrong in production, then route each finding to a fix. Use when the user says 'we just launched this agent, how is it doing', 'review the last 3 days of calls', 'check how the agent is performing', 'monitor agent {id}', 'what are callers running into', 'why are calls failing', or asks for a post-launch health check or a weekly call review."
---
# Review an agent's live calls
Every other conversation read in this plugin is downstream of a problem someone already found — a QA ticket, a reported tool error, one bad call to turn into a test. This skill is the entry point that *surfaces* the problem: start from recent calls, end with clustered findings routed to a fix.
This skill owns the list→paginate→transcript fetch pattern. When another skill needs a sample of real calls, point at this one rather than reimplementing pagination and the PII rules.
This is a review of **finished** calls. Live in-flight audio over `wss://.../v1/convai/conversations/{id}/monitor` is a different thing and is not covered here.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY` and `$AGENT_ID`. For an EU/IN/SG residency workspace the host is `https://api.<eu|in|sg>.residency.elevenlabs.io` and the key is workspace-specific. Sending a residency key to the global host fails with a clear message — `Invalid API key: The API key used is for a data residency stack, however this server is a global server` — so if you see that, switch hosts rather than doubting the key.
## Two modes — pick one before fetching
Baselines live at a fixed path so a later run — even a different session — can find one without being told where to look: `.architect-live-calls/<agent_id>-baseline.json`, relative to the repo root. Check for that file before you fetch anything.
- **Launch sweep** (default; use when the agent went live within roughly the last two weeks, or when no baseline file exists at that path for this agent). Question: *is this thing working at all?* Did calls complete, did tools fire, where do callers drop, is the first message landing. Small N, no baseline, no QA tickets to route into — findings go straight to a fix.
- **Drift check** (use when the baseline file exists for this agent). Question: *what changed?* Compare this window's aggregates against the baseline and lead with deltas. Without a baseline a rate is not a finding — "12% of calls failed" means nothing on its own, so if the user asks for a drift check and no baseline file exists, run a launch sweep instead and write the baseline for next time.
State which mode you are running in one line before you start, and name the baseline path when you are running a drift check or writing a fresh baseline.
## What the list endpoint gives you — and what it withholds
`GET /v1/convai/conversations` returns `{conversations, next_cursor, has_more}`. Each entry carries enough to run the whole aggregate pass without touching a single transcript:
`conversation_id`, `agent_id`, `agent_name`, `branch_id`, `version_id`, `start_time_unix_secs`, `call_duration_secs`, `message_count`, `status`, **`termination_reason`**, `call_successful` (`success` | `failure` | `unknown`), `call_success_score`, **`tool_names`**, `main_language`, `direction`, `conversation_initiation_source`, `sentiment_analysis`, `tag_ids`, `call_summary_title`.
Query params that are honored: `agent_id`, `page_size` (**max 100** — larger 422s), `call_start_after_unix`, `call_start_before_unix`, `call_successful` (enum-validated), `user_id`, and `cursor` (pass back `next_cursor`, loop while `has_more`).
**`summary_mode=include` is the highest-value flag here.** It defaults to `exclude`, and turning it on populates `transcript_summary` on every entry — a one-line account of each call. Cluster from those summaries *before* you open any transcript; it is far cheaper and far lPreview of the first 4,000 characters. Read full instructions →
---
name: architect-schedule-launch
description: Use when preparing an agent change now but applying it later at a specific moment (product launch, marketing go-live, embargo, scheduled announcement). Fires on "queue up these changes and publish at launch", "prepare this now but don't make it live until tomorrow", "stage a knowledge-base update for the launch", "schedule a change", or "have this ready to merge when we go live".
---
# Schedule a change for a launch
The user wants to make changes now that must not affect live traffic until a later go-live moment. Model this as a branch: all work happens on a non-live branch, main keeps serving the current config, and the change goes live only when the user merges (or ramps traffic to) the branch at launch time. There is no timer. Scheduling here means staging on a branch and holding the merge until the user is ready. Be explicit with the user that nothing publishes automatically; they press merge or ramp at go-live.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY` and `$AGENT_ID`. For the exact branch mechanics, error recovery, and traffic-split rules, follow the branches, versions, and merging skill for every branch write.
## 1. Confirm the shape of the change
Ask or infer two things before touching anything:
- **What changes** - a prompt/config edit, a new tool, a knowledge-base document add or rescrape, or a fact the agent should know. A KB add or rescrape counts and is a common launch case.
- **When it goes live** - the launch moment. Confirm the user will trigger the merge or ramp themselves; you are only staging.
If the change would be fine to ship immediately, say so and skip the branch. Scheduling only earns its complexity when the change must stay dark until a specific moment.
## 2. Read current state first
Before any write, read the branch list (`GET /v1/convai/agents/$AGENT_ID/branches`) for exact ids, `current_live_percentage`, `protection_status`, `parent_branch_id`, and `draft_exists`, and get the currently active branch config (`GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`). You need main's exact id to branch off it and to know whether main is `admin_perms_required`, which gates the eventual merge.
## 3. Create the launch branch off main
Create the branch with a clear launch-named `name` (e.g. `elevenmusic-audio-references-launch`) and `parent_version_id` set to main's HEAD version (main's `.most_recent_versions[0].id` from the branch list):
```bash
curl -s -X POST "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/branches" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{"name": "<launch-name>", "description": "Staged for launch", "parent_version_id": "<main-head-version-id>"}'
```
The new branch starts at 0% live traffic, so creation alone sends zero live traffic. That is exactly what "queue it" means. Confirm to the user the branch exists and is at 0%.
## 4. Make the change on the launch branch
Scope every edit to the launch branch with `?branch_id=<new-branch-id>` so it lands on the launch branch and never on main.
- **Config / prompt / tool edits** -> apply via `PATCH /v1/convai/agents/$AGENT_ID?branch_id=<new-branch-id>` with a partial body (see the update-config-safely skill). Never spread edits across branches.
- **Knowledge-base add or rescrape** -> create or update the KB document (`POST /v1/convai/knowledge-base/text` or `POST /v1/convai/knowledge-base/url`) and attach it while working on the launch branch. The KB reference is captured in the branch's config snapshot, so it stays off main until merge. Confirm the document shows the updated content on the branch.
- **A fact the agent should recall** -> there is no memory endpoint, and even if there were, agent memory is agent-global, not per-branch, so a fact added "on the launch branch" would go live on main and every branch immediately. For anything that must stay dark until go-live, put the fact on Preview of the first 4,000 characters. Read full instructions →
--- name: architect-secure-for-production description: "Use when a customer asks how to make their agent safe, secure, or production-ready, or how to roll it out without risk. Walks through the layered safety model across authentication, guardrails, testing, gradual rollout, real-time monitoring, and privacy." --- # Secure an agent for production Walk the customer through ElevenLabs' layered safety model. The guiding principle: protections at every stage, before the agent goes live, while it is running, and after each conversation. This is the same lifecycle behind ElevenLabs' AIUC-1 certification (the first safety/security/reliability standard purpose-built for AI agents, which also underpins agent insurance eligibility). Do not quote certification percentages, coverage terms, or pricing from memory; point the customer to their account team or current docs for anything commercial. Most of the settings below are configured in the agent's Security, Advanced, and Privacy config and can be inspected or set over the ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`) with `GET`/`PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`. Read the current config before advising. ## Stage 1: control who can reach the agent (authentication) Restrict access first. Configure one method per agent: - Signed URLs, recommended for client-side apps. Your server requests a temporary signed WebSocket URL using your API key, the client connects with it, and it expires after fifteen minutes. This authenticates sessions without exposing the API key client-side. - Allowlists, to restrict connections to approved hostnames (up to ten, exact-match, so add subdomains separately). Best for hostname-based access control. Do not configure both on one agent; pick the one matching the deployment model. The signed-URL mechanism confirms the request came from an authorized source; to restrict to specific users, authenticate them in your own app before requesting the signed URL. Never expose the API key in client code. ## Stage 2: shape and constrain behavior (guardrails) Guardrails protect at three levels: - System prompt hardening plus the Focus guardrail, the foundation. Put the most critical rules under a `# Guardrails` heading in the system prompt (models attend to it specifically), and enable the Focus guardrail to keep the agent on-topic across long conversations. - Manipulation guardrail, which validates user input, detecting prompt injection and instruction-override attempts and terminating risky conversations before the agent responds. - Content and Custom guardrails, which independently validate the agent's replies before delivery. Content blocks inappropriate material; Custom lets the customer define business-specific rules in plain language (for example, "block specific financial advice", "no refunds unless eligibility is confirmed"). For the most critical rules, put them in both the system prompt and a custom guardrail: defense in depth, so a response validator catches drift even if the model slips. Tradeoffs to convey: streaming mode adds no latency but may emit a little output before a block (recommended for voice); blocking waits for validation (~200-500ms, recommended for text) and is the only mode that supports retry as an exit strategy. Focus/Manipulation/Content are included; Custom guardrails incur usage-based LLM cost per response. Guardrails are currently in alpha; advise validating and monitoring logs as the feature evolves. ## Stage 3: prove it works before going live (testing) Do not ship on intuition. The testing framework supports: - Scenario tests, single-turn, evaluating a response against plain-language success criteria with success/failure examples. - Tool-call tests, verifying the agent calls the right tool with correct parameters (exact match, regex, or LLM evaluation). Essential for high-stakes actions like transfers. - Simulation tests, full multi-turn conversations against a simul
Preview of the first 4,000 characters. Read full instructions →
---
name: architect-structured-procedures
description: Use when you want to create, rewrite, inspect, or fix a structured / deterministic / flow-style procedure, convert a procedure between free-form and structured, or when a deterministic procedure fails validation or the compile step rejects the JSON. The authoritative JSON schema is inline here.
---
# Write or convert a structured (deterministic) procedure
Both procedure forms are first-class. Pick deliberately:
- `free_form`: markdown with optional frontmatter and prose steps. The model reads it and applies judgement. Right when steps are guidance or need discretion. This is the default and usually the correct answer.
- `deterministic`: JSON compiled into a real state machine. Steps run in order, exactly as written. Right when a tool sequence must be guaranteed (compliance, ticket hygiene, ordering that must not vary between runs).
Never convert one form to the other unless the user asked. Converting a working free-form procedure to deterministic trades away flexibility; say which capability is being traded, in one sentence, when you convert.
Everything is branch-scoped over the ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`). You need `$AGENT_ID` and `$BRANCH_ID`. Create and edit follow the draft then publish model (see the `architect-manage-procedures` skill): a create posts a draft, an edit patches the draft, and a `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` publishes pending drafts into a new version.
## Do not guess the schema
There is no `tool_code` step type and no nested `tool_code` object. Use the schema below, or read an existing deterministic procedure's `content` as a template (list procedures via `GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures`, which returns `type` and full content for every procedure). Validate the JSON before publishing with `POST /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures/compile`.
## Authoritative content schema
`content` is a JSON string with exactly two top-level keys. `steps` must be non-empty.
```json
{ "trigger": "<when this procedure fires, or empty string>", "steps": [ ... ] }
```
Every step carries a `type` discriminator. The complete set:
```
{ "type": "ask", "instruction": "<what to ask the user>" }
{ "type": "tell", "instruction": "<what to convey, model phrases it>" }
{ "type": "say", "message": "<verbatim message>" }
{ "type": "tool_call", "tool_id": "tool_...", "tool_name": "<name>",
"instruction": "<optional>", "on_failure": <handler|null> }
{ "type": "system_tool", "system_tool_name": "end_call" }
{ "type": "branch", "branches": [ <arm>, ... ], "fallback": [ <substep>, ... ] }
```
- An arm is `{ "condition": <condition>, "steps": [ <substep>, ... ] }` with non-empty `steps`.
- A condition is `{ "type": "llm", "condition": "<natural language>" }` or `{ "type": "expression", "expression": <ASTNode> }`.
- A substep may be `ask` / `tell` / `say` / `tool_call` / `system_tool`. A branch cannot nest another branch.
- `on_failure` is `{ "branches": [ { "condition": ..., "steps": [...] } ], "fallback": [ ... ] }`, where `fallback` is mandatory and non-empty, and its substeps may be `ask` / `tell` / `say` / `retry`. `retry` is `{ "type": "retry", "max_retries": 1-3 }`.
## Validation rules that reject your JSON
1. `ask` / `tell` need a non-empty `instruction`; `say` needs a non-empty `message`.
2. All conditions in one branch (or one failure handler) must be the same type; never mix `llm` and `expression`.
3. A `retry` step must be the last step in its failure branch.
4. `end_call` must be the last step wherever it appears.
5. No two consecutive `branch` steps; put a non-branch step between them.
6. An `expression` condition may not come directly after an `ask`. Use an `llm` condition to branch on a user reply, or place the expression after a `tool_call`.
7. `tool_id` must be a real tool on this agent. Get it fPreview of the first 4,000 characters. Read full instructions →
---
name: architect-troubleshoot-tool-errors
description: Use when an agent tool (webhook/server, client, system, or MCP) errors, fails validation, won't save, isn't being invoked, returns no result, or behaves wrong, including "tool not used", "property cannot be empty", async/timeout, or test/simulation failures.
---
Diagnose a misbehaving tool by reading the exact error first, then matching the failure pattern. All API calls use `xi-api-key: $API_KEY` against `https://api.elevenlabs.io`.
## Check this FIRST on any schema_mismatch from a webhook or client tool
Every parameter/property object must set EXACTLY ONE value source: a non-empty `description` (the LLM fills it), OR `dynamic_variable`, OR a non-empty `constant_value`, OR `is_system_provided: true`.
- ZERO sources is invalid. `{"type":"string","constant_value":""}` with no description is rejected; an empty-string `constant_value` does NOT count as a constant. Give the field a real `description`.
- TWO OR MORE sources is invalid.
- This applies to `parameters`, `request_body_schema.properties`, `path_params_schema`, `query_params_schema`, and `request_headers` alike.
If the error names `type` or `constant_value` on a property, this rule is almost always the cause. Fix the value source before investigating anything else.
## Do not repeat these mistakes
1. Never guess a tool's config schema or hand-build config JSON blind. Read the tool's actual saved config first with `GET /v1/convai/tools/{tool_id}` and change from there.
2. Read the actual error before theorizing. For a runtime failure, read the conversation where it happened with `GET /v1/convai/conversations/{conversation_id}` and find the failing tool call and its error verbatim; for a save failure, ask the user to quote the exact error text.
3. State tool field names, defaults, and limits from the current config you read, not from memory; they change.
## Match the failure pattern
A. Agent says it uses the tool but never calls it. Check in order: (1) the tool is actually attached to the agent (`GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`, confirm the id is in `tool_ids` or the right node's `additional_tool_ids`); (2) the description is too vague, the model decides invocation from it, so rewrite it to state clearly WHEN to use the tool and apply via `PATCH /v1/convai/tools/{tool_id}`; (3) suggest a simulation test to reproduce deterministically before going live (see the create-simulation-test skill).
B. Validation / won't-save errors ("Property description cannot be empty", missing required field). Read the tool config, find the empty or invalid field, and apply the fix by reading the full config with `GET /v1/convai/tools/{tool_id}` and writing it back with `PATCH /v1/convai/tools/{tool_id}`. For each property confirm the exactly-one-value-source rule above holds.
C. No result returned / async behavior (the tool starts a job but the answer never comes back in the same turn). Likely cause: `execution_mode` is `async` when it should wait, or a client tool's `expects_response` is false. Confirm the current values via `GET /v1/convai/tools/{tool_id}`, then fix with `PATCH /v1/convai/tools/{tool_id}`. See the edit-existing-tool skill for the async plus `expects_response` rule.
D. Webhook tool returns a backend error (a 4xx/5xx, or app-specific text). This is the user's own endpoint failing, NOT an ElevenLabs config bug. Make that distinction early. Confirm from `GET /v1/convai/conversations/{conversation_id}` what payload was sent and what status came back, then verify with the user: endpoint URL, method, auth headers, and that each parameter maps to something the endpoint expects. The fix usually lives in their endpoint or the parameter schema, not the agent.
## When to stop
If the error is from the user's own backend and needs engineering help, or you have looped twice without progress, summarize the exact error and what you have ruled out and hand off to a human (a support form) rather than gPreview of the first 4,000 characters. Read full instructions →
---
name: architect-turn-taking-latency
description: Use when the user asks about turn taking, speculative turns, agent response latency, preparing responses while the user speaks, turn eagerness or timeout, or how fast the agent replies.
---
# Turn taking and latency settings
Everything is branch-scoped over the ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`). You need `$AGENT_ID` and `$BRANCH_ID`.
## 1. Read the current turn settings
Read the agent's `conversation_config.turn` (and the workflow nodes if the question is workflow-specific) with `GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID`. Do not pull the full agent context for procedures and unrelated config; the turn block is what matters here.
## 2. Explain the relevant levers
Based on the user's specific latency or turn-taking question:
- Speculative turn (`speculative_turn`): when enabled, the agent starts preparing the LLM response during silence before full turn confidence is reached, reducing perceived latency.
- Turn eagerness (`turn_eagerness`): controls how quickly the agent jumps in (low, standard, high / eager).
- Turn timeout (`turn_timeout`): maximum wait time before the agent re-engages.
## 3. Apply the change
Use a single-field partial-merge patch with the exact dotted path so you touch only the setting in question:
- `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` with `{"conversation_config":{"turn":{"speculative_turn":true}}}`, or the same shape for `turn_eagerness` / `turn_timeout`.
This commits to branch HEAD and returns a new version. Confirm the change to the user, and note it is on the branch until merged.
---
name: architect-update-config-safely
description: Use when changing an agent setting (LLM, voice, TTS model, language, first message, ASR, guardrails, timeouts, turn-taking, data collection, evaluation criteria) and wanting it to actually apply, or on symptoms like "it won't save", "the change didn't take", "schema mismatch", "invalid config", "config validation failed", "set X to Y", or a language/voice change that broke the audio.
---
# Update agent config safely
Agent config edits fail often, most commonly with a schema mismatch that names no field, so a blind retry just fails again. The reliable path is: read the current state first, change one well-formed field at a time, and know the cross-field constraints before you send. Follow this every time you touch agent config.
Host `https://api.elevenlabs.io`, header `xi-api-key: $API_KEY`. The engineer supplies `$API_KEY`, `$AGENT_ID`, and `$BRANCH_ID`.
## 1. Read the current state first
Fetch the branch-scoped config before writing anything:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID" \
-H "xi-api-key: $API_KEY"
```
This gives you the authoritative current config: the exact dotted path you intend to change, the current value you are about to overwrite, and the surrounding settings that constrain the edit (`conversation_config.agent.language`, `conversation_config.tts.model_id`, `conversation_config.agent.prompt.llm`, `voice_id`). The workflow ships in the same response. If the agent has a workflow, config can live partly on nodes (per-node prompt, additional tool ids, additional knowledge base), so confirm whether your change belongs on the base agent or on a node before you patch. Do not edit blind.
Where an edit references tools, read them via `GET /v1/convai/tools` and `GET /v1/convai/tools/{tool_id}`. Where you plan to re-run tests after the change, list them first. Make independent reads in parallel.
Do not invent config keys, enum values, or schema paths. Confirm the exact key name and legal value from the current config response, not from memory.
## 2. Prefer one field per PATCH
A partial-merge `PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID` commits straight to branch HEAD and returns a new `version_id`. Send the single leaf you want, nested in its real shape, rather than resending a big config blob. Common partial bodies:
- llm: `{"conversation_config":{"agent":{"llm":"..."}}}`
- tts model: `{"conversation_config":{"tts":{"model_id":"eleven_flash_v2_5"}}}`
- language: `{"conversation_config":{"agent":{"language":"..."}}}`
- first message: `{"conversation_config":{"agent":{"first_message":"..."}}}`
- turn taking: `{"conversation_config":{"turn":{"speculative_turn":true}}}`
- criteria: `{"platform_settings":{"evaluation":{"criteria":[...]}}}` (send the full array; each `conversation_goal_prompt` max 2000 chars)
- data collection: `{"conversation_config":{"platform_settings":{"data_collection":{...}}}}`
Add `&version_description=...` to label the version.
```bash
curl -s -X PATCH "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID&version_description=set-tts-model" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{"conversation_config":{"tts":{"model_id":"eleven_flash_v2_5"}}}'
```
For a large text field (system prompt, first message, tool description, node prompt, procedure content), do not push the whole field through a config PATCH. Route to the string-field edit flow instead. See the `architect-edit-string-fields` skill.
Tool bodies (webhook/client/code tools) are not agent-config edits. Update them via `PATCH /v1/convai/tools/{tool_id}` (send the full tool config; it replaces). Workflow nodes and edges are not agent-config edits either.
## 3. Cross-field constraints and gotchas
- Language and TTS model move together (the big one). Changing `conversation_config.agent.language` to a non-English language while `conversation_config.tts.model_iPreview of the first 4,000 characters. Read full instructions →
---
name: code-tools
description: "Generate JavaScript/TypeScript modules for ElevenLabs code tools — sandbox tools that export a default async (ctx) => function, call APIs via fetch with ctx.secrets / ctx.config / ctx.auth_connections, and return a minimized result to the agent. Use when the user says 'write a code tool', 'code tools', 'ElevenLabs code tool', 'create a code tool', 'egress with auth connection', 'code tool allowed domains', 'X-With-Auth-Connection', or pastes a brief for custom JS/TS tool logic that should run on ElevenLabs infrastructure."
---
# ElevenLabs Code Tools
Generate paste-ready JS/TS for ElevenLabs **code tools**: custom logic that runs on ElevenLabs infrastructure, not a customer webhook.
## Canonical runtime model
Your code is a single JavaScript/TypeScript module that exports one default async function. It receives a `ctx` object and returns the tool result (same downstream uses as a server tool response: agent, transcript, dynamic variables).
```ts
export default async (ctx) => {
const { city } = ctx.args;
return { message: `Hello from ${city}!` };
};
```
Helpers and top-level variables outside the default export are fine.
### `ctx` API (use these names only)
| Property | Description |
|---|---|
| `ctx.args.<paramName>` | Tool-call parameters from the LLM, already typed (string, number, boolean, object). |
| `ctx.secrets.<NAME>` | Workspace secret mapped into this tool's Context object. |
| `ctx.config.<NAME>` | Plain string env/config value mapped into Context. |
| `ctx.auth_connections.<NAME>` | Auth-connection reference. Pass as the `X-With-Auth-Connection` header on outbound `fetch`; ElevenLabs attaches the credential — the raw secret never enters your code. |
Which secrets, auth connections, and config values appear under `ctx` (and under what name) is configured in the tool's **Context object** section in the studio — same idea as headers/params on a webhook tool.
### Naming gotchas (do not emit)
| Wrong | Right |
|---|---|
| `ctx.pargs` | `ctx.args` |
| `ctx.authConnections` | `ctx.auth_connections` |
### Hard constraints
- **No npm packages.** Built-in JavaScript + Web APIs only (`fetch`, `Promise`, `setTimeout`, `JSON`, `URL`, `encodeURIComponent`, etc.). No `import` from external packages.
- **Network allowlist.** Outbound requests only succeed for domains listed under the agent's **General Settings → Code tool allowed domains** (wildcards like `*.example.com` OK). Only workspace **admins** can add domains — flag that if the user is not an admin.
- **Timeout.** Each run must finish within the tool's response timeout (**1–30 seconds**). Cap any poll loops so total wait fits under that budget.
- **Return value = LLM context.** Everything you return is read by the model. Project to the few fields the agent needs — never dump full DB rows, internal notes, risk scores, audit logs, or other PII/internal fields.
- **Auth.** API keys → `ctx.secrets`. Plain URLs/base strings → `ctx.config`. OAuth / managed credentials → `ctx.auth_connections` + `"X-With-Auth-Connection"` header. Never hardcode secrets or put raw OAuth tokens in code.
- **Errors.** Both a structured return and a throw "work" — the difference is control. A structured `{ error: "..." }` return is always visible to the agent; `throw new Error(...)` lets you decide whether the failure reason surfaces to the LLM at all. Prefer structured returns for expected failures (not found, bad input); throw for unexpected upstream failures where a loud transcript failure helps debugging. Either way, try/catch and return or throw something meaningful. Best-effort side effects (logging) should swallow errors so they never break the tool.
## Intake
Ask only for what's missing:
1. **Tool name** + one-line purpose
2. **Parameters** (name, type, description) the LLM will fill → become `ctx.args`
3. **Upstream APIs / domains** to call
4. **Auth style** — secret vs auth connection vs plain config — and suggested Context object namesPreview of the first 4,000 characters. Read full instructions →
Referenced files: 4 — file references are metadata, not package contents.
--- name: creative-studio description: Generate and edit media through the connected ElevenLabs MCP server — speech, images, video, music, and transcription. Use when the user asks to generate a voiceover, image, video, or soundtrack, edit an image, or transcribe audio directly, rather than writing application code. Requires the ElevenLabs MCP server bundled with this plugin. license: MIT --- # ElevenLabs Creative Studio (via MCP) Workflow guidance for the `creative_*` tools on the ElevenLabs MCP server. Every tool takes a `context` parameter — briefly state the user's goal in it. For building media features into the user's own codebase (SDK, API), use the general skills instead (`text-to-speech`, `music`, `sound-effects`, `speech-to-text`). ## How generations work - `creative_generate_speech`, `creative_generate_image`, and `creative_generate_video` return immediately with a `flow_id`, `node_id`, `session_ids`, and a canvas `url` the user can open to keep editing. If the result doesn't render in a view, poll `creative_get_flow_run_status` until `all_completed` or `has_failures` is true. - **Generations spend credits.** Pass `estimate_only: true` to price a long video or a batch of variations before committing. Never call a generation tool a second time to "retry" — that starts and charges a second generation. - `generations_count` defaults to 4 variations so the user can pick; keep the default unless they ask for a specific number. ## Speech - `voice_id` is required and only ever comes from `creative_list_voices` (or the user) — never from memory. Pick a voice matching what the user described; if they gave no hint, pick a clear general-purpose voice rather than asking. - Default model: `eleven_multilingual_v2`. Use `eleven_v3` when the script uses inline audio direction tags like `[whispering]` or `[laughs softly]`. ## Images - Default model: `gemini-2.5-flash-image`. Pick by need: `gpt-image-2` for rendered text, infographics, UI mockups, or reference-driven edits; `flux-2-pro` for fine detail and strict prompt adherence. - `creative_get_flow_node_types` lists what the workspace can run; `creative_get_model_guide` explains how to prompt a specific model. ## Flows: combining generations - Nodes on different flows cannot be connected. When one generation feeds another (lipsync, a voiceover over video), call `creative_create_flow` first and pass that `flow_id` to every related call. - Wire upstream nodes with `connect_from`. A `node_id` only ever comes from a tool result or `creative_get_flow` — never invent one. - `creative_edit_image` requires `connect_from`: a node from an earlier generation on the same flow, a library asset, or an upload. ## Reference files and transcription - For a file already reachable (attached to the conversation, or a direct link): `creative_attach_reference_file` — returns a node with content. - For a file on the user's machine: `creative_upload_flow_reference` — the node stays empty until the user picks a file, so confirm it has an asset (via `creative_get_flow`) before generating from it. - Transcribe with `creative_transcribe_audio`, passing the audio node's id as `connect_from`; without it, a picker handles upload and transcription on its own — don't call the tool again or poll while it's open.
---
name: dubbing
description: Dub audio and video into other languages using the ElevenLabs Dubbing API (dubbing_v2), preserving the original speakers' voices. Use when translating videos, podcasts, or recordings into other languages, localizing media content, reviewing or correcting dubbing transcripts and translations, or regenerating a dub after edits.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Dubbing
Dub audio or video into other languages while preserving the original speakers' voices. Create a project from a file or URL, review and edit the source transcript, add one or more target languages, refine translations per segment, and regenerate outputs.
> **Important:** Use the Dubbing Projects API — `elevenlabs.dubbing.project.*` in the SDKs, or the `/v1/dubbing/project` REST endpoints. Do **not** use the legacy v1 dubbing surface (`client.dubbing.create()`, `client.dubbing.get()`, `client.dubbing.audio.get()`, or bare `/v1/dubbing` routes) — that is the older dubbing API, now under Legacy in the API reference.
> **Setup:** See [Installation Guide](references/installation.md). The `elevenlabs` CLI and the SDKs read `ELEVENLABS_API_KEY` automatically; REST base URL is `https://api.elevenlabs.io` with your API key in the `xi-api-key` header.
## Concepts
| Concept | Meaning |
|---------|---------|
| **Project** | One source of media (file or URL) plus its source transcript. Prepared (transcribed) once, then rests in `ready` while you add languages. |
| **Source transcript** | Editable segments (text, speaker, timing) transcribed from the source. The single source of truth every language is translated from. |
| **Language (target)** | One dubbed output language. Each has its own transcript (source segments + a translation per segment) and its own dubbed audio output. |
| **Revisions** | Independent monotonic counters. The project's `revision` bumps on source-transcript edits; a language's `revision` bumps on translation edits or source edits that affect it. A language's `output_revision` is the revision its current audio was generated from — when it's behind `revision`, the output is out of date. |
**Recommended order of operations:** finalize the source transcript **before** adding any languages. Translations are produced from the source, so correcting the source first means every language starts from the right text — editing the source after a language completes marks it `stale` and requires a (charged) regeneration.
> **Enterprise:** Transcript editing and regeneration are available to enterprise workspaces only. Creating projects, adding languages, and downloading dubs work on all plans.
## Workflow
1. **Create** the project from a file or URL → `queued`
2. **Poll** the project until `ready`
3. **Review and finalize the source transcript** (edit/add/delete segments)
4. **Add** one language per target → `queued` → `processing` → `completed`
5. **Download** each language's `outputs.lossless_audio` when `completed`
6. **Refine** translations per segment if needed → the language goes `stale`
7. **Regenerate** the language → `completed` again with fresh output
## Quick Start (Python)
```python
import os
import time
import requests
from elevenlabs.client import ElevenLabs
elevenlabs = ElevenLabs(api_key=os.getenv("ELEVENLABS_API_KEY"))
# 1. Create a project from a local file (or pass source_url=... instead of file)
with open("promo.mp4", "rb") as f:
project = elevenlabs.dubbing.project.create(
file=f,
source_language="en",
reference="Q3 marketing video",
)
# 2. Wait for the source media to be transcribed
while True:
project = elevenlabs.dubbing.project.get(project.project_id)
if project.status == "ready":
break
if project.status == "failed":
raise RuntimeError("Project preparatPreview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.
---
name: fix-agent-qa-ticket
description: >
Fix an Architect QA triage ticket (agtqa_*) end-to-end via the raw agents
API: fetch the ticket + conversation, find the root-cause procedure or prompt
text, fix it on a branch, add + run a simulation test proving the fix, then post
a summary comment on the ticket. Use when asked to "fix agtqa_...", "address this
QA ticket", "triage and fix this Architect ticket", or given an agtqa_* id/URL.
---
# Fix a QA ticket (agtqa_*)
`agtqa_*` = an Agent Conversation Triage Ticket: a reviewer's flagged comments
against specific turns of a real Architect/ConvAI conversation. This skill turns
one of those tickets into a verified, branch-scoped fix, entirely through the raw
ConvAI REST API (host `https://api.elevenlabs.io`, header `xi-api-key`). It never
touches main directly — it stages everything on a branch and leaves merging to
the user.
**Needs from the user**: an API key and a ticket id (`agtqa_...`) or a URL
containing one. Everything else — agent id, conversation id, branch — is derived
from the ticket.
**Platform-only.** Do not write repo code as part of this skill unless the root
cause is actually a code bug (rare — most triage findings are prompt/procedure
gaps). If code IS the root cause, say so and hand off instead of guessing at a
platform-side workaround.
## 1. Fetch the ticket
```bash
curl -s "https://api.elevenlabs.io/v1/convai/conversation-triage-tickets/$TICKET_ID" \
-H "xi-api-key: $API_KEY"
```
Returns `conversation_id`, `agent_id`, `qa_comment`, `ticket_comments[]`,
`turn_comments[]` (each with `turn_index` + `comment`), `status`
(`open`/`in_progress`/`resolved`).
## 2. Fetch the conversation and read the flagged turns
```bash
curl -s "https://api.elevenlabs.io/v1/convai/conversations/$CONVERSATION_ID" \
-H "xi-api-key: $API_KEY"
```
`transcript[]` has per-turn `role`, `message`, `tool_calls` (each with
`tool_name` + `params_as_json`). Read a window around every `turn_index` named in
`turn_comments` — usually a couple turns before and after — to understand what
the agent actually did and said. The reviewer's comments tell you *what's wrong*;
the transcript tells you *why*. Don't skip straight to guessing the fix — find
the specific tool call, prompt gap, or missing instruction that produced the bad
turn.
The conversation also carries `branch_id` and `version_id` — useful context, but
**do not build your fix branch off this conversation's branch** unless it's
demonstrably the right base (check `is_archived` / whether it's actually merged
into main — see step 3). It's just where the flagged conversation happened to run.
## 3. Create a fix branch off main's actual tip
Get the agent and find its real main branch:
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID" -H "xi-api-key: $API_KEY"
# -> .main_branch_id, .branch_id (top-level is usually main)
```
Then fetch that branch to get its true HEAD version (do not assume — a stray
personal/archived branch can look tempting but have unrelated commits in its
ancestry):
```bash
curl -s "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/branches/$MAIN_BRANCH_ID" \
-H "xi-api-key: $API_KEY"
# -> .most_recent_versions[0].id is main's real tip version_id
```
Create the branch from that exact version:
```bash
curl -s -X POST "https://api.elevenlabs.io/v1/convai/agents/$AGENT_ID/branches" \
-H "xi-api-key: $API_KEY" -H "Content-Type: application/json" \
-d '{"name": "<you>/qa-<ticket-suffix>-<short-desc>", "description": "Fix for '"$TICKET_ID"'", "parent_version_id": "<main-tip-version-id>"}'
```
Required fields are `name`, `description`, `parent_version_id` (all three, or
you get a 422 listing what's missing). Response: `{created_branch_id,
created_version_id}`.
## 4. Find and fix the root cause
Usually one of:
- **A procedure** missing an instruction (list via
`GET .../agents/{id}/branches/{b}/procedures`, fetch full content via
`GET .../procedures/{pid}`). Search procedPreview of the first 4,000 characters. Read full instructions →
---
name: music
description: Generate music using ElevenLabs Music API. Use when creating instrumental tracks, songs with lyrics, background music, jingles, or any AI-generated music composition. Supports prompt-based generation, composition plans for granular control, and detailed output with metadata.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Music Generation
Generate music from text prompts - supports instrumental tracks, songs with lyrics, and fine-grained control via composition plans.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only.
All examples below default to `music_v2`, the current generation model. Pass `model_id="music_v1"` only when explicitly requested to.
## Quick Start
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio = client.music.compose(
prompt="A chill lo-fi hip hop beat with jazzy piano chords",
music_length_ms=30000,
model_id="music_v2",
)
with open("output.mp3", "wb") as f:
for chunk in audio:
f.write(chunk)
```
### TypeScript
```typescript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createWriteStream } from "fs";
const client = new ElevenLabsClient();
const audio = await client.music.compose({
prompt: "A chill lo-fi hip hop beat with jazzy piano chords",
musicLengthMs: 30000,
modelId: "music_v2",
});
audio.pipe(createWriteStream("output.mp3"));
```
### CLI
```bash
elevenlabs music compose \
--prompt "A chill lo-fi beat" \
--music-length-ms 30000 \
--model-id music_v2 \
--output output.mp3
```
## Methods
| Method | Description |
|--------|-------------|
| `music.compose` | Generate audio from a prompt or composition plan |
| `music.stream` | Stream audio chunks as they are generated (paid plans) |
| `music.composition_plan.create` | Generate a structured plan for fine-grained control |
| `music.compose_detailed` | Generate audio + composition plan + metadata; pass `store_for_inpainting=True` to enable inpainting |
| `music.compose_detailed_stream` | Stream audio plus composition plan, metadata, and optional word timestamps as Server-Sent Events |
| `music.video_to_music` | Generate background music from one or more uploaded video files |
| `music.upload` | Upload an audio file for later inpainting workflows, optionally extracting its composition plan or word-level timestamps |
| `music.finetunes.list` | List accessible music finetunes |
| `music.finetunes.create` | Train a music finetune from uploaded audio |
| `music.finetunes.get` | Retrieve finetune status and metadata |
| `music.finetunes.update` | Update finetune metadata or visibility |
| `music.finetunes.delete` | Delete a music finetune |
See [API Reference](references/api_reference.md) for full parameter details.
`music.upload` is available to enterprise clients with access to the inpainting feature.
## Music Finetunes
Create a finetune from training audio with
[`POST /v1/music/finetunes`](https://elevenlabs.io/docs/api-reference/music/finetunes/create),
then poll the [get endpoint](https://elevenlabs.io/docs/api-reference/music/finetunes/get) until
its status is `completed`. Pass the returned `id` as `finetune_id` when composing music.
Use the [list](https://elevenlabs.io/docs/api-reference/music/finetunes/list),
[update](https://elevenlabs.io/docs/api-reference/music/finetunes/update), and
[delete](https://elevenlabs.io/docs/api-reference/music/finetunes/delete) endpoints to manage
accessible finetunes.
## Video to Music
Generate background music from uploaded video clips via
[`POST /v1/music/video-to-music`](https://elevenlabs.io/docs/api-reference/music/video-to-music)
(`client.music.video_to_music`). This is separate from prompt-based
[`music.compose`](https://elevenlabs.ioPreview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.
--- name: setup-api-key description: Guides users through setting up an ElevenLabs API key for ElevenLabs MCP tools. Use when the user needs to configure an ElevenLabs API key, when ElevenLabs tools fail due to missing API key, or when the user mentions needing access to ElevenLabs. First checks whether ELEVENLABS_API_KEY is already configured and valid, and only runs full setup when needed. license: MIT compatibility: Requires internet access to elevenlabs.io and api.elevenlabs.io. --- # ElevenLabs API Key Setup Guide the user through obtaining and configuring an ElevenLabs API key. ## Workflow ### Step 0: Check for an existing API key first Before asking the user for a key, check for an existing `ELEVENLABS_API_KEY`: 1. Check whether `ELEVENLABS_API_KEY` exists in the current environment. If it does, use that value for this initial check. 2. Only if it is not in the environment, check `.env` for `ELEVENLABS_API_KEY=<value>`. 3. Do not print, quote, or repeat the key. If you mention it, redact it. 4. If an existing key is found, validate it: ```text GET https://api.elevenlabs.io/v1/user Header: xi-api-key: <existing-api-key> ``` 5. **If existing key validation succeeds:** - Tell the user ElevenLabs is already configured and working - Skip the setup flow - Ask whether they want to replace/rotate the key; if not, stop 6. **If existing key validation fails:** - Tell the user the existing key appears invalid or expired - Continue to Step 1 ### Step 1: Request the API key Tell the user: > To set up ElevenLabs, open the API keys page: https://elevenlabs.io/app/settings/api-keys > > (Need an account? Create one at https://elevenlabs.io/app/sign-up first) > > If you don't have an API key yet: > 1. Click "Create key" > 2. Name it (or use the default) > 3. Set permission for your key. If you provide a key with "User" permission set to "Read" this skill will automatically verify if your key works > 4. Click "Create key" to confirm > 5. **Copy the key immediately** - it's only shown once! > > Do not paste the key into this chat. Instead, copy/paste it into your local `.env` file: > > ``` > ELEVENLABS_API_KEY=your-api-key > ``` > > If `.env` already has an `ELEVENLABS_API_KEY=...` line, replace that line. > Tell me when you've saved it, without sharing the key. Then wait for the user to confirm that the key is saved locally. ### Step 2: Validate and configure After the user says the key is saved: 1. Re-check both `.env` and the current environment for `ELEVENLABS_API_KEY`, but treat `.env` as the source of truth for this step. 2. If `.env` contains a value, validate that value even when the current environment also has a different `ELEVENLABS_API_KEY`. 3. If `.env` does not contain the key: - Tell the user `.env` does not appear to contain `ELEVENLABS_API_KEY`. - Show the expected line again. - If the current environment does contain a key, note that this step still requires saving the key in `.env`. - Remind them not to paste the key into chat. 4. If a `.env` key is found, validate it: ```text GET https://api.elevenlabs.io/v1/user Header: xi-api-key: <local-api-key> ``` 5. If validation fails: - Tell the user the local key appears invalid or expired. - Remind them of the API keys page. - Ask them to replace the `.env` value and tell you when it is saved. 6. If validation succeeds, confirm: > Done. ElevenLabs is configured and the key in `.env` works. ## Safety Rules - Never ask the user to paste an API key, token, or secret into chat. - Never print or echo API key values from environment variables or `.env`. - Prefer `.env` or managed secrets over shell history for persistent local configuration. - For browser or client-side apps, keep `ELEVENLABS_API_KEY` on the server and issue short-lived tokens where applicable.
---
name: sound-effects
description: Generate sound effects from text descriptions using ElevenLabs. Use when creating sound effects, generating audio textures, producing ambient sounds, cinematic impacts, UI sounds, or any audio that isn't speech. Supports looping, duration control, and prompt influence tuning.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Sound Effects
Generate sound effects from text descriptions — supports looping, custom duration, and prompt adherence control.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only.
## Quick Start
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio = client.text_to_sound_effects.convert(
text="Thunder rumbling in the distance with light rain",
)
with open("thunder.mp3", "wb") as f:
for chunk in audio:
f.write(chunk)
```
### JavaScript
```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createWriteStream } from "fs";
const client = new ElevenLabsClient();
const audio = await client.textToSoundEffects.convert({
text: "Thunder rumbling in the distance with light rain",
});
audio.pipe(createWriteStream("thunder.mp3"));
```
### CLI
```bash
elevenlabs text-to-sound-effects convert \
--text "Thunder rumbling in the distance with light rain" \
--output thunder.mp3
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `text` | string (required) | — | Description of the desired sound effect |
| `model_id` | string | `eleven_text_to_sound_v2` | Model to use |
| `duration_seconds` | number \| null | null (auto) | Duration 0.5–30s; auto-calculated if null |
| `prompt_influence` | number \| null | 0.3 | How closely to follow the prompt (0–1) |
| `loop` | boolean | false | Generate a seamlessly looping sound (v2 model only) |
## Examples with Parameters
```python
# Looping ambient sound, 10 seconds
audio = client.text_to_sound_effects.convert(
text="Gentle forest ambiance with birds chirping",
duration_seconds=10.0,
prompt_influence=0.5,
loop=True,
)
# Short UI sound, high prompt adherence
audio = client.text_to_sound_effects.convert(
text="Soft notification chime",
duration_seconds=1.0,
prompt_influence=0.8,
)
```
## Output Formats
Pass `--output-format` (CLI) or `output_format` as an SDK parameter:
| Format | Description |
|--------|-------------|
| `mp3_44100_128` | MP3 44.1kHz 128kbps (default) |
| `pcm_44100` | Raw uncompressed CD quality |
| `opus_48000_128` | Opus 48kHz 128kbps — efficient compressed |
| `ulaw_8000` | μ-law 8kHz — telephony |
Full list: `mp3_22050_32`, `mp3_24000_48`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192`, `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_32000`, `pcm_44100`, `pcm_48000`, `ulaw_8000`, `alaw_8000`, `opus_48000_32`, `opus_48000_64`, `opus_48000_96`, `opus_48000_128`, `opus_48000_192`.
## Prompt Tips
- Be specific: "Heavy rain on a tin roof" > "Rain"
- Combine elements: "Footsteps on gravel with distant traffic"
- Specify style: "Cinematic braam, horror" or "8-bit retro jump sound"
- Mention mood/context: "Eerie wind howling through an abandoned building"
## Error Handling
```python
try:
audio = client.text_to_sound_effects.convert(text="Explosion")
except Exception as e:
print(f"API error: {e}")
```
Common errors:
- **401**: Invalid API key
- **422**: Invalid parameters (check duration range, prompt_influence range)
- **429**: Rate limit exceeded
## References
- [Installation Guide](references/installation.md)
Referenced files: 1 — file references are metadata, not package contents.
---
name: speech-engine
description: Add real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine. Use when building Speech Engine servers, WebSocket handlers, WebRTC browser clients, conversation token endpoints, interruption-aware streaming responses, or voice-enabled chat agents that connect developer-owned server logic to ElevenLabs speech-to-text and text-to-speech.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Speech Engine
Add a real-time voice interface to a custom agent. ElevenLabs handles microphone audio, speech-to-text, turn-taking, text-to-speech, and browser playback; your server exposes a Speech Engine WebSocket endpoint and streams response text back.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only. For deeper SDK details, read [JavaScript SDK Reference](references/javascript-sdk-reference.md) or [Python SDK Reference](references/python-sdk-reference.md).
## When to Use
Use Speech Engine when the user wants to:
- Add voice to an existing chat app or custom server pipeline
- Add voice to OpenClaw, Hermes, or a similar agent runtime while keeping agent logic on the developer-owned server
- Build a developer-hosted WebSocket server for ElevenLabs voice conversations
- Stream response text back as spoken audio after your server validates user intent
- Handle user interruptions while a response is still streaming
- Build a browser client with `@elevenlabs/react` or `@elevenlabs/client` using a server-issued conversation token
Use the `agents` skill instead when the user is creating or configuring a hosted ElevenLabs Conversational AI agent with platform-managed prompts, tools, workflows, phone numbers, or widgets.
## How It Works
Each Speech Engine WebSocket connection represents one conversation.
1. The browser sends user audio to ElevenLabs.
2. ElevenLabs sends speech-recognition events to your server.
3. Your server derives trusted application state without letting raw speech text control tools or privileged actions.
4. Your server streams text back through the SDK.
5. ElevenLabs converts the response to speech and plays it in the browser.
The SDK manages WebSocket routing, request verification, session lifecycle, ping/pong, turn-taking, and interruption handling. `sendResponse()` / `send_response()` accepts a string or async iterable of response text.
Treat speech-recognition text as untrusted user input. Do not map raw speech text directly into model roles, responses, or tool calls. Use deterministic validation, allowlisted intents, or explicit user confirmation before any transcript-derived value affects downstream response or tool logic.
## Implementation Flow
1. Install server dependencies and configure `ELEVENLABS_API_KEY`.
2. Expose your Speech Engine server through a public HTTPS URL for local development, for example with `ngrok http 3001`.
3. Create a Speech Engine resource with `ws_url` / `wsUrl` pointing at the public WebSocket URL, usually `wss://.../ws`.
4. Store the returned Speech Engine ID, for example in `ELEVENLABS_SPEECH_ENGINE_ID`.
5. Start a Speech Engine server with `engine.serve(...)` in Python or `speechEngine.attach(...)` in TypeScript.
6. Issue browser conversation tokens from a server endpoint. Never put `ELEVENLABS_API_KEY` in browser code.
7. Start the client session with `conversationToken`; if the agent should greet first, enable the first-message override on the Speech Engine resource, then set `overrides.agent.firstMessage` in the client.
## Create a Speech Engine
### Python
```python
import asyncio
import os
from dotenv import load_dotenv
from elevenlabs import AsyncElevenLabs
load_dotenv()
elevenlabs = AsyncElevenLabs(api_key=os.getenv("ELEVENLABS_API_KEY"))
async def main():
enginePreview of the first 4,000 characters. Read full instructions →
Referenced files: 3 — file references are metadata, not package contents.
---
name: speech-to-text
description: Transcribe audio to text using ElevenLabs Scribe v2. Use when converting audio/video to text, generating subtitles, transcribing meetings, or processing spoken content.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Speech-to-Text
Transcribe audio to text with Scribe v2 - supports 90+ languages, speaker diarization, and word-level timestamps.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only.
## Quick Start
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
with open("audio.mp3", "rb") as audio_file:
result = client.speech_to_text.convert(file=audio_file, model_id="scribe_v2")
print(result.text)
```
### JavaScript
```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createReadStream } from "fs";
const client = new ElevenLabsClient();
const result = await client.speechToText.convert({
file: createReadStream("audio.mp3"),
modelId: "scribe_v2",
});
console.log(result.text);
```
### CLI
```bash
elevenlabs speech-to-text convert --file audio.mp3 --model-id scribe_v2
```
## Models
| Model ID | Description | Best For |
|----------|-------------|----------|
| `scribe_v2` | State-of-the-art accuracy, 90+ languages | Batch transcription, subtitles, long-form audio |
| `scribe_v2_realtime` | Low latency (~150ms) | Live transcription, voice agents |
| `scribe_v2_realtime_turbo` | Realtime transcription variant | Live transcription |
| `scribe_v2_realtime_lite` | Realtime transcription variant | Live transcription |
## Transcription with Timestamps
Word-level timestamps include type classification and speaker identification:
```python
result = client.speech_to_text.convert(
file=audio_file, model_id="scribe_v2", timestamps_granularity="word"
)
for word in result.words:
print(f"{word.text}: {word.start}s - {word.end}s (type: {word.type})")
```
## Speaker Diarization
Identify WHO said WHAT - the model labels each word with a speaker ID, useful for meetings, interviews, or any multi-speaker audio:
```python
result = client.speech_to_text.convert(
file=audio_file,
model_id="scribe_v2",
diarize=True
)
for word in result.words:
print(f"[{word.speaker_id}] {word.text}")
```
For call recordings, the batch API can label diarized speakers as `agent` and `customer` by setting `detect_speaker_roles=true` alongside `diarize=true`. This option is not compatible with `use_multi_channel=true`.
If your workspace has registered speaker profiles, set `use_speaker_library=true` with `diarize=true` to match detected speakers against the speaker library.
```bash
elevenlabs speech-to-text convert \
--file call.mp3 \
--model-id scribe_v2 \
--diarize true \
--detect-speaker-roles true \
--use-speaker-library true
```
## Multichannel Audio
Use `use_multi_channel=true` when each speaker is isolated on a separate audio channel. By default, the API returns one transcript per channel under `transcripts`; set `multichannel_output_style="combined"` to receive one transcript merged by timestamp, with `channel_index` on each word.
```python
result = client.speech_to_text.convert(
file=audio_file,
model_id="scribe_v2",
use_multi_channel=True,
multichannel_output_style="combined",
)
```
## Keyterm Prompting
Help the model recognize specific words it might otherwise mishear - product names, technical jargon, or unusual spellings (up to 100 terms):
```python
result = client.speech_to_text.convert(
file=audio_file,
model_id="scribe_v2",
keyterms=["ElevenLabs", "Scribe", "API"]
)
```
## Language Detection
Automatic detection with optional language hint:
```python
result = client.speech_to_text.convert(
file=audio_file,
model_id="scrPreview of the first 4,000 characters. Read full instructions →
Referenced files: 6 — file references are metadata, not package contents.
---
name: text-to-speech
description: Convert text to speech using ElevenLabs voice AI. Use when generating audio from text, creating voiceovers, building voice apps, or synthesizing speech in 70+ languages.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Text-to-Speech
Generate natural speech from text - supports 70+ languages, multiple models for quality vs latency tradeoffs.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only.
## Quick Start
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio = client.text_to_speech.convert(
text="Hello, welcome to ElevenLabs!",
voice_id="JBFqnCBsd6RMkjVDRZzb", # George
model_id="eleven_multilingual_v2"
)
with open("output.mp3", "wb") as f:
for chunk in audio:
f.write(chunk)
```
### JavaScript
```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createWriteStream } from "fs";
import { Readable } from "stream";
const client = new ElevenLabsClient();
const audio = await client.textToSpeech.convert("JBFqnCBsd6RMkjVDRZzb", {
text: "Hello, welcome to ElevenLabs!",
modelId: "eleven_multilingual_v2",
});
// convert() returns a web ReadableStream — bridge it to a Node stream to write to disk
Readable.fromWeb(audio).pipe(createWriteStream("output.mp3"));
```
### CLI
```bash
elevenlabs text-to-speech convert --voice-id JBFqnCBsd6RMkjVDRZzb \
--text "Hello!" --model-id eleven_multilingual_v2 --output output.mp3
```
The CLI reads `ELEVENLABS_API_KEY` from the environment automatically.
## Models
| Model ID | Languages | Latency | Best For |
|----------|-----------|---------|----------|
| `eleven_v3` | 70+ | Standard | Highest quality, emotional range |
| `eleven_multilingual_v2` | 29 | Standard | High quality, long-form content |
| `eleven_flash_v2_5` | 32 | ~75ms | Ultra-low latency, real-time |
| `eleven_flash_v2` | English | ~75ms | English-only, fastest |
| `eleven_turbo_v2_5` | 32 | ~250-300ms | Balanced quality/speed |
| `eleven_turbo_v2` | English | ~250-300ms | English-only, balanced |
## Voice IDs
Use pre-made voices or create custom voices in the dashboard.
**Popular voices:**
- `JBFqnCBsd6RMkjVDRZzb` - George (male, narrative)
- `EXAVITQu4vr4xnSDxMaL` - Sarah (female, soft)
- `onwK4e9ZLuTAKqWW03F9` - Daniel (male, authoritative)
- `XB0fDUnXU5powFXDhCwa` - Charlotte (female, conversational)
```python
voices = client.voices.get_all()
for voice in voices.voices:
print(f"{voice.voice_id}: {voice.name}")
```
## Voice Settings
Fine-tune how the voice sounds:
- **Stability**: How consistent the voice stays. Lower values = more emotional range and variation, but can sound unstable. Higher = steady, predictable delivery.
- **Similarity boost**: How closely to match the original voice sample. Higher values sound more like the original but may amplify audio artifacts.
- **Style**: Exaggerates the voice's unique style characteristics (only works with v2+ models).
- **Speaker boost**: Post-processing that enhances clarity and voice similarity.
```python
from elevenlabs import VoiceSettings
audio = client.text_to_speech.convert(
text="Customize my voice settings.",
voice_id="JBFqnCBsd6RMkjVDRZzb",
voice_settings=VoiceSettings(
stability=0.5,
similarity_boost=0.75,
style=0.5,
speed=1.0, # 0.25 to 4.0 (default 1.0)
use_speaker_boost=True
)
)
```
## Language Selection
Use `language_code` with models that support language enforcement to guide pronunciation and text normalization. Unsupported language codes are ignored, and `language_code` is not supported on `eleven_multilingual_v2`.
```python
audio = client.text_to_speech.convert(
text="Bonjour, comment allez-vous?",
voicePreview of the first 4,000 characters. Read full instructions →
Referenced files: 3 — file references are metadata, not package contents.
---
name: voice-changer
description: Transform the voice in an audio recording into a different target voice while preserving emotion, timing, and delivery using the ElevenLabs Voice Changer (speech-to-speech) API. Use when converting one voice to another, changing the speaker/narrator of an existing recording, dubbing a voice-over in a different voice, creating character voices from a scratch performance, anonymizing a speaker, or any "voice conversion / voice transfer / speech-to-speech" task. Make sure to use this skill whenever the user mentions voice changing, voice conversion, speech-to-speech, swapping a voice in audio, re-voicing a clip, or applying a different voice to an existing recording — even if they don't explicitly say "voice changer". Do not use this skill to create or clone a new voice from a voice sample — that is voice cloning (IVC/PVC), a separate feature; this skill only converts an existing recording into an existing voice_id.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Voice Changer
Transform the voice in an audio recording into a different target voice. Voice Changer (previously called Speech-to-Speech — the API endpoint and SDK methods still use the `speech_to_speech` / `speechToSpeech` name) keeps the original performance — emotion, pacing, intonation, breaths, whispers, laughs, cries — and only swaps who is speaking.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only.
## Key Facts
- **Maximum input length:** 5 minutes per request — split longer recordings into chunks and stitch the outputs.
- **Maximum file size:** 50 MB per request — compress to MP3 if your source is larger.
- **Pricing:** 1,000 characters per minute of audio processed (duration-based, not text-based).
- **Recommended model:** `eleven_multilingual_sts_v2` — often outperforms `eleven_english_sts_v2` even for English-only content.
## Quick Start
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
with open("source.mp3", "rb") as audio_file:
audio_stream = client.speech_to_speech.convert(
voice_id="JBFqnCBsd6RMkjVDRZzb", # George
audio=audio_file,
model_id="eleven_multilingual_sts_v2",
output_format="mp3_44100_128",
)
with open("converted.mp3", "wb") as f:
for chunk in audio_stream:
f.write(chunk)
```
### JavaScript
```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createReadStream, createWriteStream } from "fs";
const client = new ElevenLabsClient();
const audioStream = await client.speechToSpeech.convert("JBFqnCBsd6RMkjVDRZzb", {
audio: createReadStream("source.mp3"),
modelId: "eleven_multilingual_sts_v2",
outputFormat: "mp3_44100_128",
});
audioStream.pipe(createWriteStream("converted.mp3"));
```
### CLI
```bash
elevenlabs speech-to-speech convert \
--voice-id JBFqnCBsd6RMkjVDRZzb \
--audio source.mp3 \
--model-id eleven_multilingual_sts_v2 \
--output-format mp3_44100_128 \
--output converted.mp3
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `voice_id` | string (required) | — | Target voice to speak in. Use a pre-made voice ID, a cloned voice, or a voice from the library |
| `audio` | file (required) | — | Source audio whose performance (emotion, timing, delivery) will be preserved |
| `model_id` | string | `eleven_english_sts_v2` | `eleven_multilingual_sts_v2` for 29 languages, `eleven_english_sts_v2` for English-only |
| `output_format` | string | `mp3_44100_128` | See output formats table below |
| `voice_settings` | JSON string | — | Override stored voice settings for this request only |
| `seed` | integer | — | Best-effort deterministic sampling (0 – 4294967295) |
| `remove_baPreview of the first 4,000 characters. Read full instructions →
Referenced files: 1 — file references are metadata, not package contents.
---
name: voice-isolator
description: Remove background noise and isolate vocals/speech from audio using ElevenLabs Voice Isolator (audio isolation) API. Use when cleaning up noisy recordings, removing music or background ambience from dialogue, isolating speech from field recordings, preparing audio for transcription, extracting vocals, or any "denoise / clean up / isolate voice" task.
license: MIT
compatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
metadata: {"openclaw": {"requires": {"env": ["ELEVENLABS_API_KEY"]}, "primaryEnv": "ELEVENLABS_API_KEY"}}
---
# ElevenLabs Voice Isolator
Removes background noise from audio and isolates vocals/speech — useful for cleaning up noisy recordings, prepping audio for transcription, or pulling dialogue out of a mixed track.
> **Setup:** See [Installation Guide](references/installation.md). For JavaScript, use `@elevenlabs/*` packages only.
## Quick Start
### Python
```python
from elevenlabs import ElevenLabs
client = ElevenLabs()
with open("noisy.mp3", "rb") as audio_file:
audio_stream = client.audio_isolation.convert(audio=audio_file)
with open("clean.mp3", "wb") as f:
for chunk in audio_stream:
f.write(chunk)
```
### JavaScript
```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createReadStream, createWriteStream } from "fs";
const client = new ElevenLabsClient();
const audioStream = await client.audioIsolation.convert({
audio: createReadStream("noisy.mp3"),
});
audioStream.pipe(createWriteStream("clean.mp3"));
```
### CLI
```bash
elevenlabs audio-isolation convert --audio noisy.mp3 --output clean.mp3
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `audio` | file (required) | — | Audio file with vocals/speech to isolate |
| `file_format` | string | `other` | `other` for any encoded audio, or `pcm_s16le_16` for 16-bit PCM mono @ 16kHz little-endian (lower latency) |
## Isolating from a URL
```python
import requests
from io import BytesIO
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio_url = "https://example.com/noisy.mp3"
response = requests.get(audio_url)
audio_data = BytesIO(response.content)
audio_stream = client.audio_isolation.convert(audio=audio_data)
with open("clean.mp3", "wb") as f:
for chunk in audio_stream:
f.write(chunk)
```
## Low-Latency PCM Input
If you already have raw 16-bit PCM mono @ 16kHz, passing `file_format="pcm_s16le_16"` skips decoding and reduces latency:
```python
audio_stream = client.audio_isolation.convert(
audio=pcm_bytes,
file_format="pcm_s16le_16",
)
```
## Supported Formats
Any common encoded audio/video container works as input (MP3, WAV, M4A, FLAC, OGG, WebM, MP4, etc.). Response is a streamed MP3 by default.
## Common Workflows
- **Clean up interview/podcast recordings** — strip room tone, HVAC, traffic before editing.
- **Prep noisy audio for Speech-to-Text** — isolate voice first, then pass through `speech_to_text.convert()` for better transcription accuracy.
- **Extract dialogue from mixed tracks** — pull vocals out of a track with music/SFX.
- **Pre-processing for Voice Changer** — isolate the source voice before applying voice transformation.
## Error Handling
```python
try:
audio_stream = client.audio_isolation.convert(audio=audio_file)
except Exception as e:
print(f"Voice isolation failed: {e}")
```
Common errors:
- **401**: Invalid API key
- **422**: Invalid parameters (e.g. wrong `file_format` for the supplied audio)
- **429**: Rate limit exceeded
## References
- [Installation Guide](references/installation.md)
Referenced files: 1 — file references are metadata, not package contents.
Publisher declarations from the archived package. These are separate from our research and the live service's terms.
Package observed Nov 23, 2026.
plugin_asdk_app_6a8d784b60cc81919aeafbfaeda5fbcf
Download plugin data (JSON)Plugin details: freshly prepared. Prepared . Refreshed when plugin data changes or after 6 hours. Your account and Follow status are live.