LibreAI / AI Agents / agent-lightning
// agents · microsoft/agent-lightning

agent-lightning

Microsoft's trainer for AI agents - reinforcement learning for almost any agent framework

★ 18.6k stars⑂ 1.7k forksMITupdated 2026-09
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

agent-lightning is an open-source ai agents project by microsoft (microsoft/agent-lightning on GitHub). It has 18,595 GitHub stars and 1,661 forks, is released under the MIT license, and was last updated on GitHub on 29 September 2026.

GitHub stars
18,595
Forks
1,661
License
MIT
Last updated on GitHub
29 September 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Pick an agent to improve

    Choose an existing agent workload - the repo includes a full coding-agent training example.

  2. Clone the repository

    Training setups are run from a source checkout.

  3. Sync the environment

    Use uv sync and the provided setup script to prepare the training stack for your CUDA version.

  4. Run your first training job

    Start from an included example, collect trajectories, and launch a training run.

// features

Why people love it

Framework-agnostic training

Designed to train agents built with popular frameworks without rewriting them around the trainer.

Reinforcement learning for agents

Applies RL (with veRL integration scripts) to multi-step agent trajectories.

Complete coding-agent example

Ships an end-to-end example that trains a coding agent on SWE-bench-style tasks with data cleaning and reward-hacking prevention.

Lightweight architecture

Keeps the training architecture to three lightweight components per the README.

Documented results

The README reports measured gains for its examples (for example SWE-bench Verified improvements in the coding-agent pipeline).

Examples and community projects

Includes additional examples and a catalog of community projects built on it.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Get the source code from GitHub and enter the project directory.

    git clone https://github.com/microsoft/agent-lightning.git
    cd agent-lightning
  2. Sync the environment

    The README's example installation targets a CUDA machine and uses uv plus the veRL setup script.

    uv sync
    bash scripts/setup_verl.sh 0.8.0 cu130 # example versions - see README installation
  3. Start from an example

    Open the examples in the repo (including the coding-agent training example) and adapt one to your agent.

    # Browse the Examples section linked from the README and run one pipeline
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains this project?

It is maintained by Microsoft (Microsoft Research) as an open-source project on GitHub.

Is it free to use?

Yes - Agent Lightning is MIT licensed and free to use.

Does it need a paid API key?

Training needs models to train and roll out: you bring your own model endpoints or local weights and the GPU capacity; the framework itself sells no API.

How does it compare to alternatives?

Compared with fine-tuning libraries like TRL, Agent Lightning is specialized for agents - trajectory-based training designed to wrap existing agent frameworks rather than single-turn LLM training.

How do I get started?

Clone the repo, run uv sync, follow the installation guide for your CUDA setup, and run one of the included examples.

// keep exploring

Similar tools

AI Agents

NeMo-Agent-Toolkit

NVIDIA's toolkit for connecting, profiling and optimizing teams of AI agents — across any framework

★ 2.7k starsApache-2.0
View guide →
AI Agents

UFO

Microsoft's GUI agent that grew into UFO³ — orchestrating agents across Windows, Linux and mobile devices.

★ 10.0k starsMIT
View guide →
AI Agents

hermes-agent

The agent that grows with you — a Python framework for adaptive AI agents.

★ 252.0k starsMIT
View guide →
AI Agents

openclaude

A Claude Code-style coding agent that runs anywhere and works with almost any model provider

★ 33.7k starsMIT
View guide →
AI Agents

RD-Agent

Microsoft's R&D-Agent: LLM agents that automate data-driven research, Kaggle modelling and LLM fine-tuning.

★ 14.9k starsMIT
View guide →
AI Agents

agentscope

Build and run agents you can see, understand and trust — framework plus a visual agent service

★ 32.9k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if agent-lightning is not the right fit.

Get agent-lightning

Free and open — grab the source, star the repo, and start creating.