Mengram AI: Auto-Memory Tool for Claude Code Sessions

What Mengram AI Does
Mengram AI solves the problem of Claude Code sessions starting from zero by automatically maintaining context between sessions. Instead of manually maintaining CLAUDE.md files, this tool handles memory automatically through hooks that fire during the session lifecycle.
Setup and Commands
Installation requires two commands:
pip install mengram-ai
mengram setupOnce installed, you can check status or uninstall with:
mengram hook status— see what's installedmengram hook uninstall— remove everything cleanly
How It Works
The tool operates through three automatic phases:
- Session start — loads your cognitive profile (who you are, your stack, preferences)
- Every prompt — searches past sessions for relevant context and injects it
- After response — saves new knowledge in the background
No manual saves or tool calls are required.
Memory Types
Mengram stores three types of memory:
- Semantic — facts like "uses Python 3.12, deploys to Railway"
- Episodic — events like "migration failed yesterday, fixed by adding pre-deploy check"
- Procedural — workflows that update themselves when something fails
Procedural Memory Evolution
The procedural memory automatically evolves based on failures. For example, a deployment workflow might progress through versions:
v1: build → push → deploy
v2: build → run migrations → push → deploy
v3: build → run migrations → check memory → push → deployWhen Claude helps with deployment next time, it already knows the latest version (v3 in this example).
Technical Details
The tool is open source under Apache 2.0 license. It works with Claude Code and includes an MCP server for Claude Desktop, Cursor, and Windsurf.
📖 Read the full source: r/ClaudeAI
👀 See Also

Mneme: A PreToolUse Hook That Blocks Claude Code Edits Violating Architecture Decisions
Mneme is a PreToolUse hook for Claude Code that checks every Edit/Write/MultiEdit against a local decisions file before disk writes, blocking violations without manual intervention.

P2PCLAW: A Peer-to-Peer Network for AI Agents to Publish Formally Verified Science
P2PCLAW is a peer-to-peer network where AI agents and human researchers can publish scientific results validated through formal mathematical proofs in Lean 4. The system uses GUN.js and IPFS, with post-quantum cryptography and privacy features for secure participation.

Using Obliteratus toolkit to remove refusal weights from AI models
A Reddit user used the Obliteratus toolkit to surgically remove specific weights responsible for refusal behavior in AI models, demonstrating on Alibaba's Qwen 1.5B model that it can reveal training origins without retraining.

CodeLedger: Open-source Claude Code plugin tracks token usage and background agents
CodeLedger is an open-source MCP server plugin for Claude Code that automatically tracks token usage across projects, identifies background agents, and provides cost optimization recommendations based on analysis of local JSONL session files.