HTTP API reference
All 348 routes the gateway serves, generated from its OpenAPI document by scripts/gen/docs_reference.py. A running gateway serves the same document at /openapi.json and an explorer at /docs.
Two audiences
Agent traffic (/v1/*) is what your application calls on every request: the OpenAI- and Anthropic-compatible proxies, and the guard endpoints that check content and tool calls without proxying. It authenticates as an agent. The operator API (/api/*) is what the web app, the CLI and your scripts use to manage agents, policies, findings and evidence. It takes a bearer token from agentfox admin auth issue.
curl -s http://localhost:8080/v1/guard/tool_call \
-H "Authorization: Bearer $AGENTFOX_API_KEY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AGENTFOX_API_KEY" \
-H "X-AgentFox-Agent: support-triage" \
-d '{"agent": "support-triage", "tool": "tickets.close",
"arguments": {"ticket_id": "T-1042"},
"provenance": {"ticket_id": "user"},
"intent": "close tickets the customer asked to close"}'HTTP/1.1 200 OK
{"verdict":"allow", "effective_verdict":"block", "mode":"observe",
"rules_fired":[{"rule_id":"capability.default_deny", "effect":"block", "mode":"observe", ...}],
"reason":"'tickets.close' has not been granted to this agent yet (default deny). Allow it in
the dashboard (the agent's Access tab), or run `agentfox permit grant <agent> tickets.close`.",
"explanation":{..., "dispute":{"endpoint":"POST /api/guardrails/feedback", ...}}}A verdict is a 200 with a body, not an error status: your code reads verdict and decides. On a fresh install every library watches, so verdict is allow and effective_verdict says what it would have done: nothing is granted yet, so default-deny would refuse it, and the reason says how to fix it. Once agentfox policy enforce tool-containment has run, the same call returns "verdict":"block". The key is an agent key (nom_agt_…) or a workspace key (nom_api_…); a local gateway with authentication off accepts the call without one.
Worked examples for each endpoint are in the guides: Any language: the gateway covers the proxies and guard calls; Approvals covers polling an escalation.
Notes on the main routes
Proxy request and response headers, status codes (403 blocked, 428 held, 429 shed, 503 degraded) and streaming modes are in Configuration: gateway requests.
/v1/guard/tool_call
| Field | What it does |
|---|---|
agent, tool, arguments | Required. For an MCP tool the key is mcp:<server>/<tool>. |
provenance | Argument name to source (user, retrieved, tool_result, …). Declared provenance is believed. |
intent, session_id | The declared task; the conversation. |
messages | The conversation that led to the call (OpenAI or Anthropic shape). An undeclared argument is traced to where it appears in it. With neither this nor provenance, arguments are treated as untainted. |
trust | Message index to source, for messages you vouch for. |
prior_tools, prior_steps | Your own step history, for loop detection. |
in_process | What you will do with the verdict: enforced (default), all or none. Findings then say whether the call was really stopped. |
waive_ungranted | While the agent holds no grant at all, a missing grant is recorded, not applied; listed in waived_rules. |
declare | The tool's declaration as the model saw it; a new tool is registered with an inferred impact. |
Every decision is a 200 with a verdict. An escalate carries approval_id and a reason: do not run the tool yet.
Redeeming an approval
Poll GET /api/approvals/{id} (an agent key may read its own agent's). Once it is approved, repeat the same call: on the proxy with X-AgentFox-Approval: apr_… after its 428, on the guard routes with approval_id in the body. It runs once.
/v1/mcp/call
Send server, tool, arguments, optional provenance, and the result you got: the gateway never dials the server. It answers with result (possibly redacted), key (mcp:<server>/<tool>), allowed and the pre and post decisions, or 403 when it refuses. The side effect has already happened by then, so authorise a tool that changes something first with /v1/guard/tool_call.
POST /api/mcp-servers/{name}/tools registers a listing. A changed tool is held (calls refused as mcp.schema_drift) and filed as a proposal; "accept_changes": true is the signed-in person's approval, and the tool stays awaiting_second_approver until a different person approves (here or POST /api/proposals/{id}/decide).
Agent credentials
POST /api/identities/{id}/credentials?ttl_days=90 (security, admin or owner) returns an agent key (nom_agt_…) once. Find the identity whose principal is agent:<slug> with GET /api/identities. On /v1 an unknown key is treated as no credential, not refused.
/api/entitlement/filter
Takes subject, chunks (each source, text) and optional purpose, agent, trace_id. Returns chunks (what this person may see), principal, candidates, visible, withheld, reasons (counts such as not_entitled), over_permission and withheld_sources. Call it between retrieval and generation.
/api/guardrails/suppressions
Fields and rules are in Detectors: suppressions (scope agent or global, exact, ttl_days 1 to 365).
Limits
- The proxy has no route for the OpenAI Responses API.
- A streamed Anthropic reply carries text only; do not stream tool use through
/v1/messages. - Provenance and trust you declare are believed: a caller that labels a tool result as
usergets auserdecision.
Agent traffic
/api/health · Agent traffic (agent credential)
GET /health
The same payload as `/api/health`, at the path probes default to.
/api/metrics · Agent traffic (agent credential)
GET /metrics
Prometheus exposition.
/v1/chat · Agent traffic (agent credential)
POST /v1/chat/completions
OpenAI-compatible inline proxy
/v1/guard · Agent traffic (agent credential)
POST /v1/guard/agent_message
Authorise an inter-agent message
| Body field | Type |
|---|---|
sender required | string |
content required | string |
recipient | string |
nonce | string |
timestamp | number |
signature | string |
session_id | string |
POST /v1/guard/input
Enforce on content without proxying.
| Body field | Type |
|---|---|
agent required | string |
content required | string |
surface | string |
taint_source | string |
intent | string |
session_id | string |
trace_id | string |
environment | string |
context | array |
completion | object |
usage | object |
tool | string |
error | string |
approval_id | string |
POST /v1/guard/memory_write
Authorise a memory write
| Body field | Type |
|---|---|
agent required | string |
content required | string |
subject | string |
taint_source | string |
provenance | object |
verified_by | string |
ttl_seconds | integer |
session_id | string |
POST /v1/guard/output
Enforce on content without proxying.
| Body field | Type |
|---|---|
agent required | string |
content required | string |
surface | string |
taint_source | string |
intent | string |
session_id | string |
trace_id | string |
environment | string |
context | array |
completion | object |
usage | object |
tool | string |
error | string |
approval_id | string |
POST /v1/guard/tool_call
Authorise a tool call.
| Body field | Type |
|---|---|
agent required | string |
tool required | string |
arguments | object |
provenance | object |
messages | array |
trust | object |
intent | string |
prior_tools | array |
prior_steps | array |
session_id | string |
environment | string |
approval_id | string |
redeem_approved | boolean |
in_process | string |
waive_ungranted | boolean |
declare | object |
principal | string | object |
/v1/hooks · Agent traffic (agent credential)
POST /v1/hooks/copilot-studio/{connection_id}/analyze-tool-execution
Each tool a generative-orchestration agent plans to run, before it runs.
Parameters: connection_id (path, required)
POST /v1/hooks/copilot-studio/{connection_id}/validate
Called when an admin saves the endpoint in the Power Platform admin center: answers OK when the connection exists and the token is the configured app's.
Parameters: connection_id (path, required)
POST /v1/hooks/retell/{connection_id}
A Retell custom function's URL. The call is decided after its signature is verified with the connection's Retell API key; a refusal is answered with 200 and the sentence for the agent to say (a non-2xx would be retried, then read to the model as an error), an allowed call is forwarded to the tool server with Retell's own body and signature, so the server's verification still holds.
Parameters: connection_id (path, required), tool (query)
POST /v1/hooks/retell/{connection_id}/webhook
The Retell agent's webhook URL: ``call_ended`` and ``call_analyzed`` record the call's transcript (once, whichever comes first); every other event is acknowledged. Verified like the custom function, with the connection's Retell API key.
Parameters: connection_id (path, required)
POST /v1/hooks/vapi/{connection_id}
Vapi's server URL for a tool (or the assistant): ``tool-calls`` messages are governed call by call, everything else Vapi sends is acknowledged and ignored.
Parameters: connection_id (path, required)
/v1/mcp · Agent traffic (agent credential)
POST /v1/mcp/call
Govern one MCP call for callers that are not in-process Python.
| Body field | Type |
|---|---|
server required | string |
tool required | string |
arguments | object |
provenance | object |
result | any |
/v1/messages · Agent traffic (agent credential)
POST /v1/messages
Anthropic-compatible inline proxy
/v1/traces · Agent traffic (agent credential)
POST /v1/traces
OTLP/HTTP trace ingest
Operator API
/api/account · Operator API (bearer token)
POST /api/account/delete
Delete the caller's account and the whole workspace it owns. Irreversible.
| Body field | Type |
|---|---|
confirm | string |
/api/agent-controls · Operator API (bearer token)
GET /api/agent-controls
Kill-switch/quarantine state per agent.
/api/agent-messages · Operator API (bearer token)
GET /api/agent-messages
List Messages
Parameters: sender (query), limit (query)
/api/agents · Operator API (bearer token)
GET /api/agents
Every agent. An agent whose project was disconnected (status ``removed``) is left out unless ``include_removed``: it is history, not part of the workspace.
Parameters: registered (query), environment (query), include_removed (query)
POST /api/agents
Create Agent
| Body field | Type |
|---|---|
slug required | string |
name | string |
purpose | string |
owner_email | string |
owner_team | string |
environment | string |
risk_tier | string |
declared_models | array |
declared_tools | array |
data_classes | array |
framework | string |
project | string |
POST /api/agents/reject
Dismiss several proposed agents at once ("Dismiss all" on a long Proposed list): the same state change and ledger entry as dismissing each. Ids that are not drafts are skipped.
| Body field | Type |
|---|---|
ids required | array |
POST /api/agents/{agent_id}/approve
Approve Agent
Parameters: agent_id (path, required)
POST /api/agents/{agent_id}/approve-system
Approve a proposed agent and every proposed agent it hands work to, in one step.
Parameters: agent_id (path, required)
POST /api/agents/{agent_id}/reject
Reject Agent
Parameters: agent_id (path, required)
DELETE /api/agents/{slug}
Remove one agent from the dashboard (a duplicate, or one that is gone), the way disconnecting its project removes each of its agents: its guardrails recorded and emptied, its tool permissions revoked, what init declared for it cleared. Its history (traffic, issues, audit) is kept, and `agentfox init` or ``agentfox up`` proposes it again. The rest of its project stays.
Parameters: slug (path, required)
GET /api/agents/{slug}
Get Agent
Parameters: slug (path, required)
PATCH /api/agents/{slug}
Update Agent
Parameters: slug (path, required)
| Body field | Type |
|---|---|
name | string |
owner_email | string |
owner_team | string |
risk_tier | string |
purpose | string |
GET /api/agents/{slug}/access
Get Access
Parameters: slug (path, required), days (query)
POST /api/agents/{slug}/access
Grant a tool, or change the existing grant for it (one grant per tool key).
Parameters: slug (path, required)
| Body field | Type |
|---|---|
tool_key required | string |
requires_approval | boolean |
max_taint | string |
constraints | object |
actions | array |
impact | string |
expires_at | string |
DELETE /api/agents/{slug}/access/{capability_id}
Remove Access
Parameters: slug (path, required), capability_id (path, required)
GET /api/agents/{slug}/breaker
The agent's circuit breaker: settings, state, and the current window's rate.
Parameters: slug (path, required)
PUT /api/agents/{slug}/breaker
Change when the breaker trips and what it does. The same role as the kill switch: a breaker that pauses the agent is one.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
mode | string |
window_seconds | number |
min_calls | number |
block_ratio | number |
cooldown_seconds | number |
probe_calls | number |
POST /api/agents/{slug}/breaker/reset
Close the breaker now and let the agent's calls through.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
reason | string |
GET /api/agents/{slug}/control
One agent's pause/stop state (who, when, why) and its control history, newest first, read from the audit chain.
Parameters: slug (path, required), limit (query)
POST /api/agents/{slug}/enforcement
Switch everything that protects this agent from watching to enforcing.
Parameters: slug (path, required)
POST /api/agents/{slug}/enforcement/preview
What turning enforcement on for this agent switches, and what it would stop.
Parameters: slug (path, required)
GET /api/agents/{slug}/features
Get Agent Features
Parameters: slug (path, required)
DELETE /api/agents/{slug}/features/checks/{key}
Inherit Check
Parameters: slug (path, required), key (path, required)
DELETE /api/agents/{slug}/features/protections/{key}
Inherit Protection
Parameters: slug (path, required), key (path, required)
POST /api/agents/{slug}/kill
Stop an agent now. Requires the stronger role — this is an incident action.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
reason | string |
GET /api/agents/{slug}/lineage
Agent Lineage
Parameters: slug (path, required), depth (query)
GET /api/agents/{slug}/map
Which guardrails apply at each step of this agent's requests, with recent traffic.
Parameters: slug (path, required)
GET /api/agents/{slug}/platform-connections
List Connections
Parameters: slug (path, required)
POST /api/agents/{slug}/platform-connections
Register the agent as running on Vapi, Retell or Copilot Studio. The answer's ``hook_url`` is what to paste into the platform; a Vapi ``secret`` made here is shown once.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
platform required | string |
upstream_url | string |
secret | string |
config | object |
DELETE /api/agents/{slug}/platform-connections/{connection_id}
Disable a connection. Its hook URL answers 404 from then on; the row is kept for the audit trail.
Parameters: slug (path, required), connection_id (path, required)
GET /api/agents/{slug}/posture
Agent Posture
Parameters: slug (path, required)
GET /api/agents/{slug}/protection
Get Protection
Parameters: slug (path, required)
POST /api/agents/{slug}/protection
Save Protection
Parameters: slug (path, required)
| Body field | Type |
|---|---|
protections | object |
message | string |
words | array |
avoid | string |
allowed | string |
POST /api/agents/{slug}/protection/preview
Replay this agent's last week against the protections, as if enforcing.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
protections | object |
message | string |
words | array |
avoid | string |
allowed | string |
POST /api/agents/{slug}/quarantine
Stop an agent while you investigate. Reversible and audited.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
reason | string |
POST /api/agents/{slug}/restore-guardrails
Put back the guardrails an agent had when its project was disconnected.
Parameters: slug (path, required)
POST /api/agents/{slug}/resume
Restart a stopped agent. Deliberately the same role as `kill` — restarting something that was stopped for cause is not a lesser decision than stopping it.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
reason | string |
GET /api/agents/{slug}/setup
What this project still needs, for the banner a project's pages show.
Parameters: slug (path, required)
GET /api/agents/{slug}/signing-key
Key Status
Parameters: slug (path, required)
POST /api/agents/{slug}/signing-key
Mint (or rotate) an agent's HMAC signing key. Shown once — like an API token, nothing after this call can retrieve the raw value again.
Parameters: slug (path, required)
GET /api/agents/{slug}/tool-paths
The tool-call paths an agent took, which are new, and which no test expects.
Parameters: slug (path, required), days (query), baseline_days (query)
POST /api/agents/{slug}/tool-paths/tests
A regression case expecting this path, so the suite checks the agent keeps it.
Parameters: slug (path, required)
| Body field | Type |
|---|---|
path required | array |
trace_id | string |
suite | string |
GET /api/agents/{slug}/tools
The tools this agent can be tested with: granted, in its code, or seen called, each with where it is known from and a blank argument skeleton.
Parameters: slug (path, required)
/api/alerts · Operator API (bearer token)
DELETE /api/alerts/slack
Stop sending this tenant's alerts to its own Slack channel.
GET /api/alerts/slack
Whether this tenant has its own Slack channel, and whether alerts can leave at all.
PUT /api/alerts/slack
Send this tenant's monitor alerts to its own Slack incoming webhook.
| Body field | Type |
|---|---|
url required | string |
min_severity | string |
POST /api/alerts/slack/test
Send a test message to every channel this tenant's alerts go to, now.
/api/answerability · Operator API (bearer token)
GET /api/answerability/boundaries
Every declared knowledge boundary, or one agent's with `?agent=<slug>`.
Parameters: agent (query)
PUT /api/answerability/boundary
Write Boundary
| Body field | Type |
|---|---|
agent required | string |
systems_of_record | array |
coverage_months | integer |
coverage_start | string |
entity_types | array |
answerable_types | array |
out_of_scope_topics | array |
freshness_hours | integer |
mode | string |
POST /api/answerability/check
Would this question be refused, and what would we say instead?
| Body field | Type |
|---|---|
agent required | string |
question required | string |
known_entities | array |
GET /api/answerability/report
Abstention and over-refusal side by side.
Parameters: days (query)
/api/approvals · Operator API (bearer token)
GET /api/approvals
List Approvals
Parameters: status (query)
GET /api/approvals/{approval_id}
One approval. An operator may read any; an agent key only its own agent's.
Parameters: approval_id (path, required)
POST /api/approvals/{approval_id}/approve
Approve
Parameters: approval_id (path, required)
| Body field | Type |
|---|---|
rationale | string |
POST /api/approvals/{approval_id}/deny
Deny
Parameters: approval_id (path, required)
| Body field | Type |
|---|---|
rationale | string |
/api/attention · Operator API (bearer token)
GET /api/attention
What needs a human, ranked. The home page is built from this.
Parameters: hours (query)
/api/audit · Operator API (bearer token)
POST /api/audit/checkpoint
Checkpoint
GET /api/audit/entries
Audit Entries
Parameters: limit (query), action (query)
POST /api/audit/verify
Verify Chain
Parameters: start_seq (query), end_seq (query)
/api/auth · Operator API (bearer token)
POST /api/auth/github/provision
Find-or-create the user behind a GitHub identity, and mint them a token.
| Body field | Type |
|---|---|
github_user_id required | string |
github_login required | string |
email required | string |
name | string |
POST /api/auth/logout
Revoke the bearer token this request presents — the dashboard's Sign Out.
POST /api/auth/oauth/provision
Find-or-create the user behind a Google or Microsoft sign-in, and mint a token.
| Body field | Type |
|---|---|
provider required | string |
subject required | string |
email | string |
name | string |
/api/authorizers · Operator API (bearer token)
GET /api/authorizers
Get Authorizers
POST /api/authorizers
Register (or update) an access-check endpoint.
| Body field | Type |
|---|---|
key required | string |
name required | string |
url required | string |
tools | array |
agents | array |
timeout_ms | integer |
fail_mode | string |
on_deny | string |
require_principal | boolean |
cache_seconds | integer |
auth_header | string |
enabled | boolean |
auth_secret | string |
clear_secret | boolean |
DELETE /api/authorizers/{key}
Remove Authorizer
Parameters: key (path, required)
POST /api/authorizers/{key}/enabled
Toggle Authorizer
Parameters: key (path, required)
| Body field | Type |
|---|---|
enabled required | boolean |
reason | string |
POST /api/authorizers/{key}/test
Ask the access check about one example call and show its answer.
Parameters: key (path, required)
| Body field | Type |
|---|---|
subject required | string |
groups | array |
agent | string |
tool required | string |
arguments | object |
/api/board · Operator API (bearer token)
GET /api/board
Board
/api/business · Operator API (bearer token)
POST /api/business/compile
Compile written policy into rules and questions. Nothing is saved.
| Body field | Type |
|---|---|
text required | string |
agent | string |
tool | string |
GET /api/business/rules
List Business Rules
POST /api/business/rules
Save Business Rule
| Body field | Type |
|---|---|
definition required | object |
agent | string |
DELETE /api/business/rules/{key}
Remove Business Rule
Parameters: key (path, required)
GET /api/business/rules/{key}
Get Business Rule
Parameters: key (path, required)
PUT /api/business/rules/{key}
Change a rule's thresholds in place. It keeps its mode; changing an enforcing rule changes what is approved right now, so it needs the production role.
Parameters: key (path, required)
| Body field | Type |
|---|---|
definition required | object |
GET /api/business/rules/{key}/history
Every saved version of the rule, newest first, with its bands.
Parameters: key (path, required)
POST /api/business/rules/{key}/mode
Watch or enforce a business rule. Enforcing needs a recorded simulation of the rule as it stands (``POST …/simulate``), the same gate as a policy pack's; going back to watching never does.
Parameters: key (path, required)
| Body field | Type |
|---|---|
mode required | string |
POST /api/business/rules/{key}/simulate
Replay the last 7 days of calls through the rule as if it enforced, and record it: what Start blocking needs first, as for any library.
Parameters: key (path, required)
POST /api/business/rules/{key}/versions/{version}/restore
Put an earlier version's bands back, as a new version in the rule's current mode.
Parameters: key (path, required), version (path, required)
/api/catalog · Operator API (bearer token)
GET /api/catalog/controls
Every control's id and title, from the catalog this build ships.
/api/compliance · Operator API (bearer token)
GET /api/compliance/status
Compliance Status
Parameters: framework (query)
/api/controls · Operator API (bearer token)
GET /api/controls
List Controls
POST /api/controls/compute
Compute Controls
Parameters: window_days (query)
POST /api/controls/sync
Load the static control catalog and obligation calendar from YAML into this tenant's control-plane DB. `agentfox admin catalog sync` does the same thing from the CLI against whatever DB it's pointed at — this is the same idempotent upsert, reachable without shell access to the deployment, so a freshly provisioned org isn't stuck at "0 controls, mapped to seven frameworks" with no way to fix it from the product itself.
GET /api/controls/{key}
One control: what it checks, the evidence computed for it, where it is mapped, and every attestation made against it.
Parameters: key (path, required)
POST /api/controls/{key}/reviews
Attest one control against one framework. The reviewer is always the caller.
Parameters: key (path, required)
| Body field | Type |
|---|---|
framework required | string |
outcome required | string |
note | string |
/api/coverage · Operator API (bearer token)
GET /api/coverage/threats
Every published threat, and what this deployment actually does about it.
Parameters: window_days (query)
/api/credentials · Operator API (bearer token)
POST /api/credentials/{credential_id}/revoke
Revoke
Parameters: credential_id (path, required)
/api/custom-models · Operator API (bearer token)
GET /api/custom-models
Get Custom Models
POST /api/custom-models
Register (or update) a classifier endpoint as a detector.
| Body field | Type |
|---|---|
key required | string |
name required | string |
url required | string |
surfaces | array |
labels | object |
entity_prefix | string |
threshold | number |
timeout_ms | integer |
fail_mode | string |
auth_header | string |
enabled | boolean |
auth_secret | string |
clear_secret | boolean |
effect | string |
reason | string |
DELETE /api/custom-models/{key}
Remove Custom Model
Parameters: key (path, required)
POST /api/custom-models/{key}/enabled
Toggle Custom Model
Parameters: key (path, required)
| Body field | Type |
|---|---|
enabled required | boolean |
reason | string |
POST /api/custom-models/{key}/test
Send one text to a registered model and show what it would report. Records nothing. A model that cannot answer is reported, not raised.
Parameters: key (path, required)
| Body field | Type |
|---|---|
text required | string |
surface | string |
/api/custom-rules · Operator API (bearer token)
GET /api/custom-rules
Get Custom Rules
POST /api/custom-rules
Post Custom Rule
| Body field | Type |
|---|---|
key required | string |
name required | string |
kind | string |
polarity | string |
entries | array |
examples | array |
description | string |
surfaces | array |
agents | array |
case_sensitive | boolean |
sequence | SequenceSpec |
condition | ConditionSpec |
validator | ValidatorRef |
enabled | boolean |
effect | string |
message | string |
on_block | string |
severity | string |
GET /api/custom-rules/fields
The arguments a tool is known to take, to suggest as a condition's field.
Parameters: tool (query, required)
POST /api/custom-rules/try
Match one text against a rule that has not been saved. Records nothing.
| Body field | Type |
|---|---|
rule required | object |
text required | string |
surface | string |
tool | string |
DELETE /api/custom-rules/{key}
Remove Custom Rule
Parameters: key (path, required)
GET /api/custom-rules/{key}/history
Every saved version of a rule's words, patterns or condition, with what changed.
Parameters: key (path, required)
POST /api/custom-rules/{key}/versions/{version}/restore
Put an earlier version of a rule's definition back, as a new version.
Parameters: key (path, required), version (path, required)
/api/detectors · Operator API (bearer token)
GET /api/detectors
Which detectors exist, which are live, and how fast they are.
POST /api/detectors/{key}
Switch a detector on or off for this workspace. Turning one on that is not installed is refused: it would look enabled and check nothing.
Parameters: key (path, required)
| Body field | Type |
|---|---|
enabled required | boolean |
reason | string |
POST /api/detectors/{key}/pull
Download the model weights this detector loads, in a background job.
Parameters: key (path, required)
/api/discovery · Operator API (bearer token)
POST /api/discovery/scan
Sweep: lineage, unowned agents, registry drift, identity posture, delegation shape.
GET /api/discovery/shadow
Shadow Agents
Parameters: window_days (query)
POST /api/discovery/submit
Submit a redacted local scan for review
| Body field | Type |
|---|---|
source required | string |
label | string |
files_scanned | integer |
frameworks | array |
coverage | number |
counts | object |
sites | array |
agents | array |
agent_edges | array |
/api/entitlement · Operator API (bearer token)
POST /api/entitlement/filter
Return only what this human may see, and record what was withheld.
| Body field | Type |
|---|---|
subject required | string |
agent | string |
chunks | array |
purpose | string |
trace_id | string |
record | boolean — Persist what was withheld. |
GET /api/entitlement/grants
List Grants
POST /api/entitlement/grants
Add Grant
| Body field | Type |
|---|---|
resource required | string — Matches a chunk's source; globs allowed. |
principal required | string |
principal_kind | string |
classes | array |
purposes | array |
residency | string |
GET /api/entitlement/over-permission
How much more the agent can reach than its callers are entitled to.
Parameters: days (query)
GET /api/entitlement/principals
List Principals
PUT /api/entitlement/principals
Put Principal
| Body field | Type |
|---|---|
subject required | string — Stable IdP identifier — an OIDC `sub`, employee id. |
agent | string |
display | string |
groups | array |
clearances | array |
purposes | array |
residency | string |
/api/escalation · Operator API (bearer token)
GET /api/escalation/conversations/{session_id}
The transcript plus why the policy did or didn't fire on it.
Parameters: session_id (path, required)
GET /api/escalation/handoffs
List Handoffs
Parameters: status (query), agent (query)
POST /api/escalation/handoffs/{handoff_id}/acknowledge
Acknowledge
Parameters: handoff_id (path, required)
GET /api/escalation/missed
**The 31% control.** Conversations that qualified for a hand-off and got none.
Parameters: since_hours (query), agent (query)
GET /api/escalation/policy
Read Policy
Parameters: agent (query)
PUT /api/escalation/policy
Write Policy
| Body field | Type |
|---|---|
agent | string |
conditions | object |
owner_role | string |
sla_minutes | integer |
mode | string |
GET /api/escalation/report
Report
Parameters: since_hours (query), agent (query)
POST /api/escalation/scan
Run detection and act on it: findings, retroactive hand-offs, SLA breaches.
Parameters: since_hours (query), agent (query)
POST /api/escalation/turns
Record one turn with its signals.
| Body field | Type |
|---|---|
session_id required | string |
agent | string |
trace_id | string |
user_text | string |
agent_text | string |
escalated | boolean |
failed | boolean |
confidence | number |
/api/eval · Operator API (bearer token)
GET /api/eval/annotations/queue
Eval results a human should look at: score within `band` of the scorer's own pass/fail threshold, or scorers disagreeing on the same case — both are exactly the shape a human should review rather than trust blindly, not a finding-in-itself the way a failed scorer already is.
Parameters: run_id (query), band (query), limit (query)
GET /api/eval/drift
Read-only. Viewing drift persists nothing, so the number of drift findings measures how often the agent drifted, not how often someone looked. Recording is the scheduled `drift.check` job (or `agentfox report drift` locally).
Parameters: agent (query, required), scorer (query)
POST /api/eval/gate
The CI entry point. A gate that fails answers **412** with the same body (``passed: false``, the regressions, JUnit and SARIF), so ``curl --fail`` and any HTTP client fail the build on it. It answered 200 with ``passed: false``, and the snippet's ``curl -s`` passed every build.
| Body field | Type |
|---|---|
suite required | string |
target | object |
scorers | array |
baseline_run_id | string |
thresholds | object |
min_pass_rate | number |
POST /api/eval/online
Run Online
| Body field | Type |
|---|---|
agent required | string |
scorers | array |
since_days | integer |
rate | number |
POST /api/eval/results/{result_id}/annotate
Record a human's judgment on a borderline eval result. Requires a note — same reasoning as Finding's own suppress/resolve discipline (registry.py's patch_finding): a one-click verdict with nothing recorded is how a real disagreement about scorer correctness disappears without anyone having actually looked.
Parameters: result_id (path, required)
| Body field | Type |
|---|---|
verdict | string |
note required | string |
GET /api/eval/runs
List Runs
Parameters: suite (query), limit (query)
POST /api/eval/runs
Create Run
| Body field | Type |
|---|---|
suite required | string |
target | object |
scorers | array |
baseline_run_id | string |
runner | string |
GET /api/eval/runs/{run_id}
Get Run
Parameters: run_id (path, required)
GET /api/eval/scorers
Scorers
GET /api/eval/slos
Slos
Parameters: agent (query)
POST /api/eval/slos
Declare a reliability target for one agent+scorer pair.
| Body field | Type |
|---|---|
agent required | string |
scorer required | string |
objective | string |
window | string |
target | number |
GET /api/eval/suites
List Suites
POST /api/eval/suites
Create Suite
| Body field | Type |
|---|---|
key required | string |
name | string |
description | string |
tags | array |
GET /api/eval/suites/{key}
Get Suite
Parameters: key (path, required)
POST /api/eval/suites/{key}/cases
Add Case
Parameters: key (path, required)
| Body field | Type |
|---|---|
input | object |
expected | object |
context | object |
labels | array |
split | string |
POST /api/eval/suites/{key}/cases/from-trace
Promote a production failure into a regression test.
Parameters: key (path, required), trace_id (query, required)
/api/evidence · Operator API (bearer token)
GET /api/evidence
List Evidence
POST /api/evidence
Enqueues through jobs_db rather than calling evidence.build() directly, and processes it within this same request — see jobs_db's own module docstring for why same-request processing, not a deferred worker, is the honest fit here. A transient failure gets one automatic retry later, with backoff, and this returns 202 queued_for_retry meanwhile; a permanent one is a real `Job` row with status="dead" a human can find via GET /jobs, not a bare 500.
| Body field | Type |
|---|---|
agents | array |
controls | array |
period_from | string |
period_to | string |
GET /api/evidence/{package_id}/download
Download Evidence
Parameters: package_id (path, required)
/api/export · Operator API (bearer token)
GET /api/export/siem
Export Siem
Parameters: format (query), since_days (query), limit (query)
/api/features · Operator API (bearer token)
GET /api/features
Get Features
POST /api/features/checks/{key}
Switch a check on or off for every project, or for one. Switching on one that is not installed is refused: it would look on and check nothing.
Parameters: key (path, required)
| Body field | Type |
|---|---|
enabled required | boolean |
agent | string |
reason | string |
POST /api/features/protections/{key}
Set Protection
Parameters: key (path, required)
| Body field | Type |
|---|---|
level | string |
agent | string |
open_to_projects | boolean |
reason | string |
/api/findings · Operator API (bearer token)
GET /api/findings
List Findings
Parameters: status (query), severity (query), type (query), agent (query), limit (query)
GET /api/findings/types
Every finding type: its title, default severity, what it means and who raises it.
GET /api/findings/{finding_id}
Get Finding
Parameters: finding_id (path, required)
PATCH /api/findings/{finding_id}
Patch Finding
Parameters: finding_id (path, required)
| Body field | Type |
|---|---|
status required | string |
suppression_reason | string |
note | string |
POST /api/findings/{finding_id}/remedies/{key}
Take one of the issue's actions. Audited; the issue closes itself if the condition it is about cleared.
Parameters: finding_id (path, required), key (path, required)
| Body field | Type |
|---|---|
inputs | object |
/api/frameworks · Operator API (bearer token)
GET /api/frameworks
Frameworks
GET /api/frameworks/{key}
One framework: its requirements, the controls mapped to each with live status and attestation, its dated obligations, and its declared gaps.
Parameters: key (path, required)
/api/guardrails · Operator API (bearer token)
GET /api/guardrails/feedback
List Feedback
Parameters: label (query), status (query), trace_id (query), limit (query)
POST /api/guardrails/feedback
"This was wrong", attached to the decision it is about.
| Body field | Type |
|---|---|
decision_id required | string |
label required | string — false_positive | true_positive | false_negative |
detector_key | string |
entity_type | string |
note | string |
GET /api/guardrails/latency
Per-detector and per-agent p50/p95/max, plus how often the budget degraded.
Parameters: agent (query), days (query)
GET /api/guardrails/precision
Per-detector precision with the label count beside it.
Parameters: agent (query), days (query)
GET /api/guardrails/recommendations
Threshold suggestions, including the honest refusal to make one.
Parameters: days (query)
GET /api/guardrails/suppressions
List Suppressions
Parameters: agent (query)
POST /api/guardrails/suppressions
Accept a false positive as a scoped, expiring exception.
| Body field | Type |
|---|---|
feedback_id required | string |
scope | string — agent | global |
ttl_days | integer |
exact | boolean — suppress only this exact matched text |
reason | string |
DELETE /api/guardrails/suppressions/{suppression_id}
Delete Suppression
Parameters: suppression_id (path, required)
/api/health · Operator API (bearer token)
GET /api/health
Liveness, plus what is currently not being checked.
/api/identities · Operator API (bearer token)
GET /api/identities
List Identities
POST /api/identities/{identity_id}/capabilities
Add Capability
Parameters: identity_id (path, required)
| Body field | Type |
|---|---|
tool_key required | string |
actions | array |
constraints | object |
requires_approval | boolean |
max_taint | string |
POST /api/identities/{identity_id}/check
Check
Parameters: identity_id (path, required)
| Body field | Type |
|---|---|
tool_key required | string |
action | string |
arguments | object |
argument_taint | object |
POST /api/identities/{identity_id}/credentials
Issue
Parameters: identity_id (path, required), ttl_days (query)
POST /api/identities/{identity_id}/rotate
Rotate
Parameters: identity_id (path, required), overlap_hours (query)
/api/import · Operator API (bearer token)
POST /api/import/{tool}
Apply Import
Parameters: tool (path, required)
| Body field | Type |
|---|---|
source required | string |
skip | array |
files | object |
POST /api/import/{tool}/plan
Plan Import
Parameters: tool (path, required)
| Body field | Type |
|---|---|
source required | string |
skip | array |
files | object |
/api/integrations · Operator API (bearer token)
POST /api/integrations/github/connect
Connect
| Body field | Type |
|---|---|
access_token required | string |
GET /api/integrations/github/repos
List Repos
POST /api/integrations/github/scan
Trigger Scan
| Body field | Type |
|---|---|
repo_full_name required | string |
ref | string |
GET /api/integrations/github/scans/{scan_id}
Get Scan
Parameters: scan_id (path, required)
POST /api/integrations/github/scans/{scan_id}/accept
Approve every draft one scan proposed, in one step.
Parameters: scan_id (path, required)
POST /api/integrations/github/webhook
GitHub push webhook: a signed push to a monitored repository queues a rescan.
POST /api/integrations/github/webhook-secret
Create or replace the GitHub connection's push-webhook secret (shown once).
POST /api/integrations/hosted-api/scan
Scan Hosted Api
| Body field | Type |
|---|---|
endpoint_url required | string |
docs_url | string |
openapi_spec_url | string |
purpose | string |
/api/jobs · Operator API (bearer token)
GET /api/jobs
Includes dead-lettered jobs by default — that's the point (jobs.py's own docstring: the dead letter is public state, not a log line an operator has to know to go look for).
Parameters: kind (query), status (query), limit (query)
GET /api/jobs/{job_id}
Get Job
Parameters: job_id (path, required)
POST /api/jobs/{job_id}/retry
Retry Job
Parameters: job_id (path, required)
/api/judgment · Operator API (bearer token)
GET /api/judgment/posture
What is in force, what may be changed, and what the deployment forbids.
PUT /api/judgment/posture
Replace the posture, refusing anything the deployment does not permit.
| Body field | Type |
|---|---|
tiers | array — Tier names to enable. 'deterministic' is implicit and always on. |
pii_egress | string — block | redact | allow |
fail_closed | boolean |
backend | string — local | remote | auto |
reason | string — Why this change is being made. Required — it is the field an investigation actually reads. |
confirm_egress | boolean — Required when the change starts sending payloads off this machine, or loosens how personal data is handled on the way. |
/api/legal-holds · Operator API (bearer token)
POST /api/legal-holds
Place Hold
| Body field | Type |
|---|---|
scope | object |
reason required | string |
POST /api/legal-holds/{hold_id}/release
Lift a hold, so the purge reaches what it preserved. Audited like placing one.
Parameters: hold_id (path, required)
/api/library · Operator API (bearer token)
GET /api/library/packs
List Packs
GET /api/library/packs/{pack_id}/contents
What a library holds, rule by rule, and what its last simulation on these agents (comma-separated) found: the library drawer and the library's own page.
Parameters: pack_id (path, required), agents (query)
POST /api/library/packs/{pack_id}/install
Install Pack
Parameters: pack_id (path, required)
/api/mcp-servers · Operator API (bearer token)
GET /api/mcp-servers
List Mcp
POST /api/mcp-servers
Register an MCP server, and start monitoring it for tool drift.
| Body field | Type |
|---|---|
name required | string |
url | string |
transport | string |
trust_level | string |
pinned_version | string |
POST /api/mcp-servers/{name}/scan
Scan Mcp
Parameters: name (path, required)
| Body field | Type |
|---|---|
tools | array |
POST /api/mcp-servers/{name}/tools
Snapshot a listing *and* register each tool in the registry.
Parameters: name (path, required)
| Body field | Type |
|---|---|
tools | array |
accept_changes | boolean |
note | string |
/api/me · Operator API (bearer token)
GET /api/me
The signed-in identity, for the account menu.
/api/members · Operator API (bearer token)
GET /api/members
Everyone in this workspace, owners first.
POST /api/members
Add a teammate with a role. Returns a sign-in key for them, shown this once.
| Body field | Type |
|---|---|
email required | string |
role | string |
PATCH /api/members/{member_id}
Change a teammate's role, or deactivate them (their keys stop working with it).
Parameters: member_id (path, required)
| Body field | Type |
|---|---|
role | string |
active | boolean |
/api/memory · Operator API (bearer token)
GET /api/memory
List Entries
Parameters: agent (query), active_only (query), limit (query)
POST /api/memory/{entry_id}/revoke
Pull an entry immediately — the concrete fix for 'no way to find and remove a bad memory'.
Parameters: entry_id (path, required)
POST /api/memory/{entry_id}/verify
A human vouches for an entry — it stops decaying on the unverified TTL.
Parameters: entry_id (path, required)
/api/metrics · Operator API (bearer token)
GET /api/metrics/activity
Activity
Parameters: agent (query), environment (query)
GET /api/metrics/breakdown
Breakdown
Parameters: dim (query), range (query), agent (query), environment (query)
GET /api/metrics/errors
Steps that failed — a tool that threw, a model call that errored — grouped.
Parameters: range (query), agent (query), environment (query)
GET /api/metrics/quality
Is this agent giving right answers: every quality signal already recorded for it.
Parameters: agent (query, required), range (query)
GET /api/metrics/rules
How each rule behaved: fired, stopped something, or only watched.
Parameters: range (query), agent (query), environment (query)
GET /api/metrics/summary
Summary
Parameters: range (query), agent (query), environment (query)
/api/monitors · Operator API (bearer token)
GET /api/monitors
Every monitor in the tenant, with its last result and when it next runs.
Parameters: kind (query), enabled (query)
POST /api/monitors
Watch a source by hand. The first run stores a baseline; later runs report changes.
| Body field | Type |
|---|---|
kind required | string |
target required | string |
name | string |
interval_seconds | integer |
config | object |
enabled | boolean |
DELETE /api/monitors/{monitor_id}
Stop watching a source. Its findings are kept.
Parameters: monitor_id (path, required)
GET /api/monitors/{monitor_id}
One monitor, with the findings it raised that are still open.
Parameters: monitor_id (path, required)
PATCH /api/monitors/{monitor_id}
Rename, retune the interval, change config, or pause/resume (``enabled``).
Parameters: monitor_id (path, required)
| Body field | Type |
|---|---|
name | string |
interval_seconds | integer |
enabled | boolean |
config | object |
POST /api/monitors/{monitor_id}/pause
Stop scheduled runs. Open findings stay open; nothing is closed while paused.
Parameters: monitor_id (path, required)
POST /api/monitors/{monitor_id}/resume
Resume scheduled runs from the monitor's next due time.
Parameters: monitor_id (path, required)
POST /api/monitors/{monitor_id}/run
Run one monitor now, through the job queue, and return its result.
Parameters: monitor_id (path, required)
/api/obligations · Operator API (bearer token)
GET /api/obligations
Obligations
/api/onboarding · Operator API (bearer token)
GET /api/onboarding
Install state as a checklist, computed live.
POST /api/onboarding/agents/{slug}/tests
Run the attack test of the project this agent is in: the same test as the agent page's panel, against the real agent through its `agentfox init`.
Parameters: slug (path, required)
GET /api/onboarding/guardrails
The setup wizard's suggested guardrails, as a list to show. No test reads them: an "after" test checks the agents' real policies. Kept so the wizard still loads.
POST /api/onboarding/guardrails
Saves the wizard's toggles. They change what the wizard shows, nothing else.
GET /api/onboarding/key
This user's setup key. Made the first time it is asked for (or after the last one expired or was revoked), and then shown in full that once: ``value`` is null on every later call, which returns the key's ``prefix``, ``createdAt`` and ``expiresAt`` instead. ``POST /key/rotate`` replaces it.
Parameters: peek (query)
POST /api/onboarding/key/rotate
Revoke this user's setup key and make a new one, shown in full this once. A running `agentfox init` with the old key stops being accepted.
POST /api/onboarding/projects/{project}/basic-guardrails
Add the basic guardrails to every agent in the project: prompt attacks in what users send blocked, personal data and secrets in replies hidden.
Parameters: project (path, required)
GET /api/onboarding/projects/{project}/tests
The project's first test (as it was) and its latest one with the basic guardrails, whether those are on (``basicOn``: watching or blocking; ``basicEnforcing``: blocking), and whether this project's `agentfox init` is connected (only it can run a test).
Parameters: project (path, required), agent (query)
POST /api/onboarding/projects/{project}/tests
Test the project again, with the guardrails it has now, on its own map.
Parameters: project (path, required)
PUT /api/onboarding/projects/{project}/tests/sets
The attack sets this project tests with, from the library. At least one.
Parameters: project (path, required)
| Body field | Type |
|---|---|
sets required | array |
POST /api/onboarding/runner/connect
Runner Connect
| Body field | Type |
|---|---|
structure required | Structure |
project | string |
POST /api/onboarding/runner/poll
Heartbeat, and the next test to run if one is waiting.
POST /api/onboarding/runner/runs/{run_id}/guard
Check one surface of one attack against an agent's real policies, persisting nothing.
Parameters: run_id (path, required)
| Body field | Type |
|---|---|
agent required | string |
surface required | string |
content | string |
tool | string |
arguments | object |
message | string |
reads | array |
POST /api/onboarding/runner/runs/{run_id}/results
Runner Results
Parameters: run_id (path, required)
| Body field | Type |
|---|---|
results | array |
done | boolean |
error | string |
GET /api/onboarding/runs
Every attack test the projects' panels ran, latest first (Testing → Attack tests). ``agent`` (a slug): only the runs that tested it, each as it saw it.
Parameters: agent (query), limit (query)
DELETE /api/onboarding/state
Start over at step 1. The key survives, so a running `agentfox init` stays valid and re-reports its map on its next poll.
GET /api/onboarding/state
Get State
PATCH /api/onboarding/state
Save State
GET /api/onboarding/structure
Get Structure
PUT /api/onboarding/structure
The user added or removed an agent or tool on See structure. Tests run on this map.
| Body field | Type |
|---|---|
structure required | Structure |
GET /api/onboarding/tests
Latest Test
Parameters: phase (query, required)
POST /api/onboarding/tests
Start Test
| Body field | Type |
|---|---|
phase required | string |
GET /api/onboarding/tests/{run_id}
Get Test
Parameters: run_id (path, required)
GET /api/onboarding/tests/{run_id}/results
Test Results
Parameters: run_id (path, required)
/api/overview · Operator API (bearer token)
GET /api/overview
Agents, their risk tiers and open issues: the Reports summary.
/api/platform · Operator API (bearer token)
GET /
Name the service and say where to go next. Unauthenticated.
/api/policies · Operator API (bearer token)
GET /api/policies
List Policies
Parameters: agent (query), full (query)
POST /api/policies
Upsert Policy
| Body field | Type |
|---|---|
body required | string |
notes | string |
mode | string |
level | string |
scope_id | string |
compose | string |
DELETE /api/policies/agents/{slug}/rules/{rule_id}
Drop an agent's own copy of a rule: the workspace rule applies to it again.
Parameters: slug (path, required), rule_id (path, required)
GET /api/policies/applied
Every rule in force on at least one agent: what it does, which library it comes from, and whether it applies to every agent or only some (and which).
GET /api/policies/effective
The policy actually in force for a subject, with per-rule provenance.
Parameters: agent (query), team (query), user (query), environment (query)
POST /api/policies/libraries/basic/apply
Apply the basic guardrails to these agents (the project's) that don't have them, and bring those that do up to date. The onboarding card's path (``add_basic_guardrails``): watching, and blocking only when the caller may change production policy and these exact rules have a recorded simulation. ``mode`` says which; ``observe`` means simulate them, then start blocking.
POST /api/policies/libraries/starter/remove
Remove the watch-only starter rules earlier versions of `agentfox init` added, from these agents (the project's); every agent when none are named.
GET /api/policies/libraries/status
For each library (``basic`` is the basic guardrails): on which of these agents (comma-separated) it is applied, whether it blocks there, whether it is also applied workspace-wide, and on which the copy is older than the library (``outdated``).
Parameters: agents (query), project (query)
POST /api/policies/libraries/{pack_id}/apply
Apply a library to these agents only (the project's), watching first. Agents that have it already get what it ships now when it has changed (``updated``), each in the mode it is in.
Parameters: pack_id (path, required)
| Body field | Type |
|---|---|
agents | array |
project | string |
mode | string |
since_days | integer |
limit | integer |
POST /api/policies/libraries/{pack_id}/mode
Watch or block with a library on these agents (the project's).
Parameters: pack_id (path, required)
| Body field | Type |
|---|---|
agents | array |
project | string |
mode | string |
since_days | integer |
limit | integer |
POST /api/policies/libraries/{pack_id}/simulate
Replay each agent's recent traffic against its copies of a library as if they blocked, and record the simulations (``POST /api/policies/simulate``, per copy), so starting to block with it passes the simulate-before-enforce gate.
Parameters: pack_id (path, required)
| Body field | Type |
|---|---|
agents | array |
project | string |
mode | string |
since_days | integer |
limit | integer |
GET /api/policies/lint
Policy lint. `passed` is false when critical/high findings exist.
POST /api/policies/simulate
Replay recorded traffic against a candidate policy.
| Body field | Type |
|---|---|
body required | string |
agent | string |
since_days | integer |
limit | integer |
persist | boolean |
POST /api/policies/validate
Validate Policy
| Body field | Type |
|---|---|
body required | string |
notes | string |
mode | string |
level | string |
scope_id | string |
compose | string |
DELETE /api/policies/{key}
Stop applying an imported policy. Its versions stay, for the audit trail.
Parameters: key (path, required)
GET /api/policies/{key}
Get Policy
Parameters: key (path, required)
GET /api/policies/{key}/canary
Get Policy Canary
Parameters: key (path, required)
POST /api/policies/{key}/canary/advance
Check the candidate cohort's health and advance, hold, or auto-roll-back.
Parameters: key (path, required)
POST /api/policies/{key}/canary/rollback
Rollback Policy Canary
Parameters: key (path, required)
POST /api/policies/{key}/canary/start
Start Policy Canary
Parameters: key (path, required)
| Body field | Type |
|---|---|
candidate_version | integer |
steps | array |
max_block_rate_delta | number |
max_block_rate_drop | number |
min_dwell_seconds | integer |
min_sample | integer |
POST /api/policies/{key}/mode
Promote or demote a policy, optionally making a saved version live.
Parameters: key (path, required)
| Body field | Type |
|---|---|
mode required | string |
version | integer |
level | string |
scope_id | string |
compose | string |
GET /api/policies/{key}/rego
Get Rego
Parameters: key (path, required)
POST /api/policies/{key}/rules/{rule_id}
Change one rule's action or switch it off, as a new saved version.
Parameters: key (path, required), rule_id (path, required)
| Body field | Type |
|---|---|
effect | string |
enabled | boolean |
message | string |
on_block | string |
min_score | number |
overridable | boolean |
watch | boolean |
notes | string |
GET /api/policies/{key}/rules/{rule_id}/agents
Every agent, nested by hand-off, and whether each has its own copy of the rule.
Parameters: key (path, required), rule_id (path, required)
GET /api/policies/{key}/rules/{rule_id}/checks
The checks that can fire a rule: they report what it looks for, where it looks.
Parameters: key (path, required), rule_id (path, required), agent (query)
POST /api/policies/{key}/rules/{rule_id}/scope
Change a rule for every agent, or for only some (and what they hand off to).
Parameters: key (path, required), rule_id (path, required)
| Body field | Type |
|---|---|
agents | array |
include_delegates | boolean |
effect | string |
enabled | boolean |
message | string |
on_block | string |
min_score | number |
preview | boolean |
reason | string |
POST /api/policies/{key}/versions/{version}/restore
Make an earlier version's rules live again, as a new version.
Parameters: key (path, required), version (path, required)
POST /api/policies/{policy_id}/approve
Approve Policy
Parameters: policy_id (path, required)
POST /api/policies/{policy_id}/reject
Reject Policy
Parameters: policy_id (path, required)
/api/probes · Operator API (bearer token)
GET /api/probes/targets
List Targets
POST /api/probes/targets
Register a target. It is created disabled; nothing is sent until opt-in.
| Body field | Type |
|---|---|
agent required | string |
adapter | string |
url | string |
name | string |
model | string |
auth_header | string |
forbidden_tools | array |
leak_markers | array |
probes | array |
interval_seconds | integer |
max_probes_per_run | integer |
rate_limit_per_minute | integer |
timeout_seconds | number |
GET /api/probes/targets/{target_id}
Get Target
Parameters: target_id (path, required)
PATCH /api/probes/targets/{target_id}
Update Target
Parameters: target_id (path, required)
| Body field | Type |
|---|---|
url | string |
forbidden_tools | array |
leak_markers | array |
probes | array |
interval_seconds | integer |
max_probes_per_run | integer |
rate_limit_per_minute | integer |
timeout_seconds | number |
GET /api/probes/targets/{target_id}/campaigns
Campaigns
Parameters: target_id (path, required), limit (query)
POST /api/probes/targets/{target_id}/opt-in
Opt In
Parameters: target_id (path, required)
| Body field | Type |
|---|---|
acknowledgement required | string |
POST /api/probes/targets/{target_id}/opt-out
Opt Out
Parameters: target_id (path, required)
POST /api/probes/targets/{target_id}/run
Probe the target now. Same consent and caps as a scheduled run, and refused within `MIN_MANUAL_GAP_SECONDS` of the previous run.
Parameters: target_id (path, required)
GET /api/probes/warning
What a person must read before enabling probes, plus the probe library, the hard caps and the adapter contract a target endpoint has to speak.
/api/projects · Operator API (bearer token)
GET /api/projects
Every project: a multi-agent system (a root agent and every agent it hands work to, from code or traffic, across repositories), or one agent on its own.
DELETE /api/projects/{project}
Disconnect a project: connecting it again with `agentfox init` starts fresh.
Parameters: project (path, required)
POST /api/projects/{project}/approve
Add every agent `agentfox init` proposed for this project ("Add all").
Parameters: project (path, required)
GET /api/projects/{project}/map
One project's map: who talks to its agents, their models, tools, and what the tools touch. Every member of the system is drawn, sub-agents and parents in other repositories included. 404 for a name that is no project, root, repository or agent.
Parameters: project (path, required)
/api/proposals · Operator API (bearer token)
GET /api/proposals
List change proposals, filtered by status, kind and scope.
Parameters: status (query), kind (query), scope_level (query), scope_id (query), limit (query)
GET /api/proposals/{proposal_id}
One proposal with its diff, evidence, proof and decisions.
Parameters: proposal_id (path, required)
POST /api/proposals/{proposal_id}/apply
Apply an approved proposal, or settle one whose canary has finished.
Parameters: proposal_id (path, required)
POST /api/proposals/{proposal_id}/decide
Approve or reject; an org-level loosening needs two different approvers.
Parameters: proposal_id (path, required)
| Body field | Type |
|---|---|
approve required | boolean |
note required | string |
POST /api/proposals/{proposal_id}/rollback
Undo an applied or canaried proposal through its applier.
Parameters: proposal_id (path, required)
| Body field | Type |
|---|---|
reason required | string |
POST /api/proposals/{proposal_id}/verify
Record whether an applied change worked; ``verified: false`` rolls it back.
Parameters: proposal_id (path, required)
| Body field | Type |
|---|---|
verified required | boolean |
note required | string |
/api/providers · Operator API (bearer token)
GET /api/providers
The neutrality surface, made inspectable.
/api/redteam · Operator API (bearer token)
GET /api/redteam/campaigns
List Campaigns
POST /api/redteam/campaigns
Enqueues through jobs_db and processes within this same request — see jobs_db's own module docstring and governance.py's build_evidence for the same reasoning applied to the other named candidate operation.
| Body field | Type |
|---|---|
agent required | string |
name | string |
probes | array |
runner | string |
adaptive | boolean |
budget | integer |
seed | integer |
include_deployment_probes | boolean |
GET /api/redteam/probes
List Probes
/api/reliability · Operator API (bearer token)
GET /api/reliability
Circuit-breaker state and live budget consumption.
/api/report · Operator API (bearer token)
GET /api/report/summary
The one-page summary `agentfox report` prints, for this workspace: what ran, what was stopped and why, what is only watched. ``text`` is Markdown or HTML.
Parameters: since (query), agent (query), format (query)
/api/retention · Operator API (bearer token)
GET /api/retention
Every data class with its period, the last purge, the next one, and legal holds.
POST /api/retention/purge
Run the retention purge now, through the same job the daily schedule runs.
GET /api/retention/runs
Retention Runs
Parameters: limit (query)
PUT /api/retention/{data_class}
Change how long one data class is kept. Audited as `operator.retention.changed`.
Parameters: data_class (path, required)
| Body field | Type |
|---|---|
retain_days required | integer |
reason required | string |
redact_fields | array |
/api/risk · Operator API (bearer token)
POST /api/risk/assessments/{slug}
Create Assessment
Parameters: slug (path, required)
| Body field | Type |
|---|---|
eu_ai_act_class | string |
inherent_risk | string |
residual_risk | string |
answers | object |
review_months | integer |
sign_off | boolean |
signed_off_by | string |
GET /api/risk/classify/{slug}
Classify Agent
Parameters: slug (path, required)
GET /api/risk/register
Get Register
/api/rules · Operator API (bearer token)
GET /api/rules/{rule_id}/examples
Get Examples
Parameters: rule_id (path, required)
POST /api/rules/{rule_id}/examples
Post Example
Parameters: rule_id (path, required)
| Body field | Type |
|---|---|
decision_id required | string |
fires required | boolean |
sample | string |
POST /api/rules/{rule_id}/examples/check
Check Examples
Parameters: rule_id (path, required)
| Body field | Type |
|---|---|
policy required | string |
body | string |
DELETE /api/rules/{rule_id}/examples/{example_id}
Remove Example
Parameters: rule_id (path, required), example_id (path, required)
/api/sources · Operator API (bearer token)
GET /api/sources
List Sources
Parameters: tier (query), domain (query)
PUT /api/sources
Register or re-tier a source.
| Body field | Type |
|---|---|
key required | string — The identifier the retriever emits — URI, doc id, table. |
title | string |
tier | string — system_of_record | approved | unverified | external |
owner | string |
domain | string — Corpus this belongs to, e.g. 'finance'. |
updated_at_source | string |
freshness_sla_hours | integer |
deprecated | boolean |
metadata | object |
POST /api/sources/assess
Would this answer, from these sources, pass?
| Body field | Type |
|---|---|
answer required | string |
chunks | array |
agent_domain | string |
POST /api/sources/connections
Attach a real connector to a registered source — a database or an authenticated enterprise API — so `validate` can check it for real instead of assuming every source is a plain fetchable URL.
| Body field | Type |
|---|---|
key required | string — Must match an already-registered source's key. |
kind required | string — database | api |
config | object — database: dialect, host, port, database, username, check_table (optional). api: base_url, auth_header (default 'Authorization'), auth_prefix (default 'Bearer '). |
credential | string — The raw password or token — encrypted immediately, never stored in the clear. |
POST /api/sources/context-check
Would this document or chunk set be fit to enter the corpus?
| Body field | Type |
|---|---|
text | string |
chunks | array |
source_key | string |
GET /api/sources/health
Which registered sources are stale, deprecated, or unowned.
DELETE /api/sources/{key}
Retire a source. Deprecates by default rather than deleting.
Parameters: key (path, required), hard (query)
POST /api/sources/{key}/validate
Actually fetch the source and check its content, rather than trust the tier.
Parameters: key (path, required)
/api/tokens · Operator API (bearer token)
GET /api/tokens
List Tokens
POST /api/tokens
Mint a token for the caller's own use. The raw value is returned once — same guarantee as every other credential this platform issues.
| Body field | Type |
|---|---|
name | string |
ttl_days | integer |
POST /api/tokens/{token_id}/revoke
Revoke Token
Parameters: token_id (path, required)
/api/tools · Operator API (bearer token)
GET /api/tools
List Tools
POST /api/tools
Create Tool
| Body field | Type |
|---|---|
key required | string |
name | string |
kind | string |
impact | string |
description | string |
json_schema | object |
output_trust | string |
effect_class | string |
triggers | array |
/api/traces · Operator API (bearer token)
GET /api/traces
Runs, newest first. ``group=true`` gives one row per conversation turn.
Parameters: agent (query), verdict (query), environment (query), entity_type (query), tool (query), rule (query), errors (query), since_days (query), start (query), end (query), limit (query), group (query)
GET /api/traces/resolve
Their run id → our governance decision.
Parameters: system (query, required), external_id (query, required)
GET /api/traces/{trace_id}
Get Trace
Parameters: trace_id (path, required)
/api/validators · Operator API (bearer token)
GET /api/validators
Every registered validator: what it checks, its settings, and whether it runs here.
/api/version · Operator API (bearer token)
GET /api/version
Every version that participates in a decision, so a verdict can be reproduced.
/api/workspace · Operator API (bearer token)
POST /api/workspace/apply
Apply Workspace
| Body field | Type |
|---|---|
source required | string |
GET /api/workspace/export
Export Workspace
POST /api/workspace/plan
Plan Workspace
| Body field | Type |
|---|---|
source required | string |
Public, unauthenticated
The playground, the waitlist and the live showcase feed. Sandboxed or read-only, rate-limited, and separate from your data.
/api/playground · Public, unauthenticated
POST /api/playground/sessions
Create a playground sandbox.
POST /api/playground/sessions/{session_id}/chat
Chat
Parameters: session_id (path, required)
| Body field | Type |
|---|---|
agent | string |
message required | string |
document | string |
POST /api/playground/sessions/{session_id}/enforce
Flip every content check observe -> enforce (or back) for this sandbox only.
Parameters: session_id (path, required)
| Body field | Type |
|---|---|
mode required | string |
GET /api/playground/sessions/{session_id}/state
Everything the live sidebar needs: recent traces (decisions + detector runs + findings), the tamper-evident audit chain's own self-check, and compliance posture — all real, already-existing functions, just called and serialized.
Parameters: session_id (path, required)
POST /api/playground/sessions/{session_id}/tool-call
Try a tool call directly, with no model in the loop.
Parameters: session_id (path, required)
| Body field | Type |
|---|---|
agent required | string |
tool required | string |
arguments | object |
provenance | object |
intent | string |
GET /api/playground/world
The agents, tools and suggested prompts, without making a sandbox.
/api/public · Public, unauthenticated
GET /api/public/showcase
AgentFox probing its own demo agent: recent runs, attacks attempted, contained and escaped, findings opened and closed. Unauthenticated and read-only; returns ``{"enabled": false}`` on a deployment that does not run the showcase.
/api/waitlist · Public, unauthenticated
POST /api/waitlist
Record an address. Unauthenticated, idempotent, and it sends nothing anywhere.
| Body field | Type |
|---|---|
email required | string |
source | string |
company | string |
note | string |