Flanes: Feature Lanes for Agents - version control for agentic AI systems
Project description
Version Control for Agentic AI Systems
Version control designed from the ground up for AI agents. Replaces git's line-diff model with intent-based snapshots, physically isolated workspaces, and evaluation gating.
Why Flanes?
Git assumes a single human making small, curated edits. AI agents break every part of that model.
| Git | Flanes | |
|---|---|---|
| Unit of work | Line diffs | Full world-state snapshots |
| Change metadata | Free-text commit message | Structured intent + agent identity |
| Quality gate | CI runs after merge | Evaluation gating before accept |
| Parallel agents | Branch conflicts | Physically isolated workspaces |
| Cost tracking | None | Per-transition token/API accounting |
Quick Demo
cd my-project
flanes init
# Writes files, then commits in one step:
flanes commit --prompt "Add auth module" \
--agent-id coder-1 --agent-type feature_dev --auto-accept
# Create isolated feature lane
flanes lane create feature-auth
# Work in isolation, promote back to main
flanes promote --workspace feature-auth --target main --auto-accept
# Query history
flanes history --lane main
Or use the Python SDK:
from flanes.agent_sdk import AgentSession
session = AgentSession(
repo_path="./my-project",
agent_id="coder-alpha",
agent_type="feature_developer",
)
with session.work("Add authentication module", tags=["auth"], auto_accept=True) as w:
(w.path / "auth.py").write_text("def authenticate(): ...")
w.record_tokens(tokens_in=2000, tokens_out=1200)
# On exit: snapshots -> proposes -> accepts (or rejects on exception)
See examples/ for runnable demos.
Installation
pip install flanes
# Optional: remote storage backends
pip install flanes[s3] # Amazon S3 (boto3)
pip install flanes[gcs] # Google Cloud Storage
Core Concepts
World States: Immutable snapshots of the entire project. Agents propose new world states, not diffs.
Intents: Structured metadata for every change: the instruction, who issued it, cost tracking, and semantic tags.
Transitions: Proposals to move from one state to another. Must be evaluated before acceptance.
Lanes: Isolated workstreams. Work is promoted into a target lane through evaluation, not merged.
Workspaces: Main workspace is the repo root (git-style). Feature lanes get physically isolated directories under .flanes/workspaces/.
Architecture
Key Features
- Git-style main: repo root IS the main workspace. Files stay where you expect them.
- Physical isolation: feature workspaces are real directories. Parallel agents can't stomp on each other.
- Smart incremental updates: workspace sync writes only changed files, not the entire tree.
- Cross-platform locking: atomic
mkdirlocking works on Linux, macOS, and Windows. - Conflict detection: promote finds path-level collisions without content merging.
- Evaluators: run pytest, ruff, or custom checks as gates before accepting transitions.
- Cost tracking: per-transition token usage, wall time, and API call counts.
- Git bridge:
flanes export-git/flanes import-gitfor CI integration. - Remote storage: S3/GCS-backed sync for team collaboration.
- MCP server: expose Flanes as tools for LLM integration via Model Context Protocol.
- REST API:
flanes servestarts a multi-threaded HTTP API. - Garbage collection:
flanes gcremoves rejected states and unreachable objects.
Documentation
- User Guide: comprehensive reference for all features
- Examples: runnable demo scripts
- Contributing: development setup and guidelines
Workspace Layout
my-project/
+-- .flanes/
| +-- config.json
| +-- store.db # SQLite database
| +-- main.json # main workspace metadata
| +-- workspaces/
| +-- feature-auth/ # isolated feature workspace
| +-- feature-auth.json
+-- app.py # YOUR FILES AT REPO ROOT
+-- lib/
Running Tests
pip install -e ".[dev]"
python -X utf8 -m pytest tests/ -v
License
Project details
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 flanes-0.4.0.tar.gz.
File metadata
- Download URL: flanes-0.4.0.tar.gz
- Upload date:
- Size: 155.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f47fe4521aaca0edc1b4d3334bdacc4fe29767a43d5b601eb106aa20212abb4b
|
|
| MD5 |
7c2948bc6338182dd9b82ba77e4b02a9
|
|
| BLAKE2b-256 |
9e476a901ac39cd048bb6b15715fd3ad9d70c3ae75d3c73735ba9a41fad180b1
|
File details
Details for the file flanes-0.4.0-py3-none-any.whl.
File metadata
- Download URL: flanes-0.4.0-py3-none-any.whl
- Upload date:
- Size: 99.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a2ab1229a8e7115d031b812a3519ec30957dfc240026d8aec857e4040dd6c8d
|
|
| MD5 |
5f83cd935e89903447d825c0fbeddb47
|
|
| BLAKE2b-256 |
9441f9ae41822320a3cea8819474e2b2c456dff75891d83ed76f5daeb8b36437
|