agent.telequick.dev or push it through the control-plane API; the gateway
hydrates it into the runtime at call setup and hot-reloads tunables without
dropping in-flight calls. There is no rebuild and no redeploy — save the
document, place a call.
This page is the field-by-field reference. If you’re wiring a pipeline for the
first time, start with BYO ASR/LLM/TTS
(cascade) or BYO speech-to-speech
(duplex) and come back here to tune the knobs.
The shape of agent-config.yml
A cascaded agent — the most common shape — looks like this. Every field below has a default, so a minimal config is just a name, a system prompt, and any providers you want to override.agent-config.yml
Models & providers
Pick the pipeline shape withpipeline_mode, then fill in the stage fields for
that shape. The runtime processes audio as PCM16 LE at 8 kHz end to end, so
every provider is fed and drained at that rate — providers that natively want
16/24 kHz are resampled for you.
cascaded chains three provider sessions (speech-to-text → language model →
text-to-speech). realtime hands the whole turn to one duplex
speech-to-speech model. Choose the cascade for per-stage control and the
widest model choice; choose realtime for the lowest turn latency.A human-readable agent name. Shown in the console and stamped onto call
records so you can tell agents apart in the
dashboards.
The agent’s persona and task. Keep replies “spoken-friendly” — short
sentences read better than paragraphs over a phone line.
ISO 639-1 hint. Prepends a hard directive to the system prompt so the model
answers in your market’s language instead of mirroring the caller.
Cascade fields (pipeline_mode: cascaded)
Streaming speech-to-text vendor. Supported ids include
deepgram and
elevenlabs. Full table on
BYO ASR/LLM/TTS.Forwarded to the ASR vendor as its model hint (Deepgram opens the socket with
8 kHz
linear16).Language-model vendor:
openai, anthropic, gemini, or ollama
(self-hosted, no key). This is the stage where
tool calling runs.Vendor model id, e.g.
gpt-4o-mini, claude-sonnet-4-5,
gemini-2.5-flash, llama3.1.Sampling temperature for the language model.
Rolling history the runtime replays into each turn. Larger keeps more context
at the cost of prompt size and latency.
Retries against the primary language-model provider on a failed turn before
falling back.
A different provider entirely, tried once after
llm_max_retries is
exhausted. A resilience path (degrade one turn instead of dropping the call),
not a load balancer.Text-to-speech vendor:
elevenlabs, cartesia, deepgram, or openai.
Streaming providers emit audio as LLM text arrives, which keeps first-audio
low.The provider’s voice id — an ElevenLabs
voice_id, a Cartesia voice UUID, or
a Deepgram Aura voice such as aura-asteria-en.Realtime (duplex) agents
Setpipeline_mode: realtime and describe a single realtime node instead of the
three cascade stages. There is no separate ASR or TTS to configure — one model
listens and speaks on the same bidirectional session.
- OpenAI Realtime
- Gemini Live
agent-config.yml
Cloud duplex providers (OpenAI Realtime, Gemini Live, xAI Grok Voice) are
shipped. Serving your own open-weights duplex model on your GPUs is in
preview — see self-hosted inference.
Credentials
Provider keys are per-tenant, never written intoagent-config.yml. Set them
in the console at agent.telequick.dev; they are resolved from the control
plane at call setup, sealed at rest, and injected into the pipeline. An agent
whose selected providers have no usable key is refused at session creation
with a clean error rather than starting and failing mid-call. Environment-variable
fallback for single-tenant and local development is covered under
Credentials.
The turn_detection block
Turn detection is what makes a call feel natural — the agent stops the instant the caller barges in and replies the instant they finish. It has two parts: a detection mode (who runs voice activity detection) and a handful of timings. Start with the defaults and adjust from there. The concepts page, Turn Detection & Barge-In, explains the behavior end to end; this is the field reference.local runs an on-device VAD on the gateway — the default, and the right
choice for cascaded pipelines. server_vad defers end-of-turn detection to a
cloud realtime provider that already emits speech-start/stop events; the
runtime auto-selects it for a realtime entry node unless you set type
explicitly. A cascade with server_vad never sees a turn boundary — use
local there.Minimum trailing silence before end-of-utterance fires. Lower (300) for
snappier replies; raise (800) for callers who pause to think. Below ~300 the
agent starts interrupting on inter-word pauses.
Discard candidate utterances shorter than this. Raise toward 500 if line noise
or clicks cause false triggers.
Audio kept before the speech-start marker. Raise if the first syllables are
getting clipped on the way into the ASR.
Signal level (dBFS) below which the frame is treated as silence. Quieter trunks
want a lower floor (-50); noisy ones a higher one (-40).
The hold-and-confirm barge-in window. A speech onset arms a pending barge;
it only cancels the agent if speech sustains past this window — so a backchannel
(“mhm”, “ok”, “yeah”) hits silence first and never cuts the agent off. Set to
0 for legacy immediate barge-in.Minimum speech duration before the caller’s turn is allowed to trigger a
response. A coarser duration filter than
min_speech_ms, applied to whole
turns rather than candidate frames.Sensitivity margin on the detection threshold while the agent is idle.
Sensitivity margin while the agent is speaking. The telephony-safe default
is equal to
margin — the gate is not loosened during agent speech, because
there is no echo cancellation in the media path and a loosened gate would let
the agent’s own voice self-trigger a barge. Only lower it if you have
echo-cancelled audio.Codecs
Codec selection is negotiated per transport at call setup, not set inagent-config.yml. The runtime works in a single 8 kHz PCM16 contract
internally, so the same agent behaves identically no matter what the caller’s
leg negotiates.
| Caller leg | Wire codec | Inside the runtime |
|---|---|---|
| Phone (PSTN / SIP trunk) | G.711 µ-law (PCMU) / A-law (PCMA) at 8 kHz | decoded to PCM16 |
| Browser / mobile app | Opus over QUIC | decoded and resampled to PCM16 |
Opus runs narrowband for telephony — the encoder’s internal rate is 8 kHz
to match the runtime contract, even though its RTP payload keeps the standard
opus/48000/2 rtpmap and 48 kHz clock (a 960-tick advance per 20 ms frame).
A 20 ms tick is 160 samples at 8 kHz. Audio is 8 kHz mono end to end; there is
no video codec in the voice path. Details and how to influence carrier
negotiation are on Codecs.Session & output budgets
These bound how long a call can run and how much a single turn can cost. The runtime enforces them; you don’t have to build a watchdog. The Session Lifecycle page covers the full state machine.Hard ceiling on total call duration. The runtime ends the session when it’s
reached — a stuck or runaway agent cannot hold a line open indefinitely. This
is a ceiling, not a target; most calls end well before it.
Cap on the language model’s output per response. Bounds token spend on any
single turn (previously unbounded). Lower it for terse agents; keep headroom
if the agent reads back long confirmations.
Idle watchdog
The idle watchdog re-engages a silent caller and then hangs up if they’ve truly gone. It is on by default. The same knobs apply to cascade and duplex agents.Silence, in seconds, before the agent emits a re-engage prompt (“Are you still
there?”). Fires once per idle stretch.
Silence, in seconds, before the runtime ends the call. Measured from the start
of the idle stretch, so it should exceed
soft_prompt_s.The text spoken (or synthesized) as the re-engage prompt. Leave unset for the
runtime default.
Connect, idle, and per-stage turn timeouts also exist as operator-tunable
runtime settings and are hot-reloaded without dropping calls — in-flight
sessions keep the timeouts they captured at creation time, so a reload never
changes the rules mid-call. If you run self-hosted, these are documented with
the deployment models.
How a config change reaches a live call
Edit the config
Change
agent-config.yml in the console at agent.telequick.dev or via the
control-plane API.Save — no rebuild
The config is hydrated into the runtime from the control plane. There is
nothing to compile or redeploy.
New calls pick it up immediately
The next call routed to the agent uses the new config. Runtime tunables
(timeouts and the like) hot-reload for the process; in-flight calls keep
the config they started with so a mid-call edit can’t destabilize an active
conversation.
Verify on a test call
Place a call and watch the
latency breakdown and
call traces to confirm the new
providers, timings, and budgets took effect.
Related
BYO ASR / LLM / TTS
Build a cascade — provider tables, models, and credentials.
BYO speech-to-speech
Run a single duplex model for the lowest turn latency.
Turn detection & barge-in
The behavior behind the turn_detection block.
Session lifecycle
From connect to teardown, and the guardrails that bound it.
Tool calling
Give the LLM stage HTTP, MCP, and client tools.
Codecs
What gets negotiated on the wire, and how to influence it.