Give Your OpenClaw Agent Long-Term Memory (2026)
By default, OpenClaw agents start each session with a blank slate — they have no memory of previous conversations. With the elite-longterm-memory skill, your agent can store facts, decisions, and context in a vector database and recall them across sessions, days, or weeks later.
Why Persistent Memory Changes Everything
Without memory, your agent is like an employee with amnesia — you must re-explain everything every session. With persistent memory, the agent remembers your preferences, past decisions, learned patterns, and ongoing context. It gets smarter the more you use it.
Why Agents Need Persistent Memory
Cross-Session Context
Remember decisions from last week: "Don't use Provider X — had rate limit issues on March 3rd."
Learned Preferences
Store user preferences, coding style, writing tone, and workflow preferences that persist indefinitely.
Reduced Token Cost
Instead of re-explaining context each session (expensive), retrieve only relevant memories (cheap vector lookup).
Option 1: elite-longterm-memory (Recommended)
The elite-longterm-memory skill is a high-performance memory layer built for OpenClaw. It uses semantic search to find relevant memories automatically — no manual lookup required.
{
"mcpServers": {
"elite-longterm-memory": {
"command": "npx",
"args": ["-y", "@openclaw/elite-longterm-memory"],
"env": {
"MEMORY_BACKEND": "chromadb",
"CHROMADB_URL": "http://localhost:8000",
"MEMORY_COLLECTION": "agent-memory",
"MEMORY_MAX_RESULTS": "10",
"MEMORY_SIMILARITY_THRESHOLD": "0.75"
}
}
}
}Start ChromaDB Locally
ChromaDB is an open-source vector database that runs locally — no cloud account needed:
pip install chromadb chroma run --host localhost --port 8000 # Or via Docker (recommended for production) docker run -p 8000:8000 chromadb/chroma
Option 2: chromadb-memory (Simpler Setup)
If you want a lighter-weight option, the chromadb-memory skill connects directly to ChromaDB with a simpler configuration. Good for personal projects and experimentation.
{
"mcpServers": {
"chromadb-memory": {
"command": "npx",
"args": ["-y", "@openclaw/chromadb-memory"],
"env": {
"CHROMA_HOST": "localhost",
"CHROMA_PORT": "8000",
"COLLECTION_NAME": "my-agent-memories"
}
}
}
}How Memory Works in Practice
Real-World Example: Cross-Session Memory
Comparison: elite-longterm-memory vs chromadb-memory
| Feature | elite-longterm-memory | chromadb-memory |
|---|---|---|
| Setup complexity | Medium | Simple |
| Auto-summarization | ✓ Yes | ✗ Manual |
| Memory compression | ✓ Automatic | ✗ None |
| Semantic search quality | High | Medium |
| Vector backend options | ChromaDB, Pinecone, Weaviate | ChromaDB only |
| Best for | Production agents | Prototyping |
Cost Impact of Memory
Memory retrieval costs ~$0.0001 per lookup (vector search is cheap). But the token savings from not re-explaining context each session can reduce session cost by 30-60%. Use our Cost Estimator to model the savings.
Ready to Give Your Agent Memory?
Add the elite-longterm-memory skill via the Skill Registry, then configure it with the Config Wizard.