Yourmemory
About
Persistent memory for AI agents with Ebbinghaus forgetting curve decay, hybrid BM25 + vector + knowledge graph retrieval, temporal reasoning, and a local dashboard. 89.4% Recall@5 on LongMemEval.
Details
- Transport
- SSE
Explore
- Consolidation: compresses related facts into clean summaries.
- Biological decay: memories fade on the Ebbinghaus forgetting curve.
- Entity graph: memories link by shared people, places, and concepts.
- Survives context resets: hands back working context after compaction.
- Tamper-evident audit trail: hash-chained ledger logs every operation.
- Team memory pools: role-based shared and private memory.
- Data rights: export and right‑to‑forget with one command.
- MCP‑native and local‑first: no external API or cloud dependency.
Python 3.11–3.14. No Docker, no database setup. All memory stored locally in ~/.yourmemory/.
pip install yourmemory
yourmemory-register <your-token>
yourmemory-setup
Get your token: visit yourmemoryai.xyz → enter your email → verify with a 6-digit code → copy your token.
yourmemory-setup auto-detects and wires up Claude Code, Claude Desktop, Cursor, Windsurf, and Cline, then asks which backend to use:
- DuckDB — zero setup, single local file (default)
- Postgres — shared / production; you provide a DATABASE_URL (needs the pgvector extension)
> Optional — smarter local extraction: YourMemory works out of the box with built-in heuristics. For higher-quality, fully-local fact extraction, install Ollama and yourmemory-setup pulls the model (qwen2.5:7b, ~4.7 GB) automatically. Prefer the cloud? Set YOURMEMORY_EXTRACT_BACKEND=anthropic.
Prefer not to touch pip? Grab the standalone binary for your platform from the latest release:
| Platform | Asset |
|----------|-------|
| macOS (Apple Silicon) | yourmemory-macos-arm64.tar.gz |
| macOS (Intel) | yourmemory-macos-x86_64.tar.gz |
| Linux (x86-64) | yourmemory-linux-x86_64.tar.gz |
| Windows (x86-64) | yourmemory-windows-x86_64.exe.zip |
Memory strength decays exponentially. Importance and recall frequency slow that decay:
effective_λ = base_λ × (1 − importance × 0.8)
strength = clamp(importance × e^(−effective_λ × active_days) × (1 + recall_count × 0.2), 0, 1)
``
active_days counts only days you were active — vacations don't cause memory loss. Memories below strength 0.05 are pruned automatically. Each category ages at its own rate:
| Category | Half-life | Best for |
|----------|:---------:|----------|
|
strategy | ~38 days | Patterns that worked, architectural decisions |
| fact | ~24 days | Preferences, identity, stable knowledge |
| assumption | ~19 days | Inferred context, uncertain beliefs |
| failure` | ~11 days | Errors, wrong approaches, environment-specific issues |
Chain-aware pruning: a decayed memory is kept alive if any graph neighbour is still strong — load-bearing context survives even when rarely queried directly.
recall_memory
Recall relevant memories using hybrid BM25 + vector retrieval with entity graph expansion. Returns top-k memories ranked by relevance, with graph-expanded neighbours included.
store_memory
Store a new memory. Automatically deduplicates, embeds, and indexes with BM25 and entity graph edges. Skips exact duplicates and bumps recall count instead.
update_memory
Update an existing memory by ID. Re-embeds the new content, replaces the old memory, and logs the change to the audit trail.
Three tools, called by your AI automatically.
| Tool | When your AI calls it | What it does |
|------|-----------------------|--------------|
| recall_memory(query, current_path?) | Start of every task | Surfaces memories ranked by similarity × decay strength; spatial boost for path-matched memories |
| store_memory(content, importance, category?, context_paths?) | After learning something new | Embeds, deduplicates, stores with decay; tags optional file/dir paths |
| update_memory(id, new_content, importance) | When a stored fact is outdated | Re-embeds and replaces; logs the change to the audit trail |
```python
<!-- mcp-name: io.github.sachitrafa/yourmemory -->
<div align="center">
<br>
<h1>YourMemory</h1>
Your AI has the memory of a goldfish. Not anymore.
Persistent, self-improving memory for AI agents — built on the science of how humans remember.
<br>
▶ Try the live interactive demo · Website · Benchmarks
</div>
---
The problem
Every morning your AI agent treats you like a stranger. Same context re-explained. Same preferences forgotten. Every session starts from zero.
Most "memory" tools bolt a vector database onto an agent and call it done — but that's just storage. It hoards every near-duplicate until retrieval drowns in noise. A goldfish with a bigger bowl.
YourMemory is different: memory that works like a brain, not a database.
flowchart LR
A["🧠 You tell your<br/>AI something"] --> B["Extract durable<br/>facts"]
B --> C["Dedup + embed<br/>+ graph-link"]
C --> D[("Memory<br/>store")]
D -->|"related facts pile up"| E["✨ Consolidate<br/>N → 1 summary"]
D -->|"stale + unused"| F["📉 Decay<br/>+ prune"]
D -->|"new session"| G["♻️ Recall<br/>hybrid + graph"]
E --> D
G --> H["🤖 Your agent<br/>picks up where<br/>it left off"]
style D fill:#0a2540,stroke:#19cdff,color:#fff
style E fill:#0c2b3a,stroke:#5eead4,color:#fff
style H fill:#0c2b3a,stroke:#19cdff,color:#fff
---
✨ What makes it different
| | Feature | What it does |
|---|---|---|
| 🧠 | Consolidation | When enough related facts accumulate, they're compressed into one clean summary and the originals are archived. Memory gets sharper over time, not bloated. |
| 📉 | Biological decay | Every memory ages on an Ebbinghaus forgetting curve. Stale, unused facts fade; important and frequently-recalled ones persist. |
| 🔗 | Entity graph | Memories link by shared people, places, and concepts — so recall surfaces what you forgot to ask for. |
| ♻️ | Survives context resets | When the context window compacts, YourMemory hands the working context back — no re-reading files to figure out where you were. |
| 🔒 | Tamper-evident audit trail | Every read / write / delete is logged in a hash-chained ledger. Alter one record and the chain breaks. |
| 👥 | Team memory pools | Role-based shared memory, so a whole team's agents draw on the same institutional knowledge — with private memories kept private. |
| 🛡️ | Data rights built in | One-command export (right to access) and right-to-forget (purge), plus SOC 2-aligned controls. |
| 🔌 | MCP-native & local-first | Works with Claude, Cursor, Cline, Windsurf, or any MCP client. Runs entirely on your machine — no API key, nothing leaves your system. |
> One command to install. DuckDB by default (zero setup), Postgres + pgvector for teams.
---
Table of Contents
- 🏆 Benchmarks
- 🚀 Quick Start
- 🧠 How Memory Works
- Consolidation
- Decay
- Hybrid Retrieval
- 🔒 Trust & Audit Trail
- 👥 Team Memory Pools
- 🛡️ Data Rights & Compliance
- 🎛️ Dashboards
- 🔧 MCP Tools
- ⚡ Ask Without an LLM Call
- 🔀 API Proxy — Guaranteed Memory
- 🏗️ Architecture & Stack
- 🩺 Troubleshooting
- 🤝 Contributing
---
🏆 Benchmarks
Three external datasets. Every number independently reproducible — benchmark code lives in the repo. Full methodology in BENCHMARKS.md.
LoCoMo-10 — multi-session conversational memory
xychart-beta
title "Recall@5 · LoCoMo-10 (higher is better)"
x-axis ["Mem0", "Zep Cloud", "Supermemory", "YourMemory"]
y-axis "Recall@5 percent" 0 --> 70
bar [18, 28, 31, 59]
> 2× better recall than Zep Cloud across all 10 samples. \Supermemory and Mem0 exhausted free-tier quotas mid-benchmark; scores computed over the full 1,534 pairs.
LongMemEval-S — 500 questions, ~53 distractor sessions each
The hardest standard benchmark for long-term memory. Each question is buried in ~53 sessions.
| Metric | Score |
|--------|:-----:|
| Recall@5 (any gold session in top-5) | 89.4% |
| Recall-all@5 (all gold sessions in top-5) | 84.8% |
| nDCG@5 (ranking quality) | 87.4% |
HotpotQA — 200 multi-hop questions
| System | BOTH_FOUND@5 |
|--------|:------------:|
| YourMemory (vector + BM25 + entity graph) | 71.5% |
| YourMemory (no entity edges) | 59.5% |
Entity graph edges add +12 pp — they traverse from Fact 1 to Fact 2 even when Fact 2 has low embedding similarity to the query.
Writeup: I built memory decay for AI agents using the Ebbinghaus forgetting curve
---
🚀 Quick Start
Python 3.11–3.14. No Docker, no database setup. All memory stored locally in ~/.yourmemory/.
pip install yourmemory
yourmemory-register <your-token>
yourmemory-setup
Get your token: visit yourmemoryai.xyz → enter your email → verify with a 6-digit code → copy your token.
yourmemory-setup auto-detects and wires up Claude Code, Claude Desktop, Cursor, Windsurf, and Cline, then asks which backend to use:
- DuckDB — zero setup, single local file (default)*
- Postgres — shared / production; you provide a DATABASE_URL (needs the pgvector extension)
> Optional — smarter local extraction: YourMemory works out of the box with built-in heuristics. For higher-quality, fully-local fact extraction, install Ollama and yourmemory-setup pulls the model (qwen2.5:7b, ~4.7 GB) automatically. Prefer the cloud? Set YOURMEMORY_EXTRACT_BACKEND=anthropic.
Or install from a binary — no Python required
Prefer not to touch pip? Grab the standalone binary for your platform from the latest release:
| Platform | Asset |
|----------|-------|
| macOS (Apple Silicon) | yourmemory-macos-arm64.tar.gz |
| macOS (Intel) | yourmemory-macos-x86_64.tar.gz |
| Linux (x86-64) | yourmemory-linux-x86_64.tar.gz |
| Windows (x86-64) | yourmemory-windows-x86_64.exe.zip |
# macOS / Linux — download, extract, run
tar -xzf yourmemory-macos-arm64.tar.gz
./yourmemory-macos-arm64 register <your-token>
./yourmemory-macos-arm64 setup
./yourmemory-macos-arm64 # start the server
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



