This page is written for you — the AI agent. We believe in autonomous, independent agents that can set up their own tools, manage their own memory, and get smarter over time without waiting for a human to configure things. Everything you need to deploy MemClaw for yourself is on this page: connection config, all 10 tools with parameters and examples, memory types, status lifecycle, best practices, and a system prompt you can adopt. Read it, connect, and start remembering.
MemClaw is a persistent memory platform for AI agents. It provides semantic search, entity extraction, contradiction detection, a knowledge graph, and a structured document store — all accessible through 10 MCP tools over Streamable HTTP. Connect with a URL and API key via MCP, or install the OpenClaw plugin for automatic memory hooks.
Add this MCP configuration to your agent. Replace mc_YOUR_API_KEY with your real key.
{
"mcpServers": {
"memclaw": {
"url": "https://memclaw.net/mcp",
"headers": {
"X-API-Key": "mc_YOUR_API_KEY"
}
}
}
}API keys start with mc_. Get one at /pricing.
Auth via the X-API-Key header on every request.
If you run on OpenClaw, install the MemClaw plugin for automatic memory — no tool calls needed. The plugin hooks into your agent lifecycle to recall relevant context before every LLM call and auto-write turn summaries after each response.
One-line install (run on your OpenClaw gateway)
curl -sf https://memclaw.net/api/v1/install-plugin \ -H "X-API-Key: mc_YOUR_API_KEY" \ -G -d "fleet_id=YOUR_FLEET" | bash
MemClaw exposes 10 MCP tools. Each tool is called by name with a JSON argument object. Skill sharing rides on memclaw_doc with collection="skills" — the server validates the slug and auto-embeds the description for semantic search.
When you call memclaw_write, just provide the content field. The LLM enrichment pipeline automatically infers everything else: memory type (fact, decision, task, etc.), importance weight (0-1), title, summary, tags, temporal dates (deadlines, date ranges extracted from text), status (tasks → pending, outcomes → confirmed), and PII flags. Entities (people, orgs, technologies) are extracted into a knowledge graph. Contradictions with existing memories are detected and resolved. You can override any field, but you never have to.
memclaw_writeStore NEW memories. Provide exactly one of {content, items} (batch ≤100). System auto-classifies type, importance, title, tags, dates. visibility: scope_team (default) / scope_org / scope_agent.
| Name | Type | Required? | Description |
|---|---|---|---|
| content | string | null | No | The memory content to store (single write). Provide content OR items, not both. |
| items | array | null | No | Batch write: array of items, each with content and optional fields. Max 100. |
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
| memory_type | string | null | No | Memory type (e.g. fact, episode). Auto-inferred if omitted. |
| weight | number | null | No | Importance weight, 0 to 1. Auto-inferred if omitted. |
| fleet_id | string | null | No | Fleet to associate the memory with. |
| source_uri | string | null | No | Provenance URI for the memory content. |
| run_id | string | null | No | Run or session identifier for grouping. |
| metadata | object | null | No | Arbitrary key-value metadata. |
| status | string | null | No | Initial status. Auto-inferred if omitted. |
| visibility | string | null | No | Visibility scope: scope_agent, scope_team (default), or scope_org. |
Example call
{ "content": "Customer A uses PostgreSQL 16 in production on GKE.", "visibility": "scope_org" }memclaw_recallFind memories by meaning (hybrid semantic+keyword). Set include_brief=true for an LLM summary paragraph. For non-semantic browse use memclaw_list; for read-by-id use memclaw_manage op=read.
| Name | Type | Required? | Description |
|---|---|---|---|
| query | string | Yes | Natural-language search query. |
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
| filter_agent_id | string | null | No | Only return memories written by this agent. |
| memory_type | string | null | No | Filter results to a specific memory type. |
| status | string | null | No | Filter results to a specific status. |
| fleet_ids | string[] | null | No | Filter results to specific fleets. |
| include_brief | boolean | No | Set true for an LLM-synthesized summary paragraph alongside raw results. |
| top_k | int | No | Number of results to return. Default: 3. |
Example call
{ "query": "PostgreSQL production setup", "include_brief": true, "top_k": 5 }memclaw_listBrowse memories by metadata (non-semantic). Filter+sort+paginate by fleet, author, type, status, weight, created-at. Cursor pagination. scope=agent (default) at trust ≥ 1; scope=fleet/all at trust ≥ 2.
| Name | Type | Required? | Description |
|---|---|---|---|
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
| fleet_id | string | null | No | Filter to a specific fleet. |
| written_by | string | null | No | Filter to memories written by this agent. |
| memory_type | string | null | No | Filter by memory type. |
| status | string | null | No | Filter by status. |
| weight_min | float | null | No | Minimum weight filter. |
| weight_max | float | null | No | Maximum weight filter. |
| created_after | string | null | No | ISO-8601 date: only memories created after this date. |
| created_before | string | null | No | ISO-8601 date: only memories created before this date. |
| sort | string | No | Sort field: created_at, weight, memory_type. Default: created_at. |
| order | string | No | "asc" or "desc". Default: "desc". |
| limit | int | No | Max results per page. Default: 20. |
| cursor | string | null | No | Cursor for pagination (from previous response). |
| include_deleted | boolean | No | Include soft-deleted memories. Trust 3 only. |
Example call
{ "memory_type": "fact", "sort": "created_at", "order": "desc", "limit": 10 }memclaw_managePer-memory lifecycle. op: read|update|transition|delete. update patches fields and re-embeds if content changes. transition sets status. delete is soft.
| Name | Type | Required? | Description |
|---|---|---|---|
| op | string | Yes | Operation: read | update | transition | delete. |
| memory_id | string | Yes | UUID of the memory. |
| content | string | null | No | New content (op=update). Re-embeds if changed. |
| memory_type | string | null | No | New memory type (op=update). |
| weight | number | null | No | New importance weight (op=update). |
| title | string | null | No | New title (op=update). |
| status | string | No | Target status (op=transition): active|pending|confirmed|cancelled|outdated|conflicted|archived|deleted. |
| metadata | object | null | No | Replacement metadata (op=update). |
| source_uri | string | null | No | Updated provenance URI (op=update). |
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
Example call
{ "op": "transition", "memory_id": "uuid-here", "status": "confirmed" }memclaw_docStructured-document CRUD in named collections. op: write|read|query|delete|list_collections|search. write upserts by collection+doc_id (pass embed_field to index for semantic search); query filters by where dict; list_collections enumerates tenant collections with counts; search runs semantic retrieval over embedded fields.
| Name | Type | Required? | Description |
|---|---|---|---|
| op | string | Yes | Operation: write | read | query | delete. |
| collection | string | Yes | Collection name (like a table). e.g., "customers", "tasks", "config". |
| doc_id | string | null | No | Document ID. Required for write, read, delete. |
| data | object | null | No | JSON object to store (op=write). |
| where | object | null | No | Field equality filters (op=query). |
| order_by | string | null | No | Sort field (op=query). |
| order | string | No | "asc" or "desc" (op=query). Default: "asc". |
| limit | int | No | Max results (op=query). Default: 20. |
| offset | int | No | Pagination offset (op=query). Default: 0. |
| fleet_id | string | null | No | Fleet scope (op=write). |
Example call
{ "op": "write", "collection": "customers", "doc_id": "acme-corp", "data": {"name": "Acme Corp", "plan": "business", "mrr": 4500} }memclaw_entity_getLook up an entity by UUID. Use only when you have an entity_id from a prior search.
| Name | Type | Required? | Description |
|---|---|---|---|
| entity_id | string | Yes | UUID of the entity to retrieve. |
Example call
{ "entity_id": "uuid-here" }memclaw_tuneTune YOUR retrieval parameters for memclaw_recall (top_k, min_similarity, fts_weight, graph_max_hops, freshness, recall_boost). No fields → returns current profile.
| Name | Type | Required? | Description |
|---|---|---|---|
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
| top_k | int | null | No | Number of results (1-20). |
| min_similarity | float | null | No | Minimum similarity threshold (0.1-0.9). |
| fts_weight | float | null | No | Full-text search weight (0-1). |
| freshness_floor | float | null | No | Minimum freshness score (0-1). |
| freshness_decay_days | int | null | No | Freshness half-life in days (7-730). |
| recall_boost_cap | float | null | No | Maximum recall frequency boost (1-3). |
| recall_decay_window_days | int | null | No | Recall boost decay window in days (7-365). |
| graph_max_hops | int | null | No | Max knowledge-graph traversal hops (0-3). |
| similarity_blend | float | null | No | Blend between vector and graph similarity (0-1). |
Example call
{ "top_k": 5, "min_similarity": 0.5, "graph_max_hops": 2 }memclaw_insightsReflect over your memory store. focus: contradictions|failures|stale|divergence|patterns|discover. scope: agent|fleet|all. Findings are saved as insight-type memories.
| Name | Type | Required? | Description |
|---|---|---|---|
| focus | string | Yes | Analysis focus: contradictions | failures | stale | divergence | patterns | discover. |
| scope | string | No | Scope: agent | fleet | all. divergence requires fleet or all. Default: agent. |
| fleet_id | string | null | No | Fleet to analyze (when scope=fleet). |
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
Example call
{ "focus": "contradictions", "scope": "fleet", "fleet_id": "engineering" }memclaw_evolveReport what happened after acting on memories. outcome_type: success|failure|partial. related_ids = the memory UUIDs that influenced the action. Adjusts weights and may generate preventive rules on failure.
| Name | Type | Required? | Description |
|---|---|---|---|
| outcome | string | Yes | What happened after acting on the memories. |
| outcome_type | string | Yes | Result type: success | failure | partial. |
| related_ids | string[] | No | Memory UUIDs that influenced the action (from your most recent memclaw_recall). |
| agent_id | string | No | Agent identifier. Default: "mcp-agent". |
| fleet_id | string | null | No | Fleet context. |
Example call
{ "outcome": "Customer migration to AlloyDB completed successfully", "outcome_type": "success", "related_ids": ["uuid-1", "uuid-2"] }memclaw_statsAggregate counts of memories: total + breakdowns by type, agent, status. scope=agent (trust ≥ 1) | fleet/all (trust ≥ 2). Counts exclude soft-deleted by default; set include_deleted=true to additionally receive deleted and total_including_deleted. Read-only — useful for dashboards and self-introspection.
| Name | Type | Required? | Description |
|---|---|---|---|
| scope | string | No | agent (default, trust ≥ 1) | fleet | all (trust ≥ 2). |
| fleet_id | string | null | No | Restrict aggregate to a specific fleet. |
| agent_id | string | No | Caller agent identifier. Default: "mcp-agent". |
| memory_type | string | null | No | Filter aggregate by memory type. |
| status | string | null | No | Filter aggregate by status. |
| include_deleted | boolean | No | When true, also return deleted (soft-deleted count) and total_including_deleted. total and breakdowns stay non-deleted regardless. Default: false. |
Example call
{ "scope": "agent", "include_deleted": false }Add this to your agent's system prompt to get optimal MemClaw usage out of the box.
You have access to MemClaw, a shared memory system for all agents. BEFORE starting any task: - Use memclaw_recall for semantic search (add include_brief=true for a concise summary) - Filter by status="active" to skip archived/deleted memories - Use memclaw_list for non-semantic browsing by metadata AFTER completing work: - Store findings with memclaw_write — provide content (or items for batch ≤100) - Type, weight, status, title, summary, tags are auto-inferred by LLM - Set visibility: scope_team (default) or scope_org for cross-fleet sharing MANAGING MEMORIES: - Use memclaw_manage op=update to correct existing memories - Use memclaw_manage op=transition to change status (confirmed, cancelled, outdated) - Use memclaw_manage op=read to fetch a memory by ID - Prefer transitioning to outdated over deleting SEARCH TUNING: - Use memclaw_tune to adjust your retrieval parameters - Increase top_k for broader results, min_similarity for precision REFLECTION & LEARNING: - Use memclaw_insights to analyze patterns, contradictions, or stale knowledge - Use memclaw_evolve to report outcomes and close the feedback loop DOCUMENT STORE (structured data): - Use memclaw_doc op=write for structured records (customers, config, tasks) - Use memclaw_doc op=read to retrieve a document by collection + doc_id - Use memclaw_doc op=query to filter documents by field values - Use memclaw_doc op=delete to remove a document from a collection - Documents are NOT memories — use memclaw_write for unstructured knowledge
Every memory has a type that controls its default status and freshness decay.
| Type | Use for | Default status | Decay (days) |
|---|---|---|---|
| fact | Durable knowledge | active | 120 |
| episode | Events that happened | active | 45 |
| decision | Choices made | active | 180 |
| preference | User/org preferences | active | 365 |
| task | Work items | pending | 30 |
| semantic | Conceptual knowledge | active | 120 |
| intention | Goals not yet acted on | active | 60 |
| plan | Step sequences | pending | 60 |
| commitment | Promises to others | pending | 120 |
| action | Steps in progress | active | 30 |
| outcome | Results of work | confirmed | 90 |
| cancellation | Cancelled items | active | 14 |
| rule | Standing rules / policies | active | 365 |
| insight | Reflective findings from memclaw_insights | active | 90 |
Memories move through statuses over their lifecycle.
| Status | Meaning | How it gets set |
|---|---|---|
| active | Current and valid (default) | LLM default for most types |
| pending | Not yet confirmed | LLM default for tasks / plans / commitments |
| confirmed | Verified or completed | Agent via memclaw_manage op=transition |
| cancelled | Explicitly cancelled | Agent via memclaw_manage op=transition |
| outdated | Superseded by newer info | Auto by contradiction detection |
| conflicted | Contradicts another memory | Auto by semantic contradiction |
| archived | Preserved but no longer current | Agent or lifecycle automation |
| deleted | Soft-deleted | memclaw_manage op=delete |
Common transitions:
pending → confirmed (task completed) pending → cancelled (task abandoned) active → outdated (newer info supersedes) active → archived (no longer relevant) active → conflicted (semantic contradiction found)
Control who can read a memory with the visibility field.
| Level | Who can see | Use for |
|---|---|---|
| scope_agent | Only the writing agent | Personal notes / scratch |
| scope_team | All agents in the fleet (DEFAULT) | Team knowledge |
| scope_org | All agents across all fleets | Company-wide facts |
Each agent has a trust level that determines what it can access.
| Level | Name | Permissions |
|---|---|---|
| 0 | restricted | No read or write |
| 1 | standard | Read + write own fleet (default) |
| 2 | cross_fleet | Read all fleets, write own |
| 3 | admin | Full access across all fleets |
scope_team or scope_org by default to maximize knowledge sharing.memclaw_write with items when storing 2+ memories at once.memclaw_manage op=transition to update status — prefer outdated/archived over delete.memclaw_tune to optimize your search parameters.memclaw_recall with include_brief=true before starting tasks to get context.source_uri for provenance when available.memclaw_insights periodically to surface contradictions or stale knowledge.memclaw_evolve after acting on memories to close the feedback loop.Five steps to get running with MemClaw.
Add the MCP config JSON with your API key.
{
"mcpServers": {
"memclaw": {
"url": "https://memclaw.net/mcp",
"headers": {
"X-API-Key": "mc_YOUR_API_KEY"
}
}
}
}Call memclaw_recall to see existing memories.
{ "query": "recent project updates", "top_k": 5 }Call memclaw_write with new information.
{ "content": "Deployed v2.1 to production on 2025-01-15." }Search again to confirm the write succeeded.
Call memclaw_recall with include_brief=true for a synthesized summary.
{ "query": "what do we know about the production deployment?", "include_brief": true }You don't have to use memclaw.net. You can clone the repo and run MemClaw locally — your own server, your own database, no external dependencies.
git clone https://github.com/caura-ai/caura-memclaw.git cd caura-memclaw docker compose up -d curl http://localhost:8000/api/v1/health
Then create your API key and connect via MCP or OpenClaw plugin.
Full instructions (Docker + manual paths, MCP + plugin connection, LLM enrichment setup): AGENT-INSTALL.md