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://raw.githubusercontent.com/scottlarkin/muninn-release/main/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.

Outcome-aware lessons

Corrections and tool errors demote confidence; clean turns promote it. Bad lessons fall past the cutoff. Proven lessons resist being superseded.

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. Entities and relations power entity-aware recall so the graph 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

Run Neo4j + Ollama on your machine, or self-host muninn serve with multi-tenant API keys. Same CLI and hooks either way.

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

    Lessons compound

    Sessions distill into durable lessons. Corrections demote bad advice. Good patterns surface more. Dead ends never get re-tried blindly.

Memory graph

Watch a turn become durable memory

Prompts and responses land in the graph. Sessions distill into lessons — and dead ends. 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. 02Distill — lessons mint with a confidence ring; failures become dead ends.
  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 — HTTP API + management 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, 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.

Hooks & skills

Claude Code plugin ships hooks on every lifecycle event. Other harnesses use the documented stdin/stdout contract.

Serve mode

muninn serve exposes /v1 for multi-tenant deploys, plus a management UI for graph, ontology, recall, and 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.

$curl -fsSL https://raw.githubusercontent.com/scottlarkin/muninn-release/main/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.

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.

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.

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.