dobachi

Ralph Lab — AI skill for Claude Code

AI community

Gate-neutral Ralph loop driver in Python.

How to install Ralph Lab

This entry records only its repository, not the path inside it, so there is no exact command to give. Open dobachi/ralph-lab and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ralph Lab does

Gate-neutral Ralph loop driver in Python. Wraps agent CLIs (claude/codex/gemini) in a subprocess loop until a user-supplied gate script exits 0. Multi-agent, multi-model, JSONL observability. Successor to agent-loop-lab.

Alternatives in AI

  • Omniget — Udemy & Hotmart course downloader, YouTube downloader (yt-dlp GUI, 1,800+ sites) + desktop app for AI agents 13.9k ★
  • Ralph For Claude Code — by Frank Bria - An autonomous AI development framework that enables Claude Code to work iteratively on project 8k ★
  • Proxypal — A desktop app that lets you use your AI subscriptions (Claude, ChatGPT, Gemini, GitHub Copilot) with any codin 1.2k ★

README

ralph-lab

Gate-neutral **Ralph loop** driver in Python. Wraps agent CLIs (claude / codex / gemini / opencode) in a subprocess loop, runs them until a **user-supplied gate script** exits 0, and records everything as JSONL.

**Successor to [agent-loop-lab](https://github.com/dobachi/agent-loop-lab)** (archived). Full rewrite; see [Prior art](#prior-art) for the history.

Design principles

  • Ralph faithful. Each iteration starts with a fresh subprocess. No shared context across iterations — context accumulation degrades quality past 100k-150k tokens (Ralph pattern, 2025).
  • Gate-neutral. Any bash script that returns exit 0 / non-zero works. loop-goal, pytest, cargo test, eslint, grep -q "…" — all first class. ralph-lab doesn't care what the gate does; it just reads stdout as feedback and exit code as verdict.
  • Multi-agent CLI. Switch between claude, codex, gemini, opencode without changing the loop.
  • Multi-model. Run the same goal across N models to compare (--models m1,m2,m3), each in its own workspace, results in one JSONL for easy diffing.
  • Observability. Every iteration records subprocess exit, duration, gate result, and stdout/stderr sizes. Iteration-level metric only (turn/tool-call metric is inside the agent CLI subprocess and not exposed).

What ralph-lab does NOT do

  • No custom LLM SDK. openai-agents-python, anthropic-sdk, etc. belong to the agent CLI, not to ralph-lab. If you want to change which SDK is used, use a different agent CLI or add flags via agent_flags in the spec.
  • No built-in gate. Bring your own. goals/examples/ shows several patterns.
  • No multi-agent coordination. One agent CLI per run. For multi-agent workflows, orchestrate ralph-lab runs from outside.

Prior art

Based on: