Open-AgentRL

Gen-VerseApache-2.0更新放缓

面向 LLM 与 Agent 场景的开源强化学习训练库,集成 GRPO、PPO、熵方法等算法,支持编码、GUI、多智能体等任务。

RLAnything (ICML 2026) & AutoTool (ICML 2026), DemyAgent: Open-Source RL for LLMs and Agentic Scenarios

暂无版本661star59fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/Gen-Verse/Open-AgentRL.git
conda create -n OpenAgentRL python=3.11
conda activate OpenAgentRL
cd Open-AgentRL
bash scripts/install_vllm_sglang_mcore.sh
pip install -e .[vllm]
硬件要求按 README 说明

README 未说明具体显存与 GPU 型号要求

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源 LLM 与 Agent 强化学习框架,覆盖策略、奖励模型与环境闭环优化

面向 LLM 与 Agent 场景的开源强化学习训练库,集成 GRPO、PPO、熵方法等算法,支持编码、GUI、多智能体等任务。

核心能力

  • 联合优化策略、奖励模型与环境形成闭环 RL
  • 用结果与逐步信号共同训练策略
  • 通过一致性反馈联合优化奖励模型
  • 提供 DemyAgent 的 SFT 与 Agentic RL 训练代码
  • AutoTool 用 KL 正则 Plackett–Luce 排序精炼工具选择

容易踩的坑

训练前需自行从 Hugging Face 下载 SFT/RL 数据集与 Qwen 基座模型并配置脚本中的绝对路径;DemyAgent 与 RLAnything 的 Python 版本和依赖安装方式不同,需分别建环境;AutoTool 完整 200K 训练数据与工具集尚未发布,目前只提供示例数据格式

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    RLAnything (ICML 2026) & AutoTool (ICML 2026), DemyAgent: Open-Source RL for LLMs and Agentic Scenarios

    In this work, we propose RLAnything, a reinforcement learning framework that dynamically optimizes each component through closed-loop optimization, amplifying learning signals and strengthening the overall system:

    • The policy is trained with integrated feedback from outcome and step-wise signals from reward model, better than using outcome only.
    • Reward model is jointly optimized via consistency feedback, which in turn further improves policy training.
    • Our theory-motivated automatic environment adaptation improves training for both the reward and policy models by leveraging critic feedback from each, enabling learning from experience.
    • Through extensive experiments, we demonstrate each added component consistently improves the overall system.
    • We show that step-wise signals from optimized reward-model outperform outcome signals that rely on human labels.

    In this work, we systematically investigate three dimensions of agentic RL: data, algorithms, and reasoning modes. Our findings reveal:

    • Real end-to-end trajectories and high-diversity datasets significantly outperform synthetic alternatives;
    • Exploration-friendly techniques like reward clipping and entropy maintenance boost training efficiency;
    • Deliberative reasoning with selective tool calls surpasses frequent invocation or verbose self-reasoning.

    We also contribute high-quality SFT and RL datasets, demonstrating that simple recipes enable even 4B models to outperform 32B models on challenging benchmarks including AIME2024/2025, GPQA-Diamond, and LiveCodeBench-v6.

    In this work, we move beyond the fixed-toolset assumption in agentic RL and train LLM agents with dynamic tool-selection capabilities over large, evolving toolsets:

    • We construct a 200K tool-use trajectory dataset with explicit tool-selection rationales, covering 1,346 tools and 120 task types across math, science, search QA, code generation, and multimodal reasoning;
    • AutoTool employs a dual-phase optimization pipeline: Phase I stabilizes tool-integrated reasoning trajectories with SFT and RL, and Phase II refines multi-step tool selection with a KL-regularized Plackett–Luce ranking objective;
    • Trained on only 460 seen tools, AutoTool generalizes to a full 1,346-tool library (including 886 unseen tools) at inference time, and consistently outperforms advanced LLM agents and tool-integration methods across ten benchmarks, with average gains of +6.4% (math & science), +4.5% (search QA), +7.7% (code), and +6.9% (multimodal).

    See autotool/ for the full training framework and instructions.

    RLAnythingDemyAgentAutoTool
    FocusClosed-loop RL optimizationAgentic reasoningDynamic tool selection
    Core IdeaJoint optimization of policy, reward model & environmentReal trajectories + exploration-friendly techniques + deliberative reasoningTool-selection rationales + PL-ranking refinement over evolving toolsets
    ReleaseLLM/GUI/Coding Policy & Reward Model3K SFT + 30K RL Data, SOTA-level DemyAgent-4BDual-phase training code, 200K tool-use data (coming soon)

    🚩 New Updates

    • [2026.5] 🎉 AutoTool is accepted by ICML 2026! We open-source our work AutoTool under autotool/, including:

      • Dual-phase training code: Phase-I trajectory stabilization (SFT + RL) and Phase-II tool-selection refinement with KL-regularized Plackett–Luce ranking
      • Example data format of our 200K tool-selection trajectory dataset (1,346 tools, 120 task types) — full training data and toolset release coming soon
    • [2026.5] 🎉 RLAnything is accepted by ICML 2026! Check out our paper, models, and blog.

    • [2026.2] 🦞 We release OpenClaw-RL, a new fully asynchronous RL framework built on top of Open-AgentRL, targeting personalized agentic AI trained from live conversation feedback. OpenClaw-RL introduces:

      • Binary RL (GRPO): PRM-based scalar reward from next-state feedback for policy optimization
      • On-Policy Distillation (OPD): Token-level directional learning from hindsight hints — richer than any scalar signal
      • Zero API keys & fully self-hosted: conversation data never leaves your infrastructure
    • [2026.2] We fully open-source our work RLAnything, including:

      • Training code across GUI Agent, LLM Agent, and Coding LLM settings.
      • Model checkpoints: both the policy models (RLAnything-7B/8B) and reward models (RLAnything-Reward-8B/14B) across these settings.
      • Evaluation Scripts for our models
    • [2025.10] We fully open-source our work DemyAgent, including:

      • Training code for both SFT and RL stages
      • High-quality SFT dataset (3K samples) and RL dataset (30K samples)
      • Model checkpoints: SFT models (Qwen2.5-7B-RA-SFT, Qwen3-4B-RA-SFT) and RL-trained model (DemyAgent-4B)
      • Evaluation Scripts for our models

    🧭 Navigation

    🚀 Get Started

    DemyAgent

    git clone https://github.com/Gen-Verse/Open-AgentRL.git
    conda create -n OpenAgentRL python=3.11 
    conda activate OpenAgentRL
    cd Open-AgentRL
    bash scripts/install_vllm_sglang_mcore.sh
    pip install -e .[vllm]
    

    RLAnything

    conda create --name rlanything python=3.10
    source activate rlanything
    pip install -r requirements_rlanything.txt
    

    🔧 DemyAgent Training

    Cold-Start SFT

    Before you start SFT, make sure you have downloaded the 3K Agentic SFT Data and the corresponding base models like Qwen2.5-7B-Instruct and Qwen3-4B-Instruct-2507. Configure qwen3_4b_sft.sh and qwen2_7b_sft.sh, and set the absolute paths to your model and the .parquet data files.

    After all configurations are set, simply run the code below to finetune Qwen3-4B-Instruct-2507:

    bash recipe/demystify/qwen3_4b_sft.sh
    

    After obtaining the SFT models, utilize the following command to merge the model:

    python3 -m verl.model_merger merge --backend fsdp --local_dir xxx/global_step_465 --target_dir xxx/global_step_465/huggingface
    

    Agentic RL

    After obtaining the SFT models (you can also directly use our provided checkpoints Qwen2.5-7B-RA-SFT and Qwen3-4B-RA-SFT), you can start Agentic RL with our GRPO-TCR recipe.

    First, download our 30K Agentic RL Data and the evaluation datasets.

    Then, configure the SandboxFusion environment for code execution.

    There are two ways to create a sandbox:

    1. Local Deployment: Deploy SandboxFusion locally by referring to the SandboxFusion deployment documentation
    2. Cloud Service: Use Volcano Engine Cloud FaaS service by referring to Volcano Engine Code Sandbox

    Using either method, obtain an API endpoint (something like https://<ip-address-or-domain-name>/run_code), and configure it in recipe/demystify/sandbox_fusion_tool_config.yaml and the function check_correctness inverl/utils/reward_score/livecodebench/code_math.py.

    Next, configure the Agentic RL scripts grpo_tcr_qwen2_7b.sh and grpo_tcr_qwen3_4b.sh:

    • open_agent_rl: Path to the .parquet file of the agentic RL dataset
    • model_path: Path to the SFT models
    • aime2024/aime2025: Benchmark datasets evaluated every 10 training steps. Set the absolute paths to the .parquet files of the benchmarks. You can also add more benchmarks like GPQA-Diamond in test_files
    • default_local_dir: Directory to save your RL checkpoints

    Training Resources: We conducted our training on one $8\times \text{Tesla-A100}$ node with a batch size of 64.

    After finishing the configurations, run the code below to conduct Agentic RL with the GRPO-TCR recipe:

    bash recipe/demystify/grpo_tcr_qwen3_4b.sh
    

    You can observe the training dynamics and evaluation results in Weights & Biases (wandb).

    🔧 RLAnything Training

    Computer Control (OSWorld)

    Our reinforcement learning and evaluation pipeline for OSWorld is built on a pool of virtual machines running in parallel on cloud instances. Specifically, we use Volcengine Cloud in our experiments. Before training, you need to set up the security group and VM image on Volcengine following these instructions.

    Before training, you need set osworld_rl.yaml in configs. The detailed instructions are within it. To start the RLAnything training, simply

    python osworld_rl.py config=configs/osworld_rl.yaml
    # you need to set num_node in osworld_rl.yaml to 1 if you only use one node.
    

    In our experiments, we train with multiple nodes:

    if [[ ${MLP_ROLE_INDEX:-0} -eq 0 ]]; then   
        python osworld_rl.py config=configs/osworld_rl.yaml
    else
        exec tail -f /dev/null
    fi
    # directly submit this to head machine
    

    Text-based Game (AlfWorld)

    To conduct reinforcement learning or evaluation on AlfWorld, you need to first download the AlfWorld data with the following commands (after you have pip installed the rlanything environment)

    alfworld-download
    

    Then you will have a directory that contains at least detectors, json_2.1.1, and logic. This will be the directory to save AlfWorld environment files. Our adapted environment files will be generated under alfworld_file_path/json_2.1.1/alfworld_rl/syn_train. syn_train saves accepted environment files, while temp_train saves generated files which to be validated (not accept yet).

    Before training, you need set alfworld_rl.yaml in configs. The detailed instructions are within it. To start the RLAnything training, simply

    python alfworld_rl.py config=configs/alfworld_rl.yaml
    # you need to set num_node in alfworld_rl.yaml to 1 if you only use one node.
    

    In our experiments, we train with multiple nodes:

    if [[ ${MLP_ROLE_INDEX:-0} -eq 0 ]]; then   
        python alfworld_rl.py config=configs/alfworld_rl.yaml
    else
        exec tail -f /dev/null
    fi
    # directly submit this to head machine
    

    Coding

    You need to first download the training and evaluation dataset. Simply open ./data and follow the instructions to do so. Then you can start the training with

    python coding_rl.py config=configs/coding_rl.yaml
    # you need to set num_node in coding_rl.yaml to 1 if you only use one node.
    

    In our experiments, we train on 4 nodes

    if [[ ${MLP_ROLE_INDEX:-0} -eq 0 ]]; then   
        python coding_rl.py config=configs/coding_rl.yaml
    else
        exec tail -f /dev/null
    fi
    

    📊 DemyAgent Evaluation

    If you have already trained a model, you can refer to the following process for agentic reasoning capability evaluation. Alternatively, you can download our checkpoint from 🤗 DemyAgent-4B for direct testing.

    AIME2024/2025 and GPQA-Diamond

    Configure the scripts eval_qwen2_7b_aime_gpqa.sh and eval_qwen3_4b_aime_gpqa.sh. The configuration process is similar to the training setup—set the paths to your models and .parquet files of the benchmarks.

    Simply run the code below to evaluate performance on AIME2024/2025 and GPQA-Diamond:

    bash recipe/demystify/eval/eval_qwen3_4b_aime_gpqa.sh
    

    You can observe the average@32/pass@32/maj@32 metrics from your wandb project.

    LiveCodeBench-v6

    First, run inference for the benchmark:

    bash recipe/demystify/eval/eval_qwen3_4b_livecodebench.sh
    

    Specifically, we save the validation rollout paths in VAL_SAVE_PATH. After obtaining the validation rollouts, refer to the official evaluation process for local results in LiveCodeBench.

    📊 RLAnything Evaluation

    Computer Control (OSWorld)

    To eval the model on OSWorld, use

    python osworld_eval.py config=configs/osworld_eval.yaml
    

    You can also evaluate with multi-nodes to accelerate.

    if [[ ${MLP_ROLE_INDEX:-0} -eq 0 ]]; then   
        python osworld_eval.py config=configs/osworld_eval.yaml
    else
        exec tail -f /dev/null
    fi
    

    Text-based Game (AlfWorld)

    To eval the model on AlfWorld, use

    python alfworld_eval.py config=configs/alfworld_eval.yaml
    

    Coding

    For evaluation, simply

    python coding_eval.py config=configs/coding_eval.yaml
    

    📈 DemyAgent Results

    We provide the evaluation results of the agentic reasoning abilities of our models on challenging benchmarks including AIME2024/AIME2025, GPQA-Diamond, and LiveCodeBench-v6.

    MATHScienceCode
    MethodAIME2024AIME2025GPQA-DiamondLiveCodeBench-v6
    Self-Contained Reasoning
    Qwen2.5-7B-Instruct16.710.031.315.2
    Qwen3-4B-Instruct-250763.347.452.035.1
    Qwen2.5-72B-Instruct18.915.049.0-
    DeepSeek-V339.228.859.116.1
    DeepSeek-R1-Distill-32B70.046.759.6-
    DeepSeek-R1-Zero (671B)71.053.559.6-
    Agentic Reasoning
    Qwen2.5-7B-Instruct4.85.625.512.2
    Qwen3-4B-Instruct-250717.916.344.323.0
    ToRL-7B43.330.0--
    ReTool-32B72.554.3--
    Tool-Star-3B20.016.7--
    ARPO-7B30.030.053.018.3
    rStar2-Agent-14B80.669.860.9-
    DemyAgent-4B (Ours)72.670.058.526.8

    As demonstrated in the table above, despite having only 4B parameters, DemyAgent-4B matches or even outperforms much larger models (14B/32B) across challenging benchmarks. Notably, DemyAgent-4B achieves state-of-the-art agentic reasoning performance, surpassing ReTool-32B and rStar2-Agent-14B, and even outperforming long-CoT models like DeepSeek-R1-Zero on AIME2025, which further validates the insights of our research.

    📈 RLAnything Results

    In the following table, we demonstrate the effectiveness of the RLAnything framework. Each added dynamic component contributes to improvements in the overall system.

    We further scale the optimization for GUI agent and achieves SoTA results:

    📝 Citation

    @article{yu2025demystify,
      title={Demystifying Reinforcement Learning in Agentic Reasoning},
      author={Yu, Zhaochen and Yang, Ling and Zou, Jiaru and Yan, Shuicheng and Wang, Mengdi},
      journal={arXiv preprint arXiv:2510.11701},
      year={2025}
    }
    
    @article{wang2026rlanything,
      title={RLAnything: Forge Environment, Policy, and Reward Model in Completely Dynamic RL System},
      author={Wang, Yinjie and Xie, Tianbao and Shen, Ke and Wang, Mengdi and Yang, Ling},
      journal={Forty-third International Conference on Machine Learning},
      year={2026}
    }
    
    @inproceedings{zou2026autotool,
      title={AutoTool: Dynamic Tool Selection and Integration for Agentic Reasoning},
      author={Jiaru Zou and Ling Yang and Yunzhe Qi and Sirui Chen and Mengting Ai and Ke Shen and Jingrui He and Mengdi Wang},
      booktitle={Forty-third International Conference on Machine Learning},
      year={2026}
    }
    

    🙏 Acknowledgements

    This work aims to explore more efficient paradigms for Agentic RL. Our implementation builds upon the excellent codebases of VeRL and ReTool. We sincerely thank these projects for their valuable insights and high-quality implementations, which have greatly facilitated our research.