API reference

AI agents

Turn agents on and off, run an AI review and read the agent log.

GET/v3/agents/{configured, results: [{agent, name, mode, modes, options}]}
PATCH/v3/agents/{agent}/{mode, options}. Agents: review, aml_investigator, chaser, flow_helper, copilot, sar_drafter
POST/v3/session/{id}/ai-review/Run the review agent (and the AML investigator, if on) now. Returns {review, aml}
GET/v3/agents/runs/The agent log. Filter with agent, subject_id, limit
bash
curl -X PATCH https://{{HOST}}/v3/agents/review/ -H "x-api-key: sk_live_..." -H "Content-Type: application/json" \
  -d '{"mode":"act","options":{"min_confidence":0.92}}'

A review run looks like:

json
{ "agent": "review", "status": "done", "recommendation": "approve", "confidence": 0.95,
  "summary": "Document and selfie checks passed; review was triggered by a borderline image quality score.",
  "output": { "reasons": ["MRZ valid", "face match 0.91"], "risk_flags": [], "ask_customer_for": [] },
  "action": "approved", "model": "claude-sonnet-5-5" }

action is set only when the agent acted (act mode). Options: min_confidence (review, aml_investigator), after_hours, max_reminders, sms (chaser).

The in-flow helper uses POST /v1/flow/assistant {message, history, step, error} with the session token; GET /v1/flow/session returns assistant: true when it's on.