> ## 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-config update

> Write a config revision

Write a new revision onto a channel. Writing production creates the key when it does not exist; writing staging stages a candidate that only Roark-recognized simulation sessions will read. Every write is a new revision; nothing is overwritten.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent-config update <key> [options]
```

> [!NOTE]
>
> Calls `PUT /v1/agent-config/{key}`

## Arguments

**key** `string` *required*

The key.

## Options

**--channel** `string` *required*

Which channel to write. One of `production`, `staging`

**--document** `object` *required*

The full config JSON for the new revision.

**--summary** `string`

One-line story of the change.

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

Link this config to a Roark agent (the one your calls report). Required before Autoimprove can run on it: the link is how a fix finds the config channel.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent-config update <key> --channel <value> --document <value>
```

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


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