by alibaizhanov
Human-like memory for AI agents — semantic, episodic & procedural. Experience-driven procedures that learn from failures. Free API, Python & JS SDKs, LangChain, CrewAI & OpenClaw integrations.
# Add to your Claude Code skills
git clone https://github.com/alibaizhanov/mengramLast scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:53:35.696Z",
"npmAuditRan": true,
"pipAuditRan": false
}See how mengram compares with popular alternatives.
mengram is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by alibaizhanov. Human-like memory for AI agents — semantic, episodic & procedural. Experience-driven procedures that learn from failures. Free API, Python & JS SDKs, LangChain, CrewAI & OpenClaw integrations. It has 204 GitHub stars.
Yes. mengram passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/alibaizhanov/mengram" and add it to your Claude Code skills directory (see the Installation section above).
mengram is primarily written in Python. It is open-source under alibaizhanov on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mengram against similar tools.
No comments yet. Be the first to share your thoughts!
30 days in the Featured rail · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
Website · Get API Key · Docs · Console · Examples
pip install mengram-ai # the CLI; JS SDK: npm install mengram-ai
mengram try # see what memory would know about you — local only,
# no account, nothing leaves your machine
from mengram import Mengram
m = Mengram(api_key="om-...") # Free key → mengram.io
m.add([{"role": "user", "content": "I use Python and deploy to Railway"}])
m.search("tech stack") # → facts
m.ask("what's my tech stack?") # → synthesized answer + citations
m.episodes(query="deployment") # → events
m.procedures(query="deploy") # → workflows that evolve from failures
Native multilingual: ask in Russian, Chinese, Spanish, Japanese — Mengram retrieves and answers across 23 languages (Cohere multilingual embeddings + rerank).
Paste this into Claude Desktop, Cursor, Codex, Claude Code, or Windsurf — the agent reads our setup guide, installs the SDK, configures the MCP server, and verifies the round-trip end-to-end. No terminal context-switching.
Install Mengram for me. Fetch the canonical install guide at
https://mengram.io/agent-install.txt and follow it precisely.
My email is YOUR_EMAIL_HERE.
Works in any agent with shell + file-edit + web-fetch tools. Prefer doing it manually? See the plain-text guide — it's structured for human eyes too.
Persistent memory that survives /clear, auto-compaction, machine switches, and team handoffs — the SessionStart hook fires after every compact and re-injects your context. The summary can be lossy; the memory isn't.
# 1. Get a free key at https://mengram.io and save it once
mkdir -p ~/.mengram && echo '{"api_key": "om-your-key-here"}' > ~/.mengram/config.json
# 2. Install the plugin (hooks + MCP server + skill)
claude plugin marketplace add alibaizhanov/mengram
claude plugin install mengram@mengram
# 3. Skip the cold start — import your existing session history
# (secrets are redacted on your machine before anything is uploaded)
mengram import claude-code
What happens:
Session Start → Loads your cognitive profile (fires after /clear, compaction, and restarts)
Every Prompt → Searches past sessions for relevant context (auto-recall)
After Response → Saves new knowledge in background (auto-save)
Before a Bash → If the command matches a learned workflow with a weak record, asks you first (policy gate, CLI hooks)
Before compact → Writes the working state down — last prompts, files edited, last commands, where Claude left off (CLI hooks)
After compact → Puts that state back, verbatim, next to the host's summary — and tells you so in one line
No manual saves. No tool calls. Claude just knows what you worked on yesterday — even after compaction ate the transcript.
Prefer CLI-managed hooks instead of the plugin? pip install mengram-ai && mengram setup does the same via mengram hook install.
Codex and Cursor fire the same lifecycle events, so the same hooks run there — one memory across all three. mengram setup finds them on your machine and installs their hooks; or add them one by one:
mengram hook install --codex # ~/.codex/hooks.json: session context, recall on every prompt, compaction checkpoint, auto-save + task card
mengram hook install --cursor # ~/.cursor/hooks.json: session context, compaction checkpoint (back on the next tool call), auto-save
Cursor has no per-prompt context hook (beforeSubmitPrompt can only allow or block), so mid-conversation recall there is on request via the MCP tools; session start and compaction are automatic.
Every fact remembers which tool wrote it and when, and recall shows it: deploys to Fly.io from main (codex, 2026-09-15). Each hook also tells the server which OS and tool it runs under, so a workspace path recorded on your Mac never reaches a Claude Code session on a Linux box, and a Cursor settings fact never reaches Codex — those are left out and counted (facts_left_out_for_host).
mengram resumeWhen an agent stops, the hooks write a task card for the repository and branch: files touched, last commands, the last test run and the commit it ran on, plus the agent's draft of the task, what is done and what remains. The next session on that branch — tomorrow, another agent in another worktree of it, another machine — gets it first, and is told when the code has moved since the last check. A session on a branch with no card of its own (a fresh Orca worktree, say) is only told that cards exist, since another branch's card is usually another agent's task; mengram resume shows it on request:
$ mengram resume
[Mengram resume — where this task stands (2 h ago, from claude-code, branch main)]
Task (agent draft, not confirmed): prepare the Dify example for publication
Done:
- three workflows assembled
- save/recall round-trip checked through the API
Remaining:
- import the workflows into Dify and check the model's answers
Last check: `python3 -m pytest -q tests/test_dify.py` → 4 passed in 0.31s
The last check ran on 57cdde9; HEAD is now a1b2c3d (4 commits later). Its result describes the earlier state.
Files touched: examples/dify-support/workflow.yml
Sources: session 5d274778 · commit 57cdde9
mengram resume --open serves a local page to correct the card, confirm it (confirmed text is never redrafted), pick another task or copy the context for a new session. The card lives in ~/.mengram/resume/ and needs no account; only the draft of task/done/remaining uses a model.
pip install mengram-ai
mengram local init ./memory --provider anthropic --api-key sk-ant-... # or openai / ollama
mengram import claude-code --memory ./memory # seed it from your Claude Code sessions
mengram local map --memory ./memory --open # one page: who you are, what happened, what it learned
mengram hook install --memory ./memory # the same four hooks, all local
mengram server --memory ./memory # MCP for Claude Desktop, Cursor, any client
The folder is the memory: a memfmt tree of Markdown you own — git diffs it, Obsidian draws it, memfmt validate checks it. Same procedures-with-outcomes as the cloud: versions, success/fail counts per step, the policy gate, and the regression gate that quarantines a fix that would break another workflow. Only extraction and a failure revision need a model, and that one you bring. Nothing expires and nothing asks for a key. Docs.
Local search matches words in Unicode text, including Russian; it does not use embeddings or translate queries. Multiple Mengram sessions coordinate writes with a folder lock and merge independent additions. Conflicting edits require a reload instead of overwriting another session. Each changed file is replaced atomically, but the whole folder is not a single crash-atomic transaction, and external editors do not participate in the lock.
Every AI memory tool stores facts. Mengram stores 3 types of memory — and procedures evolve when they fail.
| Mengram | claude-mem | Mem0 | Zep | Letta | |
|---|---|---|---|---|---|
| Semantic memory (facts, preferences) | Yes | Yes | Yes | Yes | Yes |
| Episodic memory (events, decisions) | Yes | Partial | No | No | Partial |
| Procedural memory (workflows) | Yes | No | No | No | No |
| Procedures evolve from failures | Yes | No | No | No | No |
| Cognitive Profile | Yes | No | No | No | No |
| **Native multilingual retrieval (23 languages) |