Build and train systems of agents.
Use uv for the main development workflow:
uv syncInstall the training backend you need:
uv sync --extra tinker --extra wandb
# OR
uv sync --extra areal --extra wandbInstall a plugin/environment from its directory:
cd plugins/<plugin-name>
uv sync --extra <backend> --extra wandbNew environments live as separate python packages in the plugins folder. You can add new environments by following the example of the existing plugins.
Plugins can also be used to extend the functionality of platoon beyond adding new environments. E.g., The OpenHands plugin adds support for the OpenHands agent harness.
Tinker example:
cd plugins/textcraft
uv run python -m platoon.textcraft.train_scripts.tinker.train_tinker \
--config platoon/textcraft/configs/tinker/textcraft_tinker.yamlAReaL example:
cd plugins/textcraft
uv run python -m areal.launcher.local \
platoon/textcraft/train_scripts/areal/train_areal_synth.py \
--config platoon/textcraft/configs/areal/textcraft_synth_ctx40000_recursive_medium_areal.yamlMost config values can be overridden from the CLI:
uv run python3 platoon/number_search/train.py \
--config platoon/number_search/number_search_cispo_areal.yaml \
trial_name=debug-run \
train_dataset.batch_size=16Standalone inference workflows benchmark an OpenAI-compatible endpoint and write rollouts plus aggregate reports under inference.output_dir.
cd plugins/appworld
uv run python -m platoon.appworld.run_inference \
--config platoon/appworld/configs/inference/appworld_inference.yamlUse the trajectory visualization CLI to tail, replay, and analyze rollout event logs:
uv run -m platoon.visualization.cli --helpSee platoon/visualization/README.md.
To reproduce experiments for Recursive Agent Optimization (RAO), you may refer to this branch, which is a snapshot of the codebase used for the RAO paper.
Parts of platoon's design and optimizations were inspired by many existing great RL frameworks and projects including AReaL, tinker-cookbook and agent-lightning.
Platoon was originally designed for the paper Recursive Agent Optimization (RAO). Please cite the following if you found platoon to be useful in your work:
@article{gandhi2026rao,
title = {Recursive Agent Optimization},
author = {Gandhi, Apurva and Chakraborty, Satyaki and Wang, Xiangjun
and Kumar, Aviral and Neubig, Graham},
journal = {arXiv preprint arXiv:2605.06639},
year = {2026}
}@misc{gandhi2025platoon,
author = {Gandhi, Apurva},
title = {{Platoon}: Build and Train Systems of Agents},
howpublished = {\url{https://github.com/ApGa/platoon}},
year = {2025}
}