Adding memory to prime-agent
no hooks, an extension API — and one file is the whole install
prime-agent writes every session to ~/.prime/agent/sessions as JSONL and can list them. A new session reads none of them, and none of the sessions the other agents on this machine wrote either — including the one where the same problem was already solved.
Adding recall
deja install prime-auto
That writes two things: the deja MCP server into ~/.prime/agent/settings.json, so the model can ask for history itself (deja install prime writes this half alone), and an extension at ~/.prime/agent/extensions/deja.ts, which is what makes recall arrive without being asked:
- The project digest on the first turn — what this machine settled here — followed by recall on every prompt, both through
before_agent_start. - Compaction recovery: at
session_compactdeja reads the session file, which still holds the turns the summary replaced, and the next prompt gets the task, the commands with whether they passed, and what was still open. The list of blocks already shown goes too, so recall can say them again. - A
/dejacommand in the same session, for asking directly.
What is deliberately not wired
The repair beside a failed command, which Claude Code, Codex, Gemini and Qwen all get, is missing here for a measured reason: on prime-agent 0.9.1 the tool_call and tool_result events never fire, so a handler on them is a process spawned for nothing. It becomes work the day they do.
The part that is not about this harness
The index covers every agent's transcripts on the machine — forty-three of them, each in its own format — so a fix found in Claude Code answers a question asked here, including sessions from before any of this was installed. An injection is capped at 1,536 bytes per prompt — what memory costs has the measured comparison. Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy).
Getting started · Switching between agents · The prime-agent session format
Found this useful? Star deja-vu on GitHub.