Create a voice agent
create_agentCreate a voice agent that can make and take calls. Required fields are name and systemPrompt; optional fields configure its first line, language (cs, sk, en, de, pl, nl, pt, sl, ro, da, et, lv, bg, fi, el, fr, it, hu, lt, sv, hr, es, is, default cs), voice, number, webhook tools, human handoff, captured data, recording, goal, knowledge, e-mail summaries, voicemail handling, silencePromptSecs (a silence reminder, 3 to 25 seconds, default 10), firstMessageProtectSecs (keeps the first line from being interrupted by a short reaction, 0 to 20 seconds, outbound calls only, no default; 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; the interrupting words follow the agent's language, so an English agent is interrupted by stop, no, wait or hold), silencePromptText (your own silence reminder sentence, up to 80 characters), inboundVariables (default values for {{variable}} placeholders on inbound calls, for example { uvod: 'How can I help you?' }; up to 10 keys, values up to 200 characters, names volai supplies itself such as caller_number or volai_* are rejected; not used on outbound calls, where the variables of make_call apply; works for either provider), sttLanguageHintsStrict (strict language lock for speech recognition on the volai engine, Soniox language_hints_strict: the transcript strongly prefers the agent's language, so a short Czech reply is not written as a foreign word or in another script; best effort, meant only for cs agents with outbound calls, never for sk; stored for either provider, read only by the engine), turnDigitTailFloorMs (silence floor in milliseconds the engine keeps after a reply that ends with 3 to 8 digits, so the agent does not jump into a number the caller dictates group by group; 0 turns it off, otherwise 400 to 2300, recommended first step 800 for Czech agents that take dictated numbers; no default, the engine default is 0), turnLongSpeechFloorMs (silence floor in milliseconds after the caller spoke longer than turnLongSpeechSecs; 0 turns it off, otherwise 400 to 2300, suggested 800; engine default 0) and turnLongSpeechSecs (speech length in seconds above which that floor applies, 1 to 30, engine default 5; 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), a missed-call SMS to the caller (missedCallSms) and phases (workflow). useForOutboundTasks: true requests the volai engine, false starts on ElevenLabs, and omission follows the deployment default. A non-empty transferTo then attempts to switch a finished ElevenLabs agent to the engine, even after false; the agent can remain on ElevenLabs when that switch is paused, unavailable or fails, so inspect the returned provider before planning a task or relying on handoff. Since voiceId is chosen before creation returns, omit it when the final provider is uncertain, then set a supported voice with update_agent after inspecting provider. With explicit true, a recognized catalog voice that is unavailable on the engine, including anet, is replaced by the engine's default voice for the selected language. Outside that fallback, an engine agent accepts catalog voices except an ElevenLabs voice ('katty', 'anet') or a raw ElevenLabs voice id, and an incompatible voiceId is rejected with a 400. An ElevenLabs agent accepts katty and a raw ElevenLabs voice id ('anet' is retired - ElevenLabs no longer assigns it to new agents); use list_voices with provider: 'elevenlabs' to see its catalog. Explicit true fails with engine_not_configured when the engine is unavailable. If engine setup fails after the underlying agent was created, engine_setup_incomplete is returned; do not retry creation. Find the agent by name with list_agents, inspect its provider, then finish it in the Agents portal or contact support; update_agent cannot select a provider. The transferred leg is billed as a regular outbound call. recordCalls defaults to true; the first line gets a short recording notice only with recordingNotice: true (off by default, plays only while recordCalls is on), and the customer remains responsible for legal disclosure. A firstMessage without digital-assistant disclosure still saves the agent and returns first_message_no_ai_disclosure in warnings. Voicemail is accepted only when the initial provider selection is the engine: explicit true, or omission while the engine is the deployment default. Explicit false with transferTo still rejects voicemail before the later switch attempt. 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 the agent has a phone number, 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. A node in workflow is a SCOPE, not a script: it only adds a prompt, knowledge and tools that apply while the call is in it, plus an optional line spoken once on entry - it never dictates exact wording or forces a fixed order of questions. The model itself decides when to move between nodes by calling a tool; each edge's condition must describe what the CALLER said, never what the agent or a tool did. 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. There is no end-of-call node - a call still ends only through the built-in end behaviour. Example (a funeral home receptionist): a triage node whose edges route to bereavement, burial or inquiry based on what the caller asked for. An invalid workflow (unreachable node, entry pointing nowhere, a reserved tool name...) fails the whole request with invalid_workflow; a valid one that could still be improved (a dead-end node, a phase with no enter line...) instead comes back in warnings - see /docs/mcp for the full list of codes and /docs/api Call phases section for the JSON shape. With a calls and SMS number as numberE164 the agent must run on volai's own voice engine and its transferTo, if any, must be a Czech (+420) number (unsupported_for_number_type, destination_not_allowed), and the number must be active (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 if the engine does not answer while the number is attached it returns engine_unavailable or engine_readback_mismatch (502): in all of these the agent was not created, try again in a minute. Same data as POST /v1/agents (response schema in /openapi.json).
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": {
"name": "<name>",
"systemPrompt": "<systemPrompt>"
},
"name": "create_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| name | Yes | Display name of the agent, shown in the portal and in list_agents, 1 to 60 characters. | |
| 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. | |
| voiceId | No | Voice id from list_voices. true maps an incompatible catalog voice such as katty to the engine default; omission with the engine default rejects it. false accepts katty or a raw ElevenLabs id; anet is retired for new agents. Omit when transferTo makes provider uncertain. | |
| calendar | No | Calendar availability rules so the agent can check availability and book appointments during a call, on volai's own voice engine only. Effective once provider is engine - see calendar_pending_engine_switch in warnings otherwise. | |
| 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. Defaults to cs. | |
| laughter | No | Whether the agent may laugh during calls: 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 does not override. Omit for auto. | |
| workflow | No | Split the call into phases (nodes). Optional; a single phase, as before, when absent. Each node adds a prompt, knowledge and tools addition plus an optional entry line; edges are model-triggered transitions on what the caller said. See /docs/api Call phases section. | |
| 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. | |
| voicemail | No | Voicemail detection on outbound calls. Accepted only when the initial selection is the engine: true, or omitted with an engine deployment default. false fails even with transferTo because validation runs before the later switch attempt. | |
| 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. | |
| numberE164 | No | Phone number to attach to the new agent right away, in E.164 format with the country code, for example +420123456789, from list_numbers. Omit to create the agent without a number. | |
| 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. | |
| notifyEmail | No | Whether to email the account owner a summary after every call this agent takes. Defaults to true. | |
| recordCalls | No | Whether to record calls for this agent. Defaults to true. Recording adds no notice to the first line by itself; see recordingNotice. | |
| firstMessage | No | Opening line the agent speaks first, before the caller says anything. Omit to use a default opening line. | |
| systemPrompt | Yes | Full instructions the agent follows during the call, 10 to 6000 characters. | |
| missedCallSms | No | Send an SMS to the caller when this agent misses the call. Omit for off. | |
| 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. Defaults to off. | |
| inboundVariables | No | Default values for {{variable}} placeholders on inbound calls, for example { uvod: 'How can I help you?' }: up to 10 keys of letters, digits or underscores, values up to 200 characters. Names volai supplies itself (caller_number, volai_*, system__*) are rejected. Omit for none. | |
| silencePromptSecs | No | How many seconds of caller silence trigger a "Are you there?" reminder prompt, 3 to 25. null turns it off. Defaults to 10 when omitted. Stored the same way for either provider, but only heard once the agent runs on the volai engine (provider engine). | |
| silencePromptText | No | Your own silence reminder sentence, up to 80 characters, spoken word for word instead of the default reminder for the agent's language. End it with a question mark. null or an empty string keeps the default. Stored for either provider, heard only on the volai engine. | |
| transferCondition | No | When to transfer to a human, one or two sentences as an instruction to the model, up to 500 characters. | |
| turnLongSpeechSecs | No | Speech length in seconds above which turnLongSpeechFloorMs applies, 1 to 30, decimals allowed; no effect while that floor is 0. Omit for the engine default (5). | |
| inboundFirstMessage | No | Ordinary inbound opening line on the volai engine. Verified callback greetings take precedence. null or an empty string restores the normal opening line. | |
| useForOutboundTasks | No | Initial provider: true requests engine; false ElevenLabs (warns elevenlabs_by_explicit_choice if the language defaults to engine); omission uses deployment settings and enabled languages. Language alone does not guarantee engine. transferTo may then switch it; read provider. | |
| turnDigitTailFloorMs | No | Silence floor in ms after a reply ending with 3 to 8 digits (a dictated number): 0 turns it off, otherwise 400 to 2300, recommended first step 800. Czech agents on the default profile already wait 300, so 400 adds 100 ms. Omit for the engine default (0). | |
| turnLongSpeechFloorMs | No | Silence floor in ms after the caller spoke longer than turnLongSpeechSecs: 0 turns it off, otherwise 400 to 2300, suggested 800. Czech agents on the default profile already wait 300, so 400 adds 100 ms. Omit for the engine default (0). | |
| sttLanguageHintsStrict | No | Strict language lock for speech recognition on the volai engine (Soniox language_hints_strict): the transcript strongly prefers the agent's language. Best effort; only for cs agents with outbound calls, never for sk. ElevenLabs ignores it. Omit for off. | |
| firstMessageProtectSecs | No | Seconds of the first line protected from interruption, 0 to 20, outbound calls only. 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. Heard only on the volai engine. |