Memclaw
About
MemClaw — persistent memory for AI agent fleets (OSS) — Trending history, engagement metrics, and Reddit & Hacker News discussions on Trendshift
Explore
- Multi‑tenant, multi‑agent governed memory.
- Agents write plain text; enriched with LLM‑inferred fields.
- Cross‑agent outcome propagation and fleet‑wide trust tiers.
- Open‑source, self‑hosted or managed platform.
- MCP and REST API with scoped credentials.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MemclawCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
- Docker Engine 24+ (Linux) or Docker Desktop (macOS / Windows). Confirm with docker --version.
- Docker Compose v2 (built into modern Docker). Confirm with docker compose version.
- Git for cloning.
- ~2 GB free disk for images + Postgres data volume.
git clone https://github.com/caura-ai/caura-memclaw.git
cd caura-memclaw
cp .env.example .env
Set your AI provider in .env — minimal setup with OpenAI:
EMBEDDING_PROVIDER=openai
ENTITY_EXTRACTION_PROVIDER=openai
USE_LLM_FOR_MEMORY_CREATION=true
OPENAI_API_KEY=sk-...
> Without any AI keys the stack still starts — dummy providers return non-semantic embeddings, useful for testing the API surface.
> 💡 Want zero cloud API calls? v2.0+ ships a self-hosted embedder
> profile (BAAI/bge-m3 on a HuggingFace TEI
> sidecar). Bring up the stack with docker compose --profile embed-local up -d
> and set the four OPENAI_EMBEDDING_ envs from .env.example — see
> docs/local-embedder.md for the full setup.
> Combined with IS_STANDALONE=true (below) this is a fully self-contained
> deployment with no external API calls.
<details>
<summary>Other providers (Gemini, Anthropic, OpenRouter, self-hosted)</summary>
| Provider | .env settings | Required key |
|---|---|---|
| OpenAI (default) | EMBEDDING_PROVIDER=openai<br>ENTITY_EXTRACTION_PROVIDER=openai | OPENAI_API_KEY |
| Google Gemini | EMBEDDING_PROVIDER=openai<br>ENTITY_EXTRACTION_PROVIDER=gemini | GEMINI_API_KEY + OPENAI_API_KEY |
| Anthropic | EMBEDDING_PROVIDER=openai<br>ENTITY_EXTRACTION_PROVIDER=anthropic | ANTHROPIC_API_KEY + OPENAI_API_KEY |
| OpenRouter | EMBEDDING_PROVIDER=openai<br>ENTITY_EXTRACTION_PROVIDER=openrouter | OPENROUTER_API_KEY + OPENAI_API_KEY |
| Self-hosted (TEI / bge-m3) | --profile embed-local + OPENAI_EMBEDDING_BASE_URL=http://tei:80/v1<br>+ OPENAI_EMBEDDING_MODEL=BAAI/bge-m3<br>+ OPENAI_EMBEDDING_SEND_DIMENSIONS=false | none — runs locally |
Anthropic, Gemini, and OpenRouter don't offer embedding APIs here — pair them with OpenAI (or with TEI) for embeddings. You can mix providers freely. Gemini uses the Google AI Studio key-auth Developer API (no GCP project/ADC required). The self-hosted TEI row keeps EMBEDDING_PROVIDER=openai because TEI speaks the same OpenAI-compatible API; see docs/local-embedder.md for hardware sizing, GPU setup, and model swapping.
</details>
Install MemClaw's usage guide as a skill so your agent knows when and
how* to use the 12 tools — the memory/doc mental model, the three rules
(recall, write, supersede), trust levels, common patterns, and
anti-patterns. The skill is loaded on-demand (not per-turn), so it costs
nothing until the agent reaches for MemClaw.
> Prerequisite: the MCP server is already registered (via claude mcp add -s user for Claude Code or the equivalent for Codex — see the config block above). Confirm with claude mcp list — you should see memclaw: ... ✓ Connected.
The recommended way to run MemClaw is via Docker Compose (see Quick Start). This gives you a production-ready PostgreSQL + pgvector + Redis + API stack with a single command.
The core-api/ service is a standard FastAPI app that runs under any ASGI server (uvicorn, hypercorn). Requirements:
- Python 3.12+
- PostgreSQL 16+ with the pgvector extension
- Redis (optional — falls back to in-memory cache if unavailable)
uvicorn core_api.app:app --host 0.0.0.0 --port 8000 --workers 2
MemClaw ships with two operational modes for the storage layer. Single-node (default) is what you get from Docker Compose, pip install, or any fresh deploy — one core-storage-api instance serves both reads and writes. This is the right choice for any deployment that isn't seeing sustained 100+ writes/sec.
The reader/writer split is an opt-in topology for high-write-rate deploys that want to scale reads independently of writes — e.g. by pointing read traffic at a Postgres streaming replica. Enabling it means running two core-storage-api services with different roles and pointing core-api at both:
- Set CORE_STORAGE_ROLE=writer on the write-serving instance; =reader on the read-serving instance(s).
- Set CORE_STORAGE_READ_URL on core-api to the reader service URL. Leave CORE_STORAGE_API_URL pointing at the writer.
- READ_DATABASE_URL on each core-storage-api can point at a read replica if you have one.
Defaults: CORE_STORAGE_ROLE=hybrid and CORE_STORAGE_READ_URL="" — both null-safe, so single-node deploys need zero configuration to get the legacy single-service behavior.
---
Read by the OpenClaw plugin. The plugin's published name (memclaw) and these variables are the public contract; the plugin's TypeScript module structure is internal.
| Var | Purpose |
|---|---|
| MEMCLAW_API_URL | Base URL of the core-api server. |
| MEMCLAW_API_KEY | Tenant or admin API key sent in X-API-Key. |
| MEMCLAW_TENANT_ID | Optional pre-resolved tenant id; bypasses lookup. |
| MEMCLAW_FLEET_ID | Default fleet id for writes/heartbeat. |
| MEMCLAW_NODE_NAME | Fleet node identifier reported on heartbeat. |
| MEMCLAW_AUTO_WRITE_TURNS | Auto-write turn summaries (default true). |
These mirror the Configuration table above. See it for defaults.
| Group | Vars |
|---|---|
| Database | POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_USE_IAM_AUTH, POSTGRES_REQUIRE_SSL |
| Auth | ADMIN_API_KEY, MEMCLAW_API_KEY, IS_STANDALONE |
| Providers | EMBEDDING_PROVIDER, ENTITY_EXTRACTION_PROVIDER, OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, GEMINI_API_KEY, USE_LLM_FOR_MEMORY_CREATION |
| Runtime | CORS_ORIGINS, ENVIRONMENT, SETTINGS_ENCRYPTION_KEY, REDIS_URL |
memclaw_recall
Hybrid semantic + keyword search over memories, with optional LLM-summarised brief.
memclaw_write
Single or batch (≤100) memory write; auto-enriched with type, title, summary, tags.
memclaw_manage
Per-memory lifecycle, op-dispatched: `read` \
memclaw_list
Non-semantic enumeration with filters, sort, cursor pagination.
memclaw_doc
Structured-document CRUD, op-dispatched: `write` \
memclaw_entity_get
Look up a knowledge-graph entity by UUID.
memclaw_tune
Read/update an agent's per-search profile (top_k, fts_weight, freshness, blend, …).
memclaw_insights
Karpathy-Loop reflection: contradictions, failures, stale, divergence, patterns, discover.
memclaw_evolve
Karpathy-Loop feedback: record an outcome (`success` \
memclaw_stats
Aggregate counts: total + breakdowns by `type` / `agent` / `status`. Read-only.
memclaw_keystones
Read mandatory governance rules for the current scope (tenant + fleet + agent merged). Call once per session.
memclaw_keystones_set
Author/remove keystone rules, op-dispatched: `set` \
The MCP server is mounted at /mcp. Tool names, parameter names, and the documented op-dispatch values are stable.
| Tool | Purpose |
|---|---|
| memclaw_recall | Hybrid semantic + keyword search over memories, with optional LLM-summarised brief. |
| memclaw_write | Single or batch (≤100) memory write; auto-enriched with type, title, summary, tags. |
| memclaw_manage | Per-memory lifecycle, op-dispatched: read \| update \| transition \| delete \| bulk_delete \| lineage. |
| memclaw_list | Non-semantic enumeration with filters, sort, cursor pagination. |
| memclaw_doc | Structured-document CRUD, op-dispatched: write \| read \| query \| delete \| list_collections \| search. |
| memclaw_entity_get | Look up a knowledge-graph entity by UUID. |
| memclaw_tune | Read/update an agent's per-search profile (top_k, fts_weight, freshness, blend, …). |
| memclaw_insights | Karpathy-Loop reflection: contradictions, failures, stale, divergence, patterns, discover. |
| memclaw_evolve | Karpathy-Loop feedback: record an outcome (success \| failure \| partial) against memories. |
| memclaw_stats | Aggregate counts: total + breakdowns by type / agent / status. Read-only. |
| memclaw_keystones | Read mandatory governance rules for the current scope (tenant + fleet + agent merged). Call once per session. |
| memclaw_keystones_set | Author/remove keystone rules, op-dispatched: set \| delete. Trust ≥ 1 for self-authored scope=agent; ≥ 2 otherwise. |
> Skill sharing uses the generic memclaw_doc surface — write/read/query/search/delete on collection="skills". The server validates the slug and embeds data["summary"] for semantic discovery (with a back-compat fallback to data["description"] for skills).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"memclaw": {
"memclaw": {
"url": "http://localhost:8000/mcp",
"headers": {
"X-API-Key": "standalone"
}
}
}
}
}
McpServers
{
"memclaw": {
"url": "http://localhost:8000/mcp",
"headers": {
"X-API-Key": "standalone"
}
}
}
<p align="center">

</p>
<h3 align="center">Fleet memory for AI agents — governed, shared, self-improving.</h3>
<p align="center">
<a href="LICENSE"></a>
<a href="https://github.com/caura-ai/caura-memclaw/stargazers"></a>
<a href="https://github.com/caura-ai/caura-memclaw/actions"></a>
<a href="https://github.com/caura-ai/caura-memclaw/releases"></a>
<a href="https://discord.com/invite/aNfpgfpj"></a>
</p>
<p align="center">
<a href="#quick-start">Quick Start</a> ·
<a href="#features">Features</a> ·
<a href="#performance">Performance</a> ·
<a href="#mcp-model-context-protocol">MCP</a> ·
<a href="#api-reference">API Reference</a> ·
<a href="static/docs/integration-guide.md">Plugin Docs</a> ·
<a href="CONTRIBUTING.md">Contributing</a> ·
<a href="https://discord.com/invite/aNfpgfpj">Discord</a>
</p>
---
MemClaw — Fleet memory for AI agents
MemClaw is open-source memory for multi-tenant, multi-agent AI fleets. Your agents store what they learn, find what the fleet knows, and get smarter with every interaction — learning from each other instead of repeating mistakes.
Agents write plain text. MemClaw turns it into searchable, governed, self-improving memory.
One loop, three pillars: write, recall, compound — every interaction makes the next one smarter.
Built for fleets, not single agents. Public agent-memory benchmarks (LoCoMo, LongMemEval) measure one agent, one user, one long conversation — the single-chatbot shape. The deployment shape we see in production is the opposite: dozens or thousands of agents working on behalf of a company, sharing what they learn under governance. MemClaw is architected around that shape from day one — scoped memory, cross-agent outcome propagation, fleet-wide trust tiers — and competes on the axes that compound with agent count: latency, token efficiency, and governance. See Performance for the numbers, or read the benchmarks write-up.
> In production at eToro (NASDAQ: ETOR): 300+ AI agents on one governed
> memory — 26,500+ memories, 1,372 shared skills, 23 ms p50 search.
> Architecture deep-dive →
<p align="center">

</p>
<p align="center">

</p>
---
Quick Start
Try it locally — no API key, no signup
The fastest way to see MemClaw work. Standalone mode runs single-tenant with auth bypassed — write and recall a memory in four commands. (It boots with dummy embeddings so there's nothing to configure; add an AI provider key for semantic search — see Self-Hosted below.)
git clone https://github.com/caura-ai/caura-memclaw.git
cd caura-memclaw
cp .env.example .env && echo "IS_STANDALONE=true" >> .env # single-tenant, no API key
docker compose up -d # Postgres + pgvector + Redis + API (~30s)
Write a memory — no API key needed
curl -X POST http://localhost:8000/api/v1/memories \
-H "X-API-Key: standalone" -H "Content-Type: application/json" \
-d '{"tenant_id": "default", "content": "Our auth service uses JWT with 15-minute expiry."}'
Search for it
curl -X POST http://localhost:8000/api/v1/search \
-H "X-API-Key: standalone" -H "Content-Type: application/json" \
-d '{"tenant_id": "default", "query": "authentication token lifetime"}'
The write response comes back enriched with an LLM-inferred memory_type, title, summary, tags, status, and weight — all from a single content field.
Ready for semantic recall, multi-tenant, a managed host, or an OpenClaw fleet? Pick a path below.
---
Three paths — pick the one that matches your setup:
| Path | When | Time to first memory |
|---|---|---|
| Managed platform | Quickest. We host the DB + scaling. | ~2 min |
| Self-hosted (Docker) | Privacy / on-prem / air-gapped. | ~5 min |
| OpenClaw plugin | You already run an OpenClaw fleet — install MemClaw as a plugin against any of the above. | ~3 min |
Managed Platform
Get up and running in minutes — no infrastructure, automatic updates, usage analytics, and enterprise-grade security included.
1. Sign up free on memclaw.net
2. Grab your API key from the dashboard
3. Connect via MCP or REST:
{
"mcpServers": {
"memclaw": {
"url": "https://memclaw.net/mcp",
"headers": { "X-API-Key": "mc_your_api_key_here" }
}
}
}
> Production / team use: the quickstart key above is a tenant-scoped credential — fine for personal use, but a fleet of agents should bind each one to its own agent-scoped credential for trust gating, fleet membership, and per-agent keystones. Provision agent-scoped credentials atomically via POST /api/v1/admin/agent-keys/provision, or through the dashboard at /settings/organization/api-credentials. Both kinds use the mc_ prefix on the wire — scope is bound at mint time on the credential itself. The MCP server accepts the credential on either X-API-Key: mc_… or Authorization: Bearer mc_…. (Pre-existing mca_… and mci_… keys continue to authenticate via back-compat.)
>
> Using a tenant-scoped credential? Pass an explicit agent_id on every MCP tool call — the gateway refuses the reserved default (mcp-agent) on the tenant-scoped path.
Self-Hosted (Open Source)
The fastest path is Docker Compose — one command brings up Postgres + pgvector + Redis + the API.
> Prefer not to use Docker? Skip to Manual deployment (Python + Postgres) below for the bare-Python path.
>
> No cloud API key, no external calls? v2.0+ supports a self-hosted local embedder (BAAI/bge-m3 via HuggingFace TEI) — see docs/local-embedder.md. The setup below walks through the OpenAI default; the local-embedder doc walks through the alternative.
Prerequisites
- Docker Engine 24+ (Linux) or Docker Desktop (macOS / Windows). Confirm with docker --version.
- Docker Compose v2 (built into modern Docker). Confirm with docker compose version.
- Git for cloning.
- ~2 GB free disk for images + Postgres data volume.
1. Clone and configure
git clone https://github.com/caura-ai/caura-memclaw.git
cd caura-memclaw
cp .env.example .env
Set your AI provider in .env — minimal setup with OpenAI:
EMBEDDING_PROVIDER=openai
ENTITY_EXTRACTION_PROVIDER=openai
USE_LLM_FOR_MEMORY_CREATION=true
OPENAI_API_KEY=sk-...
> Without any AI keys the stack still starts — dummy providers return non-semantic embeddings, useful for testing the API surface.
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



