{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roark/json-schema/roark-managed-agent-config-schema.json",
  "title": "ManagedAgentConfig",
  "description": "A managed config for a code-first agent (LiveKit, Pipecat, or any stack using the SDK): your agent fetches its tunable surface from Roark at session start. Two channels: production for real traffic, staging for candidates under test.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roark-agent-config-api-openapi.yml#/components/schemas/ManagedAgentConfig",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "key": {
      "type": "string",
      "description": "The stable handle your code fetches by."
    },
    "agentId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The linked Roark agent, when one exists."
    },
    "productionRevisionId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The revision real traffic reads."
    },
    "stagingRevisionId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The candidate revision Roark test calls read. Null when nothing is staged."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO 8601."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO 8601."
    }
  },
  "required": [
    "id",
    "key",
    "agentId",
    "productionRevisionId",
    "stagingRevisionId",
    "createdAt",
    "updatedAt"
  ]
}