agent-lightning
The absolute trainer to light up AI agents.
What is agent-lightning?
The absolute trainer to light up AI agents.
Overview of agent-lightning
What it is
Agent Lightning is a lightweight agentic reinforcement learning framework for training AI agents with real harnesses. It was completely refactored in v1.0 and 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. The framework treats simplicity as a first principle, with approximately 3,500 lines of code.
Key features
- Approximately 3,500 lines of code, emphasizing simplicity.
- Train agents with real harnesses (tools, context, control flow, environments) with zero changes to the agent code.
- Native Kubernetes support, running agents directly as Kubernetes Jobs without external sandbox services.
- Full coding agent training example: using 6K training samples, an end-to-end Qwen3.5-9B workflow improves SWE-bench Verified from 41.8% to 56.4% (a gain of 14.6 percentage points).
- Additional coding agent example based on Qwen3.5-35B-A3B: pure RL improves SWE-bench Verified from 47.8% to 61.6% after only 1.8K training examples (a gain of 13.8 percentage points).
Use cases
- Math reasoning (e.g., Calc-X with AutoGen and MCP calculator tools, GSM8K grade-school math).
- Interactive science tasks in text-based environments (ScienceWorld).
- Multi-turn retrieval and reasoning agents (Search-R1).
- General agents with computer and code execution tools (LLM-in-Sandbox).
- Coding agents trained with repository tests (Coding Agent, Coding Agent: MoE).
Getting started
Example installation on a CUDA 13.0 machine:
cd
uv sync
bash scripts/setup_verl.sh 0.8.0 cu130
See the repository README for the full Installation Guide and Quick Start instructions.
License and pricing
This project is licensed under the MIT License and is open source.
Based on the project's public README and repository metadata.