> ## 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 resolve

> Resolve config for a session

The call your agent makes at session start. Returns the config JSON for this session, with per-session simulation recognition built in: when the session was originated by a Roark simulation (matched by caller number against the calls Roark has in flight), the STAGING revision is served for that session only, so Autoimprove candidates are tested on your real deployment. Real traffic always resolves to production; any recognition miss degrades to production too. On the first fetch of an unknown key, pass `defaults` (your baked-in config): the key is registered and the defaults become revision 1. That makes integration a single call. Cache the response per session; do not fetch per turn.

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

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

## Arguments

**key** `string` *required*

The key.

## Options

**--defaults** `object`

Your baked-in config. On the first fetch of an unknown key this registers the config and becomes revision 1, so integration is a single call. Ignored once the key exists.

**--session** `object`

Session context. When the call was originated by a Roark simulation, Roark recognizes it here and serves the staging revision for this session only; real traffic always gets production.

**--session.session-id** `string`

Your session or room identifier, for correlation.

**--session.caller-number** `string`

The number calling your agent (E.164). Required for simulation recognition.

**--session.called-number** `string`

The number your agent was reached on (E.164).

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent-config resolve <key>
```

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.