Enjambre – a durable kernel for swarms of AI agents (Python, MCP) Enjambre, a new open-source Python kernel for coordinating swarms of AI agents, has been released with a single PyYAML dependency and support for Python 3.10 or newer on Linux, macOS and Windows. The kernel provides a SQLite-backed process registry with heartbeats, expiring leases for GPUs and API quotas, a durable priority queue with idempotency keys and dead-letter states, a DAG scheduler, proof-of-delivery checks on files, directories and URLs, a code-enforced policy gate, a router that weighs measured success, latency, declared cost and energy, and an MCP server for any MCP client. Enjambre was extracted from a real swarm running day and night on a solar-powered workstation and a small cloud server, and its demo runs four scripted agents through a research, draft, review and publish pipeline without a model or API key. A small, honest operating system for swarms of AI agents. Enjambre is Spanish for swarm . It takes the agents you already have Claude Code, Codex, a local model behind Ollama, a hosted API, your own scripts and gives them what a team of processes needs to work together without lying to each other: a kernel, a queue, leases, a permission gate, a router and a shared memory you can see. pip install . from a clone; one dependency PyYAML enjambre demo open http://127.0.0.1:8765 Runs on Linux, macOS and Windows with Python 3.10 or newer; every change is tested on all three. The demo needs no model and no API key. Four scripted agents run a small editorial pipeline: research, draft, review, publish. The critic stumbles once so you can watch a retry. The writer tries to publish without permission and the gate stops it before it runs. The router explains every choice it makes. Single agents are easy now. Swarms fail in boring, expensive ways: - A worker dies holding the GPU, and nobody notices for ten hours. - A task is reported as done, and the file it promised does not exist. - A nightly job looks offline two thirds of the time because it only runs every 30 minutes. - A rule written in the prompt is ignored the one time it matters. - A failed step leaves everything downstream waiting forever. enjambre was extracted from a real swarm that runs day and night on a solar-powered workstation and a small cloud server. Every mechanism below exists because one of those failures happened. | Kernel | One SQLite file. Processes report heartbeats and their state alive , stale , offline is derived from the age of the last one, never declared. | | Leases | GPUs, API quotas, browsers: every lock expires on its own. A crashed holder cannot block anyone for long. | | Durable queue | Priorities, atomic claims, idempotency keys, task leases that long jobs renew, automatic retries, a dead-letter state that always records a reason. | | DAG | Tasks wait for their dependencies, receive upstream results as data never as instructions , and die visibly when something upstream fails. Retrying the upstream task brings them back. | | Proof of delivery | A task can declare what must exist when it is done, and agents declare artifacts. The kernel checks files, directories and URLs itself, and a file older than the task does not count. Record the verdict, or enforce it. | | Policy gate | Rules travel with every prompt, and permissions are enforced in code before any agent runs. A broken edit of the policy never replaces the last good one. | | Router | Picks an agent from measured success and latency, declared cost, and energy. Agents on solar power win while the sun is up. Every decision comes with a readable reason. | | Adapters | cli for any command-line agent no shell, isolated environment , openai for any OpenAI-compatible endpoint, scripted for demos and tests. | | MCP server | Any MCP client can heartbeat, lease, claim, renew and complete tasks, check permissions and query memory. | | Memory graph | A folder of markdown notes becomes a 3D graph you can explore, search and teach with. Links to notes nobody wrote yet show up in red. | | Dashboard | Live board, agents, leases, trace and task timelines. No build step, no framework, strict Content Security Policy. | my-swarm/ ├── swarm.yaml agents, router, scheduler, kernel, memory ├── policy.yaml rules and permissions hot-reloaded ├── prompts/