Proxy Mode

Process client request

Main entry point for Proxy Mode. The Agent:

  1. Authenticates the client credential. On Enterprise it also admits the user token, which is required there: a request with no token, or one that does not verify, is refused 401. On Community and community-SaaS the credential is the principal and a user token is ignored
  2. Decides the request in ONE anchored pass: the shared static engine's evaluation is the detector input, and the ADR-065 anchored engine authors the verdict for the credential or the verified user (PRD v11 §1.1, §1.6)
  3. Forwards to the Orchestrator if allowed
  4. Returns the response with the engine that decided it

One pass since v11.0.0 (#4253). The second pass that used to follow an anchored approval - the tier engine, over static_policies' stored action column and an organization's legacy per-policy overrides - is retired. A legacy per-policy override (block or require_approval) no longer decides this route; the effective-policies read (GET /api/v1/static-policies/effective) keeps showing it under its deprecation (PRD v11 §1.11). A shipped system control whose stored action is block is still refused here, by the anchored engine, naming its policy. The agent's pass resolves no governance segments, so a segment-store outage refuses nothing at that pass (a request it forwards to the orchestrator's /api/v1/process or /api/v1/plan/execute is decided there by the anchored engine too, whose facts resolve the user's segments and refuse when that fails), and the pass never holds a request for approval: an anchored approval challenge is a refusal.

Every policy verdict names the engine that decided it (engine, always anchored), the type of principal it decided for (subject_type) and the digest of the policy bundle (policy_bundle).

The LLM response is decided too. A forwarded request's response is decided by the orchestrator response plane, on the anchored engine, and response_plane names that decision. A response it withholds answers success: false and blocked: true, and is not counted against the client's circuit breaker.

Use this endpoint when you want AxonFlow to intercept and process all LLM requests.

post/api/request

Request

Headers

Authorizationstring required
Example:Basic bXktb3JnOkFYT04tVjIteHh4

OAuth2-style Basic authentication header. Format: Basic base64(clientId:clientSecret)

  • clientId: Your organization identifier (required)
  • clientSecret: Authentication credential (optional for community mode)

Not required when DEPLOYMENT_MODE=community.

X-Client-Secretstring

DEPRECATED: Use Basic authentication instead. Legacy client secret header. Prefer using Authorization: Basic header.

Request body

querystring required

The query or prompt to process

user_tokenstring

JWT token for user authentication

client_idstring required

Registered client application ID

request_type'sql' | 'llm_chat' | 'rag_search' | 'mcp-query' | 'multi-agent-plan'

Type of request:

  • sql: Database query
  • llm_chat: LLM conversation
  • rag_search: RAG retrieval
  • mcp-query: MCP connector query
  • multi-agent-plan: Multi-agent planning
skip_llmboolean

Skip LLM calls (for testing)

contextobject

Additional context for request processing

mediaobject[]

Optional multimodal payload accompanying the query (images, documents, etc.). Consumed by the platform's media-governance code path; per-item shape is MediaContent from the SDK.

Response

Request processed successfully

successboolean
dataunknown
resultstring

Result string for multi-agent planning

plan_idstring

Plan ID for multi-agent planning

metadataobject

Execution metadata for multi-agent planning

errorstring

Error message if success is false

code'ERR_TIER_LIMIT_HUMAN_PRINCIPAL' | 'ERR_TIER_LIMIT_SERVICE_PRINCIPAL' | 'ERR_TIER_LIMIT_ORG_ROOT_POLICY' | 'ERR_TIER_LIMIT_NODE'

The refusal's machine-readable code, present on a licence-ceiling (tier-limit) refusal: one code per admission dimension. On /api/request only the two principal codes occur. Omitted on every other response.

blockedboolean

True if the request was blocked, by policy, a cost budget or the licence's ceiling

block_reasonstring

Reason for blocking

budget_infoobject

Budget enforcement status (Issue #1082) — present when a budget check ran. Surfaces current usage vs limits so callers can render budget-aware UI without a separate /api/v1/budgets call.

media_analysisobject

Media-governance analysis result — populated when the request carried a media payload. Shape mirrors MediaAnalysisResponse.

engine'anchored'

Which policy engine authored this verdict: anchored, the ADR-065 decision plane, which authors every verdict on this route (PRD v11 §1.1). Since v11.0.0 (#4253) legacy is never written: the tier engine that authored it after an anchored approval is retired. Omitted on a refusal no engine decided.

subject_typestring

The type of principal the verdict was decided for (PRD v11 §1.6): User for a verified user token, Client when the request presented no user identity and its client credential is the principal. Omitted wherever engine is.

policy_bundlestring

The digest of the policy set that decided: the system corpus's restriction for this route and the organization root - the organization's active typed document composed with the deployment's baseline permission pack, or, while it has published nothing, the implicit bundle of that pack and the organization template. A rollback reinstates an earlier digest. Omitted wherever engine is.

policy_packsstring[]

The add-on policy packs (PRD v11 §1.9) whose controls composed into policy_bundle on this route, each as <pack id>@<digest of the pack document the deployment instantiated>, sorted. Omitted when the deployment installs no pack or none binds on this route.

Example response

{
  "policy_info": {
    "processing_time": "2.5ms"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.