openclaw-rl-training▌
aradotso/trending-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Skill by ara.so — Daily 2026 Skills collection.
OpenClaw-RL Training
Skill by ara.so — Daily 2026 Skills collection.
OpenClaw-RL is a fully asynchronous reinforcement learning framework that converts live multi-turn conversations into training signals for personalized AI agents. It wraps a self-hosted model as an OpenAI-compatible API via OpenClaw, intercepts conversations, and continuously optimizes the policy in the background without interrupting usage. It also supports scalable RL for terminal, GUI, SWE, and tool-call agents.
Architecture Overview
Four independent async loops that never block each other:
- Agent Serving — OpenClaw-compatible API serving rollouts
- Rollout Collection — Captures multi-turn conversations as training trajectories
- PRM/Judge Evaluation — Scores turns using next-state feedback (majority voting optional)
- Policy Training — GRPO/OPD/Combine training via slime or Tinker
Installation
git clone https://github.com/Gen-Verse/OpenClaw-RL
cd OpenClaw-RL
# Install core dependencies
pip install -r requirements.txt
# Install slime (training backend)
cd slime && pip install -e . && cd ..
# Optional: install SGLang for fast inference
pip install sglang
Project Structure
OpenClaw-RL/
├── openclaw-rl/ # Binary RL (GRPO) method
├── openclaw-opd/ # On-Policy Distillation method
├── openclaw-combine/ # Combined Binary RL + OPD
├── openclaw-test/ # Evaluation utilities
├── terminal-rl/ # Track 2: Terminal agent RL
├── gui-rl/ # Track 2: GUI agent RL
├── swe-rl/ # Track 2: SWE agent RL
├── toolcall-rl/ # Track 2: Tool-call agent RL
├── slime/ # Core training framework
└── openclaw/ # Runtime / API server
Three Learning Paradigms
1. Binary RL (GRPO)
A Process Reward Model scores each turn from next-state feedback. Uses GRPO advantage estimation with PPO-style clipped surrogate loss.
2. On-Policy Distillation (OPD)
When next state reveals useful hindsight, a judge extracts a textual hint to augment the prompt, creating an enhanced teacher. Token-level log-probability gap becomes a directional advantage signal.
3. Combination Method (Recommended)
Merges Binary RL scalar supervision with OPD token-level directional signal. Strongest and most robust optimization.
Quick Start — Personal Agent (Track 1)
Binary RL Launch Script
# openclaw-rl/run_qwen3_7b_openclaw_rl.sh
export MODEL_PATH=/path/to/qwen3-7b
export DATA_PATH=/path/to/conversation/data
export CKPT_SAVE_DIR=/path/to/checkpoints
bash openclaw-rl/run_qwen3_7b_openclaw_rl.sh
OPD Launch Script
export MODEL_PATH=/path/to/qwen3-7b
export JUDGE_MODEL_PATH=/path/to/judge-model
export DATA_PATH=/path/to/conversation/data
bash openclaw-opd/run_qwen3_7b_openclaw_opd.sh
Combination Method (One Line)
# Launch with combined Binary RL + OPD
bash openclaw-combine/run_qwen3_7b_openclaw_combine.sh
Configuration — Key Environment Variables
# Model configuration
export MODEL_PATH=/path/to/base/model
export JUDGE_MODEL_PATH=/path/to/judge/model # For OPD
export PRM_MODEL_PATH=/path/to/prm/model # For Binary RL
# Training configuration
export CKPT_SAVE_DIR=./checkpoints
export CKPT_ARGS="--save-interval 100 --save-dir $CKPT_SAVE_DIR"
# Rollout configuration
export ROLLOUT_ARGS="--rollout-batch-size 64 --num-rollouts-per-prompt 4"
# Optimizer configuration
export OPTIMIZER_ARGS="--lr 1e-6 --weight-decay 0.01 --adam-beta1 0.9 --adam-beta2 0.999"
# GPU partitioning (e.g., 8 GPUs: 4 for training, 4 for rollout)
export TRAIN_GPUS="0,1,2,3"
export ROLLOUT_GPUS="4,5,6,7"
# LoRA (optional, reduces GPU memory)
export LORA_ARGS="--lora-rank 64 --lora-alpha 128 --lora-dropout 0.05"
LoRA Training
# Add LoRA args to any launch script
export LORA_ARGS="--use-lora --lora-rank 64 --lora-alpha 128"
# Example: LoRA Binary RL
bash openclaw-rl/run_qwen3_7b_lora_openclaw_rl.sh
Custom Loss / Rollout Functions (Plugin API)
The slime framework exposes extension points without modifying core code:
# Custom loss function
--custom-loss-function-path ./my_method/custom_loss.py
# Custom rollout function
--rollout-function-path ./my_method/custom_rollout.py
# Custom generation function
--custom-generate-function-path ./my_method/custom_generate.py
# Custom reward model
--custom-rm-path ./my_method/custom_rm.py
Example Custom Loss (TypeScript-style config, Python implementation)
# my_method/custom_loss.py
import torch
from typing import Dict, Any
def compute_loss(
policy_logits: torch.Tensor,
reference_logits: torch.Tensor,
rewards: torch.Tensor,
advantages: torch.Tensor,
config: Dict[str, Any]
) -> torch.Tensor:
"""
Custom GRPO-style loss with clipped surrogate objective.
"""
# Log-ratio between policy and reference
log_ratio = policy_logits - reference_logits
ratio = torch.exp(log_ratio)
clip_range = config.get("clip_range", 0.2)
# PPO-style clipped objective
clipped = torch.clamp(ratio, 1 - clip_range, 1 + clip_range)
loss = -torch.min(ratio * advantages, clipped * advantages).mean()
# KL penalty
kl_coeff = config.get("kl_coeff", 0.01)
kl_penalty = kl_coeff * log_ratio.mean()
return loss + kl_penalty
Example Custom Reward Model
# my_method/custom_rm.py
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
class CustomPRM:
def __init__(self, model_path: str):
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
self.model = AutoModelForSequenceClassification.from_pretrained(
model_path, torch_dtype=torch.bfloat16
)
self.model.eval()
def score(self, prompt: str, response: str, next_state: str) -> float:
"""
Score a turn given prompt, response, and next-state feedback.
"""
combined = f"Prompt: {prompt}\nResponse: {response}\nOutcome: {next_state}"
inputs = self.tokenizer(combined, return_tensors="pt", truncation=True, max_length=2048)
with torch.no_grad():
logits = self.model(**inputs).logits
# Binary reward: positive class probability
return torch.softmax(logits, dim=-1)[0, 1].item()
def get_reward_model(config):
return CustomPRM(config["prm_model_path"])
Deploying on Tinker (Cloud)
# One-line cloud deployment — Hybrid RL, OPD, Binary RL all supported
export TINKER_API_KEY=$TINKER_API_KEY
exportHow to use openclaw-rl-training on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add openclaw-rl-training
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches openclaw-rl-training from GitHub repository aradotso/trending-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate openclaw-rl-training. Access the skill through slash commands (e.g., /openclaw-rl-training) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★73 reviews- ★★★★★Dev Torres· Dec 28, 2024
openclaw-rl-training reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Kwame Srinivasan· Dec 20, 2024
We added openclaw-rl-training from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Olivia Chen· Dec 20, 2024
openclaw-rl-training reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Naina Tandon· Dec 20, 2024
openclaw-rl-training is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Diya Bansal· Dec 20, 2024
Keeps context tight: openclaw-rl-training is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Mia Mensah· Dec 12, 2024
openclaw-rl-training fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kwame Thomas· Dec 8, 2024
Registry listing for openclaw-rl-training matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Ava Liu· Dec 8, 2024
openclaw-rl-training fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Pratham Ware· Dec 4, 2024
Useful defaults in openclaw-rl-training — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Soo Desai· Nov 27, 2024
openclaw-rl-training is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 73