The "Ralph" technique reframes AI agents as systems to design
A webinar clip from OpenHands explains "Ralph" — a viral agentic coding technique built around running an AI agent in a loop on the same "do-the-next-thing" prompt, then improving the system based on observed failures rather than intervening in individual runs.
Score breakdown
Developers building agentic coding pipelines can adopt the Ralph technique immediately using the OpenHands CLI to run autonomous, looped agents — shifting their role from prompt-tweaker to system designer who iterates on process rather than individual runs.
- 01Ralph was created by Jeffrey Huntley and is described by him as a technique, not a prompt, plugin, or skill.
- 02In its purest form, Ralph is a bash `while true` loop that runs an agent on the same general-purpose 'do-the-next-thing' prompt every iteration.
- 03The prompt file used in each loop iteration is called `RALPH.md`, and practitioners write their own version of it.
OpenHands published a webinar clip explaining the "Ralph" phenomenon — a technique created by Jeffrey Huntley that spread virally after early demos showed an agent autonomously building a compiler for a joke programming language called "cursed." The clip notes that various practitioners have claimed significant shipping velocity using Ralph, and draws a parallel to high-profile demos like Cursor's and Anthropic's large-scale coding projects, discussed further in an OpenHands blog post titled "Velocity Is Dead."
For OpenHands specifically, the CLI flags `-headless`, `-f` (to point at the same prompt file each run), and `-json` (for raw log output) are highlighted as the practical starting point.
The presenter is emphatic that Ralph is not a prompt, plugin, or skill — it is a technique. In its purest form, Ralph is a `while true` bash loop that runs an agent in headless, auto-approval mode on the same general-purpose "do-the-next-thing" prompt (stored in a file called `RALPH.md`) repeatedly until a task is complete. For OpenHands specifically, the CLI flags `-headless`, `-f` (to point at the same prompt file each run), and `-json` (for raw log output) are highlighted as the practical starting point. The presenter also recommends replacing the infinite loop with a bounded iteration count for budget safety.
As practitioners advance, the webinar describes graduating from a raw bash loop to a custom Python orchestration script — referred to as `ralphands.py` — that can accept parameters like iteration count and other project-specific configuration. The central philosophical shift Ralph introduces is that the developer's job is not to guide the agent through a task, but to design the system the agent operates within: inspecting failure modes after runs and updating the process systemically rather than intervening in real time.
Key facts
- 01Ralph was created by Jeffrey Huntley and is described by him as a technique, not a prompt, plugin, or skill.
- 02In its purest form, Ralph is a bash `while true` loop that runs an agent on the same general-purpose 'do-the-next-thing' prompt every iteration.
- 03The prompt file used in each loop iteration is called `RALPH.md`, and practitioners write their own version of it.
- 04For OpenHands, recommended CLI flags include `-headless` (non-interactive/auto-approval mode), `-f` (to specify the prompt file), and `-json` (for raw log output).
- 05The presenter recommends replacing the infinite loop with a bounded iteration count to control costs.