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

# Drafts and Commits

> How edits are auto-saved as a draft and saved as versioned commits.

## Drafts

Every change you make in the builder is saved automatically to the branch's **draft** a few seconds after you stop typing. You never lose work, and nothing you edit affects live calls until you commit and deploy.

The header shows the draft's state:

| Indicator | Meaning |
| - | - |
| **Draft auto-saved *x* ago** | Your latest edits are saved to the draft. |
| **Last committed *x* ago** | The branch has no uncommitted changes. |
| **Draft** badge | The branch has uncommitted changes. Select it to review and commit them. |
| **N Errors** badge | The draft has problems that block committing. Select it to see them. |

You can test a draft before committing it. See [Test your agent](/agent-builder/deploy#test-your-agent).

## Commit your changes

A commit saves the draft as a new, immutable version on the branch. Only committed versions can be [deployed](/agent-builder/deploy).

<Steps>
  <Step title="Select Commit">
    Select **Commit** in the header, or the **Draft** badge.
  </Step>

  <Step title="Fix any errors">
    The draft is validated first. If there are problems, such as a missing required field, an unknown variable, or a language without models, they're listed with a shortcut to the right place, like **Go to Pipeline**. Fix them and commit again.
  </Step>

  <Step title="Review changes">
    **Review Changes** shows a side-by-side diff of the **Last Commit** and your **Uncommitted Changes**.
  </Step>

  <Step title="Describe and commit">
    Enter a **Commit Description** (for example *"Shortened the welcome message and added Hindi."*) and select **Commit Changes**.
  </Step>
</Steps>

## Discard changes

To throw away your draft, open **Review Changes** and select **Discard Changes**. Every change since the last commit on the branch is permanently removed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.