microsoft/agent-lightning
The absolute trainer to light up AI agents.
What it solves
Agent Lightning is a lightweight framework designed to train AI agents using Reinforcement Learning (RL) without requiring significant changes to the agent's existing code or harness. It solves the difficulty of integrating complex agentic workflows—including tools, context, and control flow—into a training loop where the model is updated based on performance.
How it works
The framework uses a three-component architecture to bridge the gap between the agent's environment and the trainer:
- Trainer: Manages the RL process using
verland vLLM to build training samples and update the model policy. - API Gateway: Acts as a proxy for model requests, capturing the interactions and trajectories that become training data.
- Rollout Controller: Launches and manages the agents, either locally or as Kubernetes Jobs, allowing them to interact with their real-world environments.
Who it’s for
Researchers and developers building autonomous agents who want to apply RL to improve their performance in specific domains like coding, search, and mathematical reasoning.
Highlights
- Minimal Code Changes: Agents can be trained with their real harnesses via a proxy, requiring zero changes to the agent's logic.
- Lightweight Design: The entire framework consists of approximately 3,500 lines of code.
- Kubernetes Native: Supports running agents as Kubernetes Jobs for scalable rollout collection.
- Proven Results: Demonstrated a 14.6 percentage point gain on SWE-bench Verified for a Qwen3.5-9B coding agent using only 6K training samples.
Related
- Project
- Project
- Project
- Project
- Project