Skip to Content
AgentShield
API Reference

API Reference

The AgentShield HTTP APIs. Two services, two authentication schemes, one error envelope. Rendered from the OpenAPI contracts in the repository.

AgentShield exposes two HTTP APIs on separate origins. They never share authentication.

APIDefault originCallersAuthenticationContract
Gateway APIhttp://127.0.0.1:8081AgentsEd25519 request signaturedocs/api/gateway.openapi.yaml
Control plane APIhttp://127.0.0.1:8080Humans and automation acting for themBearer sessiondocs/api/control-plane.openapi.yaml

Every endpoint in this reference is rendered at build time from those OpenAPI 3.1 files, so the reference cannot list an operation the contract does not define.

Conventions

  • JSON only. Requests and responses are application/json with UTF-8.
  • Versioned paths. Management routes live under /api/v1/...; enforcement routes under /api/v1/runtime/.... Health routes are /health/live and /health/ready on every service.
  • Strict bodies. Unknown fields are rejected with 400 validation_failed.
  • UUID identifiers for agents, policies, approvals, decisions, and executions.
  • Timestamps are RFC 3339 in UTC.
  • Pagination. List routes that page accept limit and an opaque cursor, and return items with next_cursor.
  • Errors use one envelope everywhere. See Error responses.
  • Security headers. Responses carry X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: no-referrer, and Cache-Control: no-store.

Gateway operations

MethodPathSummary
GET/health/liveProcess liveness
GET/health/readyReadiness
POST/api/v1/runtime/authorizeAuthorize one tool call
POST/api/v1/runtime/executeExecute a previously allowed tool call

Control plane operations

MethodPathSummary
GET/health/liveProcess liveness
GET/health/readyReadiness
POST/api/v1/sessionsCreate a human session
GET/api/v1/sessions/currentThe caller's user, organization, role, and session expiry
DELETE/api/v1/sessions/currentEnd the session that made this request
POST/api/v1/sessions/current/passwordChange the caller's password and end their other sessions
GET/api/v1/membersList the organization's members
POST/api/v1/membersAdd a user with a generated temporary password
PATCH/api/v1/members/{userId}Change a member's role or status
POST/api/v1/members/{userId}/invitationEmail a new invitation and close the previous link
POST/api/v1/invitations/lookupWho an open invitation is for
POST/api/v1/invitations/acceptChoose a password and close the invitation
GET/api/v1/alertsContent analysis alerts, newest first
PATCH/api/v1/alerts/{alertId}Acknowledge or resolve an alert
GET/api/v1/evidenceEvidence bundles the event relay stored
GET/api/v1/evidence/{evidenceId}Read one bundle after checking its SHA-256
GET/api/v1/metrics/reliabilityTool reliability over the last N minutes
GET/api/v1/agentsList agents in the caller's organization
POST/api/v1/agentsRegister an agent public key
GET/api/v1/agents/{agentId}Get one agent
POST/api/v1/agents/{agentId}/revokeRevoke an agent and its active credentials
POST/api/v1/agents/{agentId}/suspendSuspend an agent without retiring its key
POST/api/v1/agents/{agentId}/resumeLet a suspended agent call again
POST/api/v1/agents/{agentId}/credentials/rotateAdd a new public key and mark the previous key rotated
GET/api/v1/policiesList policies in the caller's organization
POST/api/v1/policiesCreate a policy and its first immutable version
GET/api/v1/policies/{policyId}Read one policy and the document of its current version
PUT/api/v1/policies/{policyId}Append a new policy version and move the current pointer
GET/api/v1/approvalsList approval requests
POST/api/v1/approvalsRecord an approval request for an existing authorization decision(reserved)
POST/api/v1/approvals/{approvalId}/approveApprove the exact bound payload
POST/api/v1/approvals/{approvalId}/rejectReject an approval request
GET/api/v1/eventsList redacted security events
GET/api/v1/incidentsList security incidents
GET/api/v1/auditList hash-chain links for the caller's organization
GET/api/v1/audit/exportsList exported audit head copies
POST/api/v1/audit/exportsExport the current audit head hash
GET/api/v1/chaos/scenariosList the chaos scenario catalog
GET/api/v1/chaos/experimentsList the 50 most recent experiments
POST/api/v1/chaos/experimentsStart a chaos experiment
GET/api/v1/chaos/experiments/{experimentId}Read one chaos experiment

Reserved operations

The contract reserves POST /api/v1/approvals for a gateway service identity. The control plane does not register it, because the gateway is the only writer of approval requests. Calls return 404.

In addition to the contract, the control plane serves GET /api/v1/events/stream, a server-sent events stream for the console. See Events.

Guides by topic

Was this page helpful?

On this page