Repolode
microsoft

microsoft/agent-lightning

A lightweight agentic RL framework from Microsoft for training existing AI agents with reinforcement learning while they keep their real tools and harnesses.

Stars
18,765
Forks
1,871
Open issues
172
Last commit
14 hours ago

What is it?

Agent Lightning is an agentic reinforcement learning framework for improving AI agents by training the underlying model. Agents keep their existing tools, context, control flow and environments, and interact with the model through the Agent Lightning proxy with no code changes to the agent, according to the project's description of v1.0.

The framework is built from three components: a Trainer that runs verl and vLLM to build samples and update the policy, an API Gateway that proxies model requests and captures training data, and a Rollout Controller that runs agents locally or as Kubernetes Jobs. The project states it is about 3,500 lines of code.

The repository includes examples covering math reasoning with AutoGen and MCP calculator tools, multi-turn retrieval with Search-R1, general computer and code agents in a sandbox, and coding agents trained against repository tests, including a Qwen3.5-35B-A3B MoE variant.

Key features

  • 01Trains agents built on real harnesses with no changes to agent code.
  • 02Runs agents locally or as native Kubernetes Jobs.
  • 03Uses verl and vLLM for the training and rollout pipeline.
  • 04Provides an API Gateway that captures interaction data as training samples.
  • 05Includes end-to-end coding agent training examples on SWE-bench Verified.

Use cases

  • Improving an existing agent built with AutoGen or a similar framework using reinforcement learning.
  • Training coding agents against repository tests.
  • Running large-scale agent rollouts on a Kubernetes cluster.
  • Researching agentic RL with real tools and multi-turn environments.

Quick start

  1. 1

    Clone the repository and enter its directory

  2. 2

    Install dependencies with uv

    uv sync
  3. 3

    Set up the verl GPU stack (example for CUDA 13.0)

    bash scripts/setup_verl.sh 0.8.0 cu130

Things to know

  • Training the full pipeline requires GPUs with CUDA, as shown in the installation example.
  • Setup involves a multi-component stack (verl, vLLM, uv) and the README points to a separate installation guide for details.

Topics

FAQ

What is agent-lightning?
A lightweight agentic RL framework from Microsoft for training existing AI agents with reinforcement learning while they keep their real tools and harnesses. Agent Lightning is an agentic reinforcement learning framework for improving AI agents by training the underlying model. Agents keep their existing tools, context, control flow and environments, and interact with the model through the Agent Lightning proxy with no code changes to the agent, according to the project's description of v1.0.
Is agent-lightning free to use? What license does it have?
agent-lightning is open source under the MIT license. Check the license terms before using it in commercial products.
Is agent-lightning still maintained?
Actively maintained. The last commit to agent-lightning was on Oct 20, 2026.
What can I use agent-lightning for?
Improving an existing agent built with AutoGen or a similar framework using reinforcement learning. Training coding agents against repository tests. Running large-scale agent rollouts on a Kubernetes cluster. Researching agentic RL with real tools and multi-turn environments.
How do I install agent-lightning?
Clone the repository and enter its directory Install dependencies with uv: uv sync Set up the verl GPU stack (example for CUDA 13.0): bash scripts/setup_verl.sh 0.8.0 cu130
Where can I get agent-lightning?
The source code and installation instructions are on GitHub: https://github.com/microsoft/agent-lightning

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects