Update Agent

Update a voice agent. Only fields present on the request body are changed.

Authentication

AuthorizationBearer

Enter your API key with the Bearer prefix, e.g. ‘Bearer sk_…’.

Path parameters

idstringRequired

Request

This endpoint expects an object.
namestringOptional1-100 characters
promptstringOptional
first_messagestringOptional
languagestringOptional
llm_providerenumOptional

LLM backend. Send an empty string together with llm_model: "" to clear the pair to the platform default (today: Speechify GLM-5.2). Sending one populated and one empty is rejected as a 400. Omit both to leave the stored pair unchanged. Switching to a non-custom provider clears any stored llm_base_url / llm_api_key / llm_extra_body.

llm_modelstringOptional

Chat model slug. Empty string + empty llm_provider clears the pair to the platform default. For openai / speechify the (provider, model) pair must be in the allowed table; for custom it is free-form.

llm_base_urlstringOptional

Custom-endpoint base URL. Required when the resulting provider is custom, rejected otherwise.

llm_api_keystringOptional

Bearer key for the custom endpoint. Write-only. Omit to keep the stored key, send "" to clear it, send a value to replace it. Rejected for non-custom providers.

llm_extra_bodymap from strings to anyOptional

JSON object forwarded to the custom endpoint as chat.completions extra_body. Omit to leave unchanged; a JSON object (including {}) replaces it. Valid only when the resulting provider is custom.

voice_idstringOptional
temperaturedoubleOptional

Sampling temperature in the range 0.0–1.0. Omit to leave unchanged.

widget_configobjectOptional

Customer-editable appearance + behaviour payload for the embedded <speechify-agent> pill: button text, avatar style, orb colours, terms-and-conditions markdown, transcript display. Every field is optional - empty fields fall back to the widget’s compile-time defaults.

is_publicbooleanOptional
allowed_originslist of stringsOptional
hostname_allowlistlist of stringsOptional

When supplied, replaces the stored list. Pass an empty array to clear enforcement (public agent is open again). Omit the field to leave the existing value unchanged.

memory_enabledbooleanOptional
memory_retention_daysintegerOptional
webhook_urlstringOptional
webhook_secretstringOptional

Rotate the HMAC secret. Write-only.

amdobjectOptional

AMD routing config (PATCH-replace, wholesale). Omit to leave the stored config unchanged.

save_audio_recordingbooleanOptional
navigator_modebooleanOptional
ivr_memory_enabledbooleanOptional

Per-agent kill switch for the IVR-memory cache lookup. nil/omit = unchanged.

tts_speaking_ratedouble or nullOptional
clear_tts_speaking_ratebooleanOptional

Two-headed clear: PATCH cannot distinguish “absent” from “explicit null” reliably across stacks. Setting this to true resets tts_speaking_rate to the voice default. If both are sent, clear_tts_speaking_rate wins.

tts_playback_ratedouble or nullOptional
clear_tts_playback_ratebooleanOptional

Two-headed clear, mirroring clear_tts_speaking_rate. Setting this to true resets tts_playback_rate to null (no post-process). If both fields are sent, clear_tts_playback_rate wins.

response_delay_secondsdouble or nullOptional

Per-agent silence-wait override (seconds). See the field on Agent for semantics. Range 0.0..5.0; null is allowed but clear_response_delay_seconds=true is the canonical way to revert to the stack default.

clear_response_delay_secondsbooleanOptional

Two-headed clear, mirroring clear_tts_playback_rate. Setting this to true resets response_delay_seconds to null (revert to the stack default). If both are sent, clear_response_delay_seconds wins.

inactivity_timeout_secondsintegerOptional>=0

Per-agent silence-tolerance override. Send 0 to clear the override and fall back to the platform default. Negative values are rejected.

background_noise_presetenumOptional

Pre-mixed ambient bed slug. Send empty string ("") to disable the bed, which also clears background_noise_volume.

background_noise_volumedoubleOptional

Volume of the background-noise bed (0..1). Ignored when the preset is empty; clearing the preset also clears this field server-side.

stt_overrideenumOptional

Streaming-STT stack override. Send an empty string ("") to clear the override and fall back to the worker default (today: whisper-v3). Any non-empty value must be a known stack name.

Response

The updated agent.
idstring

Prefixed wire identifier (agent_<26 char Crockford base32>). This is the sole customer-facing identifier. URL paths accept only this prefixed form; legacy UUID path parameters are rejected with 404.

namestring
slugstring
promptstring
first_messagestring
Spoken verbatim at session start when present in the customer's flow graph.
languagestring

ISO 639-1 code, e.g. ‘en’.

llm_providerenum

LLM backend the worker constructs for this agent. Null means “use the platform default” (resolved server-side at dispatch; today: Speechify GLM-5.2). openai and speechify pair with a model from the allowed (provider, model) table. custom points the worker at any OpenAI / vLLM-compatible endpoint - see llm_base_url, llm_api_key, llm_extra_body.

llm_modelstring or null

Chat model slug. Null means “use the platform default” (resolved server-side at dispatch; today: Speechify GLM-5.2). For openai / speechify it must be a slug from the allowed table; for custom it is free-form (the customer’s endpoint owns the namespace).

voice_idstring
Speechify voice slug.
temperaturedouble
is_publicboolean

When true, the <speechify-agent> web component can start a session against this agent without an API key, subject to the allowed_origins allowlist. When false (default), only authenticated callers can start sessions.

allowed_originslist of strings

Exact Origin header values (e.g. https://example.com) that are allowed to start public sessions. Empty array with is_public = true means any origin is accepted — intended for open demos. No subdomain wildcards.

memory_enabledboolean

When true, the post-call extractor writes durable facts about each caller; at conversation-start the retriever injects the top matches into the system prompt via the {{memory}} template variable. Defaults to false.

memory_retention_daysinteger

Maximum age (in days) of memories kept and surfaced to the retriever. 0 disables the cap. Defaults to 90.

amdobject

Answering Machine Detection routing config for outbound voice agents. AMD classifies the called party’s first ~3-15 seconds of audio into one of LiveKit’s categories (human, uncertain, machine-vm, machine-ivr, machine-unavailable) and dispatches per category to the configured action. Stored on the agent row; flowed onto outbound dispatch metadata under the amd key.

save_audio_recordingboolean

When true, every conversation produces a room-composite OGG egress uploaded to the recordings bucket. Defaults FALSE for new agents (privacy by default).

navigator_modeboolean

Tunes worker turn handling for autonomous outbound IVR navigation - longer endpointing and no barge-in. The goal itself lives in the agent’s prompt; this flag is the behaviour switch only. Defaults FALSE.

ivr_memory_enabledboolean

Per-agent kill switch for the IVR-memory cache lookup performed at AMD time. Defaults TRUE so existing navigator agents keep their always-on behaviour. Set to false to skip the cache and force every outbound dial on this agent to start cold (LLM-driven navigation only).

created_atdatetime
updated_atdatetime
llm_base_urlstring or null

Custom OpenAI/vLLM-compatible endpoint base URL. Non-null only when llm_provider is custom.

llm_api_key_setboolean

Whether a bearer key is stored for the custom endpoint. The key itself is write-only and never returned.

llm_extra_bodymap from strings to any or null

JSON object forwarded verbatim to the custom endpoint as the chat.completions extra_body (reasoning / sampling knobs). Non-null only when llm_provider is custom.

widget_configobject

Customer-editable appearance + behaviour payload for the embedded <speechify-agent> pill: button text, avatar style, orb colours, terms-and-conditions markdown, transcript display. Every field is optional - empty fields fall back to the widget’s compile-time defaults.

hostname_allowlistlist of strings or null

Optional per-agent hostname allowlist enforced at session-creation time. When set and non-empty, the Origin header’s hostname must be an exact member. Bare hostnames only — no scheme, port, or path. Up to 10 entries. Omit (null) or leave empty for no enforcement (public agents accept any hostname).

webhook_urlstring

Customer-facing post-call webhook target. When non-empty, the control plane POSTs a signed payload (transcript + evals + extractors + recording URL) once the conversation completes. Empty disables the fire path.

webhook_secret_setboolean

True when an HMAC-SHA256 webhook secret is configured. The secret itself is write-only — supplied on PATCH and never echoed back on reads.

tts_speaking_ratedouble or null

Per-agent override for the voice’s default speaking rate (0.5 = half speed, 2.0 = double, 1.0 = neutral). Null means “use the voice’s default rate”.

tts_playback_ratedouble or null

Per-agent post-process pitch-preserving time-stretch applied to the synthesized audio in the worker before publishing. Distinct from tts_speaking_rate: speaking_rate biases the model’s generation prosody (clipped syllables, pauses preserved); playback_rate uniformly stretches the rendered waveform (every sample, every pause, every breath). Range 0.5..3.0; null means no post-process.

response_delay_secondsdouble or null

How long the agent waits after the caller stops talking before generating a reply (the worker’s endpointing min_delay on the VAD path). Range 0.0..5.0. Null means “use the stack default” — Deepgram VAD: 0.5s, or 0.75s when navigator_mode=true. Ignored on Flux + Whisper STT, which use semantic turn detection instead.

inactivity_timeout_secondsinteger or null

Optional override for the per-agent silence-tolerance before the worker tears the call down. Null means use the platform default.

background_noise_presetenum

Optional pre-mixed ambient bed. Null disables background noise.

background_noise_volumedouble or null

Volume of the background-noise bed. Null disables.

stt_overrideenum

Optional override for the streaming-STT stack this agent dispatches with. Null means use the default (Whisper Large V3). Pick whisper-v3 to pin Whisper Large V3 explicitly, or gpt-realtime-whisper for OpenAI’s streaming Whisper-class STT.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error