Cognitive AI Memory (YourMemory)
Lets your AI agent keep a persistent memory that fades with time and strengthens when recalled, like human memory.
271 stars on GitHubby sachitrafaLicense NOASSERTIONUpdated 2 months ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add cognitive-ai-memory -e DATABASE_URL="<your value>" -- docker run -i --rm -e DATABASE_URL -e OLLAMA_URL -e EXTRACT_MODEL ghcr.io/your-memory/cognitive-ai-memory:1.0.2
What to fill in
| Name | What it is | Required |
|---|---|---|
DATABASE_URL | PostgreSQL connection string with pgvector. Example: postgresql://localhost:5432/yourmemory | Yes |
OLLAMA_URL | Ollama server URL for local embeddings (nomic-embed-text) and classification (llama3.2:3b). Default: http://localhost:11434 | No |
EXTRACT_MODEL | Ollama model used for fact/assumption classification. Default: llama3.2:3b | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Remember that I prefer DuckDB for local projects.
What did we decide about the deployment setup?
What it is
This is the YourMemory server, listed under the name cognitive-ai-memory. It stores facts for your agent in a local database and ages them on an Ebbinghaus forgetting curve, so old unused facts fade and important or often-recalled ones stay. It also groups related facts into summaries and links memories by shared people, places and concepts.
What it can do
- Store and recall memories (MCP tools listed in the project docs)
- Consolidation of related facts into one summary
- Decay and pruning of stale memories
- Hybrid recall: vector, BM25 and entity graph
- Hash-chained audit trail
- Export and right-to-forget commands
When to use
- βΊWhen you want your agent to remember your preferences between sessions
- βΊWhen you want old, unused facts to fade instead of piling up
- βΊWhen a team wants shared memory pools with private memories kept private
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
hindsight-recallHelps your agent search long-term memory for past decisions, project context, and preferences when you ask about earlier work.memory-contextHelps your agent check long-term memory before it starts a task, so it uses past decisions, preferences, and earlier work.conversation-memoryTeaches your agent to build persistent memory for chat assistants, covering short-term, long-term and entity memory that stays separate for each user.Frequently asked questions
Is it free?
The readme shows a Creative Commons BY-NC license badge, which is non-commercial. Check the license before commercial use.
Does my data leave my computer?
The readme says it runs entirely on your machine, with memory stored in ~/.yourmemory/.
Why do I need a token?
The quick start asks you to register an email and copy a token, then run yourmemory-register with it.
Which clients are set up automatically?
yourmemory-setup detects Claude Code, Claude Desktop, Cursor, Windsurf and Cline.
Which database does it use?
DuckDB by default with zero setup, or Postgres with pgvector for teams.
Is it the same as YourMemory?
Yes. The readme in this listing is the YourMemory readme.
If it does not work
- βΊRun yourmemory-register with your token, then yourmemory-setup, and restart your client.
- βΊIf your Python is older than 3.11, update it first.
- βΊFor Postgres, make sure DATABASE_URL is set and the pgvector extension is installed.
5 new skills a week. 1 minute to read.