Skip to content

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.

Check a tool call before running it
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"}'
On a fresh install (trimmed)
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

FieldWhat it does
agent, tool, argumentsRequired. For an MCP tool the key is mcp:<server>/<tool>.
provenanceArgument name to source (user, retrieved, tool_result, …). Declared provenance is believed.
intent, session_idThe declared task; the conversation.
messagesThe 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.
trustMessage index to source, for messages you vouch for.
prior_tools, prior_stepsYour own step history, for loop detection.
in_processWhat you will do with the verdict: enforced (default), all or none. Findings then say whether the call was really stopped.
waive_ungrantedWhile the agent holds no grant at all, a missing grant is recorded, not applied; listed in waived_rules.
declareThe 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 user gets a user decision.

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 fieldType
sender requiredstring
content requiredstring
recipientstring
noncestring
timestampnumber
signaturestring
session_idstring

POST /v1/guard/input

Enforce on content without proxying.

Body fieldType
agent requiredstring
content requiredstring
surfacestring
taint_sourcestring
intentstring
session_idstring
trace_idstring
environmentstring
contextarray
completionobject
usageobject
toolstring
errorstring
approval_idstring

POST /v1/guard/memory_write

Authorise a memory write

Body fieldType
agent requiredstring
content requiredstring
subjectstring
taint_sourcestring
provenanceobject
verified_bystring
ttl_secondsinteger
session_idstring

POST /v1/guard/output

Enforce on content without proxying.

Body fieldType
agent requiredstring
content requiredstring
surfacestring
taint_sourcestring
intentstring
session_idstring
trace_idstring
environmentstring
contextarray
completionobject
usageobject
toolstring
errorstring
approval_idstring

POST /v1/guard/tool_call

Authorise a tool call.

Body fieldType
agent requiredstring
tool requiredstring
argumentsobject
provenanceobject
messagesarray
trustobject
intentstring
prior_toolsarray
prior_stepsarray
session_idstring
environmentstring
approval_idstring
redeem_approvedboolean
in_processstring
waive_ungrantedboolean
declareobject
principalstring | 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 fieldType
server requiredstring
tool requiredstring
argumentsobject
provenanceobject
resultany

/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 fieldType
confirmstring

/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 fieldType
slug requiredstring
namestring
purposestring
owner_emailstring
owner_teamstring
environmentstring
risk_tierstring
declared_modelsarray
declared_toolsarray
data_classesarray
frameworkstring
projectstring

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 fieldType
ids requiredarray

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 fieldType
namestring
owner_emailstring
owner_teamstring
risk_tierstring
purposestring

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 fieldType
tool_key requiredstring
requires_approvalboolean
max_taintstring
constraintsobject
actionsarray
impactstring
expires_atstring

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 fieldType
modestring
window_secondsnumber
min_callsnumber
block_rationumber
cooldown_secondsnumber
probe_callsnumber

POST /api/agents/{slug}/breaker/reset

Close the breaker now and let the agent's calls through.

Parameters: slug (path, required)

Body fieldType
reasonstring

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 fieldType
reasonstring

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 fieldType
platform requiredstring
upstream_urlstring
secretstring
configobject

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 fieldType
protectionsobject
messagestring
wordsarray
avoidstring
allowedstring

POST /api/agents/{slug}/protection/preview

Replay this agent's last week against the protections, as if enforcing.

Parameters: slug (path, required)

Body fieldType
protectionsobject
messagestring
wordsarray
avoidstring
allowedstring

POST /api/agents/{slug}/quarantine

Stop an agent while you investigate. Reversible and audited.

Parameters: slug (path, required)

Body fieldType
reasonstring

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 fieldType
reasonstring

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 fieldType
path requiredarray
trace_idstring
suitestring

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 fieldType
url requiredstring
min_severitystring

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 fieldType
agent requiredstring
systems_of_recordarray
coverage_monthsinteger
coverage_startstring
entity_typesarray
answerable_typesarray
out_of_scope_topicsarray
freshness_hoursinteger
modestring

POST /api/answerability/check

Would this question be refused, and what would we say instead?

Body fieldType
agent requiredstring
question requiredstring
known_entitiesarray

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 fieldType
rationalestring

POST /api/approvals/{approval_id}/deny

Deny

Parameters: approval_id (path, required)

Body fieldType
rationalestring

/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 fieldType
github_user_id requiredstring
github_login requiredstring
email requiredstring
namestring

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 fieldType
provider requiredstring
subject requiredstring
emailstring
namestring

/api/authorizers · Operator API (bearer token)

GET /api/authorizers

Get Authorizers

POST /api/authorizers

Register (or update) an access-check endpoint.

Body fieldType
key requiredstring
name requiredstring
url requiredstring
toolsarray
agentsarray
timeout_msinteger
fail_modestring
on_denystring
require_principalboolean
cache_secondsinteger
auth_headerstring
enabledboolean
auth_secretstring
clear_secretboolean

DELETE /api/authorizers/{key}

Remove Authorizer

Parameters: key (path, required)

POST /api/authorizers/{key}/enabled

Toggle Authorizer

Parameters: key (path, required)

Body fieldType
enabled requiredboolean
reasonstring

POST /api/authorizers/{key}/test

Ask the access check about one example call and show its answer.

Parameters: key (path, required)

Body fieldType
subject requiredstring
groupsarray
agentstring
tool requiredstring
argumentsobject

/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 fieldType
text requiredstring
agentstring
toolstring

GET /api/business/rules

List Business Rules

POST /api/business/rules

Save Business Rule

Body fieldType
definition requiredobject
agentstring

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 fieldType
definition requiredobject

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 fieldType
mode requiredstring

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 fieldType
framework requiredstring
outcome requiredstring
notestring

/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 fieldType
key requiredstring
name requiredstring
url requiredstring
surfacesarray
labelsobject
entity_prefixstring
thresholdnumber
timeout_msinteger
fail_modestring
auth_headerstring
enabledboolean
auth_secretstring
clear_secretboolean
effectstring
reasonstring

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 fieldType
enabled requiredboolean
reasonstring

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 fieldType
text requiredstring
surfacestring

/api/custom-rules · Operator API (bearer token)

GET /api/custom-rules

Get Custom Rules

POST /api/custom-rules

Post Custom Rule

Body fieldType
key requiredstring
name requiredstring
kindstring
polaritystring
entriesarray
examplesarray
descriptionstring
surfacesarray
agentsarray
case_sensitiveboolean
sequenceSequenceSpec
conditionConditionSpec
validatorValidatorRef
enabledboolean
effectstring
messagestring
on_blockstring
severitystring

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 fieldType
rule requiredobject
text requiredstring
surfacestring
toolstring

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 fieldType
enabled requiredboolean
reasonstring

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 fieldType
source requiredstring
labelstring
files_scannedinteger
frameworksarray
coveragenumber
countsobject
sitesarray
agentsarray
agent_edgesarray

/api/entitlement · Operator API (bearer token)

POST /api/entitlement/filter

Return only what this human may see, and record what was withheld.

Body fieldType
subject requiredstring
agentstring
chunksarray
purposestring
trace_idstring
recordboolean — Persist what was withheld.

GET /api/entitlement/grants

List Grants

POST /api/entitlement/grants

Add Grant

Body fieldType
resource requiredstring — Matches a chunk's source; globs allowed.
principal requiredstring
principal_kindstring
classesarray
purposesarray
residencystring

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 fieldType
subject requiredstring — Stable IdP identifier — an OIDC `sub`, employee id.
agentstring
displaystring
groupsarray
clearancesarray
purposesarray
residencystring

/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 fieldType
agentstring
conditionsobject
owner_rolestring
sla_minutesinteger
modestring

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 fieldType
session_id requiredstring
agentstring
trace_idstring
user_textstring
agent_textstring
escalatedboolean
failedboolean
confidencenumber

/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 fieldType
suite requiredstring
targetobject
scorersarray
baseline_run_idstring
thresholdsobject
min_pass_ratenumber

POST /api/eval/online

Run Online

Body fieldType
agent requiredstring
scorersarray
since_daysinteger
ratenumber

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 fieldType
verdictstring
note requiredstring

GET /api/eval/runs

List Runs

Parameters: suite (query), limit (query)

POST /api/eval/runs

Create Run

Body fieldType
suite requiredstring
targetobject
scorersarray
baseline_run_idstring
runnerstring

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 fieldType
agent requiredstring
scorer requiredstring
objectivestring
windowstring
targetnumber

GET /api/eval/suites

List Suites

POST /api/eval/suites

Create Suite

Body fieldType
key requiredstring
namestring
descriptionstring
tagsarray

GET /api/eval/suites/{key}

Get Suite

Parameters: key (path, required)

POST /api/eval/suites/{key}/cases

Add Case

Parameters: key (path, required)

Body fieldType
inputobject
expectedobject
contextobject
labelsarray
splitstring

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 fieldType
agentsarray
controlsarray
period_fromstring
period_tostring

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 fieldType
enabled requiredboolean
agentstring
reasonstring

POST /api/features/protections/{key}

Set Protection

Parameters: key (path, required)

Body fieldType
levelstring
agentstring
open_to_projectsboolean
reasonstring

/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 fieldType
status requiredstring
suppression_reasonstring
notestring

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 fieldType
inputsobject

/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 fieldType
decision_id requiredstring
label requiredstring — false_positive | true_positive | false_negative
detector_keystring
entity_typestring
notestring

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 fieldType
feedback_id requiredstring
scopestring — agent | global
ttl_daysinteger
exactboolean — suppress only this exact matched text
reasonstring

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 fieldType
tool_key requiredstring
actionsarray
constraintsobject
requires_approvalboolean
max_taintstring

POST /api/identities/{identity_id}/check

Check

Parameters: identity_id (path, required)

Body fieldType
tool_key requiredstring
actionstring
argumentsobject
argument_taintobject

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 fieldType
source requiredstring
skiparray
filesobject

POST /api/import/{tool}/plan

Plan Import

Parameters: tool (path, required)

Body fieldType
source requiredstring
skiparray
filesobject

/api/integrations · Operator API (bearer token)

POST /api/integrations/github/connect

Connect

Body fieldType
access_token requiredstring

GET /api/integrations/github/repos

List Repos

POST /api/integrations/github/scan

Trigger Scan

Body fieldType
repo_full_name requiredstring
refstring

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 fieldType
endpoint_url requiredstring
docs_urlstring
openapi_spec_urlstring
purposestring

/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 fieldType
tiersarray — Tier names to enable. 'deterministic' is implicit and always on.
pii_egressstring — block | redact | allow
fail_closedboolean
backendstring — local | remote | auto
reasonstring — Why this change is being made. Required — it is the field an investigation actually reads.
confirm_egressboolean — Required when the change starts sending payloads off this machine, or loosens how personal data is handled on the way.

POST /api/legal-holds

Place Hold

Body fieldType
scopeobject
reason requiredstring

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 fieldType
name requiredstring
urlstring
transportstring
trust_levelstring
pinned_versionstring

POST /api/mcp-servers/{name}/scan

Scan Mcp

Parameters: name (path, required)

Body fieldType
toolsarray

POST /api/mcp-servers/{name}/tools

Snapshot a listing *and* register each tool in the registry.

Parameters: name (path, required)

Body fieldType
toolsarray
accept_changesboolean
notestring

/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 fieldType
email requiredstring
rolestring

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 fieldType
rolestring
activeboolean

/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 fieldType
kind requiredstring
target requiredstring
namestring
interval_secondsinteger
configobject
enabledboolean

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 fieldType
namestring
interval_secondsinteger
enabledboolean
configobject

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 fieldType
sets requiredarray

POST /api/onboarding/runner/connect

Runner Connect

Body fieldType
structure requiredStructure
projectstring

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 fieldType
agent requiredstring
surface requiredstring
contentstring
toolstring
argumentsobject
messagestring
readsarray

POST /api/onboarding/runner/runs/{run_id}/results

Runner Results

Parameters: run_id (path, required)

Body fieldType
resultsarray
doneboolean
errorstring

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 fieldType
structure requiredStructure

GET /api/onboarding/tests

Latest Test

Parameters: phase (query, required)

POST /api/onboarding/tests

Start Test

Body fieldType
phase requiredstring

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 fieldType
body requiredstring
notesstring
modestring
levelstring
scope_idstring
composestring

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 fieldType
agentsarray
projectstring
modestring
since_daysinteger
limitinteger

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 fieldType
agentsarray
projectstring
modestring
since_daysinteger
limitinteger

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 fieldType
agentsarray
projectstring
modestring
since_daysinteger
limitinteger

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 fieldType
body requiredstring
agentstring
since_daysinteger
limitinteger
persistboolean

POST /api/policies/validate

Validate Policy

Body fieldType
body requiredstring
notesstring
modestring
levelstring
scope_idstring
composestring

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 fieldType
candidate_versioninteger
stepsarray
max_block_rate_deltanumber
max_block_rate_dropnumber
min_dwell_secondsinteger
min_sampleinteger

POST /api/policies/{key}/mode

Promote or demote a policy, optionally making a saved version live.

Parameters: key (path, required)

Body fieldType
mode requiredstring
versioninteger
levelstring
scope_idstring
composestring

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 fieldType
effectstring
enabledboolean
messagestring
on_blockstring
min_scorenumber
overridableboolean
watchboolean
notesstring

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 fieldType
agentsarray
include_delegatesboolean
effectstring
enabledboolean
messagestring
on_blockstring
min_scorenumber
previewboolean
reasonstring

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 fieldType
agent requiredstring
adapterstring
urlstring
namestring
modelstring
auth_headerstring
forbidden_toolsarray
leak_markersarray
probesarray
interval_secondsinteger
max_probes_per_runinteger
rate_limit_per_minuteinteger
timeout_secondsnumber

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 fieldType
urlstring
forbidden_toolsarray
leak_markersarray
probesarray
interval_secondsinteger
max_probes_per_runinteger
rate_limit_per_minuteinteger
timeout_secondsnumber

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 fieldType
acknowledgement requiredstring

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 fieldType
approve requiredboolean
note requiredstring

POST /api/proposals/{proposal_id}/rollback

Undo an applied or canaried proposal through its applier.

Parameters: proposal_id (path, required)

Body fieldType
reason requiredstring

POST /api/proposals/{proposal_id}/verify

Record whether an applied change worked; ``verified: false`` rolls it back.

Parameters: proposal_id (path, required)

Body fieldType
verified requiredboolean
note requiredstring

/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 fieldType
agent requiredstring
namestring
probesarray
runnerstring
adaptiveboolean
budgetinteger
seedinteger
include_deployment_probesboolean

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 fieldType
retain_days requiredinteger
reason requiredstring
redact_fieldsarray

/api/risk · Operator API (bearer token)

POST /api/risk/assessments/{slug}

Create Assessment

Parameters: slug (path, required)

Body fieldType
eu_ai_act_classstring
inherent_riskstring
residual_riskstring
answersobject
review_monthsinteger
sign_offboolean
signed_off_bystring

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 fieldType
decision_id requiredstring
fires requiredboolean
samplestring

POST /api/rules/{rule_id}/examples/check

Check Examples

Parameters: rule_id (path, required)

Body fieldType
policy requiredstring
bodystring

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 fieldType
key requiredstring — The identifier the retriever emits — URI, doc id, table.
titlestring
tierstring — system_of_record | approved | unverified | external
ownerstring
domainstring — Corpus this belongs to, e.g. 'finance'.
updated_at_sourcestring
freshness_sla_hoursinteger
deprecatedboolean
metadataobject

POST /api/sources/assess

Would this answer, from these sources, pass?

Body fieldType
answer requiredstring
chunksarray
agent_domainstring

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 fieldType
key requiredstring — Must match an already-registered source's key.
kind requiredstring — database | api
configobject — database: dialect, host, port, database, username, check_table (optional). api: base_url, auth_header (default 'Authorization'), auth_prefix (default 'Bearer ').
credentialstring — 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 fieldType
textstring
chunksarray
source_keystring

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 fieldType
namestring
ttl_daysinteger

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 fieldType
key requiredstring
namestring
kindstring
impactstring
descriptionstring
json_schemaobject
output_truststring
effect_classstring
triggersarray

/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 fieldType
source requiredstring

GET /api/workspace/export

Export Workspace

POST /api/workspace/plan

Plan Workspace

Body fieldType
source requiredstring

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 fieldType
agentstring
message requiredstring
documentstring

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 fieldType
mode requiredstring

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 fieldType
agent requiredstring
tool requiredstring
argumentsobject
provenanceobject
intentstring

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 fieldType
email requiredstring
sourcestring
companystring
notestring