An agent has a draft you edit and a published version that live traffic runs. Every write — dashboard, API, MCP server or CoPilot — lands on the draft; nothing reaches a caller until you publish. GET /v1/agents/{agent_id} returns the draft config, published_version (null if never published), published_at, updated_at and versions. An updated_at later than published_at means the draft has unpublished edits.

Publishing

POST /v1/agents/{agent_id}/publish runs validation, freezes the draft as the next version and makes it live. It returns version, published_at and warnings; a failure is a 400 listing every error and publishes nothing. Publishing and validating need the editor role.
To try an edit without publishing, start a call with agent_version: "draft" — see per-call configuration.

Publishing pins tool versions

Publishing an agent records, for each attached tool, lifecycle hook and task, the version live at that moment. Republishing the tool afterwards does not change what calls run: publish the agent again to pick up the new tool version.
A published version’s tools entries read {"tool_id": "…", "tool_version": 3}; the draft’s read "tool_version": null. The dashboard’s version diff lists per-tool pins (v3 → v4). Attaching a tool that has never been published is refused (tool '…' has no published version - publish it before attaching). So the order is always:
Not pinned: an MCP integration’s allowed_tools (read live) and FAQ content (live; a version freezes only which FAQs are attached).

History and diff

  • GET /v1/agents/{agent_id} → versions: every publish, newest first, with version, published_at and published_by (email). The list endpoint omits it.
  • GET /v1/agents/{agent_id}/versions/{version} → that version’s full frozen config, tool pins included.
  • Dashboard: Version history in the agent editor compares any two versions or the draft, grouped by section, with per-tool pins.

Rollback

POST /v1/agents/{agent_id}/versions/{version}/rollback:
  • Creates no new version — published_version points back at the old one.
  • Replaces the draft with that version’s config; unpublished edits are lost.
  • The restored draft is unpinned: publishing it again pins the tools’ current versions, not the old ones.
  • Sets updated_at to that version’s published_at, so it does not read as having unpublished edits.
  • Is refused if that version cannot answer a phone number the agent is assigned to (for example, a required variable with no default).
Rollback takes effect immediately for every new call. Calls in progress finish on the version they started with.

When a publish takes effect

A session started with a pinned agent_version, an agent_override or an inline agent keeps what it started with.

Deleting an agent

DELETE /v1/agents/{agent_id} deletes its versions permanently; past calls keep transcripts but no longer show the config they ran. It is refused with a 409, naming each blocker, while anything would still route to it: an enabled phone number, stream connection or integration trigger, an unfinished call batch, or another agent or tool that hands off to it.

Next

Validation

Why a publish is refused.

Publishing tools

Tool versions from the tool side.