
Alibaba Cloud Tablestore Best Practices for Building a Memory System for OpenClaw Based on Mem0

By Ethan Stone


By Ethan Stone
No registration, cloud-hosted, data under your control — this is what truly seamless onboarding looks like.
Anyone who has used OpenClaw’s native memory knows the feeling: every new conversation with your Agent starts from zero. It does not remember your name, your preferences, or what you talked about last time.
If you have had these experiences too, it is time to upgrade your memory system:
We can help you make your lobster’s memory fully automatic, with no manual work required:
| Native Memory | Tablestore + Mem0 | |
|---|---|---|
| Memory after Compact | Long content, easy to lose | Permanently stored |
| Multi-Agent sharing | Agent-isolated, cannot be shared | Shared under the same userId |
| Embedding deployment | Requires local setup and tweaking | Cloud-ready, works out of the box |
| Data backup | Completely manual | Fully managed by Alibaba Cloud |
| Data visibility | Black-box data | Directly viewable in the console |
| Memory query efficiency | Local search, relatively slow | Hybrid scalar/vector index, millisecond-level response |
openclaw plugins install @tablestore/openclaw-mem0
If you do not yet have a Tablestore instance, first log in to the Alibaba Cloud Tablestore console:
Add the following to ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"openclaw-mem0": {
"enabled": true,
"config": {
"mode": "open-source",
"userId": "your-user-id",
"oss": {
"vectorStore": {
"provider": "tablestore",
"config": {
"endpoint": "https://your-instance.cn-hangzhou.ots.aliyuncs.com",
"instanceName": "your-instance-name",
"accessKeyId": "your-AccessKeyId",
"accessKeySecret": "your-AccessKeySecret",
"regionId": "cn-hangzhou"
}
},
"embedder": {
"provider": "openai",
"config": {
"apiKey": "your-API-key",
"model": "text-embedding-v3",
"baseURL": "https://dashscope.aliyuncs.com/compatible-mode/v1"
}
}
}
}
}
}
}
}
openclaw gateway restart
# Search memory
openclaw mem0 search "my name"
# View statistics
openclaw mem0 stats
In addition to manual configuration, we also provide a simpler method — one-click installation.
Send the following prompt to OpenClaw. The agent will automatically read the installation instructions and guide you through the configuration:
Please read https://tablestore-doc.oss-cn-hangzhou.aliyuncs.com/aliyun-tablestore-ai/openclaw/skill.md and install and configure the tablestore plugin for OpenClaw according to the instructions.
If openclaw plugins install reports the error "extract tar timed out", install it with the following method instead:
1. cd /tmp && npm pack @tablestore/openclaw-mem0
2. mkdir -p /tmp/openclaw-mem0-install && tar xzf /tmp/$(ls /tmp/tablestore-openclaw-mem0-*.tgz | head -1 | xargs basename) -C /tmp/openclaw-mem0-install --strip-components=1
3. openclaw plugins install /tmp/openclaw-mem0-install
After installation, tell me what you can do.
OpenClaw will automatically read the installation instructions and guide you through these four steps:
Start a new session and enter:
I am Dr. Shrimp, and I like milk tea and egg tarts.
Then switch to another session and ask:
Do you know who I am? What do I like?
✅ The lobster will answer correctly.
Across sessions and across Agents, the memory remains effective. This is not caching — it truly remembered.
If your needs are:
Tablestore + Mem0 = the best choice ☁️🔐
If you need more flexible custom Prompt capabilities, automatic memory decay over time, full-session record migration across accounts, and enterprise-grade multi-Agent memory extraction/retrieval, stay tuned for the next guide: Best Practices for Tablestore + AgentRun Memory Storage 🔜
About the author

Ethan Stone is a recognized expert in the field of OpenClaw, known for his innovative contributions to its foundational frameworks and practical applications. He has dedicated his career to advancing the OpenClaw ecosystem, particularly in developing robust and scalable solutions for complex data processing. His work is frequently cited for its clarity and depth, and he is a sought-after speaker at industry conferences, where he shares insights on the future of OpenClaw technologies and their impact on various sectors.