Skip to main content
This walkthrough takes an agent from empty to published. Agents are editable while draft and locked once published — so you test freely, then publish when you’re happy. For the model behind this, see the Agents concept. Agent management uses the sessions:write scope and works with an API key.
1

Create a draft

Create the agent with its prompt sections, variables, provider config, and tools. It starts as a draft.
The response echoes the agent with read-only status: "draft".
2

Edit until it's right

While draft, update any field with PUT:
3

Test before publishing

You don’t need to publish to try an agent — testing works on drafts. Fetch it, or start a test session (bearer auth) and talk to it in the browser:
For a WhatsApp agent, POST /agent/{id}/whatsapp/test-reply returns a sample reply without sending anything.
4

Publish

Publishing locks the config and makes the agent bindable by campaigns:
The response now shows status: "published" and a published_at timestamp.
Publish is one-way. You get 422 if the agent has no name, and 409 if it’s already published.
5

Change it later — by cloning

A published agent can’t be edited (PUT returns 409). To change it, clone it into a fresh draft, edit, and publish the clone:
Then repoint your campaigns at the new agent. This guarantees a running campaign never changes underfoot.
Campaigns bind only published agents — creating or updating a campaign with a draft agent returns 400. And a published agent can’t be deleted while a campaign references it (409).

Run your first campaign

Put the agent to work in bulk.

Make an outbound call

Dial a single recipient.