Krionis logo

KRIONIS

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.

HITL gate Review queue Audit trace OpenAPI Agent control Cache rebuild Result records

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/healthService readiness
POST/querySubmit a query through the Krionis pipeline and HITL gate
POST/orchestrator/querySubmit a controlled query through a selected agent
GET/platform/dashboardReturn operator dashboard state
GET/platform/telemetryReturn live agent and queue telemetry
GET/platform/runtimeReturn process and worker diagnostics
GET/platform/configurationReturn resolved YAML configuration and storage paths
GET/platform/indexesShow source directories and retrieval cache state
POST/platform/indexes/{system_name}/rebuildRebuild retrieval cache for a system
GET/platform/agentsList active agents and capacity
POST/platform/agents/startStart an agent
DELETE/platform/agents/{agent_ref}Stop an agent
GET/platform/routes/recentShow which agent handled recent queries
GET/platform/recordsReturn stored quality and review metadata
GET/review/pendingList pending review items
GET/review/{review_id}Fetch a single review item
POST/review/{review_id}/approveApprove a response and optionally provide a final edited output
POST/review/{review_id}/rejectReject a response and capture reviewer notes
GET/system/metadataReturn 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"