Skip to main content

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.

CI PyPI version License: MIT Python 3.10+

demo

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?" with as_of semantics.
  • โณ 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-only skips 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 review shows a review queue before anything enters the brain. Guided mode, strict mode, or auto mode.
  • ๐Ÿ“ฆ Zero deps โ€” pip install chip-memory installs 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 ruff runs 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_DIR env 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.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chip_memory-1.1.0.tar.gz (533.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chip_memory-1.1.0-py3-none-any.whl (500.1 kB view details)

Uploaded Python 3

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

Hashes for chip_memory-1.1.0.tar.gz
Algorithm Hash digest
SHA256 478b26aab10a5f89ae1bbc7412aad43edf4c925ea10b7a28c560b0eb84894531
MD5 44904b96eb436949d21be4b62569e016
BLAKE2b-256 e06429ca06fe0f5fc5b44f65e2e661e0d9a00669aa8de55adb56bbbfb295ad0a

See more details on using hashes here.

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

Hashes for chip_memory-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79da2da2817f3c08af36f377ecaa961e8b61105291f486bf4167b5729174b101
MD5 41ccf8cdac7f99349a9d4c91ebb1b58b
BLAKE2b-256 5c3f34395a8b377b323df51bda742e2352f557e0c1e2cec5eb6bbdf75e344128

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page