Skip to content

OpenClaw

OpenClaw is a personal AI assistant that runs locally and supports 11+ messaging platforms (WhatsApp, Telegram, Slack, Discord, Signal, iMessage, Teams, Matrix, Zalo, etc.). Unlike all other AutoMem integrations, OpenClaw bypasses the MCP protocol entirely and calls the AutoMem HTTP API directly via curl commands through a native skill file.


AspectOpenClawOther Platforms
ProtocolDirect HTTP API via curlMCP over stdio
Integration typeNative skill (.md file)MCP server process
Dependenciesbash + curl (built-in)Node.js + npx
API accessDirect REST endpointsMCP tool abstraction
AuthenticationHTTP headersEnvironment variables passed to MCP server

This approach eliminates the MCP abstraction layer, making the integration simpler and more reliable for bot-based systems where the AI executes shell commands directly.


graph TB
    subgraph "Messaging Platforms"
        WA["WhatsApp"]
        TG["Telegram"]
        SL["Slack"]
        DC["Discord"]
        SG["Signal"]
        IM["iMessage"]
        OT["Teams, Matrix, Zalo, etc."]
    end

    subgraph "OpenClaw Gateway"
        OC["OpenClaw Process"]
        SK["~/.openclaw/skills/automem/SKILL.md"]
    end

    subgraph "Memory Storage"
        LOCAL["Local: memory/YYYY-MM-DD.md"]
        CURATED["Local: MEMORY.md"]
        AUTOMEM["AutoMem: FalkorDB + Qdrant"]
    end

    WA --> OC
    TG --> OC
    SL --> OC
    DC --> OC
    SG --> OC
    IM --> OC
    OT --> OC

    OC --> SK
    SK -->|"curl $AUTOMEM_ENDPOINT"| AUTOMEM

    OC --> LOCAL
    OC --> CURATED

The OpenClaw gateway receives messages from all platforms, loads skills (including automem/SKILL.md), and the bot executes curl commands to interact with the AutoMem service. This provides persistent semantic memory across all messaging platforms.


Terminal window
# Basic installation (auto-detects workspace)
npx @verygoodplugins/mcp-automem openclaw
# With explicit workspace and endpoint
npx @verygoodplugins/mcp-automem openclaw \
--workspace ~/clawd \
--endpoint https://your-automem.up.railway.app \
--api-key your-token-here
# Preview without writing
npx @verygoodplugins/mcp-automem openclaw --dry-run

CLI options:

OptionDescriptionDefault
--workspace <path>OpenClaw workspace directoryAuto-detected
--endpoint <url>AutoMem service endpointhttp://127.0.0.1:8001
--api-key <key>AutoMem API keyNone (optional)
--name <name>Project name for memory tagsAuto-detected
--dry-runPreview changes without modifying filesOff
--quietSuppress outputOff

What the installer does:

  1. Locates OpenClaw workspace directory
  2. Installs SKILL.md to ~/.openclaw/skills/automem/SKILL.md
  3. Updates ~/.openclaw/openclaw.json with AutoMem environment variables
  4. Creates <workspace>/memory/ directory for daily log files
  5. Removes legacy AGENTS.md blocks from previous installations

The installer searches for the workspace in this order:

  1. --workspace flag (explicit)
  2. OPENCLAW_WORKSPACE or CLAWDBOT_WORKSPACE environment variable
  3. ~/.openclaw/openclaw.json config file (reads agents.defaults.workspace)
  4. Default paths: ~/.openclaw/workspace, ~/clawd, ~/.clawdbot/workspace
~/.openclaw/
├── openclaw.json # Updated with AutoMem config
└── skills/
└── automem/
└── SKILL.md # Skill file with API reference
<workspace>/
└── memory/
├── .gitkeep
└── YYYY-MM-DD.md # Daily memory files (created by OpenClaw)

The installer updates ~/.openclaw/openclaw.json under skills.entries.automem:

{
"skills": {
"entries": {
"automem": {
"env": {
"AUTOMEM_ENDPOINT": "http://127.0.0.1:8001",
"AUTOMEM_API_KEY": "your-token-here"
}
}
}
}
}

The installer uses deep merging — it preserves all existing configuration and only updates the automem entry.


The skill file at ~/.openclaw/skills/automem/SKILL.md uses YAML front matter to declare required environment variables:

---
env_required:
- AUTOMEM_ENDPOINT
env_optional:
- AUTOMEM_API_KEY
---

The rest of the file contains the complete HTTP API reference that the bot uses to construct curl commands.

Store a memory:

Terminal window
curl -s -X POST "$AUTOMEM_ENDPOINT/memory" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AUTOMEM_API_KEY" \
-d '{
"content": "Brief title. Context and details. Impact/outcome.",
"type": "Decision",
"importance": 0.9,
"tags": ["project-name", "component", "YYYY-MM"]
}'

Recall memories:

Terminal window
curl -s "$AUTOMEM_ENDPOINT/recall?query=your+search+query&limit=5&tags=project-name" \
-H "Authorization: Bearer $AUTOMEM_API_KEY"

Recall parameters: query, limit, tags, tag_mode, time_query, expand_entities.

Associate memories:

Terminal window
curl -s -X POST "$AUTOMEM_ENDPOINT/associate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AUTOMEM_API_KEY" \
-d '{
"memory1_id": "id-one",
"memory2_id": "id-two",
"type": "LEADS_TO",
"strength": 0.8
}'

11 relationship types: RELATES_TO, LEADS_TO, EVOLVED_INTO, DERIVED_FROM, INVALIDATED_BY, CONTRADICTS, REINFORCES, PREFERS_OVER, PART_OF, EXEMPLIFIES, OCCURRED_BEFORE.


The skill instructs the bot to recall at session start for:

  • Questions about past decisions, preferences, or history
  • Debugging or troubleshooting (search for similar past issues)
  • Project planning or architecture discussions

Skip recall for:

  • Simple greetings or small talk
  • Questions answerable from general knowledge
  • Direct file operations or commands
CategoryImportanceExamples
Decisions0.9”Chose Railway over Fly.io for deployment. Reason: persistent volumes.”
User corrections0.8”Human prefers dark mode themes. Corrected my light mode suggestion.”
Bug fixes0.8”WhatsApp webhook failing. Root cause: expired token. Solution: auto-refresh.”
Preferences0.7”Human likes terse responses, no fluff.”
Patterns0.7”Use early returns for validation in all API routes.”
Context0.5”Set up new Telegram channel for family group.”

OpenClaw uses three complementary memory layers:

  1. Daily files (memory/YYYY-MM-DD.md) — raw conversation logs, created automatically
  2. MEMORY.md — curated notes in the workspace
  3. AutoMem (FalkorDB + Qdrant) — semantic search and graph relationships across all sessions and platforms

AutoMem provides the cross-session, cross-platform memory that the file-based layers cannot.


The skill instructs the bot on graceful degradation:

  • If AutoMem is unavailable (curl fails): Continue normally — memory enhances but never blocks
  • Do not announce failures to the human
  • Fall back to file-based memory (memory/ directory and MEMORY.md)
  • Only check /health endpoint to diagnose persistent failures
ErrorCauseSolution
401 UnauthorizedMissing Authorization headerAdd -H "Authorization: Bearer $AUTOMEM_API_KEY"
Connection refusedAutoMem service not runningStart service or fall back to file-based memory
Empty resultsQuery too specific or no matchesBroaden query terms, remove tag filters, increase limit

  1. Verify skill is loaded: openclaw skills check automem
  2. Restart OpenClaw gateway after installation
  3. Check AutoMem service is running: curl http://127.0.0.1:8001/health

This refers to OpenClaw’s built-in memory-lancedb plugin, not AutoMem. The skill explicitly instructs the bot to ignore this message — AutoMem handles embeddings server-side with no client API keys required.

  1. Verify endpoint: curl $AUTOMEM_ENDPOINT/health
  2. Check API key if using an authenticated instance
  3. Check firewall/VPN for Railway endpoints
  4. Examine OpenClaw logs for curl exit codes

FeatureOpenClaw (Direct HTTP)MCP Platforms
ProtocolREST API via curlMCP over stdio
Setup complexitySingle CLI commandCLI + config file editing
Runtime dependenciesbash + curlNode.js runtime
Error recoverycurl exit codesMCP error protocol
LatencyDirect HTTP callMCP serialization overhead
Platform specificityNative skill systemUniversal MCP
Auth methodHTTP Bearer tokenEnvironment variables

The direct HTTP approach is simpler for bot-based systems but lacks the standardization benefits of MCP for cross-platform integrations.