Update a voice agent
update_agentChanges the live agent immediately. If you want to review or simulate a change before it goes live, or a human may be editing the same agent in the volai portal, use save_agent_draft + publish_agent_draft instead; update_agent bumps the draft revision and clears the tested marker. Update an existing voice agent - send only the fields you want to change, the rest stays as-is. You can change the name (name), instructions (systemPrompt), first line (firstMessage), language (language, values cs, sk, en, de, pl, nl, pt, sl, ro, da, et, lv, bg, fi, el, fr, it, hu, lt, sv, hr, es, is) and voice (voiceId - which platform an agent runs on is its provider field, engine or elevenlabs (volai decides, support switches it; changing language to cs or sk from any other language moves an elevenlabs agent to the engine with that language's default voice, read provider in the result); an agent on the volai engine (provider engine) can use any id from list_voices except an ElevenLabs voice ('katty', 'anet') or a raw ElevenLabs voice id, an agent with provider elevenlabs can only use list_voices with provider: 'elevenlabs' (the ElevenLabs voices for the agent's language; the retired 'anet' only if it already has it) or a raw ElevenLabs voice id, anything else is rejected with a 400). Set numberE164 to null to detach the agent's number, or to a new number to attach a different one. A calls and SMS number can be attached only to an agent on the volai engine whose transferTo, if any, is a number this line may call (+420 for a Prague number, otherwise see capabilities.outboundTo of the number) (unsupported_for_number_type, destination_not_allowed), and only to an active number (invalid_transition, 409); if that number is being processed by another operation (an activation, billing or a release) the call returns in_progress (409), and when swapping numbers the previous number may already be detached, so read the agent with get_agent and try again in a minute. It also supports changing: toolIds - the FULL list of the agent's webhook tools (ids from list_tools), an empty array removes all tools; transferTo - an E.164 number to transfer to a human, null or an empty string turns transfer off (must not be your own volai number, the call would loop back on itself); transferCondition - when to transfer, an empty string restores the default sentence; dataFields - the FULL list of data the agent should record from the call, an array of objects {key, type, description, enumValues}, an empty array turns recording off; recordCalls - whether to record calls for this agent; recordingNotice - whether the agent's first line ends with a short notice that the call is recorded (off unless you turn it on, plays only while recordCalls is on), and you as the customer remain responsible for disclosure meeting the law in your case; goal - one sentence describing what a successful call looks like (used by an LLM judge, up to 300 characters), null or an empty string clears it; knowledge - extra text the agent knows besides its instructions (up to 20000 characters), null or an empty string clears it; notifyEmail - whether to email the account owner a summary after every call this agent takes; voicemail - detect a voicemail on outbound calls, an object {enabled, action, message?} (see the field descriptions below), null turns detection off and clears the setting, only accepted when this agent's provider is engine (otherwise voicemail_requires_engine); silencePromptSecs - seconds of caller silence before a 'Are you there?' reminder plays, an integer from 3 to 25 or null to turn it off, accepted for either provider but only heard once the agent runs on the volai engine; firstMessageProtectSecs - seconds of the first line that a short reaction from the person who answered (such as 'Hello?') cannot interrupt, a number from 0 to 20 or null (or 0) to turn it off, outbound calls only, accepted for either provider but only heard once the agent runs on the volai engine, a reply from the person who answered without an interrupting word (for example stop, no, wait) is dropped in that window: it does not interrupt the line, is not in the transcript and the agent does not react to it, and the interrupting words follow the agent's language (an English agent is interrupted by stop, no, wait or hold); silencePromptText - your own silence reminder sentence spoken word for word instead of the default reminder for the agent's language, up to 80 characters, null or an empty string restores the default; inboundVariables - default values for {{variable}} placeholders on inbound calls (for example { uvod: 'How can I help you?' }), an object that replaces the stored one entirely, null or {} removes them all, omit to leave unchanged, not used on outbound calls; sttLanguageHintsStrict - strict language lock for speech recognition on the volai engine (Soniox language_hints_strict, best effort; cs agents with outbound calls only, never for sk; ElevenLabs ignores it), true turns it on, false or null turns it off, omit to leave unchanged; turnDigitTailFloorMs - silence floor in milliseconds the volai engine keeps after a reply that ends with 3 to 8 digits (a caller dictating a number group by group), 0 turns it off, otherwise 400 to 2300 (recommended first step 800 for Czech agents that take dictated numbers), null clears it so the engine default 0 applies, omit to leave unchanged; turnLongSpeechFloorMs - silence floor in milliseconds after the caller spoke longer than turnLongSpeechSecs, 0 turns it off, otherwise 400 to 2300 (suggested 800), null clears it (engine default 0), omit to leave unchanged; turnLongSpeechSecs - speech length in seconds above which that floor applies, 1 to 30, null clears it (engine default 5), omit to leave unchanged; all three are stored for either provider and used only by the engine; Czech agents on the default end-of-turn profile already require 300 ms of silence before a turn ends (100 ms less than the engine default 400), so a floor of 400 already adds 100 ms for them; laughter - whether the agent may laugh back when the caller laughs, auto/on/off (see the field description), accepted for either provider but only heard for a Cartesia voice in Czech on the volai engine; missedCallSms - send an SMS to the caller when this agent misses the call, { enabled, text? } (see the field description), omit to leave unchanged, send { enabled: false } to turn it off; workflow - split the call into phases (nodes); a node is a SCOPE, not a script (it only adds a prompt, knowledge, tools and an optional entry line for while the call is in it, never a fixed wording or question order), the model decides transitions itself by calling a tool whose condition must describe what the CALLER said, and there is no end-of-call node. Limits: 2 to 8 nodes, 1 to 24 edges, at most 5 edges leaving one node, a condition 5 to 200 characters long, a node's prompt up to 2000 characters and knowledge up to 4000, with prompt plus knowledge together capped at 4000 per node. Example (a funeral home receptionist): a triage node whose edges route to bereavement, burial or inquiry based on what the caller asked for - see /docs/mcp for the full list of warning codes and /docs/api Call phases section for the JSON shape. null removes the phases and returns the agent to a single phase, omit to leave it unchanged. The EU AI Act (Article 50) also requires the first line to disclose that a digital assistant is speaking - this isn't enforced (the update still saves), but a firstMessage that doesn't disclose it gets a warnings field in the response, code first_message_no_ai_disclosure. A firstMessage estimated to take over 7 seconds to say - measured against what the caller actually hears, the greeting plus the short recording-notice sentence added when recordingNotice and recordCalls are on (about 2.53 words per second; digits always, and all-caps abbreviations up to four characters, count per character) - also gets a warnings field, code first_message_too_long; an unchanged default opening line never triggers it, only one you have edited. Keep the greeting to a name, company, a short AI notice, and a question. Once numberE164 is set, a systemPrompt or firstMessage variable outside the set an inbound call actually supplies gets prompt_variables_unavailable_inbound in warnings, and a firstMessage with no letter or digit left in it outside the variables once every variable block is removed gets first_message_empty - see /docs/mcp for both. If this keeps failing with in_progress, an uncertain provider operation is blocking the agent - resolve it with reconcile_agent_draft_operation (after checking the live state) or in the volai portal. Same data as PATCH /v1/agents/{id} (response schema in /openapi.json), plus a top-level laughterEffective field this response always includes (get_agent carries the same shape nested inside agent instead).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "update_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the agent to update, from list_agents. Looks like ag_9f3a2b7c4d1e. | |
| goal | No | One sentence describing what a successful call looks like, used by an automated judge after the call to score it met or not met, up to 300 characters. null clears it. Omit to leave it unchanged. | |
| name | No | Display name of the agent, shown in the portal and in list_agents, 1 to 60 characters. Omit to leave it unchanged. | |
| toolIds | No | Ids of webhook tools from list_tools the agent may call during a call, at most 10; the tool must already exist on the account. Omit to leave it unchanged. | |
| voiceId | No | Voice for the agent, an id from list_voices. Provider engine accepts any catalog id except an ElevenLabs voice ('katty', 'anet') or a raw ElevenLabs id; provider elevenlabs accepts katty or a raw ElevenLabs id, and anet only if the agent already has it. Omit to keep it. | |
| calendar | No | Calendar availability rules, same shape as create_agent's calendar field. null turns it off. Effective once provider is engine - see calendar_pending_engine_switch otherwise. Omit to leave unchanged. | |
| language | No | Language the agent speaks, one of: cs, sk, en, de, pl, nl, pt, sl, ro, da, et, lv, bg, fi, el, fr, it, hu, lt, sv, hr, es, is. Changing to cs or sk from any other language moves an elevenlabs agent to the volai engine; read provider in the result. Omit to leave it unchanged. | |
| laughter | No | Same values as create_agent's laughter: auto follows sensitive-topic detection, on overrides that detection, off always suppresses it. Takes effect from the next call, only heard for a Cartesia voice in Czech on the engine, which on cannot override. Omit to leave it unchanged. | |
| workflow | No | Split the call into phases (nodes), same shape as create_agent workflow; see /docs/api Call phases section for the shape and an example. null removes the phases and returns the agent to a single phase. Omit to leave it unchanged. | |
| knowledge | No | Extra text the agent knows besides its instructions, such as a price list or FAQ, appended to the end of the prompt, up to 20000 characters. null clears it. Omit to leave it unchanged. | |
| voicemail | No | Voicemail detection for this agent's outbound calls. null turns it off and clears the setting. Only accepted when this agent's provider is engine, otherwise fails with voicemail_requires_engine. Omit to leave it unchanged. | |
| dataFields | No | What the agent should record from the call, at most 10 fields; the result shows up in the data field of get_call. Omit to leave it unchanged. | |
| numberE164 | No | Phone number to attach to the agent, in E.164 format like +420123456789. null detaches the current number. Omit to leave it unchanged. | |
| transferTo | No | E.164 number the agent transfers the caller to when they ask for a human. Must not be your own volai number - the call would loop back on itself. null clears it. Omit to leave it unchanged. | |
| notifyEmail | No | Whether to email the account owner a summary after every call this agent takes. Omit to leave it unchanged. | |
| recordCalls | No | Whether to record calls for this agent. Recording adds no notice to the first line by itself; see recordingNotice. Omit to leave it unchanged. | |
| firstMessage | No | Opening line the agent speaks first, before the caller says anything. Omit to leave it unchanged. | |
| systemPrompt | No | Full instructions the agent follows during the call, 10 to 6000 characters. Omit to leave it unchanged. | |
| missedCallSms | No | Same shape as create_agent's missedCallSms. Send { enabled: false } to turn it off. Omit to leave it unchanged. | |
| recordingNotice | No | Whether the agent ends its first line with a short sentence saying the call is recorded, in the agent's language. Plays only while recordCalls is on. Omit to leave it unchanged. | |
| inboundVariables | No | Same shape as create_agent's inboundVariables: default values for {{variable}} placeholders on inbound calls. The object replaces the stored values entirely; null or {} removes them all. Omit to leave them unchanged. | |
| silencePromptSecs | No | How many seconds of caller silence trigger a "Are you there?" reminder prompt, 3 to 25. null turns it off. Stored for either provider, only heard once the agent runs on the volai engine. Omit to leave it unchanged. | |
| silencePromptText | No | Same as in create_agent: your own silence reminder sentence, up to 80 characters. null or an empty string restores the default. Heard only on the volai engine. Omit to leave it unchanged. | |
| transferCondition | No | When to transfer to a human, one or two sentences as an instruction to the model, up to 500 characters. Omit to leave it unchanged. | |
| turnLongSpeechSecs | No | Same as in create_agent: speech length in seconds above which turnLongSpeechFloorMs applies, 1 to 30. null restores the engine default (5). Omit to leave it unchanged. | |
| inboundFirstMessage | No | Inbound opening line on the volai engine, up to 300 characters. Verified callback greetings take precedence. null or an empty string clears it; omission preserves it. | |
| turnDigitTailFloorMs | No | Same as in create_agent: silence floor in ms after a reply ending with 3 to 8 digits, 0 (off) or 400 to 2300, recommended first step 800; Czech agents on the default profile already wait 300, so 400 adds 100 ms. null restores the engine default (0). Omit to leave it unchanged. | |
| turnLongSpeechFloorMs | No | Same as in create_agent: silence floor in ms after the caller spoke longer than turnLongSpeechSecs, 0 (off) or 400 to 2300; Czech agents on the default profile already wait 300, so 400 adds 100 ms. null restores the engine default (0). Omit to leave it unchanged. | |
| sttLanguageHintsStrict | No | Same as in create_agent: strict language lock for speech recognition on the volai engine, best effort (cs agents with outbound calls only, never sk). true turns it on, false or null turns it off. Omit to leave it unchanged. | |
| firstMessageProtectSecs | No | Same as in create_agent: seconds of the first line protected from short reactions, 0 to 20. A reply with no interrupting word (for example stop, no, wait; language-specific) is dropped: not in the transcript, no agent reaction. null or 0 turns it off. Omit to leave it unchanged. | |
| inboundCampaignBudgetId | No | Existing shared budget owned by this engine agent. All inbound calls require reservation and the budget duration cap. Transfers must be off. null clears the binding; omission preserves it. |