Microsoft Research Asia has released Agent Lightning v1.0, an open-source framework that trains AI agents using their real deployment harness via an LLM proxy, reducing rebuild overhead.

AI agents are no longer just standalone language models. Today’s most capable systems are full stacks that combine a model with tools, orchestration code, and an execution environment. Increasingly, their real-world performance hinges on something outside the model itself: the “agent harness” that manages context, decides when to call tools, and controls the overall interaction loop.

Reinforcement learning (RL)—training systems through trial-and-error using rewards and penalties—can improve agent behavior. But most agent-focused RL setups come with a costly catch: developers often have to reconstruct the agent inside the RL training framework. That extra engineering burden is significant, and it creates a fidelity problem, because the version trained in the lab is not exactly the one shipped to users.

Researchers at Microsoft Research Asia say they have a solution. They have introduced what they call the Harnessed Agentic RL training paradigm and released an open-source rebuild of their framework, Agent Lightning v1.0. The updated version emphasizes a lightweight design, compatibility with real deployment harnesses, and an end-to-end, reproducible training pipeline.

Traditional agentic RL systems assume the training framework owns the environment loop. In a common ReAct-style pattern, the model emits an action, the environment returns an observation, that observation is appended to the prompt, and the model produces the next action—forming one continuous token-level trajectory. Early RL projects including verl, AReaL, and slime followed this structure, which effectively required engineers to reproduce an agent’s control flow inside the trainer.

That assumption breaks down with modern “real harnesses.” Coding agents such as mini-SWE-agent, OpenHands, OpenCode, Claude Code, and Codex each implement their own context handling, tool schemas, execution logic, and dependencies. General-purpose agents do the same. Rebuilding these harnesses for training is not only expensive; it can also change behavior, undermining the goal of training the deployed system.

Agent Lightning v1.0 takes a different approach by inserting an LLM proxy between the harness and the model. Rather than rewriting the agent, developers can typically redirect the harness’s existing model endpoint to Agent Lightning. The framework then observes and logs the model calls made during normal agent operation.

In v1.0, the team formalizes this setup as Harnessed Agentic RL, meaning the same harness used in deployment participates directly in RL training. The key shift is architectural: the harness—not the RL framework—drives the environment interaction loop. The training system only sees a stream of LLM request/response pairs, which means a single rollout can be fragmented into a variable number of training examples. The researchers note that this design introduces four major challenges (not detailed in the excerpt), stemming from the fact that the trainer no longer controls step boundaries or trajectory structure.

Simplicity is central to the new release. Agent Lightning v1.0 is roughly 3,500 lines of code and is organized around three main parts: an API Gateway, a Rollout Controller, and a Customized Trainer. The API Gateway functions as an OpenAI-compatible proxy, storing rollouts, models, and events while recording prompts, responses, and the log probabilities required for training. The Rollout Controller launches and manages agent runs either as local processes or as standard Kubernetes jobs, keeping execution separate from training. The Customized Trainer, built on verl, initiates rollouts, waits for completion, gathers samples, and converts them into final training data using a sample adapter. The result is a fast on-ramp for existing harnesses: in many cases, pointing the model endpoint at the proxy is enough to start RL training.

Why it matters

As agent harnesses become the defining layer of real-world AI systems, training methods that require rebuilding those harnesses risk slowing development and producing agents that behave differently in production. Harnessed Agentic RL aims to close that gap by letting teams train the same stack they deploy. If widely adopted, it could make RL fine-tuning more accessible for complex tool-using agents—especially those running in heterogeneous, production-like environments.