Microsoft released a 3,500-line framework to train AI agents
The new Agent Lightning v1.0 lets developers use existing deployment harnesses to train AI systems with reinforcement learning.

Microsoft Research Asia launched Agent Lightning v1.0, a compact framework designed to simplify the training of AI agents. It uses roughly 3,500 lines of code to enable Reinforcement Learning (RL) without forcing developers to rebuild their entire agent setup.
Solving the integration problem
Agent Lightning v1.0 implements a complete Harnessed Agentic RL system in a codebase that is small and clear enough to understand, modify, and extend.
Previously, training an AI agent with reinforcement learning often meant creating a custom environment inside the training tool. This was slow, expensive, and sometimes caused the agent to behave differently than it would in the real world. Agent Lightning changes this by inserting a proxy between the model and the existing agent harness.
- It keeps the original deployment code intact.
- It uses native Kubernetes jobs for scheduling.
- It avoids costly commercial sandbox services.
Real-world performance
In a recent test, researchers used this framework to train the Qwen3.5-9B model on coding tasks. Using only about 6,000 training samples, the agent improved its pass rate on the SWE-bench Verified benchmark from 41.8% to 56.4%. This 14.6 percentage point gain shows that smaller, efficient datasets can yield significant results when the training method is aligned with how the agent actually runs.
How it works
Think of it as adding a high-speed tracking system to a machine that is already working on the assembly line. The system manages the interaction loop using the agent's own logic, while the training framework observes the data to improve the model's future decisions. By using Collocated Async RL, the framework manages to speed up training by about two times compared to older, synchronous methods.
Could this approach to training agents finally make advanced AI development accessible to teams without massive compute budgets?
It is important to note that this framework requires an existing agent harness to function. The current documentation and performance gains focus specifically on coding agents. The framework does not remove the need for careful data preparation and reward-hacking safeguards, which remain critical parts of any RL training pipeline.
Source: Microsoft Research Blog