AgentBox
[!WARNING]
AgentBox is under construction. APIs, behavior, and documentation may
change without notice.
AgentBox is a distributed container orchestrator for AI agents. It is built for
researchers studying multi-agent systems on high-performance computing (HPC)
clusters without requiring root access. It was originally built at Meta FAIR to study research agents and has since
been refactored and improved. AgentBox uses
Apptainer to isolate agents from each other and from accessing privileged test sets. AgentBox leans on
Monarch to coordinate agent containers.
Supported platforms: Linux (local and Slurm). macOS works for local
workers; containers on macOS run through a
Lima-backed Apptainer. Windows is not
supported.
Quick start
Requires Python 3.12+. Containers additionally need apptainer on the worker.
pip install -e .
from agentbox import AgentBoxManager, Container
with AgentBoxManager.create_local(num_workers=1) as manager:
with manager.acquire_machine() as machine:
print(machine.run("uname -a").stdout) # on the worker host
with Container(machine, image="docker://python:3.12-slim") as box:
result = box.run(["python3", "-c", "print('hello from a container')"])
print(result.stdout)
To run on Slurm instead, replace the manager:
from agentbox import AgentBoxManager, SlurmAllocation
manager = AgentBoxManager.create_slurm(
allocation=SlurmAllocation(partition="cpu", cpus_per_task=8),
num_workers=16,
)
manager.wait_for_workers(min_available=16)
Documentation
- Installation
- Core concepts
- Containers
- API map
- Examples
Contributing
See CONTRIBUTING.md and our
Code of Conduct.
License
AgentBox is Apache 2.0 licensed, as found in the LICENSE file.