About this project
Agent Lightning is an open-source framework from Microsoft for training AI agents with reinforcement learning. It is designed around simplicity, with approximately 3,500 lines of code, and allows agents to interact with models through a proxy without requiring changes to existing agent code. The framework keeps tools, context, control flow, and environments in the training loop.
The architecture consists of three lightweight components: a Trainer that runs verl and vLLM, an API Gateway that proxies model requests and captures training data, and a Rollout Controller that runs agents locally or as Kubernetes Jobs. Native Kubernetes support enables running agents directly as jobs without external sandbox services.
The project includes a full coding agent training example. Using 6,000 training samples, an end-to-end Qwen3.5-9B workflow improves SWE-bench Verified performance from 41.8% to 56.4%, a gain of 14.6 percentage points. The released pipeline includes data cleaning, reward-hacking prevention, and training scripts.
Documentation covers installation, quick start, trainer configuration, API gateway configuration, controller configuration, and asynchronous training. Examples include Calc-X, GSM8K, ScienceWorld, Search-R1, LLM-in-Sandbox, and a coding agent trained with repository tests. The project is released under the MIT License and has been evaluated against the Microsoft Responsible AI Standard.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.