Beliefs (facts)

View as Markdown

Beliefs (facts)

Beliefs are the atomic units of knowledge in XTrace. Each represents a single assertion about the user or their context.

Lifecycle

A belief moves through these states:

StatusMeaning
activeCurrent and retrievable
supersededReplaced by a newer belief (linked via superseded_by)
retractedExplicitly denied — no replacement exists

When you say “I moved to Austin,” that creates an active belief. Later, “I moved to Denver” supersedes it — the old belief stays in the revision chain for lineage, but only the new one is returned in searches.

Retraction handles pure denial: “We’re NOT doing the Kafka migration.” The old belief is marked retracted with no replacement. This is formal contraction — one of the hardest problems in belief revision, and one most memory systems ignore entirely.

Entrenchment

Not all beliefs are equal. XTrace assigns entrenchment weight based on provenance:

  1. User axioms — explicitly curated core beliefs (e.g., “I work at Anthropic”). Never auto-overridden.
  2. User-stated — things the user said directly. Outrank system inferences.
  3. System-inferred — extracted by the pipeline from conversation context. Can be overridden by higher-entrenchment sources.

Revision chain

Each superseded belief links to its replacement, forming a chain:

"User lives in SF" → superseded by → "User lives in Austin" → superseded by → "User lives in Denver"

You can traverse the chain via GET /v1/facts/{id}/ancestors to see the full history of how a belief evolved.

API

OperationEndpoint
CreatePOST /v1/facts
ListGET /v1/facts (filter by status=active|superseded)
SearchGET /v1/facts/search
GetGET /v1/facts/{id}
UpdatePUT /v1/facts/{id}
DeleteDELETE /v1/facts/{id}
AncestorsGET /v1/facts/{id}/ancestors