{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://taxonmark.com/api/v1/types/autonomous-agent-record",
    "title": "Autonomous Agent Record",
    "type": "object",
    "required": [
        "agent_name",
        "agent_version",
        "operator",
        "underlying_system_dois",
        "autonomy_level",
        "human_oversight",
        "deployment_start",
        "revocation_status"
    ],
    "properties": {
        "agent_name": {
            "title": "Agent name",
            "type": "string",
            "maxLength": 1000
        },
        "agent_version": {
            "title": "Agent version",
            "type": "string",
            "maxLength": 1000
        },
        "operator": {
            "title": "Operator (accountable legal entity)",
            "type": "string",
            "maxLength": 1000
        },
        "operator_ror": {
            "title": "Operator ROR",
            "type": "string",
            "format": "ror"
        },
        "underlying_system_dois": {
            "title": "Underlying AI system IDs",
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "Taxonmark IDs (for example TM.AI.2026.7KQ2X) or DOIs registered elsewhere"
        },
        "autonomy_level": {
            "title": "Autonomy level",
            "type": "string",
            "enum": [
                "L0-assistive",
                "L1-supervised",
                "L2-conditional",
                "L3-high",
                "L4-full"
            ]
        },
        "human_oversight": {
            "title": "Human oversight mode",
            "type": "string",
            "enum": [
                "human-in-the-loop",
                "human-on-the-loop",
                "human-out-of-the-loop"
            ]
        },
        "goals_scope": {
            "title": "Goals and scope of action",
            "type": "string",
            "x-widget": "textarea",
            "maxLength": 20000
        },
        "tool_permissions": {
            "title": "Tool permissions",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "spending_limit": {
            "title": "Spending limit (currency/period)",
            "type": "string",
            "maxLength": 1000
        },
        "network_access": {
            "title": "Network access",
            "type": "string",
            "enum": [
                "none",
                "allowlist",
                "open"
            ]
        },
        "memory_persistence": {
            "title": "Memory persistence",
            "type": "string",
            "enum": [
                "none",
                "session",
                "long-term"
            ]
        },
        "identity_credential": {
            "title": "Identity credential (SPIFFE ID, DID, certificate)",
            "type": "string",
            "maxLength": 1000
        },
        "kill_switch_tested": {
            "title": "Kill switch tested",
            "type": "boolean"
        },
        "kill_switch_evidence_doi": {
            "title": "Kill-switch test evidence ID",
            "type": "string",
            "format": "doi",
            "description": "A Taxonmark ID (for example TM.AI.2026.7KQ2X) or a DOI registered elsewhere"
        },
        "delegation_allowed": {
            "title": "May delegate to sub-agents",
            "type": "boolean"
        },
        "sub_agent_dois": {
            "title": "Sub-agent IDs",
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "Taxonmark IDs (for example TM.AI.2026.7KQ2X) or DOIs registered elsewhere"
        },
        "evaluation_dois": {
            "title": "Evaluation IDs",
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "Taxonmark IDs (for example TM.AI.2026.7KQ2X) or DOIs registered elsewhere"
        },
        "incident_dois": {
            "title": "Incident IDs",
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "Taxonmark IDs (for example TM.AI.2026.7KQ2X) or DOIs registered elsewhere"
        },
        "deployment_start": {
            "title": "Deployment start",
            "type": "string",
            "format": "date"
        },
        "deployment_end": {
            "title": "Deployment end",
            "type": "string",
            "format": "date"
        },
        "revocation_status": {
            "title": "Revocation status",
            "type": "string",
            "enum": [
                "active",
                "suspended",
                "revoked"
            ]
        },
        "logs_retention_days": {
            "title": "Action-log retention (days)",
            "type": "integer"
        },
        "accountable_contact_url": {
            "title": "Accountable contact page (organisational)",
            "type": "string",
            "format": "uri"
        }
    },
    "additionalProperties": true
}