ChatPaper.aiChatPaper

에이전트 라이트닝: 강화 학습을 통한 모든 AI 에이전트 훈련

Agent Lightning: Train ANY AI Agents with Reinforcement Learning

August 5, 2025
저자: Xufang Luo, Yuge Zhang, Zhiyuan He, Zilong Wang, Siyun Zhao, Dongsheng Li, Luna K. Qiu, Yuqing Yang
cs.AI

초록

우리는 모든 AI 에이전트를 위한 대규모 언어 모델(LLM)의 강화 학습(RL) 기반 훈련을 가능하게 하는 유연하고 확장 가능한 프레임워크인 Agent Lightning을 소개합니다. 기존 방법들이 RL 훈련을 에이전트와 긴밀하게 결합하거나 시퀀스 연결과 마스킹에 의존하는 것과 달리, Agent Lightning은 에이전트 실행과 훈련 간의 완전한 분리를 달성합니다. 이를 통해 LangChain, OpenAI Agents SDK, AutoGen과 같은 프레임워크를 사용하거나 처음부터 구축된 다양한 방식으로 개발된 기존 에이전트와 거의 코드 수정 없이 원활하게 통합할 수 있습니다. 에이전트 실행을 마르코프 결정 과정으로 공식화함으로써, 우리는 통합된 데이터 인터페이스를 정의하고, 크레딧 할당 모듈을 포함한 계층적 RL 알고리즘인 LightningRL을 제안합니다. 이를 통해 ANY 에이전트에 의해 생성된 궤적을 훈련 전환으로 분해할 수 있습니다. 이는 RL이 다중 에이전트 시나리오 및 동적 워크플로와 같은 복잡한 상호작용 논리를 처리할 수 있게 합니다. 시스템 설계 측면에서, 우리는 훈련-에이전트 분리 아키텍처를 도입하고, 에이전트 런타임에 에이전트 관찰 가능성 프레임워크를 통합하여 표준화된 에이전트 미세 조정 인터페이스를 제공합니다. 텍스트-to-SQL, 검색 증강 생성, 수학 도구 사용 작업에 걸친 실험은 안정적이고 지속적인 개선을 보여주며, 이 프레임워크가 실제 에이전트 훈련 및 배포에 있어 잠재력을 가지고 있음을 입증합니다.
English
We present Agent Lightning, a flexible and extensible framework that enables Reinforcement Learning (RL)-based training of Large Language Models (LLMs) for any AI agent. Unlike existing methods that tightly couple RL training with agent or rely on sequence concatenation with masking, Agent Lightning achieves complete decoupling between agent execution and training, allowing seamless integration with existing agents developed via diverse ways (e.g., using frameworks like LangChain, OpenAI Agents SDK, AutoGen, and building from scratch) with almost ZERO code modifications. By formulating agent execution as Markov decision process, we define an unified data interface and propose a hierarchical RL algorithm, LightningRL, which contains a credit assignment module, allowing us to decompose trajectories generated by ANY agents into training transition. This enables RL to handle complex interaction logic, such as multi-agent scenarios and dynamic workflows. For the system design, we introduce a Training-Agent Disaggregation architecture, and brings agent observability frameworks into agent runtime, providing a standardized agent finetuning interface. Experiments across text-to-SQL, retrieval-augmented generation, and math tool-use tasks demonstrate stable, continuous improvements, showcasing the framework's potential for real-world agent training and deployment.
PDF523August 7, 2025