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 | /compliance/pools | List regulation-only corpora |
| POST | /compliance/pools | Create or update a regulation-only pool |
| POST | /compliance/pools/{pool_name}/rebuild | Rebuild a regulation pool index |
| POST | /compliance/pools/{pool_name}/start-agent | Start the built-in regulatory agent |
| POST | /compliance/assess | Assess a regulated document against a regulation corpus |
| GET | /compliance/assessments | List stored compliance assessments |
| 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 |
Regulatory Wire
Dedicated regulation pools
Krionis can keep regulations in their own indexed pools so teams do not need to mix regulatory documents with SOPs or internal manuals.
Built-in regulatory agent
The platform includes a dedicated regulatory agent that binds directly to those pools and supports the compliance workflow out of the box.
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"
Explore through Jupyter
Notebook:
notebooks/krionis_regulatory_wire_walkthrough.ipynb
Journey:
1. create a regulation-only pool
2. rebuild the pool
3. start the regulatory agent
4. submit a compliance assessment
5. approve the result through HITL
GitHub-ready onboarding
The notebook makes the Krionis platform easier to explore for solution engineers, notebook users, and teams that want to trial the regulatory wire quickly.