Parallel agent swarms that never clobber files.
Deterministic DAG wave compilation, file-scope read/write leases, typed blackboards, and SHA-256 checkpoint resume in pure Python.
pip install -e . && swarmweaver demo
$ swarmweaver plan SwarmWeaver v1.1.0 — Conflict-Aware Wave Plan Total Tasks : 10 | Topological Levels : 5 Conflict-Free Waves : 7 | Conflicts Auto-Split: 2 Critical Path : 1170 ms (1.46x speedup vs 1710 ms) -------------------------------------------------------------------- Wave 01: 01_ast_audit Wave 02: 02_schema_migration, 03_jwt_verifier Wave 03: 04_rbac_policy (split: WRITE_WRITE src/auth/jwt.py) Wave 04: 05_api_gateway Wave 05: 06_rate_limiter (split: WRITE_WRITE src/api/deps.py)
Conflict-free waves.
DAGCompiler runs Kahn's sort across dependencies, detects cycles with full path chains, and splits overlapping read_globs, write_globs, and ::symbol targets into safe sub-waves.
Ordered runtime leases.
FileScopeLeaseManager grants SHARED_READ and EXCLUSIVE_WRITE locks in sorted canonical scope order with monotonic TTL eviction and SHA-256 lease tokens.
Sub-millisecond replay.
CheckpointJournal chains each finished node via prev_hash -> entry_hash SHA-256 digests, replaying 8 completed tasks in 0.077 ms without re-spending LLM tokens.
Typed blackboard handoffs.
TypedBlackboard validates typed contracts (dict, str, predicates) before downstream agents start, cutting silent schema drift and partial corrupt writes.
Zero dependencies, open interfaces
Run SwarmWeaver standalone in Python 3.11+, wire it into Claude Desktop or Cursor over Stdio MCP, or host the Streamable HTTP/SSE portal.
Try the interactive compiler in Studio or review verified numbers and CLI/SDK docs.
Frequently asked questions
How SwarmWeaver keeps concurrent coding agents predictable on real repositories.
Why split waves at compile time if runtime file locks exist?
Runtime locks stop silent overwrites, yet two agents launched blindly in parallel still waste a worker slot waiting or colliding. Compiling conflict-free waves beforehand schedules independent files together and sequences conflicting writes deterministically.
Can two agents edit different functions in the same file concurrently?
Yes. When both tasks narrow their scope using symbol qualifiers such as src/auth/jwt.py::verify_token and src/auth/jwt.py::rotate_keys, normalized scope intersection treats them as disjoint symbol locks.
What happens if someone edits or corrupts a checkpoint journal on disk?
swarmweaver verify-journal and CheckpointJournal.verify_integrity() recompute every canonical SHA-256 link against prev_hash and flag the exact tampered_sequence record.