# Unified substrate and authority

One SurrealDB graph for authoritative and experiential knowledge - provenance and reconciliation, not two silos.

SurrealDB Agent Memory stores **authoritative** and **experiential** knowledge in **one** SurrealDB graph - the **eight pillars** in practice, especially Authoritative and Experiential, expressed as records and edges, not two separate databases.

> **One multi-model SurrealDB substrate** - documents, turns, entities, attributes, relations, embeddings, traces, and (where enabled) geometry - with **provenance** explaining *which stream* produced a record and **reconciliation** deciding how streams combine.

“Layers” are still a useful **pedagogical** picture for **authority**: curated organisational truth versus conversational input. **Physically**, however, both streams are records and edges in the **same** database, updated under **ACID** transactions.

## Two streams of truth (not two databases)

| Stream | Typical `source.kind` | What it holds | Default trust |
| --- | --- | --- | --- |
| **Authoritative** | `document` (and operator `upsert`) | Manuals, policies, product data, repos, structured exports | High - vetted sources |
| **Experiential** | `turn`, plus `reflect`, `elaboration`, `consolidation`, … | What users and agents said; synthesised or background-minted facts | Lower - must earn promotion |

Retrieval, elaboration, and consolidation see **one** `entity` / `relation` graph. Hybrid rankers fuse vectors, BM25, graph structure, keyword bridges, geo predicates, and trace-derived features without cross-store joins - so questions like “semantically close to X, mentioning Y, linked to entity Z, valid as of last March” stay **one query** over one engine, not four databases stitched after the fact.

## How authority is enforced

When an experiential assertion disagrees with authoritative material, the reconciler:

1. **Does not** silently overwrite curated records.
2. Records the experiential assertion with provenance intact.
3. Surfaces **`uncertainty`** (and/or conflict metadata) so you can see the gap.

That is how the **Authoritative** pillar wins over casual assertions: **authority is a reconciliation policy**, not a second copy of the universe hidden in another engine.

## Why this matters

- **Transactions** across “what the user said” and “what the handbook says” can be reasoned about **together**.
- **Contradictions** become first-class records you can query, not cosine-distance accidents.
- **[Traces](/docs/agent-memory/architecture/traces-and-evolution.md)** link decisions back to the sources considered.

## Related reading

- [Eight pillars and six categories](/docs/agent-memory/architecture/eight-pillars-and-categories.md)
- [Principles and goals](/docs/agent-memory/architecture/principles-and-goals.md)
- [Authority when pillars meet](/docs/agent-memory/reasoning/authority-hierarchy.md) - how curated and experiential streams interact in APIs today
