Building with AI

Agent Lightning

Quick explainer2 min readAdvanced

Agent Lightning is Microsoft Research's open-source framework for training AI agents with reinforcement learning while they keep running in their usual code.

In plain words

Reinforcement learning improves a model by rewarding good outcomes, but most agent training systems make developers rebuild the agent inside the trainer. Agent Lightning instead sits between the agent and its model as a proxy, recording each model call while the agent runs unchanged. Version 1.0 has roughly 3,500 lines of code, runs agents as Kubernetes jobs and uses the MIT License. In Microsoft's coding example, training Qwen3.5-9B on about 6,000 samples raised its SWE-bench Verified score from 41.8% to 56.4%.

A quick example

Imagine a team with a support agent that already works. They point its model address at Agent Lightning, let it handle practice tickets, score each result, and use those scores to train a better model, all without editing the agent.

Where you'll meet it

  • Training coding agents and other agents with reinforcement learning.
  • Research on improving agents inside the harness they are deployed with.

Related

Sources

  1. DocsAgent Lightning v1.0: A 3,500-Line Lightweight Agentic RL Framework for Training Agents with Real Harnesses, Microsoft Research · read 7 Oct 2026
  2. Docsmicrosoft/agent-lightning, Microsoft (GitHub) · read 7 Oct 2026

Checked by WhatIsAI against the sources above · 7 Oct 2026. Spotted an error? Report it.