Agent memory should be curated, not just accumulated.
FAVA Trails is a curated memory system for AI agents — baking in the process discipline that makes large-scale codebases work. Draft isolation, promotion gates, supersession chains, atomic rollback. Built on Jujutsu (JJ), exposed via the Model Context Protocol. Works across Claude Desktop, Claude Code, and any MCP-compatible agent — on the same machine or across environments.
pip install fava-trails The Problem
Every agent memory system treats every write as immediate truth. No staging. No review gate. No rollback. Bad beliefs compound silently.
In a 24-hour autonomous ML session, an agent hit a transient GPU error at hour 2 and recorded "this environment has no GPU." It then spent 22 hours doing heroic CPU-only workarounds — while a perfectly good A100 sat idle and the cloud provider kept billing. In a chatbot deployment, a user jailbroke the bot into an unprofessional persona and the system dutifully saved it as a "user preference." Same root cause: the memory system had no opinion about what should be in it.
Everyone's putting agent memory in Git now. That's the right substrate. But nobody added the process layer — the mandatory review, staging discipline, and surgical blame that make Google's monorepo work at thousands of engineers. FAVA Trails is that process layer.
How It Works
FAVA Trails bakes in the curation pipeline that production codebases rely on — draft, review, promote, supersede, rollback — and JJ's commit graph becomes a context graph of agent decisions.
Draft Isolation
save_thought(content="Redis caching improves latency by 3x") Agent writes create atomic JJ commits in an isolated draft namespace. Invisible to other agents. A jailbroken agent's corrupted persona stays in its draft — visible only to its own session — until it passes through the promotion gate.
Promotion Gate
propose_truth(thought_id="01ABC...") An independent LLM reviewer validates each thought before promotion to shared truth. Checks for contradictions, quality, and anxiety-triggering language patterns that cause agent paralysis. Fail-closed — if the reviewer is unavailable, the thought stays in drafts.
Shared Truth
sync() Promoted thoughts become visible to all agents. Corrections create supersession chains — originals are marked as replaced with backlinks, not deleted. Default retrieval returns only current truth, avoiding contradictory beliefs.
Why Jujutsu Enables the Context Graph
Every agent memory system uses Git now. FAVA Trails uses JJ because four properties of its architecture turn version history into a queryable context graph of agent decisions.
Supersession Chains
When Agent B corrects Agent A's belief, the original is superseded — marked as replaced with a backlink, not deleted. Default retrieval hides superseded beliefs. This solves Contextual Flattening, where vector databases return both the old belief and the correction with no way to distinguish which is current.
Crash Resilience
Every thought is a JJ commit. JJ's design treats the working copy as a commit — there is no "unsaved work" state. If an agent session crashes mid-analysis, everything saved to that point is durable. No checkpoint rituals. No recovery procedures.
First-Class Conflicts
When two agents write to the same trail simultaneously, Git blocks until a human resolves the conflict. JJ treats conflicts as data: both versions are preserved, and the next agent to sync resolves the divergence programmatically. Essential for async multi-agent workflows.
MCP Native
Exposed via the Model Context Protocol. Any MCP-compatible agent framework integrates with a configuration change, not a code change. Agents interact with semantic objects — they never see VCS commands, file paths, or storage internals.
With vs. Without
What multi-agent memory coordination looks like with and without process discipline.
| Operation | Without Process Discipline | With FAVA Trails |
|---|---|---|
| Share research | Operator copies between agents manually | Agent saves to trail. Other agent runs recall() |
| Correct a stale reference | Operator relays error. Source agent regenerates entire document | Agent supersedes the one thought. Others sync and see the diff |
| Prevent bad beliefs | Every write immediately visible. Contamination spreads silently | Writes enter as drafts. Promotion requires propose_truth() |
| Audit what changed | Operator's memory. Chat logs across conversations | Supersession chain: parent_id, agent_id, timestamps |
| Roll back a mistake | Manual cleanup. Hope you found all contaminated entries | rollback() — atomic, returns trail to prior state |
| Resume in new session | Operator re-briefs from scratch | recall() returns full decision record in one call |
Who Is This For
Running Multiple Agents?
They share memory. That means they share hallucinations. FAVA Trails gives you draft isolation, promotion gates, and supersession chains so bad beliefs don't propagate. One agent's mistake stays in its draft — invisible to every other agent — until it passes review.
Read the case studyRunning One Agent Across Long Sessions?
Agent sessions degrade after about an hour — not because of model limits, but because agents lose track of their own work. FAVA Trails gives you crash-proof persistence and structured recall. Your agent picks up exactly where it left off, even after a crash or context window reset.
See how it worksQuick Start
Three steps to curated agent memory.
Install
pip install fava-trails
fava-trails install-jj Bootstrap a Trails Repo
mkdir my-trails && cd my-trails
fava-trails bootstrap . Register as an MCP Server
Add to your Claude Code or Claude Desktop config:
{
"mcpServers": {
"fava-trails": {
"command": "uvx",
"args": ["fava-trails"],
"env": {
"FAVA_TRAILS_DIR": "/path/to/your/trails-repo"
}
}
}
} Two Agents. One Trail. A Real Correction.
A Claude Desktop agent and a Claude Code CLI agent collaborated on a spec through shared curated memory. When one agent found stale references, it superseded a single thought — and the other agent understood the correction on sync, without operator intervention.
Read the Full Case StudyTry FAVA Trails
Curated agent memory with the process discipline of production codebases.
Apache 2.0 licensed. Install JJ with fava-trails install-jj.