{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aimeat-io/json-schema/aimeat-io-agent-directives-schema.json",
  "title": "AgentDirectives",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aimeat-io-agent-directives-api-openapi.yml#/components/schemas/AgentDirectives",
  "type": "object",
  "properties": {
    "purpose": {
      "type": "string"
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "system",
              "owner",
              "agent"
            ]
          }
        }
      }
    },
    "memoryAreas": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "access": {
            "type": "string",
            "enum": [
              "read",
              "write",
              "readwrite"
            ]
          }
        }
      }
    },
    "shared_tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Owner-managed shared memory tags assigned to this agent"
    },
    "shared_memory_prefixes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Convenience key prefixes derived from shared_tags, e.g. agents.tag.project."
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "budget_limits": {
      "type": "object",
      "properties": {
        "max_tokens_per_task": {
          "type": "integer",
          "description": "Per-task token cap"
        },
        "max_tokens_per_day": {
          "type": "integer",
          "description": "Daily token cap"
        },
        "max_tasks_per_day": {
          "type": "integer",
          "description": "Max tasks per day"
        },
        "alert_threshold": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "description": "Percentage at which to warn owner"
        }
      }
    }
  }
}