Agent Lightning

Agent Lightning

โ˜… 4.2 ๐Ÿ”– 4000 saves ๐Ÿ’ฐ Free GitHub

Agent Lightning is Microsoft Research’s open-source framework for training AI agents with reinforcement learning, without rewriting the agent. Its proxy-based design observes an agent’s interactions through an API gateway and turns them into training data, so almost any existing agent, built with any framework or even none, can be optimized with RL. Released in 2025, it reached version 1.0 in 2026 and has earned about 18,800 stars on GitHub.

Overview

The framework is deliberately lightweight, around 3,500 lines of code, with three components: a Trainer built on verl and vLLM that builds samples and updates the policy, an API Gateway that proxies model requests and captures trajectories, and a Rollout Controller that runs agents locally or as native Kubernetes Jobs. Because agents keep their real tools, context and control flow, training reflects production behavior rather than a simulation of it. Microsoft reports substantial results, for example pure RL lifting a Qwen3.5 coding agent on SWE-bench Verified from 41.8% to 56.4% with only 6K training samples, and example pipelines cover search agents, math reasoning and computer-use agents.

Key Features

  • Train virtually any AI agent with reinforcement learning, with zero changes to the agent itself
  • Lightweight three-part architecture: Trainer, API Gateway and Rollout Controller
  • Native Kubernetes support, running agents directly as Jobs at scale
  • Complete coding-agent training example with data cleaning and reward-hacking prevention
  • Built on verl and vLLM for efficient rollout generation and policy updates
  • Ready examples for search, math reasoning, science tasks and sandbox computer use

๐Ÿ’ณ Pricing

Agent Lightning is completely free and open source under the MIT license. You supply the GPU infrastructure and models; there are no licensing fees or hosted tiers.

Who Is It For

Agent Lightning is for ML engineers and research teams who already have working agents, coding, search or tool-use, and want to measurably improve them with reinforcement learning.

๐Ÿš€ Visit Agent Lightning Official Site

๐Ÿšฉ Report an issue