Voice Agents are server-managed configurations that pair an LLM with SLNG’s STT and TTS models. You create an agent once, then dispatch it to phone calls or web sessions. Agents support template tools, built-in utilities like current date/time lookup, webhooks, human transfer, and dynamic prompts via template variables.Documentation Index
Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
Use this file to discover all available pages before exploring further.
The Voice Agents API is served from
https://api.agents.slng.ai
under /v1/agents.Dashboard (recommended for setup)
If you prefer a UI (or you’re setting up telephony), start in the Dashboard:Quick Start (API)
Create an agent
slng_api_key is the API key your agent uses for SLNG model requests. You can
reuse the same key you use for this API, or use a dedicated key.region is required. It determines where the agent runs and which telephony and
browser-session path it uses.Agent configuration
Required fields
| Field | Type | Description |
|---|---|---|
name | string | Unique agent name (max 255 chars) |
system_prompt | string | System prompt with Handlebars template support |
greeting | string | Default greeting |
language | string | Language code (e.g., “en”, “es”, “fr”) |
region | string | Deployment region (us-east, eu-central, ap-south) |
models | object | Model configuration (see below) |
slng_api_key | string | SLNG API key for the agent runtime |
Common optional fields
| Field | Type | Default | Description |
|---|---|---|---|
inbound_greeting | string | null | Greeting override for inbound calls |
outbound_greeting | string | null | Greeting override for outbound calls |
sip_inbound_trunk_id | string | null | Inbound connection ID (for inbound calls) |
sip_outbound_trunk_id | string | null | Outbound connection ID (for outbound calls) |
enable_interruptions | boolean | true | Allow user to interrupt agent speech |
idle_nudges | object | language defaults | Silence recovery prompts and final hangup behavior |
tools | array | [] | Tools available to the agent |
template_defaults | object | {} | Default values for template variables |
Models configuration
Themodels object configures the STT, LLM, and TTS models used by the agent runtime:
Idle nudges
Useidle_nudges to recover from long silences. The agent can send two follow-up prompts, then speak a final message and hang up.
Template variables
Use Handlebars syntax ({{variable}}) in your system prompt and greeting(s) to create dynamic agents:
Tool personalization
Tool personalization uses the same{{variable}} syntax, but only on runtime-safe tool fields.
Tool fields are validated when the tool runs rather than when the call starts.
If you are looking for the UI entry point first, see Agent Infra. The
create-agent page surfaces this via the Personalizable indicator in supported tool fields.
- Prompt / greeting variables are start-critical. Missing values can block the session.
- Tool-only variables are runtime-only. Missing or invalid values fail the tool, not the call.
| Tool surface | Supports personalization | Notes |
|---|---|---|
Contextual webhook url | Yes | Only in path segments and query parameter values. Scheme, host, port, credentials, fragments, and query parameter names must stay literal. |
System webhook url | Yes | Only in path segments and query parameter values. Scheme, host, port, credentials, fragments, and query parameter names must stay literal. |
| System webhook argument values | Yes | Scalar values only in v1 (string, integer, number, boolean) |
System webhook description | No | Must stay static |
System webhook llm_result_instructions | No | Must stay static |
| System webhook pre-action message text | No | Must stay static |
Human transfer phone_number | Yes | Must resolve to E.164 |
Built-in timezone | Yes | Must resolve to an IANA timezone |
| Auth secrets | No | Secrets remain literal-only |
- URLs must resolve to a full
http://orhttps://URL while preserving the configured origin. - URL placeholders are allowed only in path segments and query parameter values.
- URL placeholders are rejected in scheme, host, port, user info, fragments, and query parameter names.
phone_numbermust resolve to E.164, for example+34600111222.timezonemust resolve to an IANA timezone, for exampleEurope/Madrid.- Templated system argument values are scalar-only in v1. Arrays must remain literal constants.
description,llm_result_instructions, and pre-action message text are static configuration and do not support runtime personalization.
arguments are also bounded:
- Maximum 32 keys
- Maximum key length 64 characters
- Maximum value length 1024 characters
- Maximum combined value length 8192 characters
- Template substitution only. Expressions and formulas are not supported.
Tools
Tool
id is required for all tools and must be unique within an
agent. Tool IDs should be stable (don’t regenerate them on every update).Template tools
Built-in date/time tool
get_current_datetime tool to the model. The result includes timezone, local_datetime,
local_date, local_time, day_of_week, utc_offset, and is_dst.
Like webhook tools, built-in tools can also be configured with "source": "system" plus system.triggers
to inject the current date/time automatically on events such as call_start.
Webhook tools (LLM-invoked)
Webhook auth secrets are write-only. Agent responses will include
auth_type but never return tokens/secrets.show_results_to_llm to control whether successful webhook payloads are exposed back to the model.
Set it to false when the webhook is side-effect only. Use llm_result_instructions to tell
the model how to interpret and respond to successful results when they are visible. This field is
static configuration and does not support runtime personalization.
HTTP method and payload format
Two optional fields control how SLNG calls your webhook:http_method:POST(default),PUT,PATCH, orDELETE.webhook_format:envelope(default) orraw.envelopewraps your tool arguments in an SLNG metadata envelope (call ID, timestamps, tool context).rawsends just the tool arguments, which is useful when the receiving service expects a specific schema and cannot parse the envelope.
System webhook tools (automatic triggers)
Human transfer tool
Transfer the caller to a human (requiressip_outbound_trunk_id on the agent):
Example agent patterns
These are common production-style combinations:- Scheduling assistant:
current_datetime+hangup+idle_nudges. Useful when the agent needs accurate local time before offering appointment slots. - Support router: contextual webhook lookup +
human_transfer. Good for triage flows where the agent resolves routine cases but escalates exceptions. - Collections follow-up:
voicemail_detection+ system webhook oncall_end. Useful when every completed call needs a CRM or collections-platform summary. - Restaurant host:
current_datetime+ availability webhook. Good for reservation, booking, and inventory-style lookups that depend on real-time availability. - After-hours clinic router: system-injected
current_datetimeoncall_start+human_transfer+hangup. Useful when business-hour logic should be available to the model before the first user turn.
The API reference now includes multiple
Create agent request
examples showing these patterns with concrete payloads.Calls and sessions
POST /v1/agents/{agent_id}/callsdispatches an outbound call (requires telephony)POST /v1/agents/{agent_id}/web-sessionscreates a web (non-telephony) sessionPOST /v1/agents/{agent_id}/duplicatecreates a server-side copy with a new name andslng_api_keyGET /v1/agents/{agent_id}/callslists calls (paginated)GET /v1/agents/{agent_id}/calls/{call_id}fetches a call record
Call records may include additional runtime diagnostics when available. These
fields are treated as opaque objects and their structure may change. For a
user-friendly transcript view, use the Dashboard calls page.
Tool execution tracking
Record webhook, template, human-transfer, and built-in tool activity against a call by posting to the tool executions endpoint. Each record carries the outcome, duration, and HTTP status. Submitted executions also surface on the call detail response for after-the-fact debugging or analytics.API reference
See the Voice Agents API tab for a complete OpenAPI reference.Next steps
Agent Infra
Build and test agents with a visual UI.
Agent configuration
System prompts, tools, and template variables.
Call Examples
Dispatch outbound calls and batch campaigns.