Evidence ledger
Genome
Append-only observations with source, SHA-256 digest, namespace, and both occurrence and recording time. The lossless source of truth.
Open-source research kernel · pre-alpha
EviCortex is a local-first Python memory kernel for long-lived AI systems. It keeps every observation exactly as recorded, tracks which claims a newer one has replaced, and compiles a cited context capsule under a hard token budget.
The problem
Question sent to memory“Which interface theme does Ada prefer?”
Assistants that run for months collect facts that change. Each update is just more text in the history.
The reader model has to guess which one is still true, and the outdated chunk spends budget the current one needed.
Both observations stay in the evidence ledger. Only the current fact is packed, with a stable evidence ID you can expand.
as_of and the capsule shows what was true then.History is a query, not a deletion. On 1 Feb 2026 the light theme was the valid claim, and that is what gets packed.
Illustration built from examples/quickstart.py. Behaviour, not a benchmark.
How it works
EviCortex separates the evidence it keeps from the views it uses to find that evidence. Views can be wrong or rebuilt. The evidence stays put.
Genome
Append-only observations with source, SHA-256 digest, namespace, and both occurrence and recording time. The lossless source of truth.
Engram
Rebuildable claim, lexical, entity, graph, temporal and optional semantic views. A correction creates a revision instead of erasing old evidence.
Transcript
Query-time ranking, temporal filtering, conflict surfacing and packing under a strict estimated-token budget, with stable IDs you can expand later.
The recall pipeline
Seven gates between a question and a capsule. Watch the rose (superseded) evidence drop out at the temporal filter, and the stream narrow at the packer.
Interim results · cutoff 25 Oct 2026
Across 200 knowledge-update queries at a 512-token budget, no EviCortex capsule included a superseded source. Fixed-chunk FTS and Hybrid RAG did in 100% of them.
On the matched answerable cohort (n = 1,921), EviCortex packed every gold source and no forbidden one in 99.27% of queries. Both chunk baselines reached 89.59%.
Matched answerable cohort, n = 1,921
Share of queries whose context held every gold source and no forbidden one
n = 200, budget 512 tokens. Lower is better.
| Metric and budget | EviCortex | FTS | Hybrid RAG |
|---|---|---|---|
| Mean source-ID recall, 512 | 71.73% | 100% | 100% |
| Mean source-ID recall, 1,000 | 69.99% | 100% | 100% |
| Mean source-ID recall, 2,000 | 69.73% | 100% | 100% |
| Mean source-ID recall, 4,000 | 99.27% | 100% | 100% |
| Mean source-ID recall, 8,000 | 100% | 100% | 100% |
| All gold, no forbidden, 512 | 65.12% | 89.59% | 89.59% |
| All gold, no forbidden, 4,000 | 99.27% | 89.59% | 89.59% |
| Stale-reference inclusion, 512 (n = 200) | 0.00% | 100% | 100% |
At 512 to 2,000 tokens EviCortex recovers about 70–72% of gold source IDs, while both chunk baselines recover all of them. That gap is where current research effort goes.
Methodology
The average share of a query’s gold source IDs present in the packed context.
The share of queries whose context holds every gold source and none marked forbidden.
On knowledge-update queries, the share whose context includes a source a later update superseded.
Quickstart
evicortex-research, imported as evicortexgit clone https://github.com/Varun-SV/EviCortex.git
cd EviCortex
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python examples/quickstart.pyfrom evicortex import ClaimInput, EviCortex
with EviCortex.open("memory.db") as memory:
record = memory.remember(
namespace="assistant/user-1",
content="Ada prefers the dark interface theme.",
source="conversation/42",
occurred_at="2026-04-18T09:30:00Z",
claims=[ClaimInput("user:ada", "prefers_theme", "dark")],
)
capsule = memory.recall(
namespace="assistant/user-1",
query="Which interface theme does Ada prefer?",
budget_tokens=300,
)
print(capsule.to_prompt())Roadmap
The baselines fit all gold evidence into 512 tokens, so the gap comes from selection and serialization, not from the budget itself.
Evidence ledger, versioned claims, valid-time recall, conflict surfacing and hard-budget packing on SQLite and FTS5.
Audited claim-extraction boundary with exact source spans, durable semantic profiles and repair.
Offline dense-encoder adapter, reranker seam and a strict LongMemEval-schema retrieval runner.
Close the 512–2,000 token gap without giving back the 0% stale-reference result.
Byte-verified dataset, preregistered configuration, and no-memory, full-history and oracle controls.
Move from retrieval proxies to answers, with exact reader-tokenizer accounting and calibrated abstention.
Documentation
Install the kernel and inspect your first MemoryCapsule.
02 · LEARNEvidence, claims, time, projections, namespaces and capsules.
03 · BUILDPublic classes, methods and provider options.
04 · DESIGNThe three planes and the invariants that hold them together.
05 · MEASUREReproduce tests and research checkpoints.
06 · ASKSecurity boundaries, limits and common questions.
Paper
A write-up of the design, the evaluation contract and the full results. It will report final numbers, not the interim ones above.