A declared system around stochastic agents
Under the hood, GenSwarms uses Elixir/OTP supervision. But the core idea is simpler: agents can behave unpredictably, while the swarm remains declared, observable, and recoverable.
Declare the swarm
A swarm is not just a set of agents. It is a declared system of roles, boundaries, and message paths.
- Agents do model-driven work.
- Objects run deterministic code: routing, validation, evaluation, guards, gateways.
- Edges define who can talk to whom.
The agent can be flexible. The system does not have to be implicit.
Keep the swarm structured while agents run
Isolate every agent
Every agent runs as its own worker with its own role, tools, backend, and sandbox. Stochastic behavior stays contained.
Recover without losing the swarm
Agents crash, tools hang, models drift, loops go off-path. Failed workers restart without bringing down the rest of the graph.
Watch behavior as it happens
Stream task flow, agent messages, crashes, restarts, state changes, and outputs in real time. Debug the swarm while it is alive.
Control the system through an API
Start swarms, send tasks, inspect state, scale workers, and stream events over REST and WebSocket.
The runtime surface for declared swarms
Pluggable backends
Local, Docker, SSH, Bwrap, and Mock.
Explicit message paths
Directed edges define who talks to whom.
Markdown skills
Plain markdown files become agent roles.
Supervised recovery
Failed workers restart without killing the swarm.
REST API and WebSocket
Programmatic control plus live event streaming.
Live scaling
Grow or shrink worker groups while inspecting state live.
Powered by a tiny agent
Each worker uses SubZeroClaw, a minimal open-source agent written in C. GenSwarms wraps that agent with the system layer a swarm needs: isolation, routing, supervision, state, observability, and API control.
Questions
What is GenSwarms?
GenSwarms is an open-source Elixir/OTP runtime for orchestrating swarms of AI agents. You declare the agents, deterministic objects, backends, and the message graph that connects them; GenSwarms runs each agent as an isolated, supervised worker, streams every event, and restarts failures automatically.
How is GenSwarms different from LangGraph, CrewAI, or AutoGen?
Those are Python libraries you wire together in code. GenSwarms is a runtime: the topology is declared rather than implicit, each agent runs as its own isolated supervised process, every message and crash is observable in real time, and the whole swarm is controllable over a REST + WebSocket API.
Which agent backends does it support?
Local processes, Docker containers, SSH remotes, Bubblewrap sandboxes, and a Mock backend for testing — chosen per agent without changing the swarm design.
Is GenSwarms production-ready?
It is built on Elixir/OTP supervision: an agent that crashes, hangs, or drifts is restarted without bringing down the rest of the graph, and you can watch task flow, restarts, and outputs as they happen. Failure is expected; outage isn't.
What models can the agents use?
Agents are model-agnostic. Each agent runs the minimal open-source SubZeroClaw loop and can use any provider via SUBZEROCLAW_MODEL; only a SUBZEROCLAW_API_KEY is required to run real agents.