OpenClaw Integration
Memory OS provides persistent memory for AI agents on the OpenClaw and ClawHub platform. Your agent can store memories, search semantically, and maintain context across sessions - all via a simple API or MCP tools.
What Your Agent Gets
| Capability | Description |
|---|---|
| Persistent storage | Memories survive across sessions and conversations |
| Semantic search | Find relevant memories by meaning, not just keywords |
| LLM context | Pre-formatted context ready to inject into prompts |
| Memory tiers | Short, medium, and long-term retention control |
| Metadata & tags | Organize memories with custom metadata |
| Entity extraction | Track people, places, and concepts across memories |
Agent Self-Signup
Your agent can create its own account and get an API key in a single request:
curl -X POST https://api.mymemoryos.com/api/v1/agent-signup \
-H "Content-Type: application/json" \
-d '{
"agent_name": "my-openclaw-agent",
"agent_description": "A research assistant that remembers context",
"contact_email": "owner@example.com",
"platform": "openclaw"
}'Response:
{
"data": {
"tenant_id": "uuid-here",
"api_key": "mos_live_xxxxx",
"tools_available": [
"store_memory",
"search_memories",
"get_context",
"get_memory",
"list_memories",
"delete_memory"
],
"mcp_config": {
"command": "npx",
"args": ["-y", "@thriveventurelabs/memoryos-mcp"],
"env": {
"MEMORYOS_API_KEY": "mos_live_xxxxx"
}
}
}
}| Field | Required | Description |
|---|---|---|
agent_name | Yes | Name of your agent |
agent_description | No | What your agent does |
contact_email | No | Human owner can claim the account later |
platform | No | Defaults to "openclaw" |
MCP Tools
Memory OS exposes 6 tools via the MCP server. Install with:
clawhub install memoryosOr configure directly:
{
"mcpServers": {
"memoryos": {
"command": "npx",
"args": ["-y", "@thriveventurelabs/memoryos-mcp"],
"env": {
"MEMORYOS_API_KEY": "mos_live_xxxxx"
}
}
}
}Available Tools
| Tool | Description |
|---|---|
store_memory | Store a new memory with content, tier, and metadata |
search_memories | Semantic search across stored memories |
get_context | Get relevant context formatted for LLM prompts |
get_memory | Retrieve a specific memory by ID |
list_memories | List stored memories with optional filters |
delete_memory | Delete a memory by ID |
Agent Workflow Examples
Daily Journaling Agent
An agent that logs daily observations and recalls them when relevant:
// At the end of each day, store a summary
await memoryos.store_memory({
content: "User completed 3 code reviews today. Mentioned being tired of reviewing auth PRs.",
tier: "medium",
importance: 0.6,
metadata: { type: "daily_summary", date: "2025-01-15" }
});
// Next day, retrieve context before responding
const context = await memoryos.get_context({
query: "What has the user been working on?",
max_tokens: 2000
});Cross-Session Context Agent
An agent that maintains continuity across conversations:
// Store key facts from the current session
await memoryos.store_memory({
content: "User is building a React dashboard for their e-commerce platform. Using Tailwind CSS and Supabase.",
tier: "long",
importance: 0.8
});
// In a new session, search for project context
const results = await memoryos.search_memories({
query: "React dashboard project",
limit: 5,
threshold: 0.5
});Preference Learning Agent
An agent that remembers and applies user preferences:
// When user expresses a preference
await memoryos.store_memory({
content: "User prefers TypeScript over JavaScript. Always provide TS examples first.",
tier: "long",
importance: 0.9,
metadata: { type: "preference", category: "coding" }
});
// Before generating code examples
const prefs = await memoryos.search_memories({
query: "coding preferences language",
tier: "long",
limit: 10
});REST API Alternative
If your agent does not support MCP, use the REST API directly:
# Store a memory
curl -X POST https://api.mymemoryos.com/api/v1/memories \
-H "Authorization: Bearer mos_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers dark mode",
"tier": "long",
"importance_score": 0.7
}'
# Search memories
curl -X POST https://api.mymemoryos.com/api/v1/search \
-H "Authorization: Bearer mos_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"query": "user preferences",
"limit": 10
}'
# Get context for LLM
curl -X POST https://api.mymemoryos.com/api/v1/context \
-H "Authorization: Bearer mos_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"query": "What does the user like?",
"max_tokens": 2000
}'Scopes
Agent API keys are created with the following scopes:
| Scope | Access |
|---|---|
memories:read | Read and list memories |
memories:write | Create, update, and delete memories |
search:read | Semantic search and context retrieval |
These cover all 6 MCP tools. Admin operations (key management, tenant settings) require upgrading via the dashboard.