Local-first, self-organizing memory layer for AI agents. Auto-absorbs knowledge from shell history, git, and Claude Code sessions. MCP-native.
Project description
chip-memory
The local-first agent brain. A temporal knowledge graph, human-in-the-loop review, and full provenance, running entirely on your machine with zero cloud and no required LLM.
AI agents forget everything when the session ends. chip-memory fixes that โ local, free, learns from use.
Quick start โ 60 seconds
pip install chip-memory
chip-memory seed # 15 demo nodes across 4 domains
chip-memory search "Hall of Light" # hybrid search, sub-millisecond
chip-memory think "who works at Acme Corp" # cited evidence + knowledge gaps
That's it. The brain is plain JSON on disk. Back it up with cp.
MCP for Claude Desktop / Claude Code:
Add this to your Claude Desktop config and restart:
{
"mcpServers": {
"chip-memory": {
"command": "chip-memory",
"args": ["mcp"]
}
}
}
Your agent now has memory_search, memory_remember, memory_context_for, memory_think, and memory_bump as native tools โ persistent memory across every session.
Features
- ๐ Local-first โ all data is plain JSON files on disk. No cloud, no account, no API key needed. Back it up with
cp. - ๐ซ Zero LLM required โ core search and linking runs on pure stdlib. No embeddings, no torch, no model download for daily use.
- ๐ Temporal knowledge graph โ typed edges with bi-temporal validity (
valid_from/valid_to). Query "where did Alice work in 2023?" or "who currently runs Acme?" withas_ofsemantics. - โณ Bi-temporal edges โ single-valued predicates auto-supersede (old facts get
valid_to+superseded_by, never deleted). Multi-valued predicates just append. - ๐ง Think mode โ
chip-memory think "who works at Acme"returns cited evidence from the brain, explicit knowledge gaps, and (via MCP sampling) fluent prose synthesized by your host LLM โ no extra key required. - ๐ Connect queries โ
chip-memory connect "Alice" "Bob"finds the multi-hop path (up to 3 hops) between any two entities through the typed edge graph. - ๐ Provenance +
whyโ every node tracks its source (git,user-correct,signal,manual), trust confidence, and access history.chip-memory why <id>prints the full audit trail. - ๐ Hybrid search โ
0.7 ร vector + 0.3 ร BM25, thenร heat ร importance ร trust.--bm25-onlyskips embeddings entirely and stays sub-millisecond. - ๐ฑ Living knowledge graph โ links get +0.15 on co-access, decay 1% per cycle, and are severed below 0.10. The graph mirrors how you actually use it.
- ๐ฆ Signal detector โ real-time message scoring classifies corrections (even natural language: "no, the interval is 5 minutes not 10"), high-signal knowledge, and low-signal chit-chat โ all with zero LLM.
- ๐ MCP-native โ native Model Context Protocol server. Any MCP client (Claude Desktop, Claude Code, Cursor) gets persistent memory tools with no plugins or glue code.
- ๐ Human review workflow โ
chip-memory reviewshows a review queue before anything enters the brain. Guided mode, strict mode, or auto mode. - ๐ฆ Zero deps โ
pip install chip-memoryinstalls zero network dependencies. Optional extras add embeddings, reranking, TUI, or LLM extraction behind lazy imports.
Comparison
| Feature | chip-memory | Mem0 | Zep / Graphiti | Letta | Cognee |
|---|---|---|---|---|---|
| Local-first | โ Local JSON | โ Cloud | โ Cloud | โ Cloud | โ Cloud |
| No LLM required | โ Zero LLM for core | โ LLM-dependent | โ LLM-dependent | โ LLM-dependent | โ LLM-dependent |
| Temporal / bi-temporal graph | โ Bi-temporal edges, local | โ No | โ ๏ธ Temporal via cloud Neo4j | โ No | โ No |
| Human review workflow | โ Review queue (guided/strict/auto) | โ No | โ No | โ No | โ No |
Provenance / why command |
โ Per-node provenance + trust | โ ๏ธ Partial | โ ๏ธ Partial | โ No | โ No |
| Cost | $0 (free, MIT) | ๐ฐ SaaS | ๐ฐ SaaS | ๐ฐ SaaS | ๐ฐ SaaS |
| MCP-native | โ Native MCP server | โ MCP | โ ๏ธ API wrapper | โ MCP | โ No |
| Secret redaction | โ 17 patterns, pre-write | โ No | โ No | โ No | โ No |
Where they're ahead
- Managed scale โ Mem0 and Zep handle 100k+ nodes with hosted infrastructure. chip-memory is optimized for the sweet spot (~5k nodes) on a single machine.
- Ecosystem โ Mem0, Letta, and Cognee have larger communities and more integrations. chip-memory is newer and growing.
- Team size โ hosted solutions have dedicated support, SLAs, and enterprise features. chip-memory is MIT โ community-supported.
MCP integration โ Claude Desktop
The native MCP server gives Claude persistent memory across sessions.
Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"chip-memory": {
"command": "chip-memory",
"args": ["mcp"]
}
}
}
Claude Code auto-discovers the MCP server when installed. No additional config needed.
Available MCP tools:
| Tool | Description |
|---|---|
memory_search |
Semantic search over the brain |
memory_remember |
Store a fact |
memory_context_for |
Get relevant context for a prompt |
memory_think |
Answer with cited evidence + gaps (uses host LLM via MCP sampling) |
memory_bump |
Boost a node's heat on access |
Reproducible eval
chip-memory eval
โ
PASS P@3=1.000 P@5=1.000 13/13 passed
Benchmark: NamedThingBench (13 queries) โ a curated set of entity-resolution queries over a seeded fixture brain. Run it yourself in under 2 seconds.
Who this is for
- Agent developers using Claude Code, Aider, Hermes, OpenClaw, or your own scripts โ drop a session transcript into
pending/and the brain extracts memory nodes automatically. - People running local models who want memory that doesn't need a cloud, an account, or an API key for the brain itself.
- Hobbyists tired of paying for embeddings. The brain runs on stdlib โ install
chip-memory[embeddings](~800MB) only when you want semantic search.
The problem it solves
Without chip-memory, every agent session starts blank:
You: "what was that uv trick for installing tools?" Agent: "I don't have memory of previous conversations."
With chip-memory:
You: "what was that uv trick for installing tools?" Agent: [reads brain] "Found it:
- uv is the fastest way to install Python tools in 2026.
uvx ruffruns ruff without polluting your system Python.- linked to: 'When debugging a Python script that crashes deep in a third-party library, set PYTHONFAULTHANDLER=1 first...'"
The brain remembered. You didn't have to.
Quick reference
chip-memory search "debug python" # hybrid search
chip-memory think "what's the deployment setup" # cited evidence + gaps
chip-memory connect "Alice" "Bob" # multi-hop path
chip-memory why <node_id> # provenance + audit trail
chip-memory recall yesterday # episodic timeline recall
chip-memory absorb --dry-run # preview machine knowledge
chip-memory review # review queue
chip-memory map hubs # top connected nodes
chip-memory timeline # brain activity log
chip-memory dashboard # web dashboard (127.0.0.1:8732)
chip-memory export "topic" -o topic.md # markdown export
chip-memory health # brain health score
Install
pip install chip-memory
From source:
git clone https://github.com/chakurov1907-cyber/chip-memory
cd chip-memory
pip install -e . # stdlib only
pip install -e ".[embeddings]" # + vector search (torch + sentence-transformers)
Develop
git clone https://github.com/chakurov1907-cyber/chip-memory
cd chip-memory
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest # 476 tests, ~11s
chip-memory --help
How scoring works
hybrid = 0.7 ร cosine_sim + 0.3 ร normalized_bm25
score = hybrid ร heat ร importance ร (0.6 + 0.4 ร trust_confidence)
- cosine_sim โ from
all-MiniLM-L6-v2(optional, behind[embeddings]) - BM25 โ pure stdlib, no sklearn
- heat โ decays 5% per cycle, boosted by access ร importance
- trust_confidence โ source-based (git-fix: 0.9, user-correct: 0.85, manual: 0.8, signal: 0.6)
Honest limits
- Scale: works fine to ~5k nodes. Past that, search latency climbs because the embedder loads one node at a time. For 10k+ nodes, swap in a real vector DB and use chip-memory as the connection layer.
- Multi-tenant: one brain per directory. Use
CHIP_BRAIN_DIRenv var to switch. - Concurrency: atomic writes (
tmp+os.replace()) prevent corruption, but two simultaneous writers to the same node will lose one's edits.
Uninstall
chip-memory uninstall # interactive โ asks for confirmation
chip-memory uninstall --force # skip confirmation
chip-memory uninstall --keep-brain # remove daemon/hooks/config but keep brain data
Removes the daemon process (if running), git post-commit hooks, background watchers, and brain data. To also remove the package itself:
pip uninstall chip-memory
Architecture
See ARCHITECTURE.md for the full system design: heat/decay mechanics, living graph dynamics, bi-temporal edge semantics, signal detector pipeline, MCP integration, and temporal reasoning.
- PRIVACY.md โ local-only, no telemetry, redaction
- SECURITY.md โ disclosure, auth, path traversal
- CONTRIBUTING.md โ how to build and contribute
- CHANGELOG.md โ release history
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chip_memory-1.1.0.tar.gz.
File metadata
- Download URL: chip_memory-1.1.0.tar.gz
- Upload date:
- Size: 533.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
478b26aab10a5f89ae1bbc7412aad43edf4c925ea10b7a28c560b0eb84894531
|
|
| MD5 |
44904b96eb436949d21be4b62569e016
|
|
| BLAKE2b-256 |
e06429ca06fe0f5fc5b44f65e2e661e0d9a00669aa8de55adb56bbbfb295ad0a
|
File details
Details for the file chip_memory-1.1.0-py3-none-any.whl.
File metadata
- Download URL: chip_memory-1.1.0-py3-none-any.whl
- Upload date:
- Size: 500.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79da2da2817f3c08af36f377ecaa961e8b61105291f486bf4167b5729174b101
|
|
| MD5 |
41ccf8cdac7f99349a9d4c91ebb1b58b
|
|
| BLAKE2b-256 |
5c3f34395a8b377b323df51bda742e2352f557e0c1e2cec5eb6bbdf75e344128
|