Most RL-for-agents efforts force you to rewrite your agent inside a training loop. Agent Lightning inverts that: it observes a running agent through lightweight tracing and treats the agent's execution as the environment, so the same code you ship to production becomes the thing being trained. The decoupling is the whole point — your agent logic and the optimization algorithm never have to know about each other.
What Sets It Apart
- Framework-agnostic by construction: integrates with LangChain, OpenAI Agents SDK, AutoGen, CrewAI, Microsoft Agent Framework, or raw code — because it hooks into traces rather than wrapping your runtime, adding a new framework is a tracing detail, not a rewrite.
- One agent at a time: in a multi-agent pipeline you can target a single role for optimization while the rest stay fixed, which avoids the credit-assignment mess of training everything at once.
- More than RL: the same trace-driven architecture (a central store of tasks/traces, pluggable algorithms that read spans and write back resources) also drives automatic prompt optimization and supervised fine-tuning, so prompts and weights are both first-class optimization targets.
Who It's For
Great fit if you already have a working agent and want to improve its prompts or fine-tune its model on real task outcomes without re-architecting it. Look elsewhere if you need a turnkey agent-building toolkit — this is a training/optimization layer that assumes you bring your own agent, and getting useful gains still requires defining rewards and standing up the RL infrastructure (it builds on a verl-style training stack).