# Saving & Publishing

Every Spara agent has two states at any given time: a **draft** and a **published version**. They work independently — your team edits and tests the draft while leads only ever interact with the published version.

## Drafts

Any change you make in the Agent Editor — to the instructions, abilities, or configuration — is saved to the draft. Drafts are private. They do not affect live conversations until you explicitly publish.

To save changes to your draft, click **Save draft** in the editor header. You can save as often as you like. The draft persists between sessions, so you can make changes over multiple sittings before publishing.

**Testing always uses the draft.** The built-in [Testing](/agents/agent-overview/testing.md) interface and [Simulations](/agents/agent-overview/testing.md#simulations) always run against the current draft, so you can validate changes before going live.

## Publishing

When you're satisfied with your draft, click **Publish** in the editor header. Publishing makes the draft the new live version — all new conversations immediately use the updated agent.

Each agent has exactly one published version at a time. The previously published version is retained in Version History.

{% hint style="info" %}
**Chat agents** require at least one activation trigger on any non-default agent before publishing. If a non-default agent has no triggers, the publish button will show an error.
{% endhint %}

## Version History

Click **Version History** in the editor header to see a list of all previously published versions, newest first. Each entry shows who published it and when.

Select any version to preview its instructions. Click **Restore** to create a new draft from that version. Restoring does not publish — it gives you a draft to review and test before going live again.

## Unpublishing

To pause a live agent without deleting it, click **Unpublish**. Unpublished agents are not shown to leads. If the agent you're unpublishing is the default for its channel, Spara will prompt you to confirm — incoming traffic will have no agent to handle it until you publish a replacement.

## FAQ

### Do saved drafts affect live leads?

No. Saving a draft never affects live conversations. Only publishing changes what leads see.

### What happens if I publish and then notice a bug?

Open Version History, select the previous version, and click **Restore**. This creates a draft from the old version. Publish it to roll back immediately.

### Can multiple people edit the same draft?

Yes, but changes are not merged — the last save wins. Coordinate with your team to avoid overwriting each other's edits.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spara.com/agents/agent-overview/saving-and-publishing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
