Agents
An agent is the core resource in Neuratel Studio. It defines a complete AI voice persona: how it thinks, how it sounds, how it listens, how it conducts conversations, what tools it can call, how it handles transfers, and what it analyzes after each call.
Every inbound call routed to a phone number, every outbound campaign call, and every browser-based WebRTC session is executed by an agent.
Agent schema
Agent configuration has seven top-level sections. There is no wrapping config key — all sections are sent directly at the top level alongside name. (The MCP tools accept an optional config dict for these same sections — see MCP Tools Reference.)
Code
Only name is required. Every other section has production-ready defaults.
Brain
The brain section controls the language model: what the agent knows, how it reasons, and how it responds.
Code
Supported providers and models
| Provider | Models |
|---|---|
openai | gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano |
groq | llama-3.1-8b-instant, meta-llama/llama-4-scout-17b-16e-instruct, openai/gpt-oss-20b |
phantom | "phantom" |
Brain parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
provider | string | "openai" | LLM provider |
model | string | "gpt-4.1" | Model identifier |
instructions | string | Required | System instructions defining agent behavior |
system_timezone | string | "UTC" | Timezone for time-aware responses (e.g., "America/New_York") |
temperature | float | 0.8 | Response creativity — 0.0 is deterministic, 2.0 is maximum variation |
max_completion_tokens | int | 4096 | Maximum tokens per agent response |
top_p | float | 1.0 | Nucleus sampling threshold |
frequency_penalty | float | null | Penalizes repeated tokens (-2.0 to 2.0) |
presence_penalty | float | null | Penalizes already-mentioned topics (-2.0 to 2.0) |
parallel_tool_calls | bool | true | Allow multiple tool calls in a single turn |
tool_choice | string | "auto" | Tool selection mode: auto, required, or none |
max_tool_steps | int | 3 | Maximum consecutive tool calls per turn before forcing a response |
Groq reasoning models
The openai/gpt-oss-20b model on Groq supports chain-of-thought reasoning. Use the reasoning_effort field (not available on other models):
Code
reasoning_effort accepts "low", "medium", or "high". Use "low" for voice — it is the fastest while still applying chain-of-thought.
Writing effective instructions
Instructions set the agent's role, tone, scope, and constraints. Keep them focused — long instructions that cannot be applied mid-call waste context and slow responses.
Code
Voice
The voice section configures text-to-speech (TTS): how the agent sounds.
ElevenLabs
Code
| Parameter | Default | Description |
|---|---|---|
voice_id | "gHu9GtaHOXcSqFTK06ux" | ElevenLabs voice ID from the voice library or a cloned voice |
model | "eleven_flash_v2_5" | TTS model — use eleven_flash_v2_5 for lowest latency |
stability | 0.5 | Voice consistency (0.0 = expressive, 1.0 = stable) |
similarity_boost | 0.75 | Adherence to the original voice (0.0–1.0) |
style | null | Style exaggeration (0.0–1.0, optional) |
speed | 1.0 | Playback speed (0.25–4.0) |
use_speaker_boost | null | Enhance voice clarity (optional) |
language | null | ISO language code (e.g., "en", "es"). null = auto-detect |
apply_text_normalization | "auto" | Text normalization mode: auto, on, or off |
Cartesia
Code
| Parameter | Default | Description |
|---|---|---|
voice_id | "731ace69-ee17-41bc-8c6f-665c9f1db95c" | Cartesia voice ID — Fatima (Arabic, female). Pairs with default Soniox language_hints: ["en", "ar"]. |
model | "sonic-3" | TTS model |
language | "ar" | BCP-47 language code |
speed | null | Speed preset ("slowest", "slow", "normal", "fast", "fastest") or float |
emotion | null | List of emotion tags to apply (e.g., ["Calm", "Confident"]) |
volume | null | Volume adjustment (Sonic 3 only) |
Phantom Speech
Phantom Speech is Neuratel's native TTS provider. It uses preset voices identified by the voice field — not a voice_id.
Code
| Parameter | Default | Description |
|---|---|---|
voice | "aria" | Preset voice name (see table below) |
model | "phantom-english-speech-preview" | phantom-english-speech-preview or phantom-arabic-speech-preview |
Available Phantom voices:
| Voice | Language |
|---|---|
aria, bella, claire | English (Female) |
alex, david, marcus | English (Male) |
layla, nour | Arabic (Female) |
omar, tariq | Arabic (Male) |
Transcriber
The transcriber section configures speech-to-text (STT): how the agent listens.
Deepgram
Code
Soniox
Code
Soniox owns end-of-utterance detection internally via semantic endpointing — when this provider is selected, the worker auto-routes turn_detection.mode to "stt" and the standalone turn detector is bypassed.
OpenAI
Code
Phantom
Code
STT provider comparison
| Provider | Models | Notes |
|---|---|---|
soniox (default) | stt-rt-v4 (default) | Single multilingual model (60+ languages) with semantic EOU built in. Default language_hints: ["en", "ar"]. When selected, the worker auto-routes turn_detection.mode to "stt" (Soniox owns endpointing). See Soniox provider page. |
deepgram | nova-3, nova-3-medical | Lowest English-only latency; nova-3-medical for clinical vocabulary |
openai | gpt-4o-mini-transcribe | Strong multilingual accuracy |
phantom | phantom-stt-v1 | Neuratel native STT |
Conversation
The conversation section controls call-flow behavior. It is a nested object — not a flat map.
Code
Turn detection
| Parameter | Default | Description |
|---|---|---|
mode | "semantic_vad" | "semantic_vad" (VAD + ML context, recommended) or "vad" (silence-based) |
min_delay | 0.5 | Minimum seconds after end-of-utterance before responding |
max_delay | 6.0 | Hard cap on wait time before forcing a turn complete |
endpointing_mode | "dynamic" | "dynamic" adapts to each caller's speech rhythm; "fixed" always uses min_delay |
First message
| Parameter | Default | Description |
|---|---|---|
enabled | true | Whether the agent speaks first |
text | "Hello! How can I help you today?" | Opening line |
delay_ms | 1100 | Milliseconds to wait after call connects before speaking |
allow_interruptions | false | Whether the caller can interrupt the greeting |
Interruption
| Parameter | Default | Description |
|---|---|---|
enabled | true | Allow callers to interrupt the agent while it speaks |
mode | "vad" | Detection mode (currently "vad") |
min_duration | 0.5 | Minimum seconds of caller speech to register as an interruption |
min_words | 0 | Minimum transcribed words required (0 = audio-only detection, faster) |
resume_false_interruption | true | Resume agent speech if the interruption was background noise |
false_interruption_timeout | 2.0 | Seconds of silence before deciding an interruption was false |
Timeout (silence)
| Parameter | Default | Description |
|---|---|---|
enabled | true | Enable silence timeout |
trigger_seconds | 15.0 | Seconds of silence before prompting the caller |
warning_messages | ["Are you still there?", "Hello?"] | Prompt messages cycled through before ending the call |
final_message | "I'll end the call now. Goodbye!" | Message spoken before disconnecting |
Call duration
| Parameter | Default | Description |
|---|---|---|
enabled | false | Enable a hard call duration limit |
max_seconds | 1800 | Maximum call length in seconds |
warning_message | (default text) | Message spoken before the limit is reached |
warning_seconds_before | 60 | Seconds before the limit to deliver the warning |
exceeded_message | (default text) | Message spoken when the limit is hit |
Background audio
Built-in ambient sources: "city_ambience", "forest_ambience", "office_ambience", "crowded_room", "hold_music".
Built-in thinking sources: "keyboard_typing", "keyboard_typing_2".
You can also supply a custom HTTPS URL as the source value.
Tools
The tools section is an object, not an array. It enables and configures the agent's built-in capabilities and external integrations.
Code
Hangup tool
| Parameter | Default | Description |
|---|---|---|
enabled | true | Allow the agent to end calls |
farewell_message | "Goodbye!" | Message spoken before hanging up |
keywords | ["goodbye", "bye", ...] | Phrases that signal the caller wants to end the call |
confirm_before_hangup | false | Ask for confirmation before hanging up |
Voicemail detection
| Parameter | Default | Description |
|---|---|---|
enabled | false | Enable answering machine detection |
action | "hangup" | What to do when voicemail is detected: "hangup", "leave_message", or "continue" |
message | (default text) | Message to leave when action is "leave_message" |
wait_for_beep | true | Wait for the beep tone before leaving a message |
Knowledge base (RAG)
Code
MCP servers
Connect the agent to external MCP (Model Context Protocol) integrations. Each entry references an integration configured in your organization settings.
Code
Transfer
The transfer section defines how calls are handed off to human agents or other numbers.
Code
Transfer parameters
| Parameter | Default | Description |
|---|---|---|
enabled | false | Enable transfer capability |
mode | "blind" | "blind" (agent drops immediately) or "warm" (agent stays until the receiving party answers) |
destinations | [] | List of transfer destinations |
fallback_destination | null | Default destination if no other destination matches |
on_fail | "return" | Action on transfer failure: "return" (back to agent), "hangup", or "voicemail" |
fail_message | (default text) | Message when transfer fails |
hold_music | true | Play hold music during transfer |
Transfer destination fields
| Field | Required | Description |
|---|---|---|
id | Yes | Unique string identifier for this destination |
name | Yes | Display name (e.g., "Sales Team") |
number | Yes | Phone number in E.164 format (e.g. +15551234567) |
keywords | No | Natural-language phrases that trigger this destination |
description | No | Context for the agent's LLM to decide when to use this destination |
message | No | Message spoken to the caller before transferring |
timeout_seconds | No | Ring timeout before considering the transfer failed (default: 30) |
priority | No | Higher number = preferred when multiple destinations match (default: 0) |
working_hours | No | Schedule restrictions for this destination |
Warm transfer
With mode: "warm", the agent stays on the line and delivers a brief introduction to the receiving party before disconnecting. Configure the introduction template:
Code
Analytics
The analytics section controls recording, post-call analysis, and webhook delivery.
Code
Recording
| Parameter | Default | Description |
|---|---|---|
enabled | true | Record calls |
format | "mp3" | File format: "mp3", "wav", or "ogg" |
channels | 2 | 1 = mono (mixed), 2 = stereo (separate tracks) |
retention_days | 30 | How long to keep recordings: 7, 30, or -1 (forever) |
consent_required | false | Announce recording consent before starting |
Post-call analysis
Analysis runs automatically after every call. Results attach to the call record.
Summary — a concise paragraph covering what was discussed and the outcome. Set prompt: null to use the default prompt.
Success evaluation — scores the call against criteria you define. Each criterion has a name, description, and optional weight.
Data collection — extracts specific structured fields from the transcript. Field type can be "string", "number", "boolean", "array", or "object".
Sentiment tracking — per-turn sentiment scoring throughout the call (controlled by top-level track_sentiment).
Webhooks
| Parameter | Default | Description |
|---|---|---|
enabled | false | Send webhook notifications |
url | null | HTTPS endpoint to receive events |
events | ["call.ended", "call.summary.ready", "call.failed"] | Events to deliver |
retry_count | 3 | Retry attempts on failure |
timeout_seconds | 30.0 | Per-request timeout |
include_transcript | true | Include transcript in payload |
include_analytics | true | Include analysis results in payload |
Available webhook events:
| Event | Description | Status |
|---|---|---|
call.started | Call has begun | ✅ Dispatched |
call.ended | Call has ended (fires before analysis) | ✅ Dispatched |
call.failed | An error occurred during the call | ✅ Dispatched |
recording.ready | Recording is available | Reserved |
call.summary.ready | Full report — transcript, summary, and analysis | Reserved |
campaign.started | Campaign begins dialing | ✅ Dispatched |
campaign.paused | Campaign paused | ✅ Dispatched |
campaign.resumed | Campaign resumed | ✅ Dispatched |
campaign.stopped | Campaign stopped | ✅ Dispatched |
campaign.cancelled | Campaign cancelled | ✅ Dispatched |
campaign.completed | Campaign finished | ✅ Dispatched |
campaign.retry_scheduled | Call retry scheduled | ✅ Dispatched |
dnc.added | Number added to DNC list | ✅ Dispatched |
Agent lifecycle
Create
Code
Only name is required. Omit any section to use defaults.
Update (partial)
Code
Send only the fields you want to change. The body is merged with the existing config — top-level sections (brain, voice, etc.) are replaced in full when included. To implement optimistic concurrency control, include expected_version:
Code
If the agent has been modified since you last read it, the request returns 409 Conflict.
Version history
Every save creates a new version. Previous versions are preserved and can be restored.
Code
Duplicate
Code
Creates a copy of the agent with all configuration preserved. The copy is named "{original name} (Copy)".
Delete
Code
Permanently removes the agent. Associated call records are retained.
Making a web call
A web call lets a browser connect directly to the agent over WebRTC — no phone number required. This is useful for testing and for embedded voice widgets.
Code
The response contains the credentials needed to join the session:
Code
Use token and server_url with the Neuratel Web SDK to open the audio connection in the browser.
API examples
Create an agent
cURL
Python
JavaScript
Update an agent (partial PATCH)
cURL
Python
JavaScript
List version history
cURL
Python
JavaScript
Start a web call
cURL
Python
JavaScript
Next steps
- Phone Numbers — Assign a number to route inbound calls to this agent
- Calls and Sessions — Understand the call lifecycle
- Analytics — Post-call analysis and performance metrics
- Knowledge Bases — Connect document sources to your agent
