INTEGRATION / AUGUST 4, 2026

OpenClaw Memory
Persistent Long-Term Memory Plugin.

12 MIN READ
VERIFIED ENVIRONMENT
Tested on: OpenClaw v2.0.16Runtime: Node.js v18+License: Apache-2.0

TL;DR

Give OpenClaw autonomous agents persistent memory across every run. The Memwyre plugin auto-injects past project context when an agent session starts and auto-captures decisions when it ends — no manual context files needed. Includes save_memory and search_memwyre tools for on-demand access during agent runs.

The Problem: OpenClaw Agents Forget Everything

Every time an autonomous agent run completes, the context window resets. The debugging breakthroughs, architecture decisions, and code patterns from the last run — all gone. You spend the first minutes of every agent session re-explaining your project's constraints.

OpenClaw doesn't ship with built-in persistent memory. If you use OpenClaw and Claude Code and Cursor, each tool maintains its own isolated silo.

Four Approaches to OpenClaw Memory

FeatureManual Context FilesMem0 / Zep (Agent Frameworks)MCP Memory ServerMemwyre Plugin
AutomationManual editsPredictive (LLM decides)Predictive (LLM decides)Deterministic (SessionStart/Stop)
StorageFlat filesLocal SQLite + ChromaDBVariesCloud vault + entity graph
SetupManual file creationHours (SDK & Database Config)JSON config + keyopenclaw plugins install
Cross-Session❌ No persistence✅ Via SDK API calls✅ Via tool calls✅ Auto-injected on startup
Cross-Tool❌ OpenClaw only❌ Custom pipelines required✅ Any MCP client✅ Shared vault (Claude Code, Cursor, VS Code)
LicenseN/AApache-2.0 / ProprietaryVariesApache-2.0
Best ForStatic rulesCustom AI Agent backendsReal-time tool accessHands-free cross-tool memory

These approaches are complementary, not exclusive. Use manual files for static rules and Memwyre for dynamic OpenClaw session memory — they work together.

Memwyre vs. Mem0 & Zep for OpenClaw

When building memory for autonomous agents, framework solutions like Mem0 (SDK-first memory) and Zep / Graphiti (temporal knowledge graphs) are popular choice for custom backend developers. However, integrating them into OpenClaw requires writing custom Python/TS wrappers, orchestrating database instances, and managing manual API calls inside your agent loops.

Where Memwyre differs for OpenClaw developers:

  • Zero-code CLI integration: Memwyre installs directly into OpenClaw with one command (openclaw plugins install @memwyre/openclaw-plugin). It automatically hooks into OpenClaw's session lifecycle events to handle context injection and session capture without writing custom SDK code.
  • Cross-tool ecosystem: Mem0 and Zep require custom sync pipelines to share memory between your CLI agents and your IDE. Memwyre's shared vault connects OpenClaw agent sessions directly to Cursor, VS Code, and Claude Desktop.
  • Benchmark performance: On the LoCoMo-10 benchmark, Memwyre's cross-encoder engine scores 73.5% accuracy vs. 43.7% for flat vector RAG baselines, using 88.5% fewer tokens. (Deep dives available on our Memwyre vs. Mem0 and Memwyre vs. Zep pages.)

How Cross-Tool Sync Actually Works

  • OpenClaw (plugin): hooks into session lifecycle events. On start → retrieval API. On stop → POST transcript to capture endpoint.
  • Claude Code / Cursor / VS Code / Claude Desktop (MCP): connect via Memwyre MCP server, same vault.
  • Same API key = same vault. Memory captured in an OpenClaw agent run is available in Cursor at the next prompt.

How the Memwyre OpenClaw Plugin Works

① SessionStart — Context Injection

When an OpenClaw agent session starts, the plugin fires before the first prompt. It reads your working directory, queries the Memwyre retrieval engine for past memories, and injects them into the agent's system prompt.

<memwyre-context>
## Past Memories for my-project
- Database uses PostgreSQL 15 with pgvector
- Auth flow: JWT + refresh tokens in httpOnly cookies
- Fixed: race condition in worker queue (use Redis lock)
</memwyre-context>

② Stop — Session Capture

When the agent run completes or goes idle, the plugin reads the session transcript (from event messages, session file, or ~/.openclaw/agents/main/sessions/ JSONL logs), sends it to Memwyre's background worker for extraction.

③ On-Demand Tools

Unlike the Claude Code plugin, OpenClaw's integration also provides two MCP tools:

  • save_memory(text, tags): Manually save a note/decision during an agent run.
  • search_memwyre(query, limit): Semantic search across your vault mid-session.

Troubleshooting & Edge Cases

  • Misclassified memory: view/edit/delete via dashboard or API (DELETE /api/v1/memories/:id).
  • Stale facts: Ebbinghaus decay auto-deprioritizes.
  • Deduplication: extraction model handles near-duplicates.
  • Tool profile requirement: OpenClaw's tool profile must be set to full or coding — the plugin is disabled under standard or minimal profiles.

Install in 60 Seconds

The Memwyre OpenClaw plugin installs directly via the OpenClaw CLI or JSON config:

  1. 1. Install the plugin package:
    openclaw plugins install @memwyre/openclaw-plugin
  2. 2. Configure your API key:

    Add the plugin entry to your ~/.openclaw/config.json settings file:

    {
      "plugins": {
        "entries": {
          "@memwyre/openclaw-plugin": {
            "enabled": true,
            "config": {
              "apiKey": "bv_sk_your_api_key_here",
              "hostUrl": "https://api.memwyre.tech"
            }
          }
        }
      }
    }

    Alternatively, export MEMWYRE_API_KEY="bv_sk_..." in your shell environment.

  3. 3. Set OpenClaw Agent Tool Profile:

    Ensure OpenClaw is running with full or coding tool profile. Custom memory tools are bypassed under standard or minimal profiles.

  4. 4. Run your agent:

    The plugin handles past context injection on agent start and saves session insights on agent exit.

Need detailed setup docs or local development links?
Read our official OpenClaw integration guide covering CLI flags, local linking, and tool profiles.
Read OpenClaw Docs →

What OpenClaw Remembers With Memwyre

  • 🧠 Architecture Decisions: Database choices, API patterns, deployment configs, and framework decisions.
  • 🐛 Debugging Solutions: Race conditions fixed, environment variable gotchas, and edge cases.
  • 🔗 Entity Relationships: Connections enabling multi-hop reasoning.
  • ✂️ Dynamic Pruning: Filters out noise to keep memory lean.

Benchmark: Why Retrieval Quality Matters

CategoryFlat Vector RAGMemwyre EngineImprovement
Single-Hop53.0%80.0%+51%
Multi-Hop24.0%45.0%+87.5%
Temporal48.0%74.0%+54%
Open-Domain50.0%76.0%+52%
Overall43.7%73.5%+68%
Context Tokens~26,000~3,000−88.5%

The improvement comes from architectural drivers like dynamic context pruning, two-stage cross-encoder re-ranking, and Ebbinghaus logarithmic recency decay. View the full LoCoMo-10 benchmark results →

Real-World Workflow: Multi-Agent Codebase Migration

Scenario: Using OpenClaw agents to handle a microservices migration. Agent #1 analyzes service boundaries on Monday. Agent #2 generates API contracts on Tuesday. Agent #3 writes integration tests on Wednesday. Without persistent memory, Agent #3 doesn't know the decisions Agent #1 made. With Memwyre, all three agents share the same vault.

Token Costs, Noise, & Security

Noise Filtration

Not every CLI error needs to be remembered. Memwyre's backend differentiates between ephemeral noise and structural knowledge.

Token Efficiency

By summarizing past sessions, the plugin injects a concise <memwyre-context> block (~1,500 token injections) vs megabytes of raw logs.

Enterprise Security

Zero-retention policies and self-hosting options ensure your code stays private.

License & Requirements

  • License: Apache-2.0
  • System requirements: Node.js 18+, any OS, no local DB needed
  • Self-hosting: Docker deployment available
  • Tool Profile: OpenClaw tool profile must be full or coding

Why Not Just Use Manual Context Files?

Manual context files are fine for static rules. But they face real limitations: manual maintenance, flat storage, and they are tool-locked.

FAQ

Does OpenClaw have built-in memory?
No. OpenClaw relies on external plugins for persistence.
How is Memwyre different from Mem0 and Zep for OpenClaw?
Frameworks like Mem0 and Zep are built for custom AI application backends, requiring developers to write Python/TS SDK code and manage database instances. Memwyre provides a zero-code native plugin for OpenClaw (openclaw plugins install @memwyre/openclaw-plugin) that hooks directly into agent session lifecycles, enabling instant cross-tool context sync with Cursor, VS Code, and Claude Desktop. Memwyre also scores 73.5% on the LoCoMo-10 benchmark vs. 43.7% for flat vector baselines.
What is the best OpenClaw memory plugin?
Depends. Memwyre for cross-tool automated memory (73.5% LoCoMo), claude-mem for local-first (89K stars, AGPL-3.0).
How is Memwyre different from claude-mem?
claude-mem stores observations locally in SQLite + ChromaDB — great for single-machine use with zero cloud dependency. Memwyre uses a shared cloud vault with an entity graph and two-stage cross-encoder re-ranking, enabling cross-tool sync without SSH setup. License-wise, claude-mem is AGPL-3.0; Memwyre is Apache-2.0. On retrieval quality, Memwyre scores 73.5% on LoCoMo-10 vs. 43.7% for flat vector baselines, using 88.5% fewer context tokens.
Does the plugin work with Claude Code and Cursor too?
Yes, same vault. Memory captured in an OpenClaw agent run is available in Cursor at the next prompt.
What license is Memwyre released under?
Apache-2.0. You can use, modify, and deploy Memwyre in proprietary environments without open-sourcing your changes.
What happens if Memwyre captures something wrong?
View/edit/delete via dashboard or API.
Is my memory data private?
Zero-retention, self-host option available.

Give OpenClaw Persistent Memory

One plugin install. Automatic context injection. Automatic session capture. Memory that works seamlessly across your autonomous agent sessions.

Start Free