FAVA Trails ๐ซ๐ฃ โ Federated Agents Versioned Audit Trail. VCS-backed memory for AI agents via MCP.
Project description
FAVA Trails
Federated Agents Versioned Audit Trail โ VCS-backed memory for AI agents via MCP.
Every thought, decision, and observation is stored as a markdown file with YAML frontmatter, tracked in a Jujutsu (JJ) colocated git monorepo. Agents interact through MCP tools โ they never see VCS commands.
Why
- Supersession tracking โ when an agent corrects a belief, the old version is hidden from default recall. No contradictory memories.
- Draft isolation โ working thoughts stay in
drafts/. Other agents only see promoted thoughts. - Trust Gate โ an LLM-based reviewer validates thoughts before they enter shared truth. Hallucinations stay contained in draft.
- Full lineage โ every thought carries who wrote it, when, and why it changed.
- Crash-proof โ JJ auto-snapshots. No unsaved work.
- Engine/Fuel split โ this repo is the engine (stateless MCP server). Your data lives in a separate repo you control.
Install
Prerequisites
Install Jujutsu (JJ) โ FAVA Trails uses JJ as its VCS engine:
fava-trails install-jj
Or install manually from jj-vcs.github.io/jj.
From PyPI (recommended)
pip install fava-trails
From source (for development)
git clone https://github.com/MachineWisdomAI/fava-trails.git
cd fava-trails
uv sync
Quick Start
Set up your data repo
# Create an empty repo on GitHub (or any git remote), then clone it
git clone https://github.com/YOUR-ORG/fava-trails-data.git
# Bootstrap it (creates config, .gitignore, initializes JJ)
fava-trails bootstrap fava-trails-data
Register the MCP server
Add to ~/.claude.json (Claude Code) or claude_desktop_config.json (Claude Desktop):
If installed from PyPI:
{
"mcpServers": {
"fava-trails": {
"command": "fava-trails-server",
"env": {
"FAVA_TRAILS_DATA_REPO": "/path/to/fava-trails-data"
}
}
}
}
If installed from source:
{
"mcpServers": {
"fava-trails": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/fava-trails", "fava-trails-server"],
"env": {
"FAVA_TRAILS_DATA_REPO": "/path/to/fava-trails-data"
}
}
}
}
For Claude Desktop on Windows (accessing WSL):
{
"mcpServers": {
"fava-trails": {
"command": "wsl.exe",
"args": [
"-e", "bash", "-lc",
"FAVA_TRAILS_DATA_REPO=/path/to/fava-trails-data fava-trails-server"
]
}
}
}
Use it
Agents call MCP tools. Core workflow:
save_thought(trail_name="myorg/eng/my-project", content="My finding about X", source_type="observation")
โ creates a draft in drafts/
propose_truth(trail_name="myorg/eng/my-project", thought_id=thought_id)
โ promotes to observations/ (visible to all agents)
recall(trail_name="myorg/eng/my-project", query="X")
โ finds the promoted thought
Agents interact through MCP tools โ they never see VCS commands. JJ expertise is not required.
Cross-Machine Sync
FAVA Trails uses git remotes for cross-machine sync. The fava-trails bootstrap command sets push_strategy: immediate which auto-pushes after every write.
Setting up a second machine
# 1. Install FAVA Trails
pip install fava-trails
# 2. Install JJ
fava-trails install-jj
# 3. Clone the SAME data repo
git clone https://github.com/YOUR-ORG/fava-trails-data.git
# 4. Initialize JJ colocated mode + track remote
cd fava-trails-data
jj git init --colocate
jj bookmark track main@origin
# 5. Register MCP (same config as above, with local paths)
Both machines push/pull through the same git remote. Use the sync MCP tool to pull latest thoughts from other machines.
Manual push (if auto-push is off)
cd /path/to/fava-trails-data
jj bookmark set main -r @-
jj git push --bookmark main
NEVER use git push origin main after JJ colocates โ it misses thought commits. See AGENTS_SETUP_INSTRUCTIONS.md for the correct protocol.
Architecture
fava-trails (this repo) fava-trails-data (your repo)
โโโ src/fava_trails/ โโโ config.yaml
โ โโโ server.py โโโ MCP โโโโโโ .gitignore
โ โโโ cli.py โโโ trails/
โ โโโ trail.py โโโ myorg/eng/project/
โ โโโ config.py โโโ thoughts/
โ โโโ trust_gate.py โโโ drafts/
โ โโโ vcs/ โโโ decisions/
โ โโโ jj_backend.py โโโ observations/
โโโ tests/ โโโ preferences/
- Engine (
fava-trails) โ stateless MCP server, Apache-2.0. Install viapip install fava-trails. - Fuel (
fava-trails-data) โ your organization's trail data, private.
Configuration
Environment variables:
| Variable | Read by | Purpose | Default |
|---|---|---|---|
FAVA_TRAILS_DATA_REPO |
Server | Root directory for trail data (monorepo root) | ~/.fava-trails |
FAVA_TRAILS_DIR |
Server | Override trails directory location (absolute path) | $FAVA_TRAILS_DATA_REPO/trails |
FAVA_TRAILS_SCOPE_HINT |
Server | Broad scope hint baked into tool descriptions | (none) |
FAVA_TRAILS_SCOPE |
Agent | Project-specific scope from .env file |
(none) |
The server reads $FAVA_TRAILS_DATA_REPO/config.yaml for global settings. Minimal config.yaml:
trails_dir: trails # relative to FAVA_TRAILS_DATA_REPO
remote_url: null # git remote URL (optional)
push_strategy: manual # manual | immediate
When push_strategy: immediate, the server auto-pushes after every successful write. Push failures are non-fatal.
See AGENTS_SETUP_INSTRUCTIONS.md for full config reference including trust gate and per-trail overrides.
Development
uv run pytest -v # run tests
uv run pytest --cov # with coverage
Docs
- AGENTS.md โ Agent-facing: MCP tools reference, scope discovery, thought lifecycle, agent conventions
- AGENTS_USAGE_INSTRUCTIONS.md โ Canonical usage: scope discovery, session protocol, agent identity
- AGENTS_SETUP_INSTRUCTIONS.md โ Data repo setup, config reference, trust gate prompts
- docs/fava_trails_faq.md โ Detailed FAQ for framework authors and ML engineers
Contributing
See CONTRIBUTING.md for setup instructions, how to run tests, and PR expectations.
See CHANGELOG.md for release history.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fava_trails-0.4.6.tar.gz.
File metadata
- Download URL: fava_trails-0.4.6.tar.gz
- Upload date:
- Size: 54.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30fdce57060e67160a07a93d0454718acdef7807a73c7d0cc8e1361742967be7
|
|
| MD5 |
22c4570075bddd6dc63d5164252ccd2a
|
|
| BLAKE2b-256 |
b6e4212de01c89a67ec9b271088527b5c314a7073a51318d5d93ed6c5154294c
|
Provenance
The following attestation bundles were made for fava_trails-0.4.6.tar.gz:
Publisher:
release.yml on MachineWisdomAI/fava-trails
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fava_trails-0.4.6.tar.gz -
Subject digest:
30fdce57060e67160a07a93d0454718acdef7807a73c7d0cc8e1361742967be7 - Sigstore transparency entry: 1004355143
- Sigstore integration time:
-
Permalink:
MachineWisdomAI/fava-trails@78563fe45c3a0b4e96a32393a659d74e2653e206 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/MachineWisdomAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@78563fe45c3a0b4e96a32393a659d74e2653e206 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fava_trails-0.4.6-py3-none-any.whl.
File metadata
- Download URL: fava_trails-0.4.6-py3-none-any.whl
- Upload date:
- Size: 60.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
290579fee0db98549bfe87b1b60ce8e53aae609ca42c51d1dd909a9ff418c66f
|
|
| MD5 |
d2cd4d927898bbc25f80e50df020c8b0
|
|
| BLAKE2b-256 |
55fc945a9e5d49561ed85fdedeb3ad42737a76c23c4fe78c582a9910be1885a8
|
Provenance
The following attestation bundles were made for fava_trails-0.4.6-py3-none-any.whl:
Publisher:
release.yml on MachineWisdomAI/fava-trails
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fava_trails-0.4.6-py3-none-any.whl -
Subject digest:
290579fee0db98549bfe87b1b60ce8e53aae609ca42c51d1dd909a9ff418c66f - Sigstore transparency entry: 1004355147
- Sigstore integration time:
-
Permalink:
MachineWisdomAI/fava-trails@78563fe45c3a0b4e96a32393a659d74e2653e206 -
Branch / Tag:
refs/tags/v0.4.6 - Owner: https://github.com/MachineWisdomAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@78563fe45c3a0b4e96a32393a659d74e2653e206 -
Trigger Event:
push
-
Statement type: