Agent Versioning
Every agent’s config — prompt, tools, voice, language, post-call metrics, and more — is managed as versions. You edit in isolated drafts, publish drafts as new versions, and activate the version you want live. Previous versions are kept so you can compare and restore at any time.
Core Concepts
When you open an older or non-active version, the editor is read-only — the only way to change it is to create a draft from it.

Creating a Draft
Drafts can be forked from either a published version or another draft:
- From the active version — click Create Draft on a read-only version.
- From any older version — open the Version history panel, then New draft next to the version.
- From an existing draft — hover a draft in the Drafts panel and click New draft to fork it.

Once the draft is created, the agent header switches from V1 (Read-only) to Draft #N and every field in the editor becomes editable.

Drafts are private scratch space. Multiple drafts can exist in parallel — for example, one experimenting with a new voice and another tuning the prompt.
Browsing Versions and Drafts
The version switcher at the top of the editor has two tabs:
Version history
Drafts
Every published version, newest first. The currently-active one is tagged Active. Older versions show a Restore action; the active one shows a New draft link.

Comparing Versions
Use Compare versions to see exactly what changed between any two snapshots — published versions or drafts.
Publishing a Draft
When a draft is ready, click Publish in the top right. The Review Changes dialog shows the diff against the current active version and asks for a label + description.

After publishing, the draft is removed and the new version appears in the Version history. If you chose to activate, it also becomes the new Active entry. The previous active version gets a Restore action.

Restoring an Older Version
Click Restore next to an older version to set it active again. The currently-active version is not deleted — you can swap back any time. Restoring never modifies config; it just changes which version serves live calls.
Managing Versions via API
Every action in the UI is available through the public API.
All examples assume BASE="https://api.smallest.ai/atoms/v1" and API_KEY is set in your environment.
Full flow — edit, publish, activate
Common operations
See the full schema in the API Reference.
Reading active config
GET /agent/{id} returns the agent document with the active version’s resolved config merged under _resolvedConfig:
GET /agent/{id}/workflow returns {prompt, tools} for the active version only. The versionId query parameter on this endpoint is currently ignored — to inspect a non-active version’s config, call GET /agent/{id}/versions/{versionId} instead.
PATCH /workflow/{id} still works but bypasses versioning. It writes directly to the legacy workflow document: the change is not captured as a version, and any field missing from the PATCH payload can be silently wiped. On a versioned agent, always go through PATCH /agent/{id}/drafts/{draftId}/config and publish.




