HyperAIHyperAI

Command Palette

Search for a command to run...

OpenClaw-RL: تدريب أي Agent ببساطة من خلال المحادثة

Yinjie Wang Xuyang Chen Xiaolong Jin Mengdi Wang Ling Yang

الملخص

تولّد كل تفاعل بين الوكلاء إشارة حالة تالية، وهي عبارة عن ردّ المستخدم، أو مخرجات الأداة، أو تغيير في حالة الطرفية (Terminal) أو واجهة المستخدم الرسومية (GUI) يلي كل إجراء. غير أن أنظمة التعزيز التعلمي (RL) القائمة للوكلاء الحواريّة (Agentic) لا تستعيد هذه الإشارات كمصدر للتعلم المباشر (Live) أو عبر الإنترنت (Online). نقدّم في هذا العمل إطار عمل OpenClaw-RL، مبنيّ على ملاحظة بسيطة: إن إشارات الحالة التالية ظاهرة عالمية، ويمكن للسياسة (Policy) أن تتعلّم منها جميعها في آن واحد. فالحادثات الشخصية، وتنفيذات الطرفية، وتفاعلات واجهة المستخدم الرسومية، ومهام هندسة البرمجيات (SWE)، ومسارات استدعاء الأدوات لا تشكّل مشاكل تدريب منفصلة؛ بل هي جميعها تفاعلات يمكن استخدامها لتدريب نفس السياسة ضمن نفس الحلقة التدريبية.تشفّر إشارات الحالة التالية نوعين من المعلومات: إشارات تقييمية (Evaluative Signals) تدلّ على مدى نجاح الإجراء، ويتم استخلاصها كمكافآت قياسية (Scalar Rewards) عبر حكم نموذج تقييم العملية (PRM Judge)؛ وإشارات توجيهية (Directive Signals) تشير إلى الكيفية التي كان ينبغي أن يختلف بها الإجراء، ويتم استعادتها من خلال عملية التمايز الموجه بالنتائج اللاحقة (Hindsight-Guided On-Policy Distillation، OPD). نستخلص من الحالة التالية تلميحات نصية، وننشئ سياقاً معززاً للمعلّم، ونوفّر إشرافاً اتجاهياً على مستوى الرمز (Token-level) يقدم مزايا أكثر ثراءً من أي مكافأة قياسية.وبفضل التصميم غير المتزامن (Asynchronous Design)، يقدّم النموذج طلبات مباشرة، ويحكم نموذج تقييم العملية (PRM) التفاعلات الجارية، في حين يقوم المدرب بتحديث السياسة في الوقت ذاته، دون أي عبء تنسيق بينها. وعند تطبيقه على الوكلاء الشخصيين، يمكّن إطار OpenClaw-RL الوكيل من التحسّن بمجرد استخدامه، وذلك باستعادة إشارات حوارية من إعادة استفسارات المستخدم، وتصويباته، وتغذيته الراجعة الصريحة. أما عند تطبيقه على الوكلاء العامّين، فإن نفس البنية التحتية تدعم التعزيز التعلمي القابل للتوسع عبر بيئات الطرفية، وواجهات المستخدم الرسومية، ومهام هندسة البرمجيات، واستدعاءات الأدوات؛ حيث نبيّن أيضاً فائدة مكافآت العملية (Process Rewards).الكود: https://github.com/Gen-Verse/OpenClaw-RL

One-sentence Summary

The authors from OpenClaw propose OpenClaw-RL, a unified framework that transforms universal next-state signals into live online learning sources via binary reinforcement learning and Hindsight-Guided On-Policy Distillation. This approach enables continuous policy improvement for both personal and general agents across diverse scenarios like terminal, GUI, and software engineering tasks without interrupting service.

Key Contributions

  • OpenClaw-RL addresses the problem of discarded next-state signals in AI agents by treating user replies, tool results, and error traces as implicit, free-form evaluations rather than mere context for future actions.
  • The framework introduces a unified asynchronous architecture that recovers both scalar process rewards via a PRM judge and token-level directional supervision through Hindsight-Guided On-Policy Distillation (OPD) from live interaction data.
  • Experiments demonstrate that combining these methods significantly improves performance for personal agents in conversational settings and general agents across terminal, GUI, SWE, and tool-call environments by providing dense credit assignment for long-horizon tasks.

Introduction

Deployed AI agents continuously generate valuable next-state signals, such as user replies or test results, yet current systems discard this data by treating it only as context for future actions rather than a source of live learning. Existing reinforcement learning approaches typically rely on offline batch data, scalar outcome rewards that lack step-level granularity, or pre-curated feedback pairs, which prevents continuous optimization during real-world deployment. The authors introduce OpenClaw-RL, a unified asynchronous infrastructure that recovers these implicit signals to enable online training for both personal and general agents. Their framework leverages Process Reward Models to extract dense step-wise rewards from live interactions and employs Hindsight-Guided On-Policy Distillation to convert textual error traces into directional token-level supervision without requiring external annotators.

Dataset

  • Dataset Composition and Sources: The authors curate a multi-scenario dataset to support terminal, GUI, software engineering (SWE), and tool-call agents by combining four distinct sources: SETA RL data, OSWorld-Verified, SWE-Bench-Verified, and DAPO RL data.

  • Key Details for Each Subset:

    • Terminal Agents: Trained on SETA RL data to leverage efficient text-based interfaces.
    • GUI Agents: Trained on OSWorld-Verified data to handle visual interfaces and pointer interactions, with evaluation restricted to the training set after excluding Chrome and multi-app tasks.
    • SWE Agents: Trained on SWE-Bench-Verified data to utilize rich executable feedback like tests and diffs.
    • Tool-Call Agents: Trained on DAPO RL data to enhance reasoning and factual accuracy, with evaluation performed on the AIME 2024 mathematics competition dataset.
  • Model Usage and Training Strategy: The authors apply specific model configurations to each subset, using Qwen3-8B for terminal tasks, Qwen3VL-8B-Thinking for GUI tasks, Qwen3-32B for SWE tasks, and Qwen3-4B-SFT for tool-call tasks. Performance for terminal and SWE agents is measured by averaging rollout-task accuracy over a window of reinforcement learning steps.

  • Processing and Metadata Construction: For GUI agent evaluation, the authors construct a strict step-level feedback prompt that combines text instructions, historical actions, and base64-encoded images of the environment state before and after an action. This prompt instructs the evaluator to assign a binary score of +1 or -1 based on whether the action is relevant, executable, and results in concrete progress toward the objective.

Method

The OpenClaw-RL framework is built on the observation that next-state signals, such as user replies or tool outputs, encode both evaluative and directive information about an agent's actions. The system unifies the training of personal and general agents through a fully asynchronous pipeline that decouples policy serving, environment hosting, reward judging, and policy training. Refer to the framework diagram for the overall architecture. The infrastructure connects Personal Agents and General Agents to Environment Servers, which handle confidential API keys and large-scale environments respectively. These servers feed data into an RL Server comprising a Training Engine (Megatron), a Policy Server (SGLang), and a PRM Server. This decoupled design ensures that the model can serve live requests while the PRM judges interactions and the trainer updates weights without blocking dependencies.

The learning process leverages next-state signals through two complementary methods. As shown in the figure below, the framework supports Binary RL for evaluative signals and On-policy Distillation for directive signals. In the Binary RL approach, a PRM judge evaluates the quality of an action ata_tat given the next state st+1s_{t+1}st+1, producing a scalar reward r{+1,1,0}r \in \{+1, -1, 0\}r{+1,1,0}. This reward serves as the advantage AtA_tAt in a standard PPO-style clipped surrogate objective.

For more granular improvement, Hindsight-Guided On-Policy Distillation (OPD) extracts textual hints from the next state to construct an enhanced teacher context. The advantage is calculated as the per-token log-probability gap between the teacher model, which conditions on the hint, and the student model: At=logπteacher(atsenhanced)logπθ(atst)A_t = \log \pi_{\text{teacher}} (a_t \mid s_{\text{enhanced}}) - \log \pi_{\theta} (a_t \mid s_t)At=logπteacher(atsenhanced)logπθ(atst) This provides directional guidance at the token level, indicating which tokens should be upweighted or downweighted. For general agents, the system further integrates step-wise rewards with outcome rewards, utilizing step-wise standardization to handle long-horizon trajectories. The authors combine both methods by weighting their respective advantages, allowing the policy to benefit from broad coverage via scalar rewards and high-resolution corrections via distillation.

Experiment

  • The personal agent track validates that conversational next-state signals enable continuous personalization, with a combined optimization method outperforming binary reinforcement learning and on-policy distillation to help agents adopt natural writing styles and provide friendlier feedback after minimal interactions.
  • The general agent track demonstrates that the unified infrastructure supports scalable reinforcement learning across terminal, GUI, software engineering, and tool-call scenarios through large-scale environment parallelization.
  • Experiments confirm that integrating process reward models with outcome rewards yields stronger optimization for long-horizon tasks compared to outcome-only approaches, despite the additional resource requirements.

بناء الذكاء الاصطناعي بالذكاء الاصطناعي

من الفكرة إلى الإطلاق — سرّع تطوير الذكاء الاصطناعي الخاص بك مع المساعدة البرمجية المجانية بالذكاء الاصطناعي، وبيئة جاهزة للاستخدام، وأفضل أسعار لوحدات معالجة الرسومات.

البرمجة التعاونية باستخدام الذكاء الاصطناعي
وحدات GPU جاهزة للعمل
أفضل الأسعار

HyperAI Newsletters

اشترك في آخر تحديثاتنا
سنرسل لك أحدث التحديثات الأسبوعية إلى بريدك الإلكتروني في الساعة التاسعة من صباح كل يوم اثنين
مدعوم بواسطة MailChimp