Reference documentation for the LeAP paradigm implemented in this library.
LeAP (Layered Epistemic Agent Protocol) is a four-layer cognitive architecture for AI agents. Information flows through distinct persistence regimes:
- Memory - experiences that fade (Gaussian decay)
- Knowledge - facts that persist until contradicted (indefinite supersession)
- Wisdom - beliefs that revise on evidence shift (evidence-gated revision)
- Intelligence - ephemeral reasoning (session-scoped)
Unlike RAG, LeAP adjudicates (via a Custodian), tracks provenance, supports supersession, and shapes itself around usage (heat). Extraction produces structured claims; the epistemology library is deterministic.
primitives implements the open, deterministic parts of LeAP:
- Epistemology - confidence math, contradiction detection, promotion rules (R1/R2), corroboration. Pure functions, no LLM at decision time.
- Signals - heat, freshness, priority scoring formulas.
- Schema - node type definitions,
PersistenceLayerenum, edge catalogue. - Protocols -
KnowledgeStore,LifecycleManager,SignalProvider,ProvenanceTracker. - Shared utilities - used across modules.
What is NOT in this library (proprietary to the service layer):
- Custodian workers (promotion, synthesis, revision scheduling)
- Extraction prompts and LLM orchestration
- Graph + vector write paths
- Storage backends (Memgraph, Qdrant, Redis, Postgres)
- API and MCP interface
| Doc | Contents |
|---|---|
| 01-paradigm.md | Why LeAP, the category error in RAG, when LeAP pays off |
| 02-layers.md | KMWI layer semantics, node types, scoring formulas |
| 03-transitions.md | Transition catalogue (T1-T15), execution rules, provenance |
| 04-metacognition.md | Meta-memory, provenance, time-travel, reflection |
| 05-mcp-contract.md | MCP tool contract and invariants |
| 06-epistemology.md | Deterministic primitives: confidence, contradiction, corroboration |
| 07-agent-usage.md | Agent cognitive guide for LeAP usage |
| 08-data-lifecycle.md | Forget, decay, hard-delete, GDPR erasure |
- 01-paradigm.md - what and why
- 02-layers.md - KMWI taxonomy
- 03-transitions.md - architecture lives here
- 06-epistemology.md - deterministic primitives (maps directly to this library's API)