RAGEN
Open-source RL framework for training reasoning LLM agents with multi-turn reinforcement learning, StarPO, and reasoning-collapse diagnostics.
At a Glance
RAGEN core framework released under the MIT License; free to use, copy, modify, and distribute.
Engagement
Available On
Alternatives
Listed Oct 2026
About RAGEN
RAGEN (Reasoning AGENT) is an open-source reinforcement learning framework from the MLL Lab at Northwestern University for training reasoning LLM agents with multi-turn RL. It is built on StarPO (State-Thinking-Actions-Reward Policy Optimization) and ships with diagnostics for failure modes in agent RL training. RAGEN-2, released in March 2026, adds reasoning-collapse diagnostics and SNR-adaptive filtering.
What It Is
RAGEN is a training framework for researchers and practitioners who want to apply reinforcement learning to LLM agents that interact with environments over multiple turns. Agent-environment interactions are formulated as Markov decision processes in which states and actions are token sequences. The model produces reasoning-guided actions in a think/answer format, and the environment returns rewards and next states.
How Training Works
StarPO alternates between a rollout stage, where the LLM generates trajectories, and an update stage, where entire trajectories are optimized with importance sampling. It supports PPO with token-level advantage estimation and GRPO with trajectory-level normalized rewards. Ten built-in environments are included: Sokoban, FrozenLake, WebShop, DeepCoder, SearchQA, Lean, Bandit, Countdown, MetaMathQA, and Sudoku. A Gym-compatible interface makes it possible to add custom environments.
Diagnosing Reasoning Collapse
RAGEN-2 studies template collapse, where outputs look diverse within a single input but become input-agnostic across inputs, so entropy alone cannot detect it. It evaluates reasoning along two axes: conditional entropy, which measures within-input diversity, and mutual information, which measures cross-input distinguishability. Mutual-information proxy metrics are used to monitor collapse during training. SNR-adaptive filtering uses reward variance to keep high-signal prompts each iteration, and it can be configured as top-p or top-k rollout filtering. According to the project page, it improved results across RL algorithms, model scales, and modalities.
Setup Path
Installation uses a conda environment with Python 3.12 and a setup script, with an optional flag for the search environment. Training runs through a train.py entry point with config names such as the Sokoban config, and evaluation runs through the agent proxy module. The repository includes guides for evaluation, rollout filtering, MI metrics, and experiment reproduction. The code is released under the MIT license.
Community Discussions
Be the first to start a conversation about RAGEN
Share your experience with RAGEN, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
RAGEN core framework released under the MIT License; free to use, copy, modify, and distribute.
- MIT License
- StarPO multi-turn RL framework
- 10 built-in environments
- SNR-Adaptive Filtering
- Reasoning collapse diagnostics
Capabilities
Key Features
- StarPO multi-turn, trajectory-level RL for LLM agents
- PPO and GRPO support
- 10 built-in environments
- Gym-compatible interface for custom environments
- SNR-adaptive rollout filtering (top-p, top-k)
- Mutual information diagnostics for template collapse
- Evaluation via agent proxy
- Experiment reproduction guides
