Install
openclaw skills install mengram-openclaw-skillLong-term memory with 3 types (facts, events, workflows). Self-improving procedures that evolve from failures. Remember user preferences, past conversations, and learned procedures across sessions. Use when recalling what the user said before, saving important info, getting user context, tracking workflows, or reporting procedure outcomes.
openclaw skills install mengram-openclaw-skillHuman-like long-term memory for your OpenClaw agent. Remembers facts, events, and workflows across all sessions and channels.
Mengram gives you 3 types of memory that work together:
All memory persists across sessions and channels. What you learn on WhatsApp is available on Discord.
This skill uses Bash to run scripts in {baseDir}/scripts/.
ALWAYS search memory before answering questions about the user, their preferences, their history, or anything personal. This is critical — check memory first, then respond.
Save to memory after:
Record procedure feedback after:
mengram-feedback.sh with truemengram-feedback.sh with false and describe what went wrong. This triggers automatic procedure evolution — the procedure improves itself.Get profile when:
Search all 3 memory types for relevant context. Do this before answering personal questions.
bash {baseDir}/scripts/mengram-search.sh "search query here"
Returns facts, past events, and known workflows matching the query. Use specific queries — "coffee preferences" not "stuff about user".
Save conversation messages so Mengram can extract facts, events, and procedures automatically.
bash {baseDir}/scripts/mengram-add.sh "user said: I'm allergic to peanuts and my meeting with Sarah went well yesterday"
You can pass multiple messages. Mengram's AI automatically extracts:
Get a comprehensive portrait of the user — who they are, what they know, recent events, known workflows.
bash {baseDir}/scripts/mengram-profile.sh
Returns a full context block you can use to personalize responses.
After completing a multi-step task, save it as a reusable procedure with success/failure tracking.
bash {baseDir}/scripts/mengram-workflow.sh "Resolved billing issue: 1) Checked subscription status 2) Found expired card 3) Sent renewal link 4) User confirmed payment"
Next time a similar task comes up, mengram-search.sh will return this workflow with its success rate.
Record success or failure for a procedure. On failure with context, the procedure automatically evolves — AI analyzes what went wrong and creates an improved version.
# Success
bash {baseDir}/scripts/mengram-feedback.sh "procedure-id" true
# Failure — triggers evolution
bash {baseDir}/scripts/mengram-feedback.sh "procedure-id" false "OOM error on step 3, forgot to increase memory limit" 3
Arguments: <procedure-id> <true|false> [failure context] [failed_at_step]
The procedure ID is returned in search results. When evolution triggers, the procedure gets a new version with improved steps — automatically.
View all learned procedures, or drill into a specific one to see version history and evolution log.
# List all
bash {baseDir}/scripts/mengram-procedures.sh
# Specific procedure with version history
bash {baseDir}/scripts/mengram-procedures.sh "procedure-id"
Shows procedure name, steps, success/failure counts, version number, and full evolution history.
Verify the Mengram connection is working:
bash {baseDir}/scripts/mengram-setup.sh
mengram-profile.sh to load user contextmengram-search.sh "topic" before answeringmengram-add.sh with the relevant messagesmengram-workflow.sh with the steps takenmengram-feedback.sh <id> truemengram-feedback.sh <id> false "what went wrong" <step> — this evolves the proceduremengram-procedures.sh to see all workflows with versionsmengram-add.sh with recent conversation highlights to keep memory updatedmengram-search.sh "favorite restaurant"mengram-search.sh "booking usual preferences" to find what "the usual" meansmengram-add.sh "user switched to Samsung Galaxy S26"mengram-add.sh "user is vegetarian"mengram-profile.shmengram-feedback.sh "proc-id" truemengram-feedback.sh "proc-id" false "forgot migrations" 3 → procedure auto-evolvesmengram-procedures.shSet in ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"mengram-memory": {
"enabled": true,
"env": {
"MENGRAM_API_KEY": "om-your-api-key-here"
}
}
}
}
}
Get your free API key at https://mengram.io
https://mengram.io/v1/* (only)MENGRAM_API_KEY (only)Trust Statement: By using this skill, conversation data is sent to mengram.io for memory extraction and storage. Only install if you trust Mengram with your conversation data. Mengram is open-source: https://github.com/AiBaizhanov/mengram