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

No registration, cloud-hosted, data under your control — this is what truly seamless onboarding looks like.
Does Your Lobster Also Have These “Memory Issues”?
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:
- Sudden amnesia after Compact — right in the middle of an important discussion, the lobster suddenly forgets part of it
- No shared memory across multiple Agents — every Agent is an “independent brain” that has to be trained again
- Local embedding is hard to deploy — sqlite-vec is tedious to configure, and GGUF models consume resources
- Backup and migration are difficult — you worry that “the lobster I’ve raised for 10 years might suddenly die”
Why Choose mem0 + Tablestore
We can help you make your lobster’s memory fully automatic, with no manual work required:
- Automatic memory — after each conversation ends, the plugin automatically extracts key information from the conversation and saves it. For example, if you say, “I like using Python,” it will remember that.
- Automatic recall — when the next conversation starts, the plugin automatically searches for relevant memories and injects them into the context. When you ask, “Help me write a piece of code,” it already knows that you prefer Python.
| 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 |
☁️ Convenience of Cloud Hosting
- No operations burden — Tablestore is a fully managed Alibaba Cloud service, with no need to build your own database
- Ready to use — one-line installation, lightweight and simple to operate
- Pay as you go — cost-friendly for small and medium-scale scenarios
🔐 Data Is Autonomous and Controllable
- Data is stored in your own account — not a black box; you can view it directly in the Tablestore console
- Enterprise-grade isolation — supports resource isolation, permission management, monitoring, and alerts
- Cross-Agent sharing — under the same userId, multiple Agents can share memories
🧠 Intelligent Memory Extraction
- Automatic structuring — extracts facts such as “name, preferences, decisions” from conversations instead of stacking raw utterances
- Hybrid retrieval — vector similarity + BM25 keyword matching, so it understands both semantics and details
- Memory auditing — memory_list / memory_forget interfaces allow you to inspect and delete memory entries
Installation Steps
Manual Installation
Step 1 | Install the Plugin
openclaw plugins install @tablestore/openclaw-mem0
Step 2 | Configure Tablestore
If you do not yet have a Tablestore instance, first log in to the Alibaba Cloud Tablestore console:
- Log in to the console: https://ots.console.aliyun.com
- Create an instance
- Obtain the instance name, Endpoint, and AccessKey
Step 3 | Configure OpenClaw
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"
}
}
}
}
}
}
}
}
Step 4 | Restart the Gateway
openclaw gateway restart
Step 5 | Verify
# Search memory
openclaw mem0 search "my name"
# View statistics
openclaw mem0 stats
One-Click Installation
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:
- Detect the npm registry and install the plugin
- Check the OpenClaw version
- Configure openclaw.json
- Restart OpenClaw
Real Test: The Lobster Remembered
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.
Finally
If your needs are:
- ✅ You want the convenience of cloud hosting without being trapped by a black box
- ✅ You want your data stored in your own Alibaba Cloud account, fully controllable and auditable
- ✅ You want cross-Agent memory sharing with synchronization across devices
- ✅ You want enterprise-grade monitoring and permission management
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 🔜
