Agent Config

Resolve config for a session

Changed on

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.

post/v1/agent-config/{key}/resolve

Request

  • Base URL
    https://api.roark.ai
  • URL
    https://api.roark.ai/v1/agent-config/{key}/resolve
  • Auth
    HTTP bearer

Path parameters

keystring required

Request body

defaultsobject

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.

Example request

{
  "defaults": {
    "systemPrompt": "You are a helpful receptionist.",
    "model": "gpt-4.1",
    "temperature": 0.4
  },
  "session": {
    "callerNumber": "+15551230000",
    "calledNumber": "+15559870000"
  }
}

Response

The resolved config for this session.

Changes