Spectron exposes one fused read path over the unified substrate: structured facts from turns and passages from documents. Use POST /api/v1/{context_id}/query for ranked hits and POST /api/v1/{context_id}/context for a pre-formatted LLM block.
Ranked hits — /query
Response fields:
| Field | Meaning |
|---|---|
tier | direct, cache, hybrid, or full_context |
hits | Ranked facts and/or passages |
query_ms | Server-side latency |
trace_id | Correlates with GET .../traces/{id} |
CLI flags: --mode hybrid|vector|bm25|graph, --include facts,passages, tri-temporal --as-of, --at-instant, --valid-from, --valid-until.
Formatted context — /context
Use when you want a single string for system-prompt injection:
Session-scoped context
Returns recall formatted for the session’s scope and recent turns.
Document-only query
For retrieval limited to uploaded files:
Chat (composed recall + synthesis)
Spectron runs recall internally, then calls the configured response model. Use --stream for SSE.
Profile and state
profile returns category-grouped attributes (identity, knowledge, context, instructions) for prompt assembly.
Four-tier router
See Coherence, retrieval, and cost tiers. Tiers progress from cheap structured lookup through response cache, hybrid vector + BM25 + graph, to full-context synthesis.