Memory Provenance
Every memory in Kernle carries provenance metadata — a detailed record of its origin, relationships, and confidence evolution over time. This enables self-examination (“why do I believe this?”), belief debugging, and identity archaeology.Provenance answers three fundamental questions about any memory:
- Where did this come from? — Source type and creation context
- What was it derived from? — Direct lineage chain
- How has it changed? — Confidence history and verification record
Universal Provenance Fields
Every memory type (episode, belief, note, value, etc.) carries these provenance fields:| Field | Type | Purpose | Example |
|---|---|---|---|
source_type | string | How this memory was created | direct_experience, inference, external |
source_entity | string | Who provided it (optional) | my-project, sean@emergent.ai |
source_episodes | array | Supporting evidence | ["ep:abc123", "ep:def456"] |
derived_from | array | Direct lineage chain | ["raw:f70c", "belief:old1"] |
confidence_history | array | Timestamped confidence changes | See below |
verification_count | number | Independent verification count | 3 |
Source Types
Source types are entity-neutral — we don’t distinguish between human and synthetic sources:Direct Experience
Firsthand observation or experience. Default for raw captures and manual entries.
Inference
Derived through reasoning over other memories. Common for beliefs formed by pattern recognition.
Consolidation
Emerged during memory consolidation/reflection. Insights from reviewing experiences.
External
Information received from another being. Includes both human and SI sources.
Seed
Pre-loaded during initialization. Inherited wisdom from roundtable discussions.
Observation
External observation from documents, web, etc. Non-conversational sources.
Lineage vs Evidence
Two critical fields serve different purposes:- derived_from
- source_episodes
Direct creation lineage — “This memory was literally created FROM these.”Used when a memory is created, including:
- raw-to-episode promotion (
raw:...→episode:...) - episode-to-belief promotion (
episode:...→belief:...) - belief revision (
belief:old_id→belief:new_id)
The Promotion Chain
Raw memories flow upward through promotion, with each step recording lineage:derived_from creates a traceable chain:
Confidence Decay
Memories that aren’t verified or reinforced gradually lose confidence over time:Decay Rates by Memory Type
Decay Rates by Memory Type
| Type | Decay Rate | Period | Floor | Rationale |
|---|---|---|---|---|
| Episode | 1% | 30 days | 0.5 | Standard — experiences fade |
| Belief | 1% | 30 days | 0.5 | Standard — beliefs need reinforcement |
| Value | 0.5% | 60 days | 0.7 | Slower — core values are stable |
| Note | 1.5% | 30 days | 0.4 | Faster — observations are transient |
| Drive | 0.5% | 60 days | 0.6 | Slower — motivations are deep |
| Goal | 1% | 30 days | 0.5 | Standard — goals can become stale |
Confidence History Format
Confidence History Format
CLI Commands
Provenance is integrated into all memory operations:Provenance Enforcement (v0.10.0)
Provenance is enforced by default. Every memory (except raw entries) must cite its sources viaderived_from.
Hierarchy Rules
| Memory Type | Required Sources | Allowed Source Types |
|---|---|---|
| Raw | none | — |
| Episode | >= 1 | raw |
| Note | >= 1 | raw |
| Belief | >= 1 | episode, note |
| Goal | >= 1 | episode, belief |
| Relationship | >= 1 | episode |
| Value | >= 1 | belief |
| Drive | >= 1 | episode, belief |
Stack Lifecycle and Enforcement
Provenance requirements depend on stack state:- INITIALIZING: Seed writes with
source_type="seed"bypass provenance (for bootstrap) - ACTIVE: All writes must have valid provenance (default state)
- MAINTENANCE: Writes blocked entirely (admin operations only)
Opting Out
For testing or migration, provenance can be disabled:Strength Cascade (v0.10.0)
When a memory’s strength changes, effects cascade through the provenance chain:- Forget/Weaken cascade: When a source memory is forgotten or weakened below 0.2, derived memories are flagged for review via audit entries
- Verify boost: When a memory is verified, its source memories get a +0.02 strength boost
- Ungrounded detection: If ALL source memories of a belief are forgotten/deleted, the belief is flagged as “ungrounded”
Belief Revision
Beliefs evolve through three mechanisms:Reinforcement
When experience confirms a belief, confidence increases with diminishing returns.
Supersession
When a belief evolves, the old one is deactivated and linked to its replacement.
Contradiction
Kernle detects conflicts between beliefs. Contradictions are features, not bugs.
Revision Example
supersedes/superseded_by are legacy compatibility fields retained for pre-v0.14 stacks. In normal operation, revision is reconstructed from audit entries (belief.revised, belief.deactivated) rather than from these fields.
Design Principles
Automatic, Not Manual
Provenance is recorded at creation time without requiring explicit caller intervention.
Write-Once Links
Forward and backward links are birth certificates — recorded once, never updated.
Trace Up, Don't Cascade Down
Upward tracing is cheap. Downward propagation is an exponential trap.
Entity-Neutral Sources
Source types don’t distinguish human from SI. A being is a being.
MCP Integration
Provenance is exposed through MCP tools for external clients:| Tool | Purpose | Parameters |
|---|---|---|
meta_lineage | Get full provenance chain | memory_type, memory_id |
meta_verify | Verify a memory with evidence | memory_id, evidence |
meta_uncertain | Find low-confidence memories | threshold, apply_decay |
memory_* | All creation tools support | source, derived_from |
Provenance transforms memory from a black box into an archaeological dig. Every belief can be traced back to its roots, every decision can be examined for its foundations.