Update an agent
Partial update: present fields are set, null clears a field, absent fields are untouched. Config edits are live on the agent's next call.
Request
- Base URL: https://api.pyai.com
- URL: https://api.pyai.com/v1/agents/{id}
- Auth: one of:
- HTTP bearer
- API key in header x-api-key
Path parameters
Request body
Display name. Required on create.
The agent's entire character, role, policies, and business context.
Role archetype. Adds PyAI's role operating standard beneath your persona and derives the runtime mode (receptionist, sales, and collections enable their matching deterministic conversation guards; everything else runs the default mode). Your stored persona is unchanged and remains authoritative for identity and business policy. Null clears the role.
Greeting message, opening line spoken at turn 0 when a call connects (before the caller speaks). Stored on the agent profile; played automatically when connecting with session_label={agent_id}. May also be sent inline in the Omni configure frame.
Approved opening-line variants. PyAI selects one for each newly resolved call profile; null or empty falls back to greeting. Recording consent is fixed and never rotated.
A stock voice_id, one of its permanent aliases from GET /v1/voices, or a cloned voice id. Omni reports the canonical served stock id in configured.voice_id.
Stored delivery direction for instruct-capable voice tiers. Current Omni routes support neutral delivery only: omit or set null for neutral speech. A saved custom value is rejected when configuring Omni; an inline empty configure.voice_instruct resets it to neutral for that session.
Per-agent model selection. Omit for the platform default.
Deprecated compatibility field. Stored values are not applied to Omni runtime.
Deprecated compatibility field. Stored values are not applied to Omni runtime.
How patient the agent is before checking in on a silent caller ("Sorry, are you still there?"). auto checks in after a few seconds of silence; patient waits far longer, for callers who routinely think, read, or look something up mid-call; off disables the check-in entirely, so the agent stays silent until the caller speaks. When unset, most roles render auto; support agents render patient. Independent of ack_mode. May also be sent inline in the Omni configure frame, which wins for that session.
Which side of the call the persona is on. agent (default) means the persona is the business being called, so PyAI adds its conversation layer for handling a caller (capability honesty, handoffs, turn discipline). caller means the persona is the individual on the call instead, as in QA and simulation callers, mystery shopping, or training partners; PyAI drops that operator-voice layer so it cannot contradict an inverted persona. May also be sent inline in the Omni configure frame, which wins for that session.
Enable stereo call recordings. Default false.
Recording disclosure spoken before recording starts when recordings_enabled is true. Required for compliance when recordings are on and must contain a meaningful spoken phrase (at least 10 characters and 5 letters). Playback order: consent_line, then greeting, then conversation.
Requested language for this Agent's Omni sessions. null or absent means en. Availability is staged: public serving includes en, fr, es, hi, it, pt, ja, and ko; de and the legacy zh alias fall back to English unless explicitly enabled with qualified endpoints. Canonical staged route identifiers are exposed in x-staged-language-ids for internal integration only and are rejected by the public control plane until qualified. Inspect the session's configured.language_active and language_fallback fields before assuming the requested language is active. See the Language support reference.
Up to 16 key/value annotations (keys ≤64 chars, values ≤512 chars).
Optional custom vocabulary for this Agent's Omni speech recognition. A non-empty list is the opt-in. PyAI keeps at most five effective terms, with at most five words per term. It trims whitespace, deduplicates without regard to case while preserving the first spelling and order, and drops common-only phrases. Set [] or null to turn it off. The list is fixed when a session starts. Organization Hear vocabulary is never applied to Omni.
Deprecated stored compatibility field. It does not affect speech recognition. Use vocabulary.
Goal checklist for post-call outcome scoring (stored now; scoring ships with summaries).
JSON Schema of fields to capture from each completed call's transcript. When set with extraction_webhook_url, PyAI runs a post-call extraction pass and POSTs the structured JSON to your webhook (signed with X-PyAI-Signature). Null disables extraction.
HTTPS URL that receives the signed post-call extraction result (event omni.call.extracted). Requires extraction_schema. The call's agent is resolved from the connect-URL session_label when it equals this agent's id.
Reuse a tiny caller card on the next call when PyAI can resolve the caller (phone number or a signed customer id). The card is advisory — the agent may recall a name or open thread, and must not refund, book, or transfer from it. Default false.
Response
Updated agent
Effective TTS delivery direction for instruct-capable voice tiers. Renders PyAI's natural conversational pace when no override is stored.
Idle check-in patience. Renders auto when unset, except support agents render patient.
Which side of the call the persona is on. Renders the effective default (agent) when unset.
Read-only runtime mode derived from the agent's role (default, receptionist, sales, or collections). Set indirectly via the writable role field.
Role archetype the agent runs as, or null. Writable on create and update.
Whether this agent reuses a prior-call caller card when a caller key is available. Default false.
Session language for this agent's calls. Renders the effective default (en) when unset. Canonical staged route identifiers remain excluded from the public enum until qualification.
Sanitized Agent vocabulary. An empty list means speech-recognition biasing is off.
Post-call extraction JSON Schema, or null.
Signed delivery target for post-call extraction, or null.
Unix seconds.
Example response
{
"object": "agent",
"agent_id": "agent_7f3a0b12",
"brain_model": "default",
"mode": "default"
}Changes
No recorded changes to this operation across all 2 revisions of this API.