Skip to main content

SOTA-level agent memory at zero infrastructure cost.

Project description

Neuromem

One SQLite file. Zero cloud. Ten minutes to set up.

PyPI Python License Base Score Pro Score

🏆 91.5% on LoCoMo · 📦 One SQLite File · ☁️ Zero Cloud · 💰 Zero Infrastructure Cost

Benchmark · Highlights · Base vs Pro · Install · Claude · API


🔬 Benchmark

Tested on LoCoMo, the standard benchmark for conversational memory. 1,540 questions across 10 conversations. All 8 systems share the same answer model, judge, scoring, top-k, and byte-identical answer prompt — only retrieval differs.

LoCoMo 8-System Comparison

Neuromem achieves state-of-the-art accuracy for fully-local memory systems at zero ongoing infrastructure cost. Base runs entirely offline with no API keys. Pro adds one small LLM call per query for HyDE query expansion.

Accuracy vs Infrastructure Cost

All scores use the same evaluation pipeline: GPT-4.1-mini answer generation, GPT-4o-mini judge (3x majority vote), temperature=0. Zero errors across 12,320 total answers. Scores use a lenient semantic-match judge; rankings are valid across all systems but absolute values are higher than published LoCoMo baselines using strict exact-match. Full methodology and reproduction scripts in benchmarks/.


⚡ Research Highlights

  • 30+ percentage points more accurate than Mem0 on LoCoMo (91.5% vs 61.4%)
  • 2x more cost-efficient per correct answer than Mem0
  • Runs offline on any device with Python 3.10+ and 512MB RAM
  • One SQLite file, zero API keys. The entire 6-layer system runs offline.
  • Within 3.0pp of EverMemOS, the only higher-scoring system — and EverMemOS uses pre-computed retrieval rather than live search at query time.

Category Breakdown

Neuromem Pro nearly matches EverMemOS across all 4 question categories. Mem0 collapses on multi-hop reasoning (37.7% vs 90.7%).


🏗️ Base vs Pro

Same features, same 6-layer pipeline. Pro upgrades the embedding model and the cross-encoder reranker for higher retrieval accuracy.

Base Pro
LoCoMo 88.2% 91.5%
Runs on Any machine (CPU only) 4GB+ RAM (CPU or GPU)
First install ~30MB ~1.5GB one-time download
Speed Ultra-fast Fast

Base works everywhere. Pro remembers better.


🚀 Quickstart

Base

pip install neuromem-core

Pro

pip install neuromem-core[gpu]

Usage

from neuromem import Memory

m = Memory()
m.add("Prefers dark mode and TypeScript", user_id="alex")
m.add("Allergic to peanuts", user_id="alex")

results = m.search("What are Alex's preferences?", user_id="alex")
print(results[0]["content"])
# → "Prefers dark mode and TypeScript"

The database is created automatically at ~/.neuromem/memories.db.


🤖 Claude Integration

Claude forgets you between sessions. Neuromem fixes that.

1. Install with MCP support

Base:

pip install neuromem-core[mcp]

Pro:

pip install neuromem-core[gpu,mcp]

2. Add to your Claude config

Claude Code: add to ~/.claude.json under "mcpServers":

{
  "mcpServers": {
    "neuromem": {
      "command": "python",
      "args": ["-m", "neuromem.mcp_server"],
      "env": {}
    }
  }
}

Claude Desktop: add to claude_desktop_config.json (Settings > Developer > Edit Config), same format.

If you installed in a virtualenv, use the full path to that Python (e.g. "/path/to/venv/bin/python") instead of "python".

Neuromem starts in Base mode by default. On your first session, Claude will ask if you'd like to upgrade to Pro. You can switch at any time. Your existing memories are automatically re-embedded.

3. Make it automatic

Copy CLAUDE.md.example to your project root or home directory as CLAUDE.md. This tells Claude to automatically store your preferences and recall them without being asked.

cp CLAUDE.md.example ~/CLAUDE.md

4. Test it

Start a new Claude session:

  • Say "I always prefer dark mode". Claude stores it automatically.
  • Open another session and ask "What are my preferences?". It remembers.

📖 API

Method What it does
m.add(content, user_id=None) Store a memory
m.search(query, user_id=None, limit=10) Search memories
m.search_deep(query, user_id=None, limit=10) Agentic multi-round search (higher latency + LLM cost; best for ambiguous queries)
m.get(memory_id) Get one memory
m.get_all(user_id=None, limit=100) List all memories
m.update(memory_id, content) Update a memory
m.delete(memory_id) Delete a memory
m.delete_all(user_id=None) Delete all

📊 Full Benchmark Details

Every benchmark script is self-contained and runs on Modal.


📝 Citation

@software{neuromem2026,
  title = {Neuromem: State-of-the-Art Local-First Agent Memory},
  author = {@Building\_Josh},
  organization = {Sauron},
  year = {2026},
  url = {https://github.com/buildingjoshbetter/neuromem},
  version = {0.2.0}
}

⚖️ License

Licensed under Apache 2.0. Free for personal and commercial use.

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

neuromem_core-0.2.1.tar.gz (8.9 MB view details)

Uploaded Source

Built Distribution

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

neuromem_core-0.2.1-py3-none-any.whl (161.7 kB view details)

Uploaded Python 3

File details

Details for the file neuromem_core-0.2.1.tar.gz.

File metadata

  • Download URL: neuromem_core-0.2.1.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neuromem_core-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6e16d1ec0d99bb0b436986e5aa02f33d9ee9d2b4dd6df9c83144bdc16229d34d
MD5 aece4a69ed905641d07c0f50de142b18
BLAKE2b-256 8825a6ae479f03850ab36eb326ca442467935d03dbe729408c5465185f97a2db

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuromem_core-0.2.1.tar.gz:

Publisher: publish.yml on buildingjoshbetter/Neuromem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neuromem_core-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: neuromem_core-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 161.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neuromem_core-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc396333fb59e7a8cf47649a86cbbcfe1d5f82196b66dab8178829385911f1ad
MD5 77458d6b0c2e9d77209ed8221a8bd538
BLAKE2b-256 8f466d648a6fc9a92a882630ae1a8826ff049b8f7b825f3a83004a8929543aa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuromem_core-0.2.1-py3-none-any.whl:

Publisher: publish.yml on buildingjoshbetter/Neuromem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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