← Back to Leaderboard
Amicrosoft

microsoft/agent-lightning

Proxy-based reinforcement learning for agents in their existing harnesses

Engineering Health (Methodology)
A+ · 97/100
Maintenance Activity
● Updated 8d ago
Latest Release
v1.0.3
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption22/25
Release Cadence20/20
License Clarity20/20
Self-HostedGPUAPI
Total Stars
★ 19,030
24h Growth
+5
7d Growth
+30
Forks
1,738

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

microsoft/agent-lightning Star History (2025-07-16 - 2026-12-04) ALL-TIME STAR HISTORY (2025-07 – 2026-12) +19k in 506d · avg +38/day 20.1k 10k 0 2025-07-16: ★ 12025-08-16: ★ 7722025-09-20: ★ 1,5092025-10-25: ★ 1,9102025-11-29: ★ 8,8082026-01-03: ★ 9,7812026-02-07: ★ 13,9332026-03-14: ★ 15,1382026-04-18: ★ 16,6872026-05-23: ★ 16,9862026-06-27: ★ 17,1772026-08-01: ★ 17,2982026-09-05: ★ 17,9012026-10-10: ★ 18,5922026-11-10: ★ 18,9182026-12-04: ★ 19,030 ★ 19k 2025-07 2026-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Agent Lightning v1.0 is a Python reinforcement-learning framework for existing agent harnesses, not a general-purpose inference server. The Trainer creates rollouts, uses verl and vLLM, and aggregates interaction traces into samples for policy updates. The Rollout Controller launches the harness locally or as a Kubernetes Job, and the API Gateway proxies model calls and captures the interactions used for training.

The gateway is the integration boundary: a harness that can point its model client at the proxy can keep its tools, context management, control flow, and execution environment. Process launch and task evaluation still need to be wired up. The package requires Python 3.12 or newer; its manifest includes FastAPI and Uvicorn, HTTPX and httpx-retries, and Hydra and OmegaConf for configuration.

Key Capabilities & Differentiators

The examples span calculator-assisted reasoning with AutoGen and an MCP calculator, multi-turn retrieval with Search-R1, execution in a sandbox, and coding tasks evaluated with repository tests. Calc-X provides a one-GPU proof of concept. The Qwen3.5-9B coding recipe includes data cleaning and reward-hacking mitigations; its SWE-bench Verified score rose from 41.8% to 56.4% with about 6,000 training examples.

A separate Qwen3.5-35B-A3B run uses Megatron, CISPO, and R3 expert-routing replay. That pure-RL experiment improved SWE-bench Verified from 47.8% to 61.6% after 1,792 training examples. The v1.0.3 Qwen3.5-9B math recipe adds GRPO and Score Centering presets, top-K behavior-policy probability capture, INT8 inference, and an INT4 attention KV cache. These are specific tested recipes and benchmark results, not a compatibility matrix or a forecast for other harnesses.

Trade-offs & Limitations

Compared with integrating verl directly, Agent Lightning supplies model-call capture and rollout orchestration, which is useful when a task depends on the behavior of an existing harness. If those pieces are already in place, direct integration can avoid an extra gateway and controller. Compared with vLLM alone, Agent Lightning solves a different problem: it uses inference to collect experience for policy updates rather than just serving model responses.

The proxy reduces agent-side changes, not system-side work. Budget for GPU training and inference, task evaluation, and access controls on captured model traffic. Slow tools or evaluators can limit rollout throughput even when GPU capacity is available. Kubernetes Jobs provide a scheduling mechanism, not a complete isolation policy for agents that execute code. The framework is MIT-licensed, but models, datasets, dependencies, and tools require separate review.

Hardware & Deployment Guide

For a self-hosted pilot, start with the local runner and a documented task. The CUDA 13.0 installation path uses Python 3.12 or newer, runs uv sync from the checkout, then installs the verl stack with bash scripts/setup_verl.sh 0.8.0 cu130. The gateway is an API for training-time model traffic, not a hosted training service. Local rollout execution does not itself guarantee offline operation; model artifacts and any external agent tools must be available within the intended network boundary.

Move to native Kubernetes Jobs when you need cluster-side scheduling. Check that Jobs can reach the gateway and that the harness has its task dependencies, credentials, and resource limits. Size GPU memory for policy updates and inference, and measure host memory under realistic rollout concurrency. Treat pre-1.0 deployments as a migration because v1.0 was refactored. v1.0.2 added the MoE coding recipe, and v1.0.3 lowered peak host memory for MoE routing replay by decoding one rollout at a time.

Integration: Model requests pass through an API Gateway while the existing harness retains its tools, context, and control flow.
Training: The Trainer combines verl and vLLM and aggregates rollout traces into samples for policy updates.
Execution: The Rollout Controller supports local runs and native Kubernetes Jobs; collocated asynchronous collection includes pause and drain.
Coding RL: The Qwen3.5-35B-A3B recipe uses Megatron, CISPO, and R3 routing replay; its pure-RL run improved SWE-bench Verified from 47.8% to 61.6% after 1,792 examples.
Low-precision RL: The v1.0.3 Qwen3.5-9B math recipe demonstrates Score Centering with top-K behavior-policy probability capture, INT8 inference, and an INT4 attention KV cache.
Host memory: v1.0.3 decodes MoE expert routing one rollout at a time to reduce peak host-memory use during replay.
Best For

Teams with a tool-using agent, a configurable model endpoint, a repeatable evaluator, and GPU capacity to train on real task rollouts.

Skip If

You only need an inference API or prompt tuning, cannot route model calls through the proxy, or lack an environment in which task rewards can be measured reliably.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedGPUAPI
cd <this-repo>
uv sync
bash scripts/setup_verl.sh 0.8.0 cu130

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
agent-lightning ★19k+30PythonMITProxy-based reinforcement learning for agents in their existing harnesses
DeepSpeed43.4k+33PythonApache-2.0PyTorch runtime for distributed training and inference under GPU memory constrai
ludwig11.8k+6PythonApache-2.0YAML-first framework for fine-tuning, training, and serving LLMs and multimodal
annotated_deep_learning_paper_implementations67.8k+43PythonMITAnnotated PyTorch references for understanding and adapting deep learning algori

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/microsoft/agent-lightning.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

microsoft/agent-lightning Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about agent-lightning

How do I connect an existing agent to the training loop?

Point the agent’s model requests at the API Gateway and configure the Controller to launch the existing harness. The gateway captures model interactions, and the Trainer builds learning samples from rollout data. The low-change integration assumes the model endpoint is configurable; you still need a runnable environment and a task-level reward or evaluator.

Can I start on one GPU, and what should I measure before scaling?

Calc-X is a documented one-GPU proof of concept. That is not a sizing guarantee for coding or MoE runs. Budget VRAM for policy training and vLLM rollout inference, accounting for whether they are collocated, and measure host RAM for rollout data and MoE routing replay. Model choice, context length, and rollout concurrency all affect capacity; the available configurations do not establish an exact VRAM minimum.

Can we self-host it for commercial use?

Yes. The MIT license permits commercial use, modification, and redistribution, with the copyright and license notices retained as required. Model weights, datasets, dependencies, and third-party tools carry their own terms. Self-hosting gives you control of the deployment, but you must still set access and retention policies for interaction traces.

When should I choose Agent Lightning over direct verl integration or vLLM alone?

Use Agent Lightning when the training signal depends on the behavior of an existing harness and you want proxy-based capture plus local or Kubernetes rollout execution. Use verl directly if you already own those pieces and prefer fewer service boundaries. If the job is only to serve a trained model, vLLM alone addresses that need; it does not replace the agent RL loop.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining microsoft/agent-lightning? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature microsoft/agent-lightning on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare