Agent Lightning
An open-source AI agent training framework using reinforcement learning with existing agent harnesses, local execution and Kubernetes support.

Agent Lightning is a Python framework for developers and researchers training AI agents through reinforcement learning. It keeps the agent's existing tools, context and task environment involved in training, so feedback comes from the workflow the agent actually uses.
- Existing agent harnesses: Train agents without changing their harness code, preserving their tools and control flow during interactions.
- Local and Kubernetes execution: Run agents locally or as Kubernetes Jobs without an external sandbox service.
- Coding agent training: Use repository tests as feedback through example pipelines covering data cleaning, reward-hacking prevention and training scripts for Qwen3.5-9B and Qwen3.5-35B-A3B.
- Other training tasks: Work from examples for retrieval and reasoning, AutoGen agents with MCP calculator tools, ScienceWorld tasks and vision-language question answering.
The training backend uses verl and vLLM. Asynchronous training supports collecting agent interactions alongside model updates. The Qwen3.5-35B-A3B coding example also uses Megatron and R3.
Agent Lightning is open source under the MIT license. Training uses a GPU stack, with CUDA-based setup support; the Calc-X math reasoning example requires one GPU.