v1

latestOpenAPI 3.1.0BUSL-1.12026-07-1756132288.0 KB

Write a single fact. Dispatches on infer mode: full (LLM-extracted), triples (caller-supplied), preview (dry run), none (literal).

post/api/v1/{context_id}/facts

Path parameters

context_idstring required

Spectron context id

Request body

infer'full' | 'triples' | 'preview' | 'none'

Inference mode for the /facts write API.

Decides which extraction path runs and which provenance kind the reconciler tags the writes with (see the per-variant docs below).

labelsLabel[]

Descriptive labels for the persisted rows (scope-model §5). Accepted and recorded on the wire now; row-level application lands in a follow-up (cf. ScopeView — accepted but behaves as Strict).

memory_category'identity' | 'knowledge' | 'context'

Memory category classification applied during extraction.

observed_atstring nullable

Optional RFC3339 known/observed time for the written facts (backfill). When set, the facts are stamped with this created_at (known time), so as_of queries see them dated to when they were observed rather than to wall-clock ingest. None keeps the default (facts dated to ingest time).

role'user' | 'assistant' | 'system' | 'tool'

Role of a conversation turn participant.

session_idstring nullable

Existing session id to attach the turn to. When absent, the handler auto-creates a session before the write.

textstring nullable

Free-form text (used by full, preview, none). Optional only when infer = triples is supplied.

Response

chunkIdstring
mode'full' | 'triples' | 'preview' | 'none' required

Inference mode for the /facts write API.

Decides which extraction path runs and which provenance kind the reconciler tags the writes with (see the per-variant docs below).

previewboolean
sessionIdstring required
turnIdstring