ScriptsApr 2, 2026·3 min read
Mem0 — Memory Layer for AI Agents
Add persistent, personalized memory to any AI agent. Learns user preferences, adapts context, reduces tokens. 51K+ stars, used by 100K+ devs.
TO
TokRepo精选 · Community
Quick Use
Use it first, then decide how deep to go
This block should tell both the user and the agent what to copy, install, and apply first.
```bash
pip install mem0ai
```
```python
from mem0 import Memory
m = Memory()
# Add memories from conversations
m.add("I prefer dark mode and use VS Code", user_id="alice")
m.add("My project uses Python 3.12 with FastAPI", user_id="alice")
# Search relevant memories
memories = m.search("What editor does Alice use?", user_id="alice")
print(memories)
# [{"memory": "Prefers VS Code with dark mode", ...}]
# Get all memories for a user
all_memories = m.get_all(user_id="alice")
```
Also available as npm package: `npm install mem0ai`
🙏
Source & Thanks
- GitHub: [mem0ai/mem0](https://github.com/mem0ai/mem0)
- License: Apache 2.0
- Stars: 51,000+
- Maintainer: Mem0 AI team (Deshraj Yadav)
Thanks to Deshraj Yadav and the Mem0 team for solving one of the hardest problems in AI applications — giving agents the ability to remember, learn, and personalize over time.
Discussion
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.
Related Assets
LaVague — Natural Language Web Automation
Give a text objective, LaVague drives the browser to accomplish it. Large Action Model framework for web agents. 6.3K+ stars.
TokRepo精选
Trae Agent — AI Coding Agent by ByteDance
Open-source autonomous coding agent for software engineering tasks. Multi-provider LLM support. By ByteDance. 11K+ stars.
TokRepo精选
bolt.diy — AI Full-Stack App Builder, Any LLM
Community fork of Bolt.new. Prompt, edit, and deploy full-stack web apps with any LLM provider. 19K+ GitHub stars.
TokRepo精选