CoreMem

Memory you can measure.
Zero LLM calls.

CoreMem is an on-device memory core for agents — ingest turns into a file-based journal, retrieve with a unified recall() API, consolidate with dream(), and expose it all through an MCP server, CLI, and editor hooks. No external APIs, no vector services, no internet.

v0.16.1 — Sep 2026 What's new
Conversation turn Agent Retrieved context → response recall() episodic · direct · expanded · fusion AgentJournal Daily pages · source-quote entries ingest_turn() Messages grouped by turn_id MemoryCore HybridDB-backed local store Each layer is independent, inspectable, and unit-testable
What it gives you

Retrieval that behaves like software, not magic.

Zero-LLM recall

The default episodic strategy decomposes your query, runs hybrid keyword + vector search, reranks, and diversifies — 0 LLM calls on the happy path.

Benchmark-validated

99.9% session recall@5 on LongMemEval Oracle, 95.0% on the harder S set, and 0% abstention across all modes.

Four strategies, one recall()

episodic (zero-LLM, reranked), direct (zero-LLM), expanded (one LLM call for rephrasing), fusion (RRF of both) — filters for role, session, time, and metadata.

A journal with receipts

AgentJournalCompiler extracts structured entries per turn; every claim must quote the source verbatim — deterministic, auditable, no hallucinated facts.

MCP server, CLI, hooks

coremem mcp exposes 8 stdio tools; wire Claude Code, Codex, or OpenCode through hook handlers in minutes.

Consolidation, not rewriting

dream() rolls journal entries into diary-style summaries in weekly chunks with cursor dedup. Raw turns stay verbatim — memory is never rewritten through a model.

Architecture

Ingest, consolidate, retrieve — over one embedded store.

CoreMem separates ingestion (ingest_turn, compile_turn), consolidation (dream), and retrieval (recall) on top of MemoryCore, backed by a single SQLite + FTS5 + ChromaDB store. Every layer is inspectable and testable.

MemoryCore

The main API: ingest, ingest_turn, recall, fetch, store, count, delete, compile_turn, dream, rebuild_index. Groups messages by turn_id.

AgentJournal

File-based journal of daily pages with weekly/monthly navigation. compile_turn() writes entries; every claim carries an exact source quote.

AgentJournalCompiler

Deterministic validation — each claim must be an exact substring of the source before it is written; failed claims are rejected or auto-corrected to the verbatim quote.

Versioned memory

Opt-in (0.14), default (0.15): git-like versioned tables over HybridDB 0.7 — recall against memory as of any timestamp, with batched restores for update-heavy rollbacks.

Filter pushdown

Equality filters (role, session, user, agent) push into the Chroma scan before the vector search (0.16.0) — filtered recall can no longer starve; timestamp filters compare chronologically (0.16.1).

recall() strategies

episodic (default), direct, expanded, fusion. bundles=True reconstructs surrounding session context with anchors preserved. bge-small is the default embedder.

Why it matters

Memory that behaves like software, not magic.

Preserves raw text verbatim rather than rewriting memories through a model.

99.9% session recall@5 on LongMemEval Oracle at zero LLM calls; 95.0% on the harder S set.

Every journal claim has a provenance pointer to an exact source quote.

Versioned memory by default (0.15+) — recall against memory as of any point in time, on git-like versioned tables.

Filtered recall can't starve: equality filters push into the Chroma scan, and timestamp filters compare chronologically.

Best positioned as an inspectable memory core, not a black-box personalization platform.

Compared to alternatives

A memory layer for developers who care why something was remembered.

Many memory products optimize for automatic personalization. CoreMem optimizes for determinism, cost control, local privacy, and testability.

Versus mem0 and Zep

mem0 extracts and rewrites memories through an LLM; Zep builds a hosted temporal knowledge graph. Even strong open-source rivals score on answer accuracy alone. CoreMem is the one where retrieval is deterministic, recall needs zero LLM calls, and every journal claim carries a verbatim source quote you can audit.

Versus Letta / MemGPT

Letta is a broader stateful-agent runtime. CoreMem is a lower-level memory substrate that can sit under any runtime when you want explicit, testable retrieval behavior.

Versus LangGraph checkpoints

Checkpointing saves execution state. CoreMem retrieves long-term episodic context. They complement each other rather than competing directly.

Versus hosted RAG memory

Hosted file search is convenient but provider-bound and opaque. CoreMem keeps memory local, framework-neutral, and free to query repeatedly — with versioned tables when you need memory as of a point in time.

Use it when

Use CoreMem when repeatability beats magic.

Use it for local agents that need structured, auditable memory with measurable recall quality (99.9% session recall@5, zero-LLM, on LongMemEval Oracle).

Journal entries are source-quote aligned — use it when every remembered fact needs a receipt you can inspect.

Position it as an inspectable memory core, not a finished managed memory cloud.

The clearest CTA is not 'make your agent smarter automatically'; it is 'make memory predictable enough to test.'

FAQ

Questions, answered.

What is CoreMem?

CoreMem is an on-device memory core for AI agents. It ingests conversation turns into a file-based journal, retrieves them with a unified recall() API, consolidates with dream(), and exposes everything through an MCP server, CLI, and editor hooks — with no external APIs, no vector services, and no internet.

How does CoreMem reach 99.9% recall with zero LLM calls?

The default episodic strategy decomposes your query, runs hybrid keyword + vector search, reranks with a local cross-encoder, and diversifies results — all deterministically, with 0 LLM calls on the happy path. That's measured at 99.9% session recall@5 on LongMemEval Oracle and 95.0% on the harder S set.

What recall strategies does CoreMem offer?

Four: episodic (zero-LLM, reranked — the default), direct (zero-LLM), expanded (one LLM call to rephrase the query), and fusion (RRF of both). All support filters for role, session, time, and metadata, and bundles=True reconstructs surrounding session context.

Is CoreMem free and open source?

Yes — MIT-licensed and open source under the Open Assistants Lab. It runs entirely on your machine with no external APIs, no vector services, and no paid tiers.

How is CoreMem different from mem0 or Zep?

Those are managed platforms with polished hosted memory and graph features. CoreMem is smaller and more inspectable: raw turns, a file-based journal, deterministic scoring, and no hidden LLM call during retrieval. Every journal claim carries a verbatim source quote.

Does CoreMem work with Claude Code, Codex, or OpenCode?

Yes. CoreMem ships an MCP server with 8 stdio tools plus a CLI and hook handlers, so you can wire it into Claude Code, Codex, OpenCode, or any MCP-capable agent in minutes.

Where does CoreMem store memory?

Locally, in a file-based AgentJournal (daily pages with weekly/monthly navigation) backed by a single SQLite + FTS5 + ChromaDB store. Raw turns stay verbatim — memory is never rewritten through a model.

Which embedding model does CoreMem use?

bge-small is the default (it beat the previous default by +0.010 message recall on the full S set). Swap it any time with COREMEM_EMBEDDING_MODEL — validation showed larger rerankers can be a net negative.

Make memory deterministic, auditable, and measurable.

CoreMem gives you a file-based AgentJournal, a unified recall() API with four strategies (zero-LLM by default), dream() consolidation, and an MCP server + CLI + hooks — all in one inspectable local memory core.

Add deterministic memory