microsoft/agent-lightning is one of the AI-powered repositories TopGit tracks, currently at 19.0k stars, written primarily in Python. The absolute trainer to light up AI agents.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
3,500-Line Lightweight Agentic RL Framework for Training Agents with Real Harnesses!
Documentation · Technical Report · WeChat Group (微信群) · MIT License
Agent Lightning was completely refactored in v1.0. For legacy releases earlier than v1.0, see this branch.
⚡ News
[2026/11] We release a Score Centering example for math reasoning, with GRPO and score centering presets, INT8 inference, and an INT4 Attention KV cache.
[2026/10] Read our AGL-SKILL: Coding Harnesses as Agentic Optimizers technical report on using coding harnesses to optimize other agents across five benchmarks.
[2026/09] We release a new coding agent example based on an MoE model. Pure RL improves Qwen3.5-35B-A3B on SWE-bench Verified from 47.8% to 61.6% after training it on only 1.8K training examples!
[2026/08] Agent Lightning Skill is released. It helps a coding agent improve another AI agent against a benchmark.
[2026/08] Agent Lightning v1.0 technical report is released!
[2026/08] We open source Agent Lightning v1.0!
⚡ Key Features
🪶 ~3,500 lines of code: We treat simplicity as the first principle.
🧩 Train with real agent harnesses: Agents interact with the model through the Agent Lightning v1.0 proxy with ZERO changes, while keeping tools, context, control flow, and environments in the loop.
☸️ Native Kubernetes support: Run agents directly as Kubernetes Jobs without relying on external sandbox services.
💻 Full coding agent training example: Using only 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. We release the full pipeline, including data cleaning, reward-hacking prevention, and training scripts. Update: We release a new coding agent training example based on Qwen3.5-35B-A3B. Pure RL improves Qwen3.5-35B-A3B on SWE-bench Verified from 47.8% to 61.6% after only 1.8K training examples, a gain of 13.8 percentage points.
⚡ Installation
The following is an example installation on a CUDA 13.0 machine:
cd <this-repo>
uv sync
bash scripts/setup_verl.sh 0.8.0 cu130
See the Installation Guide for details.
⚡ Architecture
Agent Lightning v1.0 keeps the training architecture simple with three lightweight components:
Trainer: Runs verl and vLLM, builds training samples, and updates the policy.
API Gateway: Proxies model requests and captures training data.
Rollout Controller: Runs agents locally or as Kubernetes Jobs.
The Trainer creates rollouts, the Controller launches agents, and the Gateway turns interactions into training data, while agents continue to run with their real harnesses.
⚡ Results
We evaluate Agent Lightning v1.0 across several practical training domains, including Search R1, LLM-in-Sandbox, and Coding Agent. Pure RL delivers substantial improvements across all three domains, as shown below.
⚡ Documentation
Section
Content
Installation
Base environment and verl GPU stack
Quick Start
Local first run and end-to-end flow
Basics
Components, rollouts, events, and trajectories
Trainer Configuration
verl integration and trace aggregation
API Gateway Configuration
Gateway and model proxy settings
Controller Configuration
Local and Kubernetes runners
Asynchronous Training
Collocated async collection and pause/drain
⚡ Examples
Example
Description
Calc-X
POC math reasoning example with AutoGen and MCP calculator tools, requiring only one GPU.
GSM8K
POC grade-school math reasoning example.
ScienceWorld
Interactive science tasks in a text-based environment.
Search-R1
Multi-turn retrieval and reasoning agent.
LLM-in-Sandbox
General agent with computer and code execution tools.
Coding Agent
Coding agent trained with repository tests.
Coding Agent: MoE
Train Qwen3.5-35B-A3B with Megatron and R3.
⚡ Articles
8/19/2026 Agent Lightning v1.0: Towards Harnessed Agentic RL technical report.
12/17/2025 Adopting the Trajectory Level Aggregation for Faster Training Agent-lightning blog.
11/4/2025 Tuning ANY AI agent with Tinker ✕ Agent-lightning Medium. See also Part 2.
10/22/2025 No More Retokenization Drift: Returning Token IDs via the OpenAI Compatible API Matters in Agent RL vLLM blog. See also Zhihu writeup.
8/11/2025 Training AI Agents to Write and Self-correct SQL with Reinforcement Learning Medium.
8/5/2025 Agent Lightning: Train ANY AI Agents with Reinforcement Learning arXiv paper.
7/26/2025 We discovered an approach to train any AI agent with RL, with (almost) zero code changes. Reddit.
6/6/2025 Agent Lightning - Microsoft Research Project page.
⚡ Community Projects
DeepWerewolf — A case study of agent RL training for the Chinese Werewolf game built with AgentScope and Agent Lightning.
AgentFlow — A modular multi-agent framework that combines planner, executor, verifier, and generator agents with the Flow-GRPO algorithm to tackle long-horizon, sparse-reward tasks.
Youtu-Agent — Youtu-Agent lets you build and train your agent with ease. Built with a modified branch of Agent Lightning, Youtu-Agent has verified up to 128 GPUs RL training on maths/code and search capabilities with steady convergence. Also check the recipe and their blog Stop Wrestling with Your Agent RL: How Youtu-Agent Achieved Stable, 128-GPU Scaling Without Breaking a Sweat.
⚡ Citation
If you use Agent Lightning v1.0 in your research or projects, please cite the technical report:
@misc{he2026agentlightningv10harnessed,
title={Agent Lightning v1.0: Towards Harnessed Agentic RL},
author={Zhiyuan He and Siwei Zhang and Zhiwen Zhou and Yuqing Yang and Yu Kang and Yuge Zhang and Luna K. Qiu and Tin Yan Tsui and Jiahang Xu and Chong Luo},
year={2026},
eprint={2608.17528},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2608.17528},
}
For the original Agent Lightning paper, please use:
@misc{luo2025agentlightningtrainai,
title={Agent Lightning: Train ANY AI Agents with Reinforcement Learning},
author={Xufang Luo and Yuge Zhang and Zhiyuan He and Zilong Wang and Siyun Zhao and Dongsheng Li and Luna K. Qiu and Yuqing Yang},
year={2025},
eprint={2508.03680},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2508.03680},
}
⚡ Contributing
This project welcomes contributions and suggestions. Start by reading the Contributing Guide for recommended contribution points, environment setup, branching conventions, and pull request expectations. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
⚡ Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
⚡ Responsible AI
This project has been evaluated and certified to comply with the Microsoft Responsible AI Standard. The team will continue to monitor and maintain the repository, addressing any severe issues, including potential harms, if they arise.
⚡ License
Agent Lightning v1.0 is released under the MIT License.
How active is development on microsoft/agent-lightning?
The most recent commit recorded on microsoft/agent-lightning was 4 months ago, based on the GitHub push timestamp. The repository has 1.7k forks — one of the better signals of community interest.
How many stars does microsoft/agent-lightning have?
microsoft/agent-lightning has 19.0k GitHub stars — refresh the page for the live number, or check github.com/microsoft/agent-lightning. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is microsoft/agent-lightning written in?
microsoft/agent-lightning is written primarily in Python. GitHub's language field is based on the largest share of bytes in the default branch.
What license does microsoft/agent-lightning use?
microsoft/agent-lightning is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is microsoft/agent-lightning associated with?
GitHub's repository topics for microsoft/agent-lightning: "agent", "agentic-ai", "llm", "mlops", "reinforcement-learning". TopGit's editorial category is AI Tools.
Where can I see microsoft/agent-lightning in action?
The project maintains a homepage at https://microsoft.github.io/agent-lightning/. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about microsoft/agent-lightning?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/microsoft/agent-lightning is the definitive source.
Read full README in the tab above.
Curious whether agent-lightning is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about agent-lightning.