Git-native project memory for AI coding agents, with deterministic local recall, evidence gates, and layered delivery that quotes, points, or abstains.
Open-source project memory for Claude Code, Codex, Cursor, Gemini CLI, and other AI coding agents — local, deterministic, reviewable, and never written behind your back.
Most AI agent memory systems optimize for remembering more. OwnMem starts with a different question: who owns project knowledge, who may change it, and how can a bad memory be stopped before it changes a coding agent's actions?
Advantage
What it means in practice
The repository owns memory
Readable Markdown in .ownmem/ travels through clone, review, and rollback with the code, and every agent in the repository reads the same source.
Deterministic local recall
Default recall makes no model or network call; the same query, config, and snapshot produce the same ranking.
Evidence before authority
Content cannot declare itself trusted. Independent receipts and live evidence checks decide delivery.
It tells you when it does not know
Delivery is graded: the memory quoted, up to three pointers, or an abstention that names the gate that refused.
Net-zero growth
A hard entry count that only ratchets down, so adding to a full corpus means retiring something in the same change.
Measured on the locked CC0 corpus in this repository. Reproduce it in a clone with npm run benchmark.
🆚 How it compares
OwnMem does not replace CLAUDE.md or AGENTS.md. Those files say how to work here, and they are read in full every turn. OwnMem answers a different question — which of the things this project learned the hard way are worth putting in front of the model for this task — and it is allowed to answer “none of them”.
Instruction files
Built-in agent memory
OwnMem
Who writes it
you, by hand
the agent, from your conversations
you, reviewed like code
Where it lives
one file in the repository
the vendor's account
Markdown in your repository
What reaches the model
all of it, every turn
whatever its own recall picked
one of three tiers, under a token budget
When an entry is wrong
you edit the file
you may never see the entry
evidence drift downgrades it and names what moved
Cost per turn
the whole file in tokens
a retrieval call
no model call, no network call
🚀 Quick start
Requires Node.js 20.6 or newer. Run this inside the repository that should own the memory:
Reopen the agent afterwards. Name the hosts you use in --hosts (claude, codex, cursor, gemini, grok); the list is recorded, and passing it again later is how a host is added or removed. init creates .ownmem/ and the host adapters, edits instruction files such as CLAUDE.md only inside managed blocks, and prints any one-time step a host still needs. Add --check to the same command to preview it, and --locale auto to write the generated instructions in your system language.