YourMemory is a persistent self-improving memory system for AI agents, positioned to solve the problem that most memory tools simply mount a vector database onto an agent, causing retrieval to be flooded by near-duplicate data. The project name is YourMemory, and the repository address is https://github.com/sachitrafa/YourMemory。其核心思路是让记忆像大脑一样生长、巩固、遗忘与连接,而非单纯存储。
In terms of purpose: it provides AI agents with persistent memory across sessions, avoiding the need to re-explain context and repeat preferences in every session, thereby enabling agents to remember user history and preferences.
Main capabilities:
- Memory consolidation: the system monitors clusters of related facts, and when a certain number has accumulated, compresses them into a single clear summary and archives the original records (without deleting them). Consolidation is event-driven, not a scheduled task. In the example, production storage was compressed from 444 memories to 16 summaries.
- Decay: exponential decay based on the Ebbinghaus forgetting curve; importance and recall frequency can slow decay. active_days counts only active days, so vacations do not cause memory loss. Memories with strength below 0.05 are automatically pruned, and different categories age at their own rates. For chain-aware pruning, if a decaying memory's graph neighbors are still strong, that memory is retained (supporting context survives).
- Hybrid retrieval: combines vector retrieval, BM25, and an entity graph, with two rounds of recall, covering information the user explicitly asks about as well as information they are not aware of; before each storage, subject-aware deduplication is performed, distinguishing different entities by embedding sentence subjects, with no hardcoded vocabulary, and it can generalize to any language.
- Entity graph and multi-hop reasoning: on 200 multi-hop questions in HotpotQA, entity graph edges brought a +12 percentage point improvement, allowing traversal even when the second fact has low embedding similarity to the query.
- Audit trail: all operations (read, write, update, delete, consolidate) are appended to a hash-chained tamper-proof log, recording timestamp, user/agent, action, operation, target memory, source (http or mcp), and previous row hash; verify_chain() can locate where the chain breaks. Auditing is fail-open and does not block memory operations; read events generated by the dashboard rendering loop are not counted.
- Team memory pool: supports shared memory and private memory, with role-based per-agent access control, allowing teams to share learning outcomes while protecting private context.
- Data rights and compliance: combined with the hash-chain audit trail and a 90-day retention floor, mapped to the controls documented in SECURITY.md (aligned with SOC 2).
- Answering without LLM calls: when memory is strong enough, answer directly, with zero tokens, zero cloud cost, and zero latency; when insufficient, explicitly refuse rather than hallucinate, and queries do not leave the local machine.
- API proxy: intercepts every LLM call to automatically inject relevant memories and handles store_memory / update_memory, with no model configuration required; OpenAI compatibility via base_url="http://localhost:3033/proxy/openai"。
- Built-in browser UI: memory dashboard http://localhost:3033/ui(统计栏、按智能体标签、记忆卡片、强度条、类别过滤、审计追踪、池管理);图谱可视化 http://localhost:3033/graph(力导向图,根记忆为亮节点,邻居按类别着色,边厚度表示连接强度,可拖拽、缩放、点击查看内容)。
- Three MCP tools can be called automatically by AI.
How to use:
- Installation environment: Python 3.11–3.14, no Docker or database setup required, memory is stored in ~/.yourmemory/.
- Get a token: visit yourmemoryai.xyz, enter your email, verify with a 6-digit code, and copy the token.
- yourmemory-setup automatically detects and connects to Claude Code, Claude Desktop, Cursor, Windsurf, and Cline, and asks about the backend: DuckDB (default, zero-configuration single file) or Postgres (shared/production, requires providing DATABASE_URL and requires the pgvector extension).
- Optional local extraction: the built-in heuristic is ready to use; for higher-quality fully local fact extraction, Ollama can be installed, and yourmemory-setup will automatically pull qwen2.5:7b (about 4.7 GB); for cloud, you can set YOURMEMORY_EXTRACT_BACKEND=anthropic.
- Binary installation: no Python required; a standalone binary can be obtained from the latest release. A single executable handles the register, setup, ask "<question>", and path commands, and starts the server if no arguments are given; it is fully self-contained and offline, bundling Python, dependencies, and two ML models (embedding model and spaCy), with no downloads on first run, at the cost of about 2 GB in size; you can build it yourself with ./build-binary.sh, and multi-platform releases are automatically completed by the build workflow.
- After starting the server (yourmemory), point the client to localhost:3033.
Use cases: individuals and teams that need to let AI agents remember user preferences and context across sessions; enterprises that need to share agent memory while protecting private context; scenarios that require auditing and compliance controls; scenarios that require no cloud dependency and local offline operation.
Limitations and notes:
- The license is CC-BY-NC-4.0; free for personal, educational, academic research, and open-source projects, while commercial use requires a separate written agreement (contact mishrasachit1@gmail.com).
- Write hangs/timeouts (DuckDB single-write lock): if the MCP server and HTTP server run at the same time, they will competefor the write lock, which needs to be fixed; when running Claude Desktop (MCP) and Claude Code (hooks) at the same time, it is recommended to switch to SQLite: DATABASE_URL=sqlite:///~/.yourmemory/memories.db.
- The binary size of about 2 GB is a tradeoff.
- In some benchmarks, Supermemory and Mem0 ran out of free quota midway, and the scores are calculated based on all 1,534 pairs.
- Pricing, a specific platform support list, complete installation command details, etc. are not provided; the above content is based on the materials, and missing information is not provided for now.