Skip to content

Viewer

Open http://localhost:37778 or run agent-mem view. The viewer runs in the background, starts with every agent session and at login, and reads the same database the agents use. It is read-only. Nothing you do there changes your memory, except that you can switch rules on from the terminal it tells you about.

The page is built fresh when the database changes. An open tab reloads itself every 10 seconds (viewer.refresh_seconds). The pills at the top switch between all projects and one project. / focuses search.

Overview: requests and sessions, tiles for activity, memories, tokens and learned items, the latest requests and recently learned memories.

How much is saved across how many projects, activity per day, memories by kind, the token comparison (what loading cost against what finding it out took) and what was learned. Below, the latest requests with their steps and the memories learned most recently. Filters: all requests, done, with errors, running.

Timeline: sessions with their title and summary, each request with its steps.

Every session under its title, with the observer’s summary (done, learned, next steps) and its requests. A request opens to each step: the agent’s own description of the tool call, the command or file, and whether it failed. Failed commands stand out. Sessions without requests are counted below the list, not shown.

Memories: memories grouped by agent and session, preferences and lessons first.

Sorted by agent, then by session, preferences and lessons first. The agents’ own notes (Claude Code’s memory files, Codex’s summaries) get a group of their own. A memory opens to its full text, provenance (which request it came from), trust, links to files and their state, and Savings: what it cost to learn against what it costs to read. Retired memories can be shown with a toggle; they say what replaced them.

Learned: lessons, error fixes, rules and commands, each linked to the request it came from.

What agent-mem learned so the next agent does not repeat a mistake:

SectionWhat
Lessonsrules for next time, drawn from a mistake and its fix, a correction or a reverted approach
Error fixesa command failed, then passed after a change: the problem, what fixed it, where it was seen, how often it worked
Rulesyour repeated corrections; they warn until you switch them on with agent-mem rules enable R1, then they block
Commandstest, lint, build and install commands that worked; agents get them at session start

Graph: files, tools, libraries, settings and errors and their relations.

How the files, functions, tools, libraries, settings and errors of a project relate (“search.py uses SQLite FTS5”), read from the memories by the background model. Click a thing to see each relation and the memory it comes from. The graph fills over several observer runs (three batches of 40 memories per run).

Health: recording, search by meaning, cleanup, agents and which model writes their facts, background jobs, storage.

Whether everything works: recording on or paused, search by meaning, the last cleanup; per agent whether it is connected, which model writes its facts, and the next step if something is missing; each background job with its last run, runs and errors; storage, savings and events waiting to be saved. agent-mem doctor checks the same in a terminal.

Terminal window
agent-mem view --output memory.html

Writes the same page as one local file with a copy of your memory. It makes no network requests. Useful on a machine where the viewer is off. agent-mem purge discards an existing snapshot.

WantDo
another port"viewer": {"port": 37800} in config.json
no viewer at all"viewer": {"enabled": false}
no login itemagent-mem serve --no-autostart
start at login againagent-mem serve --autostart