What Is an Agent?
An agent is oneagent_id, one brain, and one or more voices. The
brain answers turns; each voice is a voice profile the agent can speak with. The
brain belongs to the agent, not to a voice - so editing the brain reaches every
voice at once.
client.agents replaces the old five-concern publish with three separate
statements:
client.pipes is the deprecated predecessor of a single agent-voice row. It
still writes the same rows, but every call now raises a DeprecationWarning.
See Speech Pipe for the migration table.The Brain: One Parameter, Four Sources
brain= takes exactly one of four typed sources. Passing two is
unrepresentable, so there is no precedence rule and no validation error to
memorise.
Playbook(id)is a live reference, not a snapshot: editing the playbook changes the agent on its next call.Prompt(text)is the shortest path from nothing to a talking agent - no process of yours runs at all.Runner()normally registers under the agent’s own id. Pass an id only when agentsales-botis served by a runner registered asmy-brain-v2.Endpoint(...)acceptsmodel,api_key,headers,query,extra_body,timeout_sandmax_retries. Theapi_keyis stored on the agent and redacted on every read path - the API never echoes it back.
Creating an Agent
agents.voice.create() parameters
Adding More Voices
A second voice inherits the agent’s brain unchanged - same logic, another language or persona.Reading Agents
Agent fields
AgentVoice fields
Updating an Agent
Deleting an Agent
Attaching a Phone Number
attach() also takes number_id= (the upstream id), plus
inbound_trunk_id= / outbound_trunk_id=. Pass the real number_id when you
have it: on the upsert branch the path id is stored as the cross-plane
back-reference, so passing only a phone number records a phone number where a
database id belongs.
detach() is a DELETE on /attach, not a POST to /detach - the platform
models detaching as removing the attachment. There is no /detach route.Full Method Reference
Next Steps
AgentRunner & Sessions
Run the worker a
Runner() brain points at, and act on live calls - say,
transfer, end, record.Voice Profiles
Browse the catalog and pick the
profile_id you pass as voice_profile.Numbers
Provision, sync, and route phone numbers.
Analytics
Attach a prompt plus a field spec and get structured data from every call.