{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/justautomate-ai/json-schema/justautomate-ai-agent-identity-schema.json",
  "title": "AgentIdentity",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/justautomate-ai-openapi.json#/components/schemas/AgentIdentity",
  "type": "object",
  "required": [
    "authenticated",
    "sub",
    "scope",
    "resource",
    "rateLimit"
  ],
  "properties": {
    "authenticated": {
      "type": "boolean",
      "const": true
    },
    "sub": {
      "type": "string",
      "description": "Agent identifier from the token."
    },
    "scope": {
      "type": "string"
    },
    "resource": {
      "type": "string",
      "format": "uri"
    },
    "rateLimit": {
      "type": "object",
      "required": [
        "policy",
        "limit",
        "windowSeconds"
      ],
      "properties": {
        "policy": {
          "type": "string"
        },
        "limit": {
          "type": "integer"
        },
        "windowSeconds": {
          "type": "integer"
        }
      }
    }
  }
}