Skip to content

Agent Lightning

A training framework that uses reinforcement learning to improve AI agents running with their real tools.

Stars
18.9k
Forks
1.7k
Licence
MIT
Language
Python
Last update
4 days ago
Type
Framework

What it is

Agent Lightning is a Python framework for training AI agents with reinforcement learning. Instead of rewriting an agent to fit a training system, the README says agents keep their existing tools, context, and control flow while a proxy records their model interactions as training data. It is aimed at researchers and engineers who want to improve how an agent behaves on tasks such as coding or search.

  • Train a math reasoning agent with the Calc-X or GSM8K examples
  • Run a coding agent trained against repository tests using the Coding Agent example
  • Run agents as Kubernetes Jobs with the built-in Kubernetes support
  • Study training pipelines through the published examples and technical report

Great for

  • Researchers experimenting with reinforcement learning on LLM agents
  • Engineers who already have an agent and want to improve it with training data
  • Teams with GPU access who can run the documented verl and vLLM stack
  • Anyone following the coding-agent examples on SWE-bench Verified

Not ideal for

  • People who only want to use an existing AI assistant, since this is a training tool, not an end-user app
  • Users without GPU resources, because the examples and installation assume CUDA-capable hardware
  • Beginners new to reinforcement learning or LLM training, who will likely find the setup and concepts heavy
Step-by-step guide: how to use Agent LightningInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Python · uv · CUDA-capable GPU (the example uses CUDA 13.0)

    Enter the repository directory

    cd <this-repo>

    Install Python dependencies with uv

    uv sync

    Set up the verl GPU stack

    bash scripts/setup_verl.sh 0.8.0 cu130
  2. 2

    Run it

    • Follow the Installation Guide in the documentation
    • Work through the Quick Start page for a local first run
    • Read the Basics page to learn about components, rollouts, and trajectories
    • Try a small example such as Calc-X, which the README says needs only one GPU
  3. 3

    Get the most out of it

    • Read the Trainer Configuration page to understand verl integration and trace aggregation
    • Use the Controller Configuration page to choose between local and Kubernetes runners
    • Review the Asynchronous Training page for collocated async collection and pause/drain
    • Look at the Agent Lightning Skill referenced in the README, which helps a coding agent improve another agent

Downloads

Strengths

  • The README describes a small core of about 3,500 lines, with three named components: Trainer, API Gateway, and Rollout Controller
  • Works with real agent harnesses without requiring code changes, according to the README
  • Ships multiple worked examples, including coding, search, and sandbox agents

Trade-offs

  • Requires significant GPU setup; the documented install example targets a CUDA 13.0 machine
  • Several reported results are from the project's own evaluations and have not been independently verified here
  • Version 1.0 was refactored, so older v0.x material may not apply

How it compares

ProjectStarsTypeLevelUpdatedBest for
agent-lightning (this)18.9kFrameworkadvanced4 days agoResearchers experimenting with reinforcement learning on LLM agents
learn-harness-engineering22.9kLearning resourcebeginner14 days agoDevelopers new to building or controlling AI coding agents
Octop11.5kAppintermediate4 days agoHouseholds or small teams that want a shared, self-hosted assistant
wandb11.3kLibrarybeginner4 days agoMachine learning engineers who want to compare training runs over time
MetaGPT71.1kFrameworkintermediate10 months agoDevelopers experimenting with multi-agent LLM workflows
eliza19.8kFrameworkadvanced4 days agoDevelopers who want to build AI agents or plugins in TypeScript

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.