<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chris Mungall</title>
    <description>The latest articles on DEV Community by Chris Mungall (@cmungall).</description>
    <link>https://dev.to/cmungall</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1086779%2F98cdefff-1115-44a9-8a07-e4198b30322a.png</url>
      <title>DEV Community: Chris Mungall</title>
      <link>https://dev.to/cmungall</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cmungall"/>
    <language>en</language>
    <item>
      <title>Ralph Wiggum Tries His Hand at Deep Research</title>
      <dc:creator>Chris Mungall</dc:creator>
      <pubDate>Mon, 12 Jan 2026 01:58:46 +0000</pubDate>
      <link>https://dev.to/cmungall/ralph-wiggum-tries-his-hand-at-deep-research-2mdf</link>
      <guid>https://dev.to/cmungall/ralph-wiggum-tries-his-hand-at-deep-research-2mdf</guid>
      <description>&lt;p&gt;&lt;em&gt;Autonomous AI loops, iterative research, and watching your agent do research&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feoo1arv4owlo2cman7bz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feoo1arv4owlo2cman7bz.jpg" alt="Ralph Wiggum in the Library" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've been anywhere near the Claude Code discourse lately, you've probably encountered the "Ralph Wiggum loop"—a technique that went viral in late 2025 and has since been canonized as an &lt;a href="https://github.com/anthropics/claude-code/tree/main/plugins/ralph-wiggum" rel="noopener noreferrer"&gt;official Claude Code plugin&lt;/a&gt;. The idea is simple. As &lt;a href="https://ghuntley.com/ralph/" rel="noopener noreferrer"&gt;Geoffrey Huntley&lt;/a&gt; puts it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Ralph is a Bash loop."&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; :&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;PROMPT.md | claude-code &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Feed Claude a prompt. Let it work. When it exits, feed it the same prompt again. Claude sees its previous work—the modified files, its own git commits—and iterates. The loop creates a self-correcting feedback system that can run for hours without human intervention.&lt;/p&gt;

&lt;p&gt;The name comes from &lt;a href="https://en.wikipedia.org/wiki/Ralph_Wiggum" rel="noopener noreferrer"&gt;Ralph Wiggum&lt;/a&gt;, the perpetually confused child from &lt;em&gt;The Simpsons&lt;/em&gt; who never stops trying despite consistent failure. Huntley's philosophy: "Better to fail predictably than succeed unpredictably." Let the agent iterate toward correctness rather than demanding perfection on the first attempt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ralph Tries Research
&lt;/h2&gt;

&lt;p&gt;So Ralph can code. But can he do a literature review?&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/monarch-initiative/cyberian" rel="noopener noreferrer"&gt;cyberian&lt;/a&gt; provider in &lt;a href="https://github.com/monarch-initiative/deep-research-client" rel="noopener noreferrer"&gt;deep-research-client&lt;/a&gt; runs a similar autonomous loop, but instead of iterating on code until tests pass, it iterates on research until the literature is exhausted. The workflow is defined in &lt;a href="//../workflows/deep-research.yaml"&gt;deep-research.yaml&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;subtasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;initial_search&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;perform deep research on {{query}}.&lt;/span&gt;
      &lt;span class="s"&gt;# ... creates PLAN.md, REPORT.md, citations/ ...&lt;/span&gt;

  &lt;span class="na"&gt;iterate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Keep on researching {{query}}, following the plan...&lt;/span&gt;
    &lt;span class="na"&gt;loop_until&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NO_MORE_RESEARCH&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;If you think all research avenues are exhausted,&lt;/span&gt;
        &lt;span class="s"&gt;yield status NO_MORE_RESEARCH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creates a research plan&lt;/li&gt;
&lt;li&gt;Searches, downloads papers, extracts text&lt;/li&gt;
&lt;li&gt;Maintains a narrative report (not bullet points—&lt;em&gt;prose&lt;/em&gt;, like a review article)&lt;/li&gt;
&lt;li&gt;Tracks a citation graph showing how papers relate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loops back&lt;/strong&gt; to continue researching until it decides it's done&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Same pattern: iteration until completion, with the agent observing its own previous work and refining. The difference is that instead of git history as the feedback mechanism, research-Ralph accumulates findings in a structured workspace (&lt;code&gt;PLAN.md&lt;/code&gt;, &lt;code&gt;REPORT.md&lt;/code&gt;, &lt;code&gt;citations/&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Watching Ralph Think
&lt;/h2&gt;

&lt;p&gt;Most "deep research" services are black boxes. You submit a query, wait, and receive a result. The cyberian provider uses &lt;a href="https://github.com/coder/agentapi" rel="noopener noreferrer"&gt;agentapi&lt;/a&gt; to bridge to local AI agents. Agentapi exposes a chat interface, which means you can watch Ralph work in real-time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3284/chat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb9ycfxl0jmxn5ofcpl8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb9ycfxl0jmxn5ofcpl8.png" alt="Screenshot of agentapi chat interface with Wigguming over a gene research query" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure: The agentapi chat interface at localhost:3284 (default for Cyberian), showing Ralph mid-literature-review. You can see his searches, his reasoning, and the citations accumulating in real-time.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This turns out to be useful. You can see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What searches the agent is performing&lt;/li&gt;
&lt;li&gt;Which papers it's finding (and which it's missing)&lt;/li&gt;
&lt;li&gt;How it's reasoning about the literature&lt;/li&gt;
&lt;li&gt;When it's going down an unproductive path&lt;/li&gt;
&lt;li&gt;Failure points - e.g. lacking access to download full texts&lt;/li&gt;
&lt;li&gt;The actual citation files being created&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It transforms deep research from "fire and forget" to "pair researching with an AI assistant." You can even intervene—though usually you won't need to.&lt;br&gt;
Additionally, you can use tools like &lt;a href="https://ai4curation.io/ai-blame/" rel="noopener noreferrer"&gt;ai-blame&lt;/a&gt; to mine traces.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;To use the cyberian provider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;deep_research_client&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DeepResearchClient&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DeepResearchClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;research&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What are the molecular mechanisms of autophagy in neurodegeneration?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;provider&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cyberian&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;cyberian&lt;/code&gt; Python package installed&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentapi&lt;/code&gt; binary in your PATH&lt;/li&gt;
&lt;li&gt;A local agent (Claude Code, Aider, Cursor, or Goose)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One nice thing about the cyberian approach: since it works through agentapi, you're not locked into any particular model or provider. Claude Code with Anthropic models works best (we would say that), but if you prefer Aider with GPT-4 or Cursor with whatever they're running this week, the same workflow runs. Ralph is agent-agnostic.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm Learnding
&lt;/h2&gt;

&lt;p&gt;The Ralph pattern isn't complicated. Complex tasks benefit from iteration. LLMs are better at correcting their mistakes than avoiding them.&lt;/p&gt;

&lt;p&gt;For code: write, test, fail, fix, repeat.&lt;/p&gt;

&lt;p&gt;For research: search, read, synthesize, find gaps, repeat.&lt;/p&gt;

&lt;p&gt;The cyberian workflow predates the "Ralph Wiggum" meme—we just called it "iterative deep research" because we're boring academics. But it's the same idea: let the agent loop until the work is done.&lt;/p&gt;

&lt;p&gt;Now, when you run &lt;code&gt;provider="cyberian"&lt;/code&gt;, you can picture Ralph in there, earnestly accumulating citations until he runs out of papers to read.&lt;/p&gt;

&lt;p&gt;You can even peer inside his head while he works.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ghuntley.com/ralph/" rel="noopener noreferrer"&gt;Geoffrey Huntley - Ralph Wiggum as a "software engineer"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/anthropics/claude-code/tree/main/plugins/ralph-wiggum" rel="noopener noreferrer"&gt;Claude Code Ralph Wiggum Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/sivarampg/the-ralph-wiggum-approach-running-ai-coding-agents-for-hours-not-minutes-57c1"&gt;The Ralph Wiggum Approach - DEV Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/monarch-initiative/cyberian" rel="noopener noreferrer"&gt;cyberian - Monarch Initiative&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/monarch-initiative/deep-research-client" rel="noopener noreferrer"&gt;deep-research-client - Monarch Initiative&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/coder/agentapi" rel="noopener noreferrer"&gt;agentapi - Coder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
