Why Brood Agent?
The idea of RLM has fascinated me since its proposal, but I didn’t really have a harness to put those ideas into practice. So I built Brood Agent.
It:
- Gives LLM agents an Elixir REPL and one tool to access it:
elixir_repl - Runs a persistent daemon so you can access it from anywhere
- Provides agentic patterns, such as subagents, as first class citizens through the
BroodAPI
How does it work?
Every agent gets its own REPL. If you’re new to REPLs, the simplest way to picture it is typing bun or node or iex (Elixir’s REPL) into your terminal and being dropped into an interactive environment:
iex drops you into a live Elixir REPL.
Once you’re here, you can do things like assign values to variables:
And perform actions, like renaming files:
files from the prior turn and renames both files on disk.
This is the same thing Brood Agent does, but for every agent. Agents are spun up with their own REPL and a rich Elixir (and Brood) API.
The power of Elixir in every tool call
Elixir was a natural fit for a harness for several reasons:
- It supports dynamic runtime evaluation, so it’s possible for an LLM to express intent in raw code.
- The language and API are expansive, so the agent can get creative in how it evaluates commands. An example: opening persistent SSH connections.
- It runs on BEAM, which allowed me to create a fault tolerant and supervised daemon that I can access from any surface.
With a dedicated Brood API, the agent can now perform and chain operations with Elixir’s expressiveness:
Built for lower API costs
Because elixir_repl always returns the output of the evaluation, agents can decide what to include in their outputs in tool calls.
I take this a step further by providing agents the ability to modify their own conversations. Essentially, all conversations sent to model providers are actually projections on top of raw JSONL. In a nutshell, this means that agents can pick and choose what to send.
For instance, say that a tool call results in a massive amount of output:
Agents can now mark certain tool calls as “pruned” using the Brood.prune API. These tool calls do not get sent in the projection.
This allows the agent to proactively manage its context, resulting in significant token savings.
First-class support for every provider
I didn’t just want this to be my test bed for RLM. I wanted to prove that RLM was possible as a daily driver. To accomplish this, I needed the harness to be able to do the same things other harnesses do, or better, such as being model agnostic, and allowing the use of subagents.
So I made Brood Agent so that you can both run local models using tools like Ollama or llama.cpp, but also your subscriptions such as Claude Code, Codex, Antigravity. This means you can easily have an orchestrator that runs on the latest Opus model, while spinning up subagents on your local model.
Brood.spawn/3 · isolated REPLs · message bus
When you install Brood Agent, it automatically picks up your existing API keys in the environment and detects what CLI tools you have installed. And switching models mid-conversation is (usually) seamless between providers.
Extensibility
Because Brood Agent is built on Elixir, we can take advantage of some Elixir features, like hot swapping modules. This allowed me to implement and iterate on an extension system. And you can take advantage of these features too.
As an example, the background task and scheduler modules are built on top of the extension system. As I found issues with these modules, I asked the agents to fix these issues, and then restart the modules on the fly.
This has other added benefits, like being able to setup and modify MCP servers without exiting the daemon. And because the source code for Brood Agent is available to the agent, it can diagnose and correct issues within Brood Agent.
Open-source
The harness is MIT licensed and open source so feel free to look around. Brood Agent is also set up with feedback tooling so you can open GitHub Issues using agents.
Here are the providers Brood Agent currently supports:
- APIs: Anthropic · OpenAI · Google · xAI · OpenRouter · Fireworks · Meta · Z.ai · Tinfoil (with secure enclave)
- Local: Ollama · llama.cpp · OpenAI-compatible
- Subscriptions: Claude Code · Codex · Antigravity
Quickstart
Native install
Prebuilt binaries are available for macOS (Apple Silicon & Intel) and Linux (x86_64).
Run the daemon in Docker
Prefer to isolate the daemon in a container? Multi-arch images (linux/amd64 and linux/arm64) are published to ghcr.io/dextermiguel/brood. Install the CLI, then run:
Daemon state (agents, logins, and MCP config) persists in a brood-state Docker volume across container updates, and you can connect from any machine with brood daemon connect.
There are plans to support web and desktop surfaces in the future.