Agent Governance Protocol
API ReferenceDecision APIPolicy

Request policy evaluation

Synchronous when the Prefer header is respond-sync and SLA allows. Must be async when human review is required, external compliance systems are queried, or multiple engines must be combined (§7.2).

POST
/agp/policy-evaluations

Authorization

AuthorizationBearer <token>

In: header

Scope: agp.decision.read, agp.decision.write

Header Parameters

Idempotency-Key?string
Prefer?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agp/policy-evaluations" \  -H "Content-Type: application/json" \  -d '{    "decision_ref": "string",    "evaluated_at": "2019-08-24T14:15:22Z"  }'
{  "evaluation_id": "string",  "decision_ref": "string",  "status": "pending",  "requested_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "context_refs": [    "string"  ],  "evidence_refs": [    "string"  ],  "policy_decision_ref": "string",  "operation_id": "string",  "callback_url": "http://example.com"}
{  "evaluation_id": "string",  "decision_ref": "string",  "status": "pending",  "requested_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "context_refs": [    "string"  ],  "evidence_refs": [    "string"  ],  "policy_decision_ref": "string",  "operation_id": "string",  "callback_url": "http://example.com"}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}