API for clear local control

One API surface for answers, review, and traceability.

The Krionis API gives teams one clear way to query local knowledge, route higher-risk answers into review, inspect traces, and manage the system around it. It is built to stay simple when you start and stay usable as you grow.

1 surface Query, review, audit, and control in one place
Review ready Hold sensitive answers before release
Trace first Keep IDs that help teams inspect every step

What this API helps you do.

The API is grouped around the jobs teams actually need: ask questions, send risky work to review, inspect the trail, and manage the local system behind it.

Core

Query local knowledge

Send a question and get a grounded answer from the system you choose.

Review

Hold sensitive work

Route higher-risk answers into a human review flow before they are released.

Audit

Follow the trace

Use trace IDs and review IDs to inspect what happened and when.

Main route groups.

These are the parts most teams touch first. The grouping keeps the page readable, while the full route table below keeps the exact surface close by.

Ask and route

Start with query endpoints.

POST /query

Send a normal question through the main pipeline and review gate.

POST /orchestrator/query

Send the request through a selected agent when you need a more controlled route.

GET /platform/routes/recent

See how recent requests were routed across the system.

Review and audit

Keep answers inspectable.

GET /review/pending

List the items waiting for a human decision.

POST /review/{review_id}/approve

Approve a held answer and optionally edit the final response.

GET /audit/traces/{trace_id}

Pull the audit trail for one trace from start to finish.

Operations

Run and inspect the system.

GET /platform/telemetry

Check live agent and queue activity.

POST /platform/agents/start

Start an agent for the flow you want to run.

POST /platform/indexes/{system_name}/rebuild

Rebuild search indexes when your local source files change.

Compliance

Work with dedicated regulation pools.

GET /compliance/pools

List the regulation-only pools available to the system.

POST /compliance/assess

Check a regulated document against a selected regulation corpus.

POST /compliance/pools/{pool_name}/start-agent

Start the built-in regulatory agent on a dedicated pool.

Full route table.

Review and audit routes use the x-api-key header. The table below keeps the whole surface together in one place.

Method Path Purpose
GET/healthCheck whether the service is ready.
POST/querySend a question through the main pipeline and review gate.
POST/orchestrator/querySend 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 configuration and storage paths.
GET/platform/indexesShow source directories and search cache state.
POST/platform/indexes/{system_name}/rebuildRebuild the search 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 recent routing decisions.
GET/platform/recordsReturn stored quality and review metadata.
GET/compliance/poolsList regulation-only corpora.
POST/compliance/poolsCreate or update a regulation-only pool.
POST/compliance/pools/{pool_name}/rebuildRebuild a regulation pool index.
POST/compliance/pools/{pool_name}/start-agentStart the built-in regulatory agent.
POST/compliance/assessAssess a regulated document against a regulation corpus.
GET/compliance/assessmentsList stored compliance assessments.
GET/review/pendingList pending review items.
GET/review/{review_id}Fetch one review item.
POST/review/{review_id}/approveApprove a response and optionally edit the final output.
POST/review/{review_id}/rejectReject a response and store reviewer notes.
GET/system/metadataReturn system version and metadata.
GET/audit/traces/{trace_id}Return audit events for one trace.
GET/audit/reviews/{review_id}Return audit events for one review lifecycle.

Why trace IDs matter.

Every request returns a trail you can follow. Reviewable outputs also return a review ID, which helps teams inspect what was held, who acted on it, and what changed.

Review path

Response records stay connected.

  • Keep the original generated response.
  • Store reviewer notes and final approved text.
  • Track timestamps and attribution.
  • Use trace IDs to rebuild the full path later.
Sample payload

What that looks like in practice.

{
  "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."
}

Quick examples.

These are the calls many teams start with first: ask a question, check the review queue, approve a held answer, and inspect the audit trail.

Query

Ask a system

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?"
  }'
Review

List pending review items

curl http://127.0.0.1:8000/review/pending \
  -H "x-api-key: your-review-key"
Approve

Approve a held response

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."
  }'
Audit

Inspect one trace

curl http://127.0.0.1:8000/audit/traces/TRACE_ID \
  -H "x-api-key: your-review-key"