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

# roark agent version restore

> Restore an agent version

Roll back: publishes a new version, numbered after the latest, with this version's settings and makes it live. History stays append-only. An open draft started before this is kept but can no longer be published (409 `agent_draft_base_changed`); discard it or start a new one. Pass `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if another version went live since you read it.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent version restore <agent-id> <version-id> [options]
```

> [!NOTE]
>
> Calls `POST /v1/agent/{agentId}/versions/{versionId}/restore`

## Arguments

**agent-id** `string` *required*

The agent-id.

**version-id** `string` *required*

The version-id.

## Options

**--summary** `string`

**--expected-live-version-id** `string`

The live version when you decided to restore. When sent, the restore is refused with 409 if another version went live since.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent version restore <agent-id> <version-id>
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


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