Oleksandr Kuzmenko, EditorPublished 7 min readAI-assisted · editor-reviewed
TL;DR
- Replaces monolithic agent frameworks with an OS kernel using expiring SQLite locks.
- Enforces physical verification of output files before completing dependent steps.
- Exposes swarm status, task claims, and memory directly via Model Context Protocol.
Key facts
- Core Dependencies
- Python standard library and PyYAML
- Storage Engine
- Single SQLite database file
- Runtime Requirement
- Python 3.10 or newer (tested on Linux, macOS, Windows)
- Protocol Support
- Native Model Context Protocol server CLI
The Swarm Coordination Failure Mode
Most multi-agent pipelines built on monolithic orchestration libraries fail in predictable, expensive ways: a worker process terminates while holding an API quota or GPU lock, a failed upstream step blocks execution indefinitely, or an agent reports a task completed when the promised output file was never written. Enjambre solves these structural flaws by dropping below the application framework layer and acting as a lightweight operating system kernel.
Kernel-Level Leases and Verification Gates
Enjambre coordinates separate processes across Linux, macOS, and Windows with only a Python 3.10+ requirement and PyYAML. Its architecture enforces reliability through distinct mechanisms:
- Expiring Leases: Locks on GPUs, API quotas, and browser instances expire automatically, preventing stalled processes from freezing shared infrastructure.
- Derived Liveness: Node state (
alive,stale,offline) is computed strictly from heartbeat ages inside a single SQLite file rather than self-reported assertions. - Artifact Verification: Tasks define physical proofs (such as
/tmp/chart.png). The kernel inspects filesystem artifacts and enforces that matching files postdate task initiation before marking jobs complete. - Process Isolation: Command-line agents execute without invoking a shell, receiving prompts purely via arguments or standard input and seeing only explicitly whitelisted environment variables.
Native Model Context Protocol Integration
Enjambre exposes its queue and memory primitives as a standard Model Context Protocol server. Running claude mcp add enjambre -- enjambre mcp --dir ./my-swarm allows external models like Claude Code to claim tasks, report heartbeats, acquire resources, and inspect shared markdown memory directly.
Try it in 2 minutes
pip install .
enjambre demo
claude mcp add enjambre -- enjambre mcp --dir ./my-swarmWhen to use
- Multi-agent pipelines where processes frequently fail, lock resources, or produce missing files.
- Workflows coordinating local and cloud models alongside Claude Code via Model Context Protocol.
When NOT to use
- Simple single-prompt scripts or conversational chat applications without background tasks.
- Environments requiring immediate distributed multi-node Postgres clusters out of the box.
What to do today
- Clone the repository and run enjambre demo to inspect the local scheduler dashboard.
- Expose task and resource tools to Claude Code using the claude mcp add command.
- Configure task dependencies with explicit proof parameters to enforce output verification.
Step names are taken from What to do today.
Step names are taken from What to do today. Clone the repository and run enjambre demo to inspect the local scheduler dashboard.. Expose task and resource tools to Claude Code using the claude mcp add command.. Configure task dependencies with explicit proof parameters to enforce output verification.
- Clone the repository and run enjambre demo to inspect the local scheduler dashboard.
- Expose task and resource tools to Claude Code using the claude mcp add command.
- Configure task dependencies with explicit proof parameters to enforce output verification.
