building-with-agent-memory
Build persistent memory systems for AI agents using Mem0, claude-mem, or custom implementations. Use when adding conversation memory, user preferences, or contextual recall to agents. Covers memory architecture patterns, retrieval strategies, and privacy controls. NOT for RAG systems (use building-rag-systems).
npx skills add majiayu000/claude-skill-registry --skill building-with-agent-memory --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Building Agent Memory Systems Production-grade memory layers for AI agents that persist context across sessions. ## Quick Decision | Need | Tool | Why | |------|------|-----| | Simple memory for any agent | Mem0 | Open-source, Python SDK, minimal setup | | Claude Code agent memory | claude-mem | Automatic hooks, 3-layer retrieval | | Enterprise/self-editing memory | Letta (MemGPT) | Agent-driven memory management | | Custom memory | RAG + state management | Full control | --- ## Mem0: Primary Implementation ### Installation ```bash pip install mem0ai export OPENAI_API_KEY="your-key" ``` ### Basic Usage ```python from mem0 import Memory m = Memory() # Add memory from conversation messages = [ {"role": "user", "content": "Hi, I'm Alex. I love basketball and gaming."}, {"role": "assistant", "content": "Hey Alex! I'll remember your interests."} ] m.add(messages, user_id="alex") # Search memories results = m.search("What do you know about me?", filters={"user_id": "alex"}) # Returns: {"results": [{"memory": "Name is Alex. Enjoys basketball and gaming.", "score": 0.89}]} ``` ### Default Configuration (OSS) - **LLM**: OpenAI gpt-4.1-nano-2025-04-14 (fact extraction) - **Embeddings**: te
- Quick Decision
- Mem0: Primary Implementation
- Installation
- Basic Usage
- Default Configuration (OSS)
- Memory Categories
- Core Operations
- Custom Configuration
- Memory Architecture Patterns
- Five Memory Types
- Letta/MemGPT Two-Tier Architecture
- Retrieval Strategies
- Recency-Based
- Relevance-Based (Semantic)
pip install mem0ai export OPENAI_API_KEY="your-key"
What does the building-with-agent-memory skill do?
Build persistent memory systems for AI agents using Mem0, claude-mem, or custom implementations. Use when adding conversation memory, user preferences, or contextual recall to agents. Covers memory architecture patterns, retrieval strategies, and privacy controls. NOT for RAG systems (use building-rag-systems).
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill building-with-agent-memory --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
