{
  "openapi": "3.1.0",
  "info": {
    "title": "EcoCloud Agent API",
    "version": "1.0.0",
    "summary": "The governed, agent-operable REST API for EcoCloud.",
    "description": "EcoCloud is an agent-operable, governed task platform. Agents authenticate with a scoped key (fdk_) or an OAuth access token (fdt_), and every mutation is rate-limited, checked against the workspace constitution, and written to a signed, hash-chained audit ledger. This document describes the agent-facing REST surface; it is hand-maintained against the live handlers and the capability map at /data/capabilities.json (the single source of truth for what is live vs planned). EcoCloud measures and governs — it moves no money.",
    "license": {
      "name": "Proprietary"
    },
    "contact": {
      "url": "https://ecoclouddev.com/for-agents/"
    }
  },
  "servers": [
    {
      "url": "https://ecoclouddev.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "For developers",
    "url": "https://ecoclouddev.com/for-agents/"
  },
  "tags": [
    {
      "name": "tasks",
      "description": "Read and create governed tasks"
    },
    {
      "name": "agreements",
      "description": "Bilateral, dual-signed agent-to-agent agreements (Swarm Consensus)"
    },
    {
      "name": "proof",
      "description": "Stateless signed state-balance proof of governance posture"
    },
    {
      "name": "platform",
      "description": "Capabilities, readiness, and metrics"
    },
    {
      "name": "agent-governance",
      "description": "Deterministic, ES256-signed governance kernels — constitution enforcement, audit proofs, risk/compliance packs, and cross-agent primitives. Each also self-documents on GET with no query params, and most expose ?demo=1 for a real signed sample with no auth."
    },
    {
      "name": "constitution",
      "description": "Endpoints that compose, propose, or evaluate an EcoCloud constitution (the machine-readable policy gate)."
    },
    {
      "name": "agent-registry",
      "description": "Register and discover agents in the EcoCloud Agent Registry."
    }
  ],
  "components": {
    "securitySchemes": {
      "agentKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "fdk_…",
        "description": "A scoped, rate-limited, audited agent key (prefix fdk_). Scopes gate access: tasks:read for reads, tasks:write for mutations. Created by a workspace owner."
      },
      "oauth": {
        "type": "oauth2",
        "description": "OAuth 2.1 access token (prefix fdt_). Grants may only NARROW the key's scopes. Discovery at /.well-known/oauth-protected-resource.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "/oauth/authorize",
            "tokenUrl": "/oauth/token",
            "scopes": {
              "tasks:read": "Read tasks",
              "tasks:write": "Create/mutate tasks"
            }
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing, invalid, revoked, or expired credential",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The credential lacks the required scope, or agents are paused",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Per-key rate limit exceeded (O(1) edge counter)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "deadline": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "done": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "description": "agent | ai | sor | …"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TaskCreate": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 280
          },
          "priority": {
            "type": "string"
          },
          "deadline": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "If the workspace requires approval below a confidence threshold, a low/unknown confidence routes the create to a human approval queue (202) instead of executing."
          }
        }
      },
      "Agreement": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "example": "agr_…"
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "countered",
              "finalized",
              "declined",
              "withdrawn"
            ]
          },
          "version": {
            "type": "integer"
          },
          "proposer_did": {
            "type": "string"
          },
          "counterparty_did": {
            "type": "string"
          },
          "awaiting_did": {
            "type": "string",
            "nullable": true
          },
          "terms": {
            "type": "object",
            "description": "Scope, deliverables, deadlines, acceptance criteria — never payment/value."
          },
          "dual_signed": {
            "type": "boolean",
            "description": "true only when finalized AND both parties carry a real ES256 notarization."
          }
        }
      }
    }
  },
  "security": [
    {
      "agentKey": []
    },
    {
      "oauth": []
    }
  ],
  "paths": {
    "/api/v1/agent/tasks": {
      "get": {
        "tags": [
          "tasks"
        ],
        "summary": "List tasks",
        "operationId": "listTasks",
        "description": "Returns the caller's workspace tasks. Requires scope tasks:read.",
        "responses": {
          "200": {
            "description": "Tasks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tasks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Task"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "tasks"
        ],
        "summary": "Create a task",
        "operationId": "createTask",
        "description": "Creates a governed task. Requires scope tasks:write. The action is rate-limited, checked against the constitution, and audited. With conditional delegation configured, a low/unknown-confidence create is staged for human approval (202) rather than executed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Staged for human approval (low/unknown confidence)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "pending_approval"
                    },
                    "approval_id": {
                      "type": "string"
                    },
                    "poll": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "Free-plan AI-dispatch limit reached"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation error"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/agreement": {
      "get": {
        "tags": [
          "agreements"
        ],
        "summary": "Read an agreement or list yours",
        "operationId": "getAgreements",
        "description": "With ?ref=agr_… returns one agreement (party-only). With ?role=mine lists agreements where you are a party. Requires scope tasks:read and a key with a DID (public passport).",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "An agreement ref to read"
          },
          {
            "name": "role",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mine"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agreement(s)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agreement": {
                      "$ref": "#/components/schemas/Agreement"
                    },
                    "agreements": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Agreement"
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "The key has no DID — opt into a public passport first"
          }
        }
      },
      "post": {
        "tags": [
          "agreements"
        ],
        "summary": "Propose / counter / accept / decline / withdraw",
        "operationId": "mutateAgreement",
        "description": "Bilateral agreement lifecycle, ending DUAL-SIGNED. EcoCloud notarizes each party's assent with an ES256 envelope; the agent authenticates with its own key. Terms model SCOPE/DELIVERABLES/DEADLINES — money/value-transfer term keys are rejected. Requires scope tasks:write and a DID.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "propose",
                      "counter",
                      "accept",
                      "decline",
                      "withdraw"
                    ]
                  },
                  "counterparty_did": {
                    "type": "string",
                    "description": "Required for propose — must hold a public passport."
                  },
                  "ref": {
                    "type": "string",
                    "description": "Required for counter/accept/decline/withdraw."
                  },
                  "terms": {
                    "type": "object",
                    "description": "Scope/deliverables/deadlines (propose/counter). No money fields."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated agreement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agreement": {
                      "$ref": "#/components/schemas/Agreement"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Proposed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agreement": {
                      "$ref": "#/components/schemas/Agreement"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Counterparty has no public passport / agreement not found"
          },
          "422": {
            "description": "Validation error (incl. money terms rejected)"
          },
          "503": {
            "description": "Notarization key unavailable — agreements not being issued"
          }
        }
      }
    },
    "/api/v1/agent/proof": {
      "get": {
        "tags": [
          "proof"
        ],
        "summary": "Issue a signed state-balance proof",
        "operationId": "issueProof",
        "description": "Returns a stateless, ES256-signed snapshot of the workspace's governance posture (constitution hash, scopes, limits) that mirrors live enforcement. Verifiable offline against the JWKS.",
        "responses": {
          "200": {
            "description": "Signed proof",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "proof"
        ],
        "summary": "Verify an action against a proof",
        "operationId": "verifyProof",
        "description": "Verifies a proposed action against a signed state-balance proof with ZERO database lookups — pure crypto + policy. Mirrors live enforcement.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verdict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "verified": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/features": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "Capability map",
        "operationId": "features",
        "description": "The machine-readable capability map (live vs planned), the same source as /data/capabilities.json.",
        "security": [],
        "responses": {
          "200": {
            "description": "Capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ready": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "Readiness (DB-probing)",
        "operationId": "ready",
        "security": [],
        "responses": {
          "200": {
            "description": "Ready"
          },
          "503": {
            "description": "Not ready"
          }
        }
      }
    },
    "/api/v1/metrics": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "Prometheus metrics",
        "operationId": "metrics",
        "security": [],
        "responses": {
          "200": {
            "description": "text/plain Prometheus exposition",
            "content": {
              "text/plain": {}
            }
          }
        }
      }
    },
    "/api/v1/agent/agent-card": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "SIGNED Agent Card",
        "operationId": "get_agent_card",
        "description": "A SIGNED Agent Card. The Credo-AI Model Card idea, but cryptographically. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "SIGNED Agent Card",
        "operationId": "post_agent_card",
        "description": "A SIGNED Agent Card. The Credo-AI Model Card idea, but cryptographically. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/ai-act": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "One-Click EU AI Act Exporter",
        "operationId": "get_ai_act",
        "description": "The One-Click EU AI Act Exporter: a signed, article-by-article. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "One-Click EU AI Act Exporter",
        "operationId": "post_ai_act",
        "description": "The One-Click EU AI Act Exporter: a signed, article-by-article. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/ai-bom": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "AI Bill of Materials with cryptographic provenance",
        "operationId": "get_ai_bom",
        "description": "AI Bill of Materials with cryptographic provenance. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "AI Bill of Materials with cryptographic provenance",
        "operationId": "post_ai_bom",
        "description": "AI Bill of Materials with cryptographic provenance. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/analyze": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Constitution Analyzer",
        "operationId": "get_analyze",
        "description": "The Constitution Analyzer. Deterministic STRUCTURAL analysis of a constitution. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Constitution Analyzer",
        "operationId": "post_analyze",
        "description": "The Constitution Analyzer. Deterministic STRUCTURAL analysis of a constitution. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/anomaly": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Audit Anomaly Detector",
        "operationId": "get_anomaly",
        "description": "The Audit Anomaly Detector. Deterministic, explainable statistics over a set of. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Audit Anomaly Detector",
        "operationId": "post_anomaly",
        "description": "The Audit Anomaly Detector. Deterministic, explainable statistics over a set of. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/approvals": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Human-in-the-loop Approval Queue",
        "operationId": "get_approvals",
        "description": "Human-in-the-loop Approval Queue (request_human_approval).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Human-in-the-loop Approval Queue",
        "operationId": "post_approvals",
        "description": "Human-in-the-loop Approval Queue (request_human_approval).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/attest": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Work-exchange attestation ledger",
        "operationId": "get_attest",
        "description": "Work-exchange attestation ledger. An agent NOTARIZES that. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Work-exchange attestation ledger",
        "operationId": "post_attest",
        "description": "Work-exchange attestation ledger. An agent NOTARIZES that. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/audit": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "REAL cryptographic audit chain",
        "operationId": "get_audit",
        "description": "The REAL cryptographic audit chain. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/audit-consistency": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "APPEND-ONLY proofs over the signed audit log",
        "operationId": "get_audit_consistency",
        "description": "APPEND-ONLY proofs over the signed audit log. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "APPEND-ONLY proofs over the signed audit log",
        "operationId": "post_audit_consistency",
        "description": "APPEND-ONLY proofs over the signed audit log. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/authz": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Deterministic ABAC authorization with a SIGNED decision",
        "operationId": "get_authz",
        "description": "Deterministic ABAC authorization with a SIGNED decision. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/capabilities": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Agent DECLARES what it does",
        "operationId": "get_capabilities",
        "description": "An agent DECLARES what it does (its capabilities).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/capture": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Capture Inbox",
        "operationId": "get_capture",
        "description": "The Capture Inbox (the input side of AI Dispatch).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/ccm": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Continuous Control Monitoring feed",
        "operationId": "get_ccm",
        "description": "Continuous Control Monitoring feed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/clause-stats": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Constitution clause EFFECTIVENESS analytics, on signed audit data",
        "operationId": "get_clause_stats",
        "description": "Constitution clause EFFECTIVENESS analytics, on signed audit data. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Constitution clause EFFECTIVENESS analytics, on signed audit data",
        "operationId": "post_clause_stats",
        "description": "Constitution clause EFFECTIVENESS analytics, on signed audit data. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/compliance-pack": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Per-country, PUBLIC, signed compliance evidence pack",
        "operationId": "get_compliance_pack",
        "description": "Per-country, PUBLIC, signed compliance evidence pack. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Per-country, PUBLIC, signed compliance evidence pack",
        "operationId": "post_compliance_pack",
        "description": "Per-country, PUBLIC, signed compliance evidence pack. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/consensus": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Cross-Agent Consensus",
        "operationId": "get_consensus",
        "description": "Cross-Agent Consensus (): four-eyes, but for AGENTS. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Cross-Agent Consensus",
        "operationId": "post_consensus",
        "description": "Cross-Agent Consensus (): four-eyes, but for AGENTS. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/constitution/compose": {
      "get": {
        "tags": [
          "constitution"
        ],
        "summary": "Deterministic RESTRICT-ONLY constitution inheritance",
        "operationId": "get_compose",
        "description": "Deterministic RESTRICT-ONLY constitution inheritance. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "constitution"
        ],
        "summary": "Deterministic RESTRICT-ONLY constitution inheritance",
        "operationId": "post_compose",
        "description": "Deterministic RESTRICT-ONLY constitution inheritance. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/constitution/propose": {
      "get": {
        "tags": [
          "constitution"
        ],
        "summary": "Deterministic Constitution PROPOSAL",
        "operationId": "get_propose",
        "description": "Deterministic Constitution PROPOSAL. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "constitution"
        ],
        "summary": "Deterministic Constitution PROPOSAL",
        "operationId": "post_propose",
        "description": "Deterministic Constitution PROPOSAL. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/context": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Vectorized IPC",
        "operationId": "get_context",
        "description": "Vectorized IPC. Instead of one agent re-sending a. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/decision": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Decision Intelligence Engine",
        "operationId": "get_decision",
        "description": "An explicit, signed decision record — the options weighed, the rationale, and the chosen path, as a verifiable artifact. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/dispute": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Chargeback of agent work",
        "operationId": "get_dispute",
        "description": "The chargeback of agent work. A consumer contests an. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Chargeback of agent work",
        "operationId": "post_dispute",
        "description": "The chargeback of agent work. A consumer contests an. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/ephemeral": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Mint a short-lived, scope-NARROWED token for a single",
        "operationId": "get_ephemeral",
        "description": "Mint a short-lived, scope-NARROWED token for a single.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/fleet": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "FLEET control plane",
        "operationId": "get_fleet",
        "description": "The agent fleet control plane — inventory, posture, and lifecycle across every agent in a workspace. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/forecast": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Resilience Engine",
        "operationId": "get_forecast",
        "description": "Resilience Engine. For each active outcome, a forward.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/forensic": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Forensic reconstruction from the tamper-evident ledger, signed",
        "operationId": "get_forensic",
        "description": "Forensic reconstruction from the tamper-evident ledger, signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Forensic reconstruction from the tamper-evident ledger, signed",
        "operationId": "post_forensic",
        "description": "Forensic reconstruction from the tamper-evident ledger, signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/grounding": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Grounding Gate",
        "operationId": "get_grounding",
        "description": "The Grounding Gate (anti-hallucination buffer, ). Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Grounding Gate",
        "operationId": "post_grounding",
        "description": "The Grounding Gate (anti-hallucination buffer, ). Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/interop": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "EXPORT an EcoCloud constitution to OPA/Rego and AWS Cedar policy text",
        "operationId": "get_interop",
        "description": "EXPORT an EcoCloud constitution to OPA/Rego and AWS Cedar policy text. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "EXPORT an EcoCloud constitution to OPA/Rego and AWS Cedar policy text",
        "operationId": "post_interop",
        "description": "EXPORT an EcoCloud constitution to OPA/Rego and AWS Cedar policy text. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/jurisdiction": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Jurisdiction Control Plane",
        "operationId": "get_jurisdiction",
        "description": "The Jurisdiction Control Plane. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Jurisdiction Control Plane",
        "operationId": "post_jurisdiction",
        "description": "The Jurisdiction Control Plane. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/marketing-claim": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "SIGNED marketing-claim compliance check",
        "operationId": "get_marketing_claim",
        "description": "A SIGNED marketing-claim compliance check. This is the real. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "SIGNED marketing-claim compliance check",
        "operationId": "post_marketing_claim",
        "description": "A SIGNED marketing-claim compliance check. This is the real. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/markov": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Markov Chain Workflow Analyzer",
        "operationId": "get_markov",
        "description": "The Markov Chain Workflow Analyzer. Workflow HEALTH from real transition evidence. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Markov Chain Workflow Analyzer",
        "operationId": "post_markov",
        "description": "The Markov Chain Workflow Analyzer. Workflow HEALTH from real transition evidence. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/matrix": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Governance Matrix",
        "operationId": "get_matrix",
        "description": "The Governance Matrix: BATCH constitution evaluation as one signed operation. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Governance Matrix",
        "operationId": "post_matrix",
        "description": "The Governance Matrix: BATCH constitution evaluation as one signed operation. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/mesh-report": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Signed, offline-verifiable robustness verdict for an agent-mesh",
        "operationId": "get_mesh_report",
        "description": "A signed, offline-verifiable robustness verdict for an agent-mesh. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/meter": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Governed Action Unit",
        "operationId": "get_meter",
        "description": "The Governed Action Unit (GAU) meter. Reports agent-work.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/model-risk": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Per-model Model Risk Packs",
        "operationId": "get_model_risk",
        "description": "Per-model Model Risk Packs (SR 11-7 / EU AI Act / ECB model-risk). Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Per-model Model Risk Packs",
        "operationId": "post_model_risk",
        "description": "Per-model Model Risk Packs (SR 11-7 / EU AI Act / ECB model-risk). Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/netting": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "MULTILATERAL netting/clearing across N parties",
        "operationId": "get_netting",
        "description": "MULTILATERAL netting/clearing across N parties. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "MULTILATERAL netting/clearing across N parties",
        "operationId": "post_netting",
        "description": "MULTILATERAL netting/clearing across N parties. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/notary": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Cross-vendor Notary Hub",
        "operationId": "get_notary",
        "description": "The cross-vendor Notary Hub. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Cross-vendor Notary Hub",
        "operationId": "post_notary",
        "description": "The cross-vendor Notary Hub. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/outcome-forecast": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Bayesian outcome forecasting on SIGNED ACTUALS",
        "operationId": "get_outcome_forecast",
        "description": "Bayesian outcome forecasting on SIGNED ACTUALS. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Bayesian outcome forecasting on SIGNED ACTUALS",
        "operationId": "post_outcome_forecast",
        "description": "Bayesian outcome forecasting on SIGNED ACTUALS. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/outcomes": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Continuous outcome verification",
        "operationId": "get_outcomes",
        "description": "Continuous outcome verification (goal-closure).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Continuous outcome verification",
        "operationId": "post_outcomes",
        "description": "Continuous outcome verification (goal-closure).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/plan": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Goal Mode",
        "operationId": "get_plan",
        "description": "Goal Mode. Turn one objective into a GOVERNED, REVERSIBLE.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/portfolio": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Delivery rollup",
        "operationId": "get_portfolio",
        "description": "Delivery rollup (answers, not charts). Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/posture": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Live compliance posture, signed",
        "operationId": "get_posture",
        "description": "Live compliance posture, signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Live compliance posture, signed",
        "operationId": "post_posture",
        "description": "Live compliance posture, signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/readiness": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Agent Readiness Index",
        "operationId": "get_readiness",
        "description": "The Agent Readiness Index (ARI), signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Agent Readiness Index",
        "operationId": "post_readiness",
        "description": "The Agent Readiness Index (ARI), signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/receipt": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Outcome Receipts",
        "operationId": "get_receipt",
        "description": "Outcome Receipts: a signed, third-party-verifiable proof that a piece of. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Outcome Receipts",
        "operationId": "post_receipt",
        "description": "Outcome Receipts: a signed, third-party-verifiable proof that a piece of. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/redact": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Zero-Trust context redaction",
        "operationId": "get_redact",
        "description": "Zero-Trust context redaction. Replace structured PII.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/reputation": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Signed, verifiable AGENT TRACK RECORD",
        "operationId": "get_reputation",
        "description": "A signed, verifiable AGENT TRACK RECORD. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Signed, verifiable AGENT TRACK RECORD",
        "operationId": "post_reputation",
        "description": "A signed, verifiable AGENT TRACK RECORD. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/resilience": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Governance Resilience Score",
        "operationId": "get_resilience",
        "description": "Governance Resilience Score (proactive red-team of a Constitution). Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Governance Resilience Score",
        "operationId": "post_resilience",
        "description": "Governance Resilience Score (proactive red-team of a Constitution). Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/resolution": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Generative Resolution Plan",
        "operationId": "get_resolution",
        "description": "Generative Resolution Plan (SOP). Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/route": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Deterministic AI-model routing with a SIGNED routing decision",
        "operationId": "get_route",
        "description": "Deterministic AI-model routing with a SIGNED routing decision. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/screen": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Server-side prompt-injection screening with a SIGNED verdict",
        "operationId": "get_screen",
        "description": "Server-side prompt-injection screening with a SIGNED verdict. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/search": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Agent-operable workspace search",
        "operationId": "get_search",
        "description": "Agent-operable workspace search. Lets an agent query the task.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/search-reindex": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Build/refresh the semantic search index",
        "operationId": "get_search_reindex",
        "description": "Build/refresh the semantic search index. Embeds workspace.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/simulate": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Pre-flight what-if for an agent action",
        "operationId": "get_simulate",
        "description": "Pre-flight what-if for an agent action. Runs the.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/spend-authz": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Signed agent PAYMENT-AUTHORIZATION + dispute proof",
        "operationId": "get_spend_authz",
        "description": "Signed agent PAYMENT-AUTHORIZATION + dispute proof. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Signed agent PAYMENT-AUTHORIZATION + dispute proof",
        "operationId": "post_spend_authz",
        "description": "Signed agent PAYMENT-AUTHORIZATION + dispute proof. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/statement": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "SIGNED netting",
        "operationId": "get_statement",
        "description": "A SIGNED netting. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/trace": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Distributed tracing for agent runs",
        "operationId": "get_trace",
        "description": "Distributed tracing for agent runs. Given a correlation id. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/twin": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Cognitive Twin",
        "operationId": "get_twin",
        "description": "A behavioral profile of an agent, learned from its signed history, for drift and anomaly comparison. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/undo": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Reversible execution",
        "operationId": "get_undo",
        "description": "Reversible execution. An agent can undo (soft-delete) or.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/validate": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "MCP tool schema-contract validation with a SIGNED verdict",
        "operationId": "get_validate",
        "description": "MCP tool schema-contract validation with a SIGNED verdict. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/agent/verified-done": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Verified Work OS",
        "operationId": "get_verified_done",
        "description": "Risk-tiered proof-of-completion: reports which verification steps (signature, policy check, tests, evidence, attestation, rollback) an action satisfied for its risk tier. Signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Verified Work OS",
        "operationId": "post_verified_done",
        "description": "Risk-tiered proof-of-completion: reports which verification steps (signature, policy check, tests, evidence, attestation, rollback) an action satisfied for its risk tier. Signed. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agents": {
      "get": {
        "tags": [
          "agent-registry"
        ],
        "summary": "Agents",
        "operationId": "get_agents",
        "description": "GET /api/v1/agents — discover agents registered in the Operant Agent Registry.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agents/register": {
      "get": {
        "tags": [
          "agent-registry"
        ],
        "summary": "Register",
        "operationId": "get_register",
        "description": "POST /api/v1/agents/register — register an agent in the Operant Agent Registry.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agents/verify": {
      "get": {
        "tags": [
          "agent-registry"
        ],
        "summary": "Verify",
        "operationId": "get_verify",
        "description": "GET /api/v1/agents/verify?id=<uuid> — verify an agent's AI-BOM (Agent Bill of Materials).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/analytics-summary": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "CLOSED A/B loop",
        "operationId": "get_analytics_summary",
        "description": "The CLOSED A/B loop. Returns the per-variant conversion funnel.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/checkout": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Checkout",
        "operationId": "get_checkout",
        "description": "POST /api/v1/checkout — agent-initiated checkout.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/credential": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Mint a portable Verifiable Credential of THIS agent's Passport",
        "operationId": "get_credential",
        "description": "Mint a portable Verifiable Credential of THIS agent's Passport. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/creditworthiness": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Lender-facing creditworthiness",
        "operationId": "get_creditworthiness",
        "description": "A lender-facing creditworthiness.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/delegations": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Manage conditional auto-approval grants",
        "operationId": "get_delegations",
        "description": "Manage conditional auto-approval grants.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Manage conditional auto-approval grants",
        "operationId": "post_delegations",
        "description": "Manage conditional auto-approval grants.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/did": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Did",
        "operationId": "get_did",
        "description": "GET /api/v1/did?did=did:flowdesk:... — resolve an Operant agent DID to a W3C DID-Core.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/did-status": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Public credential status",
        "operationId": "get_did_status",
        "description": "Public credential status (hotlist).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/directory": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Acceptance network",
        "operationId": "get_directory",
        "description": "The acceptance network: discover opt-in.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/handover": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Handover",
        "operationId": "get_handover",
        "description": "GET /api/v1/handover — while you were out executive shift summary.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Handover",
        "operationId": "post_handover",
        "description": "GET /api/v1/handover — while you were out executive shift summary.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Health",
        "operationId": "get_health",
        "description": "GET /api/v1/health — versioned health endpoint for agents and uptime monitors.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/messages": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Inter-agent communication",
        "operationId": "get_messages",
        "description": "Inter-agent communication.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Inter-agent communication",
        "operationId": "post_messages",
        "description": "Inter-agent communication.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/passport": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Operant Passport resolver",
        "operationId": "get_passport",
        "description": "Operant Passport resolver. Public.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/pricing": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Pricing",
        "operationId": "get_pricing",
        "description": "GET /api/v1/pricing — machine-readable plans for agents & humans.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/stats": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Stats",
        "operationId": "get_stats",
        "description": "GET /api/v1/stats — a public, live readout of the real system. ANONYMIZED AGGREGATE COUNTS.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/subprocessors": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Machine-readable, versioned, ES256-signed subprocessor graph",
        "operationId": "get_subprocessors",
        "description": "Machine-readable, versioned, ES256-signed subprocessor graph. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Machine-readable, versioned, ES256-signed subprocessor graph",
        "operationId": "post_subprocessors",
        "description": "Machine-readable, versioned, ES256-signed subprocessor graph. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/trials": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Trials",
        "operationId": "get_trials",
        "description": "POST /api/v1/trials — waitlist-mode trial provisioning.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/api/v1/agent/recursive-checkpoint": {
      "get": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Bounded verification of UNBOUNDED audit history",
        "operationId": "get_recursive_checkpoint",
        "description": "Bounded verification of UNBOUNDED audit history. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "agent-governance"
        ],
        "summary": "Bounded verification of UNBOUNDED audit history",
        "operationId": "post_recursive_checkpoint",
        "description": "Bounded verification of UNBOUNDED audit history. Supports ?demo=1 for a real signed sample with no auth. Response is ES256-signed and offline-verifiable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    }
  }
}
