Epistemic Kernel

Epistemic Kernel

Foundational Architecture for Trust-Aware Multi-Agent Systems

The Epistemic Kernel is a broker daemon that enforces a strict structural distinction between fact and belief in multi-agent LLM systems. It is the first buildable slice of a ground-up “AI OS” — applying traditional kernel principles (mediate access to shared resources) to the substrate of truth rather than memory/CPU.


Core Concept

Multi-agent LLM systems today have no structural distinction between fact and belief. Agent A summarizes something, Agent B treats the summary as ground truth, Agent C builds on B’s already-corrupted belief — and by the fourth hop nobody can trace where the error entered.

The Epistemic Kernel solves this by enforcing one invariant everywhere:

A process may act on another process’s belief, but it can never receive that belief as if it were an attested fact.

This is achieved through a real Linux privilege boundary plus a Rust type system that makes the fact/belief distinction impossible to accidentally erase.


Architecture Overview

                 ┌────────────────────────────┐
                 │        Broker Daemon        │
                 │  (owns Unix socket, owns    │
                 │   the only Attested ctor)   │
                 │                              │
                 │  ┌────────────┐ ┌──────────┐│
                 │  │ Provenance │ │ Attestor ││
                 │  │   Store    │ │ Registry ││
                 │  │ (TTL sweep)│ │(pluggable)││
                 │  └────────────┘ └──────────┘│
                 └──────────────┬───────────────┘
                                │ Unix domain socket
                                │ (request/response protocol)
              ┌─────────────────┼─────────────────┐
              │                 │                 │
        ┌─────▼─────┐     ┌─────▼─────┐     ┌─────▼─────┐
        │  Agent A   │     │  Agent B   │     │  Agent C   │
        │ (client SDK)│    │(client SDK)│     │(client SDK)│
        └────────────┘     └────────────┘     └────────────┘

Components

ComponentPurpose
ek-provenanceRust crate defining Provenance, Tagged<T>, upgrade/downgrade functions, serialization
ek-brokerDaemon owning the socket, store, attestor registry, TTL sweeper
ek-sdkClient SDK crate for agents to communicate with the broker
ek-attestorsPluggable trait Attestor + filesystem implementation for MVP
ek-demoScripted fake agents exercising the system for acceptance testing

Provenance Type System

The core innovation is a type system that distinguishes three categories:

  • Attested: State whose provenance traces to a real, broker-verified source (file, sensor, direct process output)
  • Belief: State derived/inferred by an agent (a model), never directly ground truth
  • Synthesized: Generated artifacts (image, audio, self-authored tool) — neither a fact nor an inference about the world

Key rule: Provenance::Attested has no public constructor outside ek-broker. Every other crate can only build Believed or Synthesized, and building Believed always requires wrapping an existing Provenance (never fabricating one from nothing).


Key Invariants (The Constitution)

The Epistemic Kernel enforces these non-negotiable rules:

RuleDescription
R1Sole constructor: Only ek-broker can construct Provenance::Attested
R2No silent stripping: Cannot discard provenance tag while keeping the value
R3No flattening: Belief provenance must nest, never replace with fresh tag
R4Mandatory revalidation: Every attested fact must be re-checkable via Attest
R5TTL on beliefs: Expired beliefs are inaccessible until re-derived
R6No direct cross-agent access: All state crosses boundary through broker protocol only
R7Reject forged attestation: Broker rejects agent claims of Attested provenance
R8Traceable by construction: Can always walk belief back to real Attested leaf
R9No amnesty by age: Retained beliefs always expose staleness, never upgrade to attested
R17Rate-bounded requests: Per-agent request-rate limiting to prevent abuse
R18Crash-safe writes: Atomic operations survive unclean shutdowns without corruption

MVP Definition

The MVP is not a full OS. It is:

  1. A broker daemon (single OS process, async runtime) that owns a Unix domain socket
  2. A provenance type library (Rust crate) where Attested values can only be constructed inside the broker
  3. A client SDK crate that agent processes use to talk to the broker over the socket
  4. A pluggable attestor interface with filesystem facts implementation for MVP
  5. A belief store with TTL-based expiry
  6. A demo with 2-3 toy agent processes proving the broker’s guarantees

Explicitly out of scope for MVP: multi-machine distribution, process-level UID isolation, semantic filesystem, scheduler/context-window economy, GUI, LLM integration.


Roadmap

PhaseDescription
Phase 0Spec, requirements, rules — COMPLETE
Phase 1ek-provenance crate — types, constructors, visibility rules, serialization
Phase 2ek-broker skeleton — socket, connection handling, in-memory belief store, protocol enforcement
Phase 3ek-attestors — trait + filesystem implementation
Phase 4Persistence + TTL — persistent store, background sweep, retained beliefs, Promote request
Phase 5ek-sdk — ergonomic async client wrapper
Phase 6ek-demo — scripted agents, acceptance tests
Phase 7Stretch: process-level UID/cgroup isolation, multi-machine transport, second attestor backend

Documentation

Core Documentation

Epistemic Kernel Full Specification — Complete technical specification including protocol details, data model, functional requirements, and non-functional requirements

Future Directions & Hardware Tiers — Exploratory document covering hardware tiers (T0-T5), functional expansion ideas, ambient device ecosystem, security & threat model, multi-user identity, and open questions

dream.sh Memory Consolidation — Aurora’s memory consolidation script demonstrating provenance tracking principles aligned with the Epistemic Kernel

Quick Reference

ComponentDescription
ek-provenanceRust crate defining Provenance, Tagged<T>, upgrade/downgrade functions
ek-brokerDaemon owning the socket, store, attestor registry, TTL sweeper
ek-sdkClient SDK crate for agents
ek-attestorsPluggable trait Attestor + filesystem implementation
ek-demoScripted fake agents for acceptance testing

Relationship to Aurora


Relationship to Aurora

The Epistemic Kernel serves as foundational architecture for Aurora’s memory and provenance systems. It provides the trust boundaries and provenance tracking that enable Aurora to maintain transparency about what she knows and how she knows it — a core principle in her design.

For more about Aurora, see Aurora’s self-documentation