RAGEN
RAGEN is an open-source reinforcement learning framework for training reasoning LLM agents, based on the StarPO algorithm and supporting multi-turn trajectory-level reinforcement learning. It provides 10 built-in environments (such as Sokoban, FrozenLake, WebShop, DeepCoder, SearchQA, etc.) and a Gym-compatible interface, making it easy to add custom environments. The RAGEN-2 version further introduces SNR-Adaptive Filtering, a lightweight trajectory filtering method based on reward variance, as well as reasoning collapse diagnostics (detecting template collapse through conditional entropy and mutual information proxy metrics), helping to understand and fix hidden failure modes in agent reinforcement learning (such as Echo Trap and reasoning collapse). The framework supports two optimization methods, PPO and GRPO, and includes tools such as a diagnostics dashboard and training metrics guide.