episteme

Latest Release License: AGPL-3.0-or-later Unique Clones

English한국어Español中文

epistemekernel.com

episteme makes an AI agent show its work before it acts.

You know the feeling: the diff looks fine, the analysis sounds right, and a small voice says I should probably read this more carefully. episteme is that voice, given teeth. Before anything irreversible — a push, a deploy, a migration — your agent has to write down what it knows, what it doesn't, and what would prove it wrong. On disk, where you can read it. A quiet, deterministic gate holds the door until the thinking is real.

It plugs into the tools you already use (Claude Code today; a vendor-neutral adapter layer for others). Lessons from verified decisions stick around as tamper-evident protocols that resurface exactly when they matter again — so the agent gets sharper on your codebase over time, and your docs are held to the same standard as your code.

What it looks like ↓ · Install ↓ · The demos ↓ · How it compares ↓ · Under the hood ↓ · Does it work? ↗


What it looks like

Say you ask your agent: "Evaluate whether our retrieval-augmented memory system is actually improving response quality."

Without episteme, the agent treats this as a measurement chore. It pulls 30 days of metrics, finds a 7% lift in thumbs-up rate, and writes you a confident memo: "memory helps; keep shipping." It reads beautifully. It's also wrong three ways at once:

With episteme, the memo can't land yet. First, the agent has to put this on disk:

FieldWhat the agent must write
Core QuestionThe one question this work actually answers — "does memory improve correctness, controlled for length?"
KnownsVerified facts with sources — not plausible-sounding guesses
UnknownsNamed gaps ("whether the lift survives length control") — a blank here fails the gate
AssumptionsLoad-bearing beliefs, flagged so they can be falsified
DisconfirmationA pre-committed observable — "if the lift disappears under length-controlled re-run, memory is adding tokens, not signal"

Lazy answers (none, n/a, tbd, 해당 없음) don't pass. Vague hedges ("if issues arise") don't pass either — only a concrete, observable way to be proven wrong does. And here's the quiet magic: the act of writing that surface is exactly what exposes that thumbs-up was never the question. That's the product. The agent has to think in a way you can audit, before the consequences exist.

episteme — the thinking framework in motion

Recorded from scripts/demo_posture.sh — a blocked constraint-removal, a validated rewrite, a refactor forced to declare its blast radius, and the synthesized protocol firing on a later decision.

What you get

Install

Option A — Claude Code plugin (two commands, self-contained):

/plugin marketplace add junjslee/episteme
/plugin install episteme@episteme

Hooks, agents, and skills are live in your session; no pip involved.

Option B — clone the kernel (CLI + editable source):

git clone https://github.com/junjslee/episteme ~/episteme
cd ~/episteme && pip install -e .

episteme init      # generate personal memory files from templates
episteme setup .   # score working style + reasoning posture
episteme sync      # push identity to every adapter
episteme doctor    # verify wiring

Adopting in an existing repo? Run episteme docs lint first — it asks every tracked doc to declare what it is, and that first run is usually the most honest inventory the repo has ever had. Details, project harnesses, and the full command reference live in INSTALL.md · docs/SETUP.md · docs/COMMANDS.md.

The demos

Every demo ships its real artifacts. Read them before you read any philosophy — they're the receipts.

DemoWhat it proves
demos/04_symbiosis/The thesis, from real history (2026-04-27, Events 65–67): the operator proposed an anxiety-driven irreversible bundle; the kernel's adversarial review surfaced 3 Critical findings; the decomposed path became constitutional in AGENTS.md. Agent and human debugging each other's intent. DIFF.md shows the alternate world side-by-side.
demos/03_differential/Same prompt, framework off vs on. Off answers how; on answers whether. DIFF.md names the failure modes caught.
demos/02_debug_slow_endpoint/A p95 regression where the fluent-wrong "add a cache" dies at the Core Question gate; a schema-level root cause is produced instead.
demos/01_attribution-audit/The canonical four-artifact shape (reasoning-surface → decision-trace → verification → handoff) — the kernel auditing its own attributions.
demos/05_contract_gate/The behavioral complement: declared contracts run at turn-end.

Re-record the hero demo yourself: scripts/demo_posture.sh (recipe in the script header). The live dashboard renders against the kernel's own hash chain — web/README.md.

How it compares

AxisepistemeMemory APIs (mem0, OpenMemory)Agent runtimes (Agno, opencode)
What it isReasoning governance + identity layer over your existing toolsMemory API embedded in an appA runtime that executes agents
Where identity livesGoverned, versioned markdown/JSON — cross-toolVector/graph store, per appSystem prompt, per session
Know-howExtracted at the file-system boundary, hash-chained, resurfaced by contextOpaque retrievalPrompt-tuned, per session
Docs/state hygieneLifecycle-linted, GC'd, drift-gated in CIN/AN/A

Isn't this just contract testing? Contract tests ask did the code do what the spec says. The Reasoning Surface asks something earlier and harder: was that the right spec, the right question, and what would have told us otherwise? A green test suite can't tell you you're solving the wrong problem beautifully — that failure happens before the spec exists. episteme ships both layers (docs/CONTRACT_GATE.md).

Why can't a prompt do this? Because prompts are suggestions. They live for one call, get skipped when you're in a hurry, and quietly fall out of context. A hook that exits non-zero doesn't negotiate. The MIRROR benchmark (arXiv 2604.19809; 16 models, 8 labs, ~250k instances) tested this directly: showing a model its own calibration scores changed nothing — only architectural constraint helped (confident-failure rate 0.60 → 0.14). Posture beats prompting.

Honest limits

Under the hood

Status: 1.10.0-rc.1 · The practice is five stages — Frame → Decompose → Execute → Verify → Handoff — and each one exists to counter a specific way minds go wrong under fluency: question substitution, WYSIATI, anchoring, narrative fallacy, planning fallacy, overconfidence. The full story is in docs/THE_WAY_TO_THINK.md; the four Cognitive Blueprints (Axiomatic Judgment · Fence Reconstruction · Consequence Chain · Architectural Cascade) are specced in docs/ARCHITECTURE.md.

graph TD
    subgraph SG1["① The Agentic Mind — Intention"]
        A["Agent\nGenerating intent for a high-impact op"]
        B["Reasoning Surface\ncore_question · knowns · unknowns\nassumptions · disconfirmation"]
        D["Doxa\nFluent hallucination\nnone / n/a / tbd / 해당 없음\n< 15 chars · missing fields"]
        E["Episteme\nJustified true belief\nconcrete knowns · named unknowns\ndisconfirmation ≥ 15 chars · no placeholders"]
    end

    subgraph SG2["② The Sovereign Kernel — Interception"]
        F["Stateful Interceptor\ncore/hooks/reasoning_surface_guard.py\nnormalises cmd · deep-scans agent-written files\ncross-call stateful memory"]
        G["Hard Block · exit 2\nExecution denied\nAgent forced to re-author surface"]
        H["PASS · exit 0\nPrecondition satisfied\nExecution admitted to Praxis"]
    end

    subgraph SG3["③ Praxis & Reality — Execution"]
        I["Tool Execution\ngit push · bash script.sh · npm publish\nterraform apply · DB migrations · lockfile edits"]
        J["Observed Outcome\ncore/hooks/calibration_telemetry.py\nexit_code 0 or non-zero · stderr captured"]
    end

    subgraph SG4["④ 결 · Gyeol — Cognitive Texture & Evolution"]
        K["Prediction Record\ncorrelation_id stamped at PASS\n~/.episteme/telemetry/YYYY-MM-DD-audit.jsonl"]
        L["Outcome Record\ncorrelation_id · exit_code · stderr\n~/.episteme/telemetry/YYYY-MM-DD-audit.jsonl"]
        M["episteme evolve friction\nsrc/episteme/cli.py · _evolve_friction\npairs prediction ↔ outcome by correlation_id\nranks under-named unknowns · flags exit_code ≠ 0"]
        N["결 · Gyeol\nRefined cognitive grain\nfriction hotspots · calibrated profile axes"]
        O["Operator Profile\ncore/memory/global/operator_profile.md\nlast_elicited axes updated · confidence rescored"]
        P["kernel/CONSTITUTION.md\nFour principles recalibrated\nfailure-mode counters sharpened"]
    end

    A --> B
    B --> D
    B --> E
    D --> F
    E --> F
    F --> G
    F --> H
    G -.->|"cognitive retry"| A
    H --> I
    I --> J
    E -.->|"correlation_id stamped at PASS"| K
    J --> L
    K --> M
    L --> M
    M --> N
    N --> O
    N --> P
    O -.->|"posture loop closed"| A
    P -.->|"posture loop closed"| A

    classDef doxaStyle fill:#c0392b,stroke:#922b21,color:#fff
    classDef episteStyle fill:#1e8449,stroke:#145a32,color:#fff
    classDef passStyle fill:#27ae60,stroke:#1e8449,color:#fff
    classDef praxisStyle fill:#2ecc71,stroke:#27ae60,color:#000
    classDef gyeolStyle fill:#1a5276,stroke:#154360,color:#fff
    classDef kernelStyle fill:#6c3483,stroke:#512e5f,color:#fff
    classDef neutralStyle fill:#2c3e50,stroke:#1a252f,color:#fff

    class D,G doxaStyle
    class E episteStyle
    class H,I passStyle
    class J praxisStyle
    class K,L,M,N,O,P gyeolStyle
    class F kernelStyle
    class A,B neutralStyle

Four ideas, in the colors above. Doxa (red) is fluent-but-unvalidated output — the failure state this whole thing exists to prevent. Episteme (green) is a surface that actually holds up, and it's the price of admission for execution. Praxis is the action that got through, plus what really happened. 결 · Gyeol (blue) is the loop that folds those outcomes back into how you're calibrated next time. Stack-agnostic by construction: the kernel is plain markdown, the profile plain JSON, the adapters (Claude Code, Hermes, OMO/OMX) swappable.

The kernel itself — markdown, no code, nothing to lock you in — starts at kernel/:

FileWhat it defines
SUMMARY.md30-line operational distillation
CONSTITUTION.mdRoot claim, four principles, reasoner failure modes
FAILURE_MODES.mdFull 12-mode taxonomy ↔ counter artifacts
REASONING_SURFACE.mdThe Knowns / Unknowns / Assumptions / Disconfirmation protocol
MEMORY_ARCHITECTURE.mdFive memory tiers (working → reflective)
KERNEL_LIMITS.mdWhen the kernel is the wrong tool
REFERENCES.mdAttribution + convergent contemporary work
episteme/
├── kernel/          philosophy (markdown; travels across runtimes)
├── core/hooks/      deterministic gates + session automation
├── src/episteme/    CLI + core library (doc lifecycle, sync, telemetry)
├── adapters/        delivery layers (Claude Code, Hermes, …)
├── demos/           end-to-end reference deliverables
├── skills/          reusable operator skills
├── templates/       project scaffolds
└── docs/            architecture, contracts, runtime docs — lifecycle-linted

Authority hierarchy: project docs > operator profile > kernel defaults > runtime defaults. Repo operating contract for agents: AGENTS.md · LLM sitemap: llms.txt.

TopicWhere
The practice, operationalizeddocs/THE_WAY_TO_THINK.md
Architecture + blueprint specsdocs/ARCHITECTURE.md
Does it work? (evaluation method)docs/EVALUATION_METHOD.md
Install paths (marketplace, CLI, dev)INSTALL.md
Doc lifecycle + memory contractsdocs/MEMORY_CONTRACT.md · docs/SYNC_AND_MEMORY.md
Hooks + governance packsdocs/HOOKS.md
Security posture (OWASP Agentic 2026 mapping)docs/COMPLIANCE_CROSSWALK.md
Personal customizationdocs/CUSTOMIZATION.md
Full docs index (generated)docs/README.md

Commercial licensing

Need a commercial license, or want help adopting this? Say hello — I'd genuinely like to hear what you're building.