Skip to main content
An agent is a persistent assistant with a name, a model, a history, and at most one phone. You send it tasks as turns, and it remembers earlier turns.

Create one

The call returns 201 with the agent in data. Keep data.id, the agent id. Find device ids with GET /v1/devices. See Phones.
POST /v1/agents/primary returns your workspace’s primary agent, and creates it if there is none. Calling it again returns the same agent.

Give it a phone, or move it

An agent uses at most one phone. To attach one, or to move the agent to another phone, send the new phone:
The swap is atomic. The agent’s next turn uses the new phone. Send "devices": [] to detach the phone. The same call changes name, description, model, color or avatar. Send only the fields you want to change.

Manage agents

GET /v1/agents returns every active agent. Add limit (1 to 100) or cursor to read one page at a time, most recently active first. The response then carries nextCursor and hasMore. GET /v1/agents/{id} returns the agent’s newest 20 turns in turns, oldest first. Pass turnsCursor as cursor to GET /v1/agents/{id}/turns to walk back through older history.

Archive and restore

Archiving hides the agent. Its sessions and recordings stay. You can restore it for 30 days: purgeAfter says until when. After that, restore returns 410.