Credentials. Your LLM key and any Mem0 API key are used for extraction and storage.
Who it is forA developer building a chat assistant that should remember each user.
The problemUsers must repeat preferences every session.
The outcomePer-user memories retrieved when relevant.
What you need first
- Python or Node.js
- Docker to self-host the server
- An LLM provider key for memory extraction
Steps
- Install with
pip install mem0aiornpm install mem0ai - Add a memory with a user id, for example alice
- Search memories for that user before replying
- Include results in the prompt
Prompt for your agent
Using mem0, store <preference> for user <id> and search "What does <id> prefer?". Confirm results only include that user's memories.
Caveat. The README's benchmark numbers come from the project's own runs.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mem0ai/mem0 and "Remember each user's preferences in your app"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer