Platform API for compliant, traceable AI workflows
The Krionis Platform API exposes human-in-the-loop controlled querying, protected review actions, append-only audit retrieval, and system metadata so teams can build regulated and auditable applications on top of Krionis.
What the API exposes
Query execution
Submit a query to the current RAG flow through a future-safe orchestrator hook.
HITL outcomes
Receive either an immediate approved response or a review item with a traceable `review_id`.
Audit retrieval
Pull append-only trace and review events through the API for external tooling and investigations.
Endpoint Surface
Review and audit routes require an API key in the x-api-key header.
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Service readiness |
| POST | /query | Submit a query through the Krionis pipeline and HITL gate |
| POST | /orchestrator/query | Submit a controlled query through a selected agent |
| GET | /platform/dashboard | Return operator dashboard state |
| GET | /platform/telemetry | Return live agent and queue telemetry |
| GET | /platform/runtime | Return process and worker diagnostics |
| GET | /platform/configuration | Return resolved YAML configuration and storage paths |
| GET | /platform/indexes | Show source directories and retrieval cache state |
| POST | /platform/indexes/{system_name}/rebuild | Rebuild retrieval cache for a system |
| GET | /platform/agents | List active agents and capacity |
| POST | /platform/agents/start | Start an agent |
| DELETE | /platform/agents/{agent_ref} | Stop an agent |
| GET | /platform/routes/recent | Show which agent handled recent queries |
| GET | /platform/records | Return stored quality and review metadata |
| GET | /review/pending | List pending review items |
| GET | /review/{review_id} | Fetch a single review item |
| POST | /review/{review_id}/approve | Approve a response and optionally provide a final edited output |
| POST | /review/{review_id}/reject | Reject a response and capture reviewer notes |
| GET | /system/metadata | Return system versioning and GAMP-oriented metadata |
| GET | /audit/traces/{trace_id} | Return audit events for a single trace |
| GET | /audit/reviews/{review_id} | Return audit events for a review lifecycle |
Human-in-the-Loop Review
Flagging model outputs
Krionis currently routes outputs to review when the query or answer contains review keywords such as dosage, treatment, compliance, GMP, or validation, or when the response crosses the configured length threshold.
Preserved records
- Original generated response
- Reviewer notes
- Final approved response
- Timestamps
- User and reviewer attribution
Operator experience
Split by responsibility
The built-in Krionis console separates the operator workflow from telemetry, runtime, configuration, records, and reviewer signoff.
API first
Those pages are reference clients only. The same platform endpoints can be used to build a completely custom frontend on top of Krionis.
Audit and Traceability
{
"status": "pending_review",
"trace_id": "4c31d2d7-3d7d-4d39-9f79-cf4c57c1b182",
"review_id": "9a4f4b6d-c6b8-47af-88c6-5d1dfd0984aa",
"system": "TestSystem",
"question": "What is the dosage recommendation?",
"response_preview": "Dosage guidance requires human validation before release."
}
Built for inspections
Every query returns a trace_id. Reviewable outputs also return a review_id. These IDs let downstream systems reconstruct the full audit chain without relying on mutable application state.
Examples
curl -X POST http://127.0.0.1:8000/query \
-H "Content-Type: application/json" \
-H "x-user-id: operator-1" \
-d '{
"system": "TestSystem",
"question": "What is the restart sequence?"
}'
curl http://127.0.0.1:8000/review/pending \
-H "x-api-key: your-review-key"
curl -X POST http://127.0.0.1:8000/review/REVIEW_ID/approve \
-H "Content-Type: application/json" \
-H "x-api-key: your-review-key" \
-H "x-reviewer-id: qa-1" \
-d '{
"final_response": "Approved and verified dosage response.",
"reviewer_notes": "Cross-checked against SOP-17."
}'
curl http://127.0.0.1:8000/audit/traces/TRACE_ID \
-H "x-api-key: your-review-key"