API Reference
Tool Execution
The authorize-then-execute flow over HTTP, with complete request and response examples for allow, deny, approval, and adapter results.
A tool call is two signed requests to the gateway. This page walks through both with concrete bodies. For the lifecycle and guarantees, see Tool execution lifecycle.
Rendering diagram…
1. Authorize
{
"agent_id": "3f2b8c1e-6a4d-4f7e-9b21-5c8d0e7a4b13",
"organization_id": "9a7e5d2c-1b3f-4c6a-8e0d-2f4b6a8c0e1d",
"execution_id": "c4d6e8f0-2a4c-4e6a-8c0e-1a3c5e7a9b2d",
"tool_name": "http.request",
"operation": "http.get",
"resource": "https://api.github.com/repos/octo/hello",
"arguments": { "headers": { "Accept": "application/json" } },
"requested_at": "2026-11-30T12:00:00Z",
"idempotency_key": "idem-5f0d2c8e9a1b4c7d9e0f1a2b3c4d5e6f"
}{
"decision_id": "7f1c2a9e-4b3d-4e5f-8a6b-1c2d3e4f5a6b",
"outcome": "allow",
"explanation": {
"policy_id": "2e8d…",
"policy_version": 3,
"matched_rule": "allowed:http.get",
"reason": "allowed"
}
}2. Execute
{
"decision_id": "7f1c2a9e-4b3d-4e5f-8a6b-1c2d3e4f5a6b",
"idempotency_key": "idem-5f0d2c8e9a1b4c7d9e0f1a2b3c4d5e6f",
"arguments": { "headers": { "Accept": "application/json" } }
}For a require_approval decision, add "approval_id" after a person approves it.
{
"decision_id": "7f1c2a9e-4b3d-4e5f-8a6b-1c2d3e4f5a6b",
"outcome": "allow",
"adapter": "http.request",
"result": {
"status": 200,
"headers": { "Content-Type": "application/json; charset=utf-8" },
"truncated": false,
"json": { "id": 1296269, "full_name": "octo/hello" }
},
"analysis": { "status": "clean", "ruleset": "2026.11.1", "verdict": "none", "findings": [] }
}analysis is present only when the gateway has INTELLIGENCE_URL.
Execute errors
| Status | Code | Cause | Retry? |
|---|---|---|---|
| 400 | validation_failed | Body invalid, or the adapter rejected the call (non-canonical URL, host not allowed, blocked address, unsupported argument) | Fix the request; authorize again |
| 403 | forbidden | The decision is deny, or the agent is no longer active | No |
| 404 | not_found | No such decision for this agent | No |
| 409 | approval_required | require_approval without an approved approval | After approval |
| 409 | approval_expired | The approval expired | Authorize again |
| 409 | conflict | Idempotency key or arguments mismatch, approval mismatch or rejected, or a previous attempt failed or was interrupted | Authorize again |
| 500 | internal_error | Adapter timeout ("tool adapter timed out") or a server failure | Authorize again |
| 501 | not_implemented | No adapter for the tool or operation | No |
| 503 | circuit_open | The tool's circuit is open | After 30 s |
Sample adapter
sample.echo ignores arguments and returns its inputs:
{
"decision_id": "…",
"outcome": "allow",
"adapter": "sample.echo",
"result": {
"adapter": "sample.echo",
"label": "sample adapter with no external side effect",
"operation": "sample.echo",
"resource": "demo"
}
}Full contracts
Was this page helpful?