Skip to main content

Install

openclaw plugins install openclaw-mengram

Setup

  1. Get a free API key at mengram.io
  2. Add to ~/.openclaw/openclaw.json:
{
  "plugins": {
    "entries": {
      "openclaw-mengram": {
        "enabled": true,
        "config": {
          "apiKey": "${MENGRAM_API_KEY}"
        }
      }
    },
    "slots": {
      "memory": "openclaw-mengram"
    }
  }
}
  1. Set your API key:
export MENGRAM_API_KEY="om-your-key-here"
  1. Restart OpenClaw. Memory works automatically.

How It Works

Auto-recall: Before every agent turn, relevant memories are injected into context via before_agent_start hook. No manual tool calls needed. Auto-capture: After every turn, new information is automatically extracted and stored via agent_end hook. Nothing is lost.

Tools

The agent can use these 12 tools explicitly:
ToolPurpose
memory_searchSearch all 3 memory types with Graph RAG
memory_storeSave text to long-term memory
memory_forgetDelete a memory entity by name
memory_profileGet cognitive profile (who the user is)
memory_proceduresList or search learned workflows
memory_feedbackRecord workflow success/failure (triggers evolution)
memory_episodesSearch or list past events with date filtering
memory_timelineGet chronological timeline of memory events
memory_triggersGet smart triggers (reminders, contradictions, patterns)
memory_insightsGet AI-generated reflections and patterns
memory_agentsRun maintenance agents (curator, connector, digest)
memory_graphGet the knowledge graph (entities + connections)

Slash Commands

CommandAction
/remember <text>Save to memory
/recall <query>Search memory
/forget <entity>Delete from memory

CLI

openclaw mengram search "coffee preferences"   # Search all 3 memory types
openclaw mengram stats                          # Memory usage statistics
openclaw mengram profile                        # Cognitive profile
openclaw mengram procedures                     # List learned workflows
openclaw mengram episodes                       # List past events
openclaw mengram timeline                       # Chronological event timeline
openclaw mengram triggers                       # Smart triggers
openclaw mengram insights                       # AI-generated reflections
openclaw mengram agents                         # Run maintenance agents
openclaw mengram graph                          # Knowledge graph
openclaw mengram feed                           # Activity feed
openclaw mengram reindex                        # Reindex embeddings
openclaw mengram dedup                          # Deduplicate memories
openclaw mengram merge <source> <target>        # Merge two entities

Configuration

OptionDefaultDescription
apiKey$MENGRAM_API_KEYAPI key from mengram.io
baseUrlhttps://mengram.ioCustom URL for self-hosted
autoRecalltrueInject memories before each turn
autoCapturetrueStore memories after each turn
topK5Max results per search
graphDepth2Knowledge graph hops (0=off, 1, 2)
injectProfilefalseInclude cognitive profile periodically
profileFrequency25Profile injection every N turns
maxFactsPerEntity5Max facts shown per entity in context
maxRelationsPerEntity5Max relationships shown per entity
maxEpisodes5Max episodic memories in context
maxProcedures3Max procedures in context
maxStepsPerProcedure8Max steps shown per procedure
captureMessageCount10Messages to capture after each turn
maxTriggers10Max triggers shown
maxTimelineItems20Max timeline items shown
requestTimeout15000HTTP timeout in milliseconds
debugfalseVerbose logging