MemOS Tutorial: Deploy Self-Evolving Memory for Your AI Agents
Step-by-step tutorial on deploying MemOS with Docker, configuring the Memory API, enabling multi-agent memory sharing, and integrating with Hermes Agent.
MemOS Tutorial: Deploying a Self-Evolving Memory System for Your AI Agents
In this tutorial, we'll walk through deploying MemOS β a production-ready Memory Operating System β and integrating it with your AI agents. By the end, you'll have a fully functional long-term memory backend that learns and evolves with your agents.
π Want to deploy MemOS yourself?
Docker configs, system requirements, and installation guides β all on one page.
View MemOS Tool Page βPrerequisites
- A server with at least 4GB RAM and 2 CPU cores (8GB/4CPU recommended)
- Docker and Docker Compose installed
- Python 3.10+ (for the local plugin)
- An LLM API key (OpenAI, Anthropic, or local model)
Step 1: Quick Start with Docker
The fastest way to get MemOS running is via Docker Compose. Create a docker-compose.yml file:
memos:
image: ghcr.io/memtensor/memos:latest
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./data/memos:/data
Then run:
MemOS will be available at http://localhost:8080.
Step 2: Configure Memory API
MemOS provides a RESTful Memory API. Here's how to store your first memory:
-H "Content-Type: application/json" \
-d '{
"content": "User prefers concise technical answers",
"type": "preference",
"metadata": {"source": "conversation", "confidence": 0.9}
}'
Step 3: Multi-Agent Memory Sharing
MemOS excels at multi-agent scenarios. Different agents can share and contribute to the same memory store while maintaining isolation through memory cubes:
curl -X POST http://localhost:8080/api/v1/memory \
-d '{"content":"Docker restart needed after config change","cube":"devops","agent":"agent-a"}'
# Agent B retrieves from the same cube
curl -X GET "http://localhost:8080/api/v1/memory?cube=devops&query=docker+restart"
Step 4: Integrate with Hermes Agent
MemOS has an official local plugin for Hermes Agent. Install it and enable hybrid retrieval (FTS5 + vector) with smart deduplication:
# Configure in your Hermes Agent profile
memos-plugin --enable --retrieval hybrid --dedup smart
Real-World Impact
In production benchmarks, MemOS improved OpenClaw task completion rates from 36.63% to 50.87% across five agent tasks β a 39% relative improvement. With 35.24% token savings through smart deduplication and hybrid retrieval, it pays for itself in API cost reductions alone.
π Ready to deploy MemOS?
Get the Docker configs, system requirements, and full installation guide.
View MemOS Tool Page β