# Versions and drafts

Snapshot the agent before a change, experiment in a draft, roll back in one click

> Full REST + WebSocket API reference: https://api.happ.tools/reference

A **version** is a snapshot of the agent — prompt, settings, model, tools, knowledge base and auditor — that you can return to. A **draft** is a hidden copy of the agent for experiments: test it, then publish it to the main version.

Both live in the **Versions** panel in the agent's top bar; **Open full history** shows every version with its diff.

<VersionsPageDemo />

## Versions [#versions]

**Save** only keeps the agent's current state live — it doesn't create a version. To record a point you can roll back to:

1. **Versions** > **Create version**. The button shows the pending change (`+N −M`) and is disabled when nothing changed since the last version.
2. Describe **What changed** — e.g. "Rewrote the delivery section of the prompt" — and **Create version**.

Happ also records versions by itself: when an agent or draft is created, before a restore or a publish (**auto-save**), and when an AI agent edits it through the [MCP server](/docs/settings/mcp) (**AI edit**).

### History [#history]

**Open full history** lists the last 50 versions with their origin — **saved**, **auto-save**, **rollback**, **published**, **AI edit** — author and note. Pick one to see the diff against the previous version, grouped by section: prompt, settings, model and provider, tools, knowledge base, auditor. **Call this version** places a test call on that version's voice without touching the live agent.

### Restore [#restore]

**Restore** on a version replaces the agent's configuration with it. The current state is auto-saved first, and the restore is added on top as a new **rollback** version — history only moves forward, nothing is lost. The voice agent re-syncs and changed knowledge documents re-index on their own.

## Drafts [#drafts]

A draft works in the playground and in [tests](/docs/agents/tests), but is **not connected to channels or phones** — customers never reach it.

1. **Versions** > branch menu > **New draft from here**, give it a name (default "Dev").
2. Edit the draft on the same screens as the agent. Voice settings are read-only in a draft; the text model is editable.
3. Test it: **Test** in the top bar, or **Tests** > **Run on** > the draft.
4. **Make this draft live** shows the diff against the main version and publishes it: the draft's prompt, settings, tools and auditor overwrite the main version, a **published** version is recorded and the draft is deleted.

To start a draft from an older version, open it in history and choose &#x2A;*⋯** > **Draft from here**.

Limits: up to **3 drafts** per agent, no draft of a draft. The knowledge base is shared with the main version and read-only in the draft. Tools that create orders or leads in your CRM are not copied into a draft, so experiments can't create real records. If the main version changed after the draft was created, publishing warns you — those changes will be overwritten.

**API:** [api.happ.tools/reference](https://api.happ.tools/reference)

## Next [#next]

* [Tests](/docs/agents/tests) — prove the draft is better before publishing
* [Agents](/docs/agents) — what the agent's settings are
* [MCP](/docs/settings/mcp) — let Claude or Cursor edit the agent, with every edit versioned
