Skip to content

Agent Lightning Documentation

Agent Lightning v1.0

Welcome to the Agent Lightning v1.0 documentation. Start with the installation and quick-start guides, then use the configuration guides and examples below to build and train your own agents.

Agent Lightning v1.0 is a completely redesigned and reimplemented version with the following key features:

  • 🪶 ~3,500 lines of core Python: Simplicity is the first principle.
  • 🧩 Training 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: Agents run directly as Kubernetes Jobs without relying on external sandbox services.
  • 💻 A complete coding-agent training example: The released pipeline covers data cleaning, reward-hacking prevention, and training scripts.

For the legacy Agent Lightning releases earlier than v1.0, see the v0.x code branch and the v0.3.0 documentation.

Getting Started

Guide Description
Installation Set up the base environment and the tested verl GPU stack.
Quick Start Run a local end-to-end rollout-driven training job.
Basics Learn the core components, rollouts, events, and trajectories.

Configuration

Guide Description
Trainer Configuration Configure verl integration, rollout collection, and trace aggregation.
API Gateway Configuration Configure the API Gateway and model proxy.
Controller Configuration Configure local and Kubernetes rollout runners.
Asynchronous Training Configure collocated asynchronous collection and pause/drain behavior.

Examples

Example Description
Calc-X Train a math reasoning agent with AutoGen and MCP calculator tools.
GSM8K Train an agent on grade-school math reasoning tasks.
ScienceWorld Train an agent on interactive science tasks in a text environment.
Search-R1 Train a multi-turn retrieval and reasoning agent.
LLM-in-Sandbox Train a general agent with computer and code execution tools.
Coding Agent Train a coding agent using repository tests as feedback.