Free binary · Local-first · Agent memory
muninn — agent memory for Claude Code

Agent memorythat compounds every turn

muninn is agent memory for Claude Code and any other harness — a Neo4j graph of prompts, lessons, entities, and your code, auto-injected into every prompt.

$curl -fsSL https://muninnai.dev/install.sh | bash

macOS & Linux · One Go binary · Docker Neo4j + Ollama optional

Built for coding agents

Claude CodeFirst-class hooks + skills
Any harnessstdin/stdout contract
Self-hostedHTTP API + management UI
Client modePoint CLI at a remote server

Features

Everything your agent did — still useful tomorrow

Not a chat log. A living graph with confidence, negative knowledge, and code awareness — wired into the prompt path automatically.

Passive recall

Every prompt is embedded and matched against past work, lessons, entities, and your code graph. The best of it is injected before the model sees your message.

Graph curator

A tool-using agent curates the graph at session end — lessons, dead ends, entity merges, ontology hygiene. Not a rigid multi-pass pipeline. Quiet graphs skip the model.

Remember & forget

Assert durable facts with muninn remember. Preview and delete with muninn forget — no silent re-recall drift. Dead ends capture what failed and why.

Runtime ontology

A seed type vocabulary grows with use. The curator folds rare types, merges duplicates, and keeps entities typed — so recall understands your world, not just keywords.

Code graph

tree-sitter indexing for TS/JS, Python, Go, Elixir. Find similar code before you write it, measure blast radius, surface risky central files.

Local-first, remote-ready

Recommended: muninn serve + client mode even on one laptop (job queue, catchup, UI). Direct bolt still works. Same CLI and hooks either way; multi-tenant API keys when you share.

How it works

Zero ceremony after day one

Wire it once. From then on, memory is passive — the graph grows as you ship.

  1. 01

    Install

    One curl installs the binary, walks you through Neo4j/embeddings/LLM, and optionally wires Claude Code hooks and skills.

  2. 02

    Work as usual

    Keep using your agent. muninn records prompts, responses, tool outcomes, and indexes your repos in the background.

  3. 03

    Memory injects

    On every UserPromptSubmit, relevant lessons, entities, and code context are embedded-matched and injected automatically.

  4. 04

    A curator runs

    At session end a tool-using agent writes lessons and dead ends, merges duplicates, and tidies the ontology. Not a fixed pipeline — and not mid-prompt.

Memory graph

Watch a turn become durable memory

Prompts and responses land in the graph. At session end a curator agent writes lessons and dead ends, merges duplicates, and tidies types. The code graph joins in. On the next turn, recall pulses along the best path and injects what matters.

  1. 01Record — every agent turn writes nodes and edges.
  2. 02Curate — the session-end agent mints lessons and dead ends, and keeps the graph honest.
  3. 03Index — tree-sitter code nodes link into the same graph.
  4. 04Recall — a pulse lights the multi-hop path into the new prompt.
Graph · live demo
loop ~14s
PromptLessonDead endCodeEntityRecall pulse

CLI surface

Skills and commands when you need them

Auto-inject covers the common case. Reach for the CLI — or agent skills — when you want time-bounded recall, a DRY check, impact analysis, or to pin a fact forever.

  • muninn recall — windows, file history, session view
  • muninn search — ad-hoc semantic search over memory
  • muninn index — code graph from your repos
  • muninn serve — recommended HTTP backend, curator jobs, UI
Assert a durable factbash
muninn remember "deploy only via the blue-green pipeline"
Record a dead endbash
muninn remember --dead-end \
  "tried rewrite in Redis for session cache; races on multi-host"
DRY check before writingbash
muninn similar "parse JWT from Authorization header"
Blast radiusbash
muninn impact AuthService
muninn risky
What gets injected (example)

Lessons

Prefer blue-green deploys for API services — last three production rollouts used canary gates successfully.

Dead ends

Redis session rewrite abandoned: multi-host races under load. Stick with sticky sessions + Postgres.

Code

similar: internal/auth/jwt.go · validateBearer already exists — DRY before writing a new parser.

Architecture

One binary. Graph-native memory.

muninn is a single Go binary that sits between your harness and a Neo4j graph — local Docker stack by default, with muninn serve recommended even on one machine, and remote Bolt + HTTP when you scale out.

Graph store

Neo4j holds prompts, responses, lessons, entities, and the code graph — versioned schema, vector + fulltext indexes.

Embeddings

Local Ollama or any OpenAI-compatible endpoint. Separate text and code embedding spaces for better retrieval.

Curator agent

Session-end (and catchup) run a tool-using agent over allowlisted graph tools — lessons, merges, type hygiene — instead of a rigid distill/promote pipeline.

Serve mode

Recommended even on one machine: muninn serve + [server].url for the job queue, catchup, and UI. Same binary scales to multi-tenant API keys.

Install

Up in minutes

The installer resolves the latest release, verifies checksums, and walks you through graph, embeddings, and LLM — Docker, existing services, or remote. After that, the recommended layout is a long-lived muninn serve with [server].url so the curator job queue and catchup live in one process.

$curl -fsSL https://muninnai.dev/install.sh | bash

1. Binary

Download + install to /usr/local/bin or~/.local/bin

2. Stack

Neo4j + Ollama via Docker, or point at services you already run

3. Harness

Optional Claude Code hooks + skills — previewed before write

Prefer manual install? Grab a release archive and verify against checksums.txt.

Or let your agent do it

Point Claude (or any agent) at the install instructions

Paste the prompt below. It links to agent-specific steps — consent before Docker, Claude hooks, or sudo — so the installer is not run blindly.

View for-agents.md
Install muninn following https://muninnai.dev/for-agents — ask me before Docker, Claude hooks, or sudo.

Works in Claude Code, Cursor, or any agent that can read a URL and run shell commands. Full instructions: muninnai.dev/for-agents

FAQ

Common questions

Where does my data live?+

By default, on your machine — Neo4j in Docker (or a path you configure) and embeddings via local Ollama or a provider you choose. Nothing is sent to muninn cloud; there is no hosted SaaS product required.

Is Claude Code required?+

Claude Code is the reference integration with a first-class plugin (hooks + skills). Any harness can drive muninn through the documented stdin/stdout hook contract, or talk to muninn serve over HTTP.

Can my agent install muninn for me?+

Yes. Paste a prompt that points at https://muninnai.dev/for-agents — agent-specific install instructions. The agent should ask before starting Docker, writing Claude hooks, or using sudo. You can also run the curl installer yourself.

What is the curator agent?+

From 0.2, muninn curates memory with a tool-using agent at session end (and on a cheap catchup tick if you run muninn serve). It writes lessons and dead ends, merges duplicate entities, and tidies the ontology through allowlisted tools — not a fixed promote / distill-session / ontology-distill pipeline. Lessons no longer appear from every user prompt; they show up after the session (or muninn remember).

What is a dead end?+

Negative knowledge: something was tried for a problem and failed for a reason. Dead ends are first-class lessons (kind=dead_end) — they inherit the confidence economy, supersede chains, and forget, but surface in their own clearly labelled recall section.

Can a team share one graph?+

Yes. Run muninn serve with API-key auth and tenant-scoped keys, or point every client at the same [server].url. Local work (parse, transcripts) stays on the client; graph writes and recall hit the server. Serve + client is also the recommended layout on a single laptop — you get catchup and the UI without a fleet.

What about project CLAUDE.md / AGENTS.md?+

muninn complements instruction files — it does not replace them. Static project rules stay in docs; episodic work, lessons, and code structure live in the graph and are recalled when relevant.

Which platforms are supported?+

Release binaries for macOS and Linux (amd64 and arm64). Windows builds are not offered yet. CGO is used for tree-sitter grammars in from-source builds; releases ship prebuilt.