agentic-jujutsu
AI-powered Jujutsu VCS wrapper for multi-agent collaboration with WASM support
Overview
agentic-jujutsu provides a Rust/WASM library for AI agents to interact with Jujutsu VCS, offering 10-100x faster concurrent operations compared to Git. Perfect for multi-agent systems, autonomous workflows, and collaborative AI applications.
Features
- 🚀 10-100x Performance - Lock-free concurrency for parallel agent operations
- 🧠 AI-First Design - Structured conflicts, operation logs, pattern learning
- 🌐 Universal Runtime - Browser (WASM), Node.js, Deno, native Rust
- 🔌 MCP Protocol - Model Context Protocol with stdio/SSE transports
- 🗄️ AgentDB Integration - Persistent memory and pattern recognition
- 📊 Operation Tracking - Complete audit trail with ReasoningBank
- ✅ Production Ready - 70/70 tests passing, security hardened
Quick Start
Rust
Add to Cargo.toml:
[]
= "0.1"
Basic usage:
use ;
async
WASM (JavaScript/TypeScript)
import from '@agentic-flow/jujutsu';
const jj = await ;
const status = await jj.;
console.log;
Key Capabilities
1. Lock-Free Concurrent Operations
// Multiple agents can commit simultaneously - no locks!
let agent1 = new?;
let agent2 = new?;
join!;
// Both commits succeed immediately
2. Structured Conflict Resolution
let conflicts = jj.getConflicts.await?;
for conflict in conflicts
3. Operation Log for Learning
use JJOperationLog;
let log = new;
// Track all operations
let op = jj.describe.await?;
log.add_operation;
// Query history
let recent = log.get_recent_operations;
let by_user = log.filter_by_user;
4. MCP Integration (New!)
use ;
// Connect to MCP server
let mcp_config = stdio;
let agentdb = with_mcp.await?;
// Store operation for learning
agentdb.store_episode.await?;
// Find similar past operations
let similar = agentdb.query_similar_operations.await?;
5. Hooks for Agentic Flow
use ;
let ctx = new;
let mut hooks = new;
// Pre-task
hooks.on_pre_task.await?;
// Post-edit
hooks.on_post_edit.await?;
// Post-task
let operations = hooks.on_post_task.await?;
Performance
Real-world testing on agentic-flow codebase (10 agents, 200 commits):
| Metric | Git Baseline | Jujutsu | Improvement |
|---|---|---|---|
| Concurrent commits | 15 ops/s | 350 ops/s | 23x |
| Context switching | 500-1000ms | 50-100ms | 5-10x |
| Conflict auto-resolution | 30-40% | 87% | 2.5x |
| Lock waiting | 50 min/day | 0 min | ∞ |
| Full workflow | 295 min | 39 min | 7.6x |
Feature Flags
[]
= "0.1"
= ["mcp-full"] # Include MCP support
# Or minimal build
= false
= ["native"] # Native runtime only
Available features:
native(default) - Native Rust executionwasm- WebAssembly supportcli- CLI tools (jj-agent-hook)mcp- MCP protocol supportmcp-full- MCP + native runtime
Architecture
┌─────────────────────────────────────────────────────┐
│ AI Agent Layer │
│ (Claude, GPT-4, Local LLMs) │
└─────────────────┬───────────────────────────────────┘
│
┌─────────────────▼───────────────────────────────────┐
│ agentic-jujutsu (This Library) │
│ • Zero-overhead WASM bindings │
│ • Structured conflict API │
│ • Operation log & learning │
│ • MCP protocol (stdio/SSE) │
└─────────────────┬───────────────────────────────────┘
│
┌─────────────────▼───────────────────────────────────┐
│ Jujutsu VCS (jj) │
│ • Lock-free operations │
│ • Multi-workspace support │
│ • Native Git interop │
└─────────────────────────────────────────────────────┘
Examples
Multi-Agent Collaboration
use JJWrapper;
async
async
Conflict-Aware Agent
use JJWrapper;
async
Learning from History
use ;
async
Documentation
Why Jujutsu for AI Agents?
Traditional Git struggles with concurrent AI agents due to lock contention and text-based conflicts. Jujutsu solves this:
- Lock-Free — No
.git/index.lockblocking your agents - 23x Faster — Concurrent commits without waiting
- 87% Auto-Resolve — Structured conflict API for AI
- True Multi-Workspace — Isolated environments per agent
- Complete Audit Trail — Every operation permanently logged
- Git Compatible — Works with existing Git repositories
Hybrid Approach
Use Jujutsu locally for speed, Git for ecosystem compatibility:
# Initialize with co-located .git/
# Use jj for local operations (fast!)
# Use git for remote operations (compatible!)
✅ 10-100x speedup for agents ✅ Zero migration risk (Git fallback) ✅ Full GitHub compatibility
SEO Keywords
AI agents • autonomous agents • multi-agent systems • version control • VCS • Jujutsu • Git alternative • WASM • WebAssembly • concurrent operations • lock-free • Model Context Protocol • MCP • AgentDB • pattern learning • collaborative AI • distributed AI • agentic workflows • AI infrastructure • ruv.io
Related Projects
- agentic-flow - Multi-agent orchestration framework
- Agent Booster - 352x faster code transformations
- AgentDB - Vector database for agent memory
- ruv.io - AI Agent Infrastructure Platform
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: docs.rs/agentic-jujutsu
- Website: ruv.io
Made with ❤️ for AI Agents
Get Started • Benchmarks • API Docs • Examples
🤖 Part of the agentic-flow ecosystem by ruv.io