> ## Documentation Index
> Fetch the complete documentation index at: https://hercules.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent drafts, publishing, and versions

> Edits to a Hercules Agent are saved as a draft first. Save it, publish it when it's ready, and go back to an earlier version any time.

<Note>
  Agents is in private beta, so things may change. If you hit a problem, tell us via [Support &
  feedback](/docs/company/contact).
</Note>

Editing an Agent never changes what's running. Your changes are saved as a draft, and your Agent carries on with the published version until you click **Publish**.

The buttons sit in the bar above every **Build** page, so they follow you between Instructions, Integrations, Triggers, and the rest.

<div className="screenshot slate">
  <img src="https://mintcdn.com/zeus-0f6dadbf/AUzCpLx0wjCzKFM0/images/agents/versions-main.png?fit=max&auto=format&n=AUzCpLx0wjCzKFM0&q=85&s=dfbb5f8a6c66b94eb81132c711ce22a0" alt="Version switcher listing v6 as published alongside earlier versions" width="664" height="471" data-path="images/agents/versions-main.png" />
</div>

### What do Save and Publish do?

| Button      | What it does                                           |
| ----------- | ------------------------------------------------------ |
| **Save**    | Keeps your draft. Your live Agent doesn't change       |
| **Publish** | Makes your draft live, and saves it as a new version   |
| **Discard** | Throws your changes away and goes back to the live one |

The bar always tells you where you are: unsaved changes, saving, a draft that isn't published yet, an older version you've opened, or a save that didn't work. Press <kbd>Cmd + S</kbd> / <kbd>Ctrl + S</kbd> to save.

<Note>
  Drafts don't save themselves. Nothing is kept until you press **Save**, so a half-finished idea is
  never left for a teammate to find.
</Note>

On a phone, **Publish** keeps its button and Save and Discard move into the **...** menu.

### How do I go back to an earlier version?

<Steps>
  <Step title="Open the version list">Click the version name in the bar.</Step>

  <Step title="Pick a version">
    Choose the one you want. It opens in the editor so you can read it first.
  </Step>

  <Step title="Publish it">Click **Publish** to make it live.</Step>
</Steps>

Opening a version doesn't make it live. Going back is the same Save and Publish as any other change, so nothing happens on a single click.

<Warning>
  Opening a version replaces whatever's in the editor, saved or not. Publish or discard what you're
  working on first. Hercules warns you when there's something to lose.
</Warning>

### What's saved in a version?

Everything that makes the Agent what it is: its instructions, model, integrations and which of their tools it can use, skills, subagents, and issue access. These go into your draft, and you'll see them in the version history.

Everything else saves the moment you change it, and doesn't create a version: [triggers](/docs/agents/triggers), [channels](/docs/agents/channels), [guardrails](/docs/agents/guardrails), run limits, description, tags, and starter prompts.

<Warning>
  Going back to an old version doesn't undo those. You get its instructions and tools back, and your
  triggers, channels, and guardrails stay exactly as they are today. Change those back yourself.
</Warning>

### Additional FAQ

<AccordionGroup>
  <Accordion title="Can I see what changed between versions?">
    Yes. The version history shows each version next to the one before it, so you can read exactly
    what changed in the instructions and see a summary line for everything else.
  </Accordion>

  <Accordion title="Is a saved draft safe?">
    A saved draft isn't a version. The next Save or Publish writes over it. If it matters, publish it.
  </Accordion>

  <Accordion title="What happens to runs already going when I publish?">
    A run finishes with the version it started on. Publishing only affects runs that start afterwards.
  </Accordion>

  <Accordion title="Can I compare versions?">
    Yes, that's what a baseline is for. An [evaluation](/docs/agents/evaluation-runs) lets you pick which
    version answers, so you can run the same questions against two versions and compare them.
  </Accordion>
</AccordionGroup>
