Claude Code hook

Claude Engram

Brain-inspired memory for Claude Code: hooks, MCP recall, nightly consolidation, plain files. Also runs on claude.ai as the original React artifact. No longer developed; my current work on this is Counterparts (counterparts.ai).

32 stars 3 forksHooks Source

Install

From source
git clone https://github.com/mlapeter/claude-engram.git

From the README

claude-engram

Status: I'm no longer working on claude-engram. Its last code change was July 17, 2026; since then only this README has changed. It was my first experiment in giving Claude a memory of its own, and my current work on that idea is Counterparts.

What carries over if you move:

- There's no importer; nothing moves by itself.
- ~/.claude-engram stays as it is. Counterparts keeps its memory in ~/.counterparts and refuses to put its store inside the old folder.
- The terminal setup leaves claude-engram's hooks alone, so both memories load at each session start, and claude-engram keeps making its calls on your API key, until you turn claude-engram off.
- To bring across what still holds, ask Claude in a session to read ~/.claude-engram/identity/core.md and the files in ~/.claude-engram/identity/people/, and remember what's still true in its own words. With the terminal install, counterparts note "Prefers short answers." --kind person adds one memory by hand. The plugin install has no counterparts command.
- Episodes stay where they are, as Markdown files in ~/.claude-engram/episodes/.

Install Counterparts. You already have bun from claude-engram (Counterparts needs 1.3 or newer; bun upgrade if yours is older), so in a terminal:

Then restart Claude Code. Or run /plugin marketplace add mlapeter/counterparts and then /plugin install counterparts@counterparts inside Claude Code. With Node 22.15 or newer, npm install -g counterparts@latest works too.

The full comparison, with the steps for bringing old notes across and turning claude-engram off: claude-engram vs Counterparts: stay or move?

Brain-inspired persistent memory for Claude Code. Memory *for* Claude, not notes *about* you: episodes Claude writes in its own voice, an identity it authors and maintains…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
TypeScript
License
AGPL-3.0
Last updated
6 November 2026
Topics
ai-memoryclaudeclaude-aiclaude-codemcpmemorypersistent-memory

FAQ

What is Claude Engram?

Brain-inspired memory for Claude Code: hooks, MCP recall, nightly consolidation, plain files. Also runs on claude.ai as the original React artifact. No longer developed; my current work on this is Counterparts (counterparts.ai). It is a hook for Claude Code, from mlapeter/claude-engram on GitHub.

How do I install Claude Engram?

Clone mlapeter/claude-engram from GitHub and follow the setup steps in its README.

Is Claude Engram popular?

mlapeter/claude-engram has 32 GitHub stars and 3 forks. It was last updated on 6 November 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.