{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AI agent register entry",
  "type": "object",
  "required": ["agent_id", "agent_name", "purpose", "owner", "status", "agency_tier", "review_by"],
  "properties": {
    "agent_id": {"type": "string", "pattern": "^AG-[0-9]{4,}$"},
    "agent_name": {"type": "string", "minLength": 1},
    "purpose": {"type": "string", "minLength": 10},
    "owner": {"type": "string", "description": "One named person, not a team alias"},
    "team": {"type": "string"},
    "status": {"enum": ["proposed", "pilot", "production", "paused", "retired"]},
    "agency_tier": {"type": "integer", "minimum": 1, "maximum": 4},
    "risk_score": {"type": "integer", "minimum": 0, "maximum": 100},
    "risk_band": {"enum": ["low", "moderate", "high", "critical"]},
    "tools_and_mcp_servers": {"type": "array", "items": {"type": "string"}},
    "credentials": {"type": "string", "description": "Identity the agent uses; never a person's own login"},
    "credential_lifetime": {"type": "string", "examples": ["15m", "1h", "8h"]},
    "data_classes": {"type": "array", "items": {"type": "string"}},
    "web_policy_file": {"type": "string", "description": "Path to the per-agent policy file enforced before each request"},
    "unclassified_destinations": {"enum": ["deny", "allow_reads"]},
    "exceptions": {"type": "array", "items": {"type": "object", "required": ["page_type", "domain", "expires"],
      "properties": {"page_type": {"type": "string"}, "domain": {"type": "string"}, "expires": {"type": "string", "format": "date"}, "requires_approval": {"type": "boolean"}}}},
    "hosted_by": {"enum": ["in-house", "vendor"]},
    "model": {"type": "string"},
    "last_assessed": {"type": "string", "format": "date"},
    "review_by": {"type": "string", "format": "date"},
    "decision_log_location": {"type": "string"},
    "retired_on": {"type": ["string", "null"], "format": "date"},
    "notes": {"type": "string"}
  }
}
