{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cotal-ai/json-schema/cotal-ai-managed-agent-schema.json",
  "title": "ManagedAgent",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cotal-ai-manager-console-openapi.yml#/components/schemas/ManagedAgent",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "agent": {
      "type": "string"
    },
    "space": {
      "type": "string"
    },
    "mode": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "mesh": {
      "type": "string"
    },
    "meshView": {
      "type": "string"
    },
    "lifecycleUid": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "variant": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "cwd": {
      "type": "string"
    },
    "spawner": {
      "type": "string"
    },
    "instanceId": {
      "type": "string"
    },
    "host": {
      "type": "string"
    },
    "authHealth": {
      "type": "string"
    },
    "authReason": {
      "type": "string"
    },
    "uptimeMs": {
      "type": "integer"
    },
    "pid": {
      "type": "integer"
    },
    "activeAt": {
      "type": "number"
    },
    "presenceIdentityVerified": {
      "type": "boolean"
    },
    "presenceObservedAt": {
      "type": "integer"
    },
    "offlineSince": {
      "type": "integer"
    },
    "condition": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "since": {
          "type": "number"
        }
      },
      "required": [
        "code"
      ]
    },
    "joinHealth": {
      "type": "object",
      "properties": {
        "state": {
          "const": "degraded"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "state",
        "reason"
      ]
    },
    "resume": {
      "type": "object",
      "description": "Recorded fork provenance when this seat resumed a prior session."
    }
  },
  "required": [
    "name",
    "id",
    "agent",
    "space",
    "mode",
    "status",
    "uptimeMs",
    "mesh",
    "meshView",
    "presenceIdentityVerified",
    "lifecycleUid",
    "spawner",
    "instanceId",
    "host"
  ]
}