Deploy and roll back
Edit a draft, ship it as a version, and restore an earlier version in one click.
Callers always talk to the live version of an agent. Your edits in the dashboard go to a draft first, so you can change and test an agent without touching live calls.
The API works differently. PATCH /v1/agents/{id} skips the draft: it changes the live agent straight away, and records a new version when the change touches a versioned setting. Settings outside the version snapshot, such as ringTimeoutSeconds and outboundDtmf, change live without a new version. To stage changes from code, write them with PUT /v1/agents/{id}/draft, then ship them with POST /v1/agents/{id}/deploy. See Deploy from code.
Save a draft
Edit anything under Configuration or Workflow. A bar appears at the bottom of the page.
- Save draft keeps your edits without changing the live agent.
- Discard throws them away.
Once saved, the bar shows what changed, for example Draft v4 · 2 changes since v3.
Test the draft
Set the bar's Testing switch to Draft. The Test button and every test case run now use the draft. Switch to Live to compare against what callers hear today. See Test before you deploy.
Deploy
Click Deploy. The draft becomes the new live version, and calls that start from now on use it. Calls already in progress finish on the version they started with.
Tools are the exception: they are not part of a version. A call loads the agent's tool list when it starts, so a tool added later is not offered to calls already in progress. When a call runs a tool, though, the server reads that tool as it is now. On phone calls an edited tool runs with its new settings and a deleted one fails, and on any call a tool whose credentials are missing is refused.
Some settings skip the draft and change live right away: the agent's phone number assignment, and a prompt applied with Improve the prompt.
If your workspace blocks deploys on failed tests, Deploy can be refused. The bar links to the failing case and offers Deploy anyway. See Block deploys on failures.
Roll back
- Open the agent and select Versions in the sidebar.
- Open the version you want.
- Click Restore this version, then Confirm.
The restored version becomes live as a new version number, and the history shows Rolled back to v2. Every setting saved with that version comes back, including the greetings, turn handling and language routing, not only the prompt and models. Nothing is deleted, so you can roll forward the same way.
Deploy from code
| Endpoint | What it does |
|---|---|
GET /v1/agents/{id}/draft | Read the pending draft. |
PUT /v1/agents/{id}/draft | Save a draft without touching live calls. |
DELETE /v1/agents/{id}/draft | Discard the draft. |
POST /v1/agents/{id}/deploy | Make the draft the new live version. |
GET /v1/agents/{id}/versions | List versions, newest first. |
POST /v1/agents/{id}/rollback | Restore an earlier version as a new live version. |
PATCH /v1/agents/{id} | Change the live agent directly, without a draft. |
Request and response shapes are in the API reference under Agent draft and Agent versions.