Skip to main content

API Reference

AxonFlow exposes two primary API surfaces:

  • the Agent API on port 8080 for gateway-mode policy checks, MCP input and output checks, health and metrics, and the proxy entrypoint most applications should call first
  • the Orchestrator API on port 8081 for governed request processing, multi-agent planning, tenant policy management, provider management, execution replay, and other control-plane workflows
Community Examples

See working HTTP API examples with curl in the AxonFlow examples repository.

In self-hosted and production deployments, many api/v1 management endpoints are reachable through the Agent proxy as well as directly on the Orchestrator. For most application traffic, prefer the Agent because it is where request governance, gateway mode, MCP request checks, and authentication integration usually start. For internal platform operations, you may expose the Orchestrator directly on 8081 inside a trusted network.

Service Split

ServiceLocal PortDescription
Agent8080Policy enforcement, gateway mode, MCP request checks, health, metrics, and proxied control-plane APIs
Orchestrator8081Request processing, audit search, planning, tenant policies, templates, provider routing, replay, and admin APIs
Recommended access pattern

Application traffic usually starts at http://localhost:8080. Platform and admin tooling can call http://localhost:8081 directly when you intentionally expose the Orchestrator in a trusted network.

Authentication and Tenant Context

All protected endpoints use HTTP Basic authentication. The server derives tenant and org context from the authenticated credentials — no separate tenant header is needed.

HeaderRequiredNotes
AuthorizationYesBasic base64(clientId:clientSecret) — tenant is derived from the authenticated clientId
X-User-IDFor mutating APIsUsed for create, update, apply, or per-tenant config changes (audit attribution)
Content-TypeFor POST/PUTUsually application/json
curl http://localhost:8080/api/v1/dynamic-policies \
-H "Authorization: Basic $(echo -n 'client-id:client-secret' | base64)" \

For the cross-surface reference that includes portal sessions, SCIM, and admin APIs, use Auth And Header Matrix.

Public API Families

Gateway and request processing

ReferenceDescription
Agent EndpointsGateway mode, MCP request checks, health, metrics, and proxied APIs
Orchestrator EndpointsDirect request processing, planning, audit, connectors, and replay
Error CodesWhat AxonFlow error payloads actually look like across handlers

Governance and control plane

ReferenceDescription
System Policy APIPattern-based system policy CRUD on /api/v1/static-policies
Tenant Policy APICondition-based tenant policy CRUD on /api/v1/dynamic-policies
Policy Templates APIBrowse and apply reusable policy templates
LLM Provider APIConfigure providers, routing weights, and health checks
Audit APISearch audit logs, summarize compliance activity, and record tool-call audit events

Runtime operations and debugging

ReferenceDescription
Connector Marketplace APIDiscover, install, uninstall, and health-check MCP connectors
Cost Controls APICommunity pricing and usage plus non-community budget management
Decision & Execution Replay APIList, inspect, export, and delete execution records
Media Governance Configuration APIRead media governance status and manage paid-tier per-tenant config

Endpoint Index

Agent-first endpoints

Method / PathPurpose
GET /healthAgent health check
GET /metricsJSON metrics snapshot
GET /prometheusPrometheus scrape endpoint
POST /api/policy/pre-checkGateway-mode approval before an external LLM call
POST /api/audit/llm-callGateway-mode audit write after an external LLM call
POST /api/v1/mcp/check-inputPolicy-check an MCP query before execution
POST /api/v1/mcp/check-outputPolicy-check an MCP result after execution
PathPrefix /api/v1/...Proxy many orchestrator APIs such as policies, providers, templates, audit, connectors, budgets, and replay

Core orchestrator endpoint families

Method / PathPurpose
POST /api/v1/processGoverned request processing
POST /api/v1/planMulti-agent planning
POST /api/v1/plan/executeExecute a stored plan
GET /api/v1/plan/{id}Get plan status
POST /api/v1/audit/searchSearch audit logs
POST /api/v1/audit/tool-callRecord non-LLM tool calls
POST /api/v1/audit/summaryCompliance summary
`GETPOST /api/v1/dynamic-policies`
`GETPOST /api/v1/llm-providers`
GET /api/v1/executionsReplay and execution history

How To Choose The Right Surface

  • If your app is using gateway mode and makes the LLM call itself, start with Agent Endpoints.
  • If your app wants AxonFlow to process and route the request, start with Orchestrator Endpoints.
  • If your platform team is setting up governance, provider routing, templates, or replay, move into the dedicated control-plane references linked above.
  • If you are validating production readiness, the public API docs show the community and evaluation path, while the protected docs add deeper enterprise operational workflows.