ownmem
Open-source, Git-native memory for AI coding agents — deterministic local recall for Claude Code, Codex, Cursor, Gemini CLI, and compatible tools.
What is it?
What it is
OwnMem is a repository-owned memory system for AI coding agents that stores project knowledge as local, reviewable Markdown files in a `.ownmem/` directory. It provides deterministic, local-first recall across multiple agents (Claude Code, Codex, Cursor, Gemini CLI, etc.) using five fused candidate lanes (exact, BM25F, n-gram, fuzzy, graph) and four independent delivery gates (relevance, epistemic validity, task applicability, action risk).
Why it exists
Most memory systems optimize for remembering more, but 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 an agent's actions. It exists to make agent memory verifiable, attributable, rejectable, and reversible, preventing memory poisoning and ensuring that retrieved text cannot override host instructions or authorize tools.
Who should use it
Development teams using AI coding agents (Claude Code, Codex, Cursor, Gemini CLI, Grok CLI) who need a repository-owned, reviewable, Git-native memory layer with deterministic local recall and evidence-governed evolution.
Who should avoid it
Users seeking a cross-repository personal memory profile, cloud-based large-scale vector search, real-time global knowledge graphs, or systems designed to automatically capture every conversation without an evidence and risk boundary.
Stars over time
+23 stars in the last 2 days
How it works
A quick walkthrough in plain English
How ownmem works
Step 1 of 3
You interact with it
Open ownmem, send a request, or connect it to your stack.
Features
Advantages
- Memory travels with code through clone, review, and rollback with the repository
- One shared source of truth across multiple coding agents
- Zero-query-cost deterministic recall without model or network dependencies
- Evidence before authority system prevents unverified content from being trusted
- Prevents memory bloat through schemas, quotas, duplicate gates, and lifecycle rules
- Automatic R0 changes are replay-proven and precisely reversible
- Hard boundaries prevent retrieved text from overriding host instructions
- Reproducible and reviewable Markdown format enables human oversight
- Quarantine system isolates candidates with insufficient evidence
- Three anti-pollution ledgers prevent impersonation between retrieval, outcome, and attribution
- Immutable snapshots ensure reproducible runtime inputs
- Local console and dashboard provide visibility into memory state
Disadvantages
- Limited to project-level knowledge within a single repository
- Not suitable for cross-repository personal profiles or global user memory
- No automatic capture of every conversation without evidence
- No large-scale cloud vector search capabilities
- No real-time global knowledge graph
- Requires Node.js 20.6 or newer
- Maximum recall volume may be secondary to governance requirements
- Initial setup requires running npm install and init commands
- Host-specific adapters needed (separate setup for Claude, Codex, Cursor, etc.)
- Governance overhead may slow down rapid memory accumulation
Installation
native
npm install --save-dev ownmem npx ownmem init --locale auto --hosts claude,codex --layers dashboard --hook
FAQ
What is OwnMem and what problem does it solve?
OwnMem is a repository-owned memory system for AI coding agents like Claude Code, Codex, Cursor, and Gemini CLI. It stores project knowledge as reviewable Markdown inside `.ownmem/` so it travels with the code through clone, review, and rollback. Its core focus is governance: deciding who owns project knowledge, who may change it, and how bad memory can be stopped before altering an agent's actions.
How do I install and initialize OwnMem in a project?
OwnMem needs Node.js 20.6 or newer. Install it as a dev dependency and run the init command inside the repository: `npm install --save-dev ownmem` followed by `npx ownmem init --locale auto --hosts claude,codex --layers dashboard --hook`. Use `--hosts claude`, `--hosts codex`, `--hosts cursor`, or `--hosts gemini` for a single adapter, and `--check` to preview changes. After init, reopen the agent so it picks up the managed marker regions in host files.
Does OwnMem make network or LLM calls during recall?
No. Default recall is fully local: it reads repository files and compiled snapshots without any model call, network request, or per-query token cost. Five deterministic candidate lanes (exact, BM25F, n-gram, fuzzy, and graph) fuse locally, and an optional embedding lane stays at weight 0 until repository-local A/B evidence passes the safety gate.
How does OwnMem prevent memory poisoning and bad data from affecting agents?
Candidates, content, authority, and evidence are treated as separate trust domains. Content cannot declare itself trusted—independent receipts and live evidence checks decide delivery. A counterfactual promotion gate requires automation to prove baseline miss, candidate-only recovery, and zero regression before promotion. Unsigned content or unverifiable evidence is quarantined, evidence drift becomes advisory instead of action, and retrieved text can never override host instructions or authorize tools.
What can OwnMem automate unattended, and what requires human review?
OwnMem automatically handles deterministic recall, candidate scanning, tripwire checks, counterfactual replay, R0 trigger backfill, machine trust receipts, audits, compilation, observation, quarantine, and exact rollback. It escalates to human review for new prose knowledge, policy changes, active-set changes, conflicts, insufficient evidence, R1–R5 changes, and publishing. An agent cannot downgrade its own proposals, and R0 metadata changes can only be promoted if they are replay-proven, quota-bounded, and precisely reversible.
How does rollback work when an automatic change goes wrong?
Every automatic edit carries a verified inverse operation tied to the content-addressed snapshot. If a change fails or produces a harmful outcome, OwnMem restores the exact previous bytes through a compensating rollback without erasing history. Failure behavior also includes transaction failure restoring the prior validated state, ensuring the repository can always return to its last known-good memory configuration.
Featured in Videos
YouTube tutorials and walkthroughs for ownmem
Alternatives
Similar projects ranked by category, topics, and text overlap.