<?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: Rayen Mlayeh</title>
    <description>The latest articles on DEV Community by Rayen Mlayeh (@rayenmlayeh).</description>
    <link>https://dev.to/rayenmlayeh</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4184807%2Fb4a7c055-0f60-42eb-b054-2bf17d62963e.jpg</url>
      <title>DEV Community: Rayen Mlayeh</title>
      <link>https://dev.to/rayenmlayeh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rayenmlayeh"/>
    <language>en</language>
    <item>
      <title>A web crawler for AI agents with no LLM in the crawl loop</title>
      <dc:creator>Rayen Mlayeh</dc:creator>
      <pubDate>Wed, 14 Oct 2026 13:25:25 +0000</pubDate>
      <link>https://dev.to/rayenmlayeh/a-web-crawler-for-ai-agents-with-no-llm-in-the-crawl-loop-267f</link>
      <guid>https://dev.to/rayenmlayeh/a-web-crawler-for-ai-agents-with-no-llm-in-the-crawl-loop-267f</guid>
      <description>&lt;p&gt;When an AI agent needs an answer that lives a few clicks deep on a website, there are two common ways to get it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dump everything.&lt;/strong&gt; A crawler fetches many pages and the agent's LLM reads all of them. It is slow, it costs a lot of tokens, and the answer drowns in navigation menus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let the LLM choose every link.&lt;/strong&gt; This works, but each step is an LLM call. On my benchmark it cost about $0.19 per question and took a minute.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I wanted the accuracy of the second option at a price closer to the first. So I built &lt;a href="https://github.com/RayenMlayeh/jevcrawl" rel="noopener noreferrer"&gt;jevcrawl&lt;/a&gt;, an open-source (Apache-2.0) MCP server and CLI where a small scoring model drives the crawl and &lt;strong&gt;no LLM sits inside the crawl loop&lt;/strong&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz16htgt9z0g022yyewkf.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz16htgt9z0g022yyewkf.png" alt=" " width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;You give it a question and a start URL. It fetches as few pages as it can and returns only the passages that answer the question, copied verbatim with their source URLs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uvx jevcrawl crawl https://docs.python.org/3/ &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--goal&lt;/span&gt; &lt;span class="s2"&gt;"What does the walrus operator := do and which Python version added it?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On that example it fetched 6 pages and cut about 80,000 tokens of page text down to about 1,900 tokens of answers. That took 11 scoring calls, cost about $0.007, and finished in 8 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;The decisions come from Jev, a small model from TypeSafe that only answers yes/no questions with a probability. For each page, jevcrawl sends one request:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Is this passage relevant to the goal?" for every text block&lt;/li&gt;
&lt;li&gt;"Does this link lead to the answer?" for every link&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plain code does the rest. It keeps the high-scoring passages, orders the links by priority, and asks once more whether the kept passages already answer the goal, so it can stop early.&lt;/p&gt;

&lt;p&gt;Because the model only returns numbers, it cannot invent text, and a page cannot give it instructions. At worst, a prompt-injection attempt biases a score.&lt;/p&gt;

&lt;p&gt;A few details turned out to matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sitemap seeding.&lt;/strong&gt; On big sites with a small page budget, jevcrawl reads the sitemap (including gzip files and sitemap indexes) from the &lt;code&gt;robots.txt&lt;/code&gt; Sitemap lines and ranks the entries by how much they overlap with the goal words.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A reserve for weak links.&lt;/strong&gt; Links under the priority floor go to a reserve queue instead of being dropped, so the crawl can come back to them if the good links run out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boilerplate detection across pages.&lt;/strong&gt; Menus and footers are kept as link candidates but not returned as text.&lt;/li&gt;
&lt;/ul&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx57ad95bng0q6pefkl96.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx57ad95bng0q6pefkl96.png" alt=" " width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark
&lt;/h2&gt;

&lt;p&gt;I used &lt;a href="https://arxiv.org/abs/2501.07572" rel="noopener noreferrer"&gt;WebWalkerQA&lt;/a&gt; (Wu et al., Alibaba Tongyi Lab, ACL 2025), a benchmark of questions buried several clicks deep in real websites. I re-verified 50 tasks against the live sites and did not look at them during development. Every system used the same answering LLM and the same judge.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;System&lt;/th&gt;
&lt;th&gt;Correct&lt;/th&gt;
&lt;th&gt;Found answer page&lt;/th&gt;
&lt;th&gt;Cost per task&lt;/th&gt;
&lt;th&gt;Time per task&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;jevcrawl&lt;/td&gt;
&lt;td&gt;40%&lt;/td&gt;
&lt;td&gt;54%&lt;/td&gt;
&lt;td&gt;$0.025&lt;/td&gt;
&lt;td&gt;27.5 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude picks each link&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;td&gt;33%&lt;/td&gt;
&lt;td&gt;$0.194&lt;/td&gt;
&lt;td&gt;61.7 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Breadth-first crawl&lt;/td&gt;
&lt;td&gt;8%&lt;/td&gt;
&lt;td&gt;11%&lt;/td&gt;
&lt;td&gt;$0.228&lt;/td&gt;
&lt;td&gt;22.4 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I also compared against Crawl4AI's best-first deep crawl, a keyword-scored crawler with no LLM. On 20 other tasks, measuring only whether the crawler fetched the answer page, jevcrawl reached it on 10 of 20 and Crawl4AI on 5 of 20. The median time was 29 s against 43 s.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy3ay47q9kt1e8gxsxz34.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy3ay47q9kt1e8gxsxz34.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;br&gt;
These are small samples (50 and 20 tasks). I trust the cost gap more than the accuracy gap, and the Crawl4AI test measures reaching the page, not final answers. The benchmark code is in the repo's &lt;code&gt;bench/&lt;/code&gt; folder, so you can run it or try your own tasks.&lt;/p&gt;
&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No JavaScript rendering.&lt;/strong&gt; Pages that only render with JS are reported in &lt;code&gt;stats.needs_js_urls&lt;/code&gt; and skipped. Crawl4AI drives a real browser and handles those. Optional rendering is &lt;a href="https://github.com/RayenMlayeh/jevcrawl/issues/8" rel="noopener noreferrer"&gt;an open issue&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No &lt;code&gt;robots.txt&lt;/code&gt; enforcement yet.&lt;/strong&gt; It only reads &lt;code&gt;robots.txt&lt;/code&gt; for Sitemap lines. &lt;a href="https://github.com/RayenMlayeh/jevcrawl/issues/1" rel="noopener noreferrer"&gt;Open issue&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It depends on a hosted model.&lt;/strong&gt; Scoring is done by TypeSafe's Jev API, so you need an API key, and page text is sent to TypeSafe for scoring. A crawl costs roughly a cent in Jev calls. The crawler itself is free and open source. I am not affiliated with TypeSafe.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;For Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add jevcrawl &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;TYPESAFE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;your key&amp;gt; &lt;span class="nt"&gt;--&lt;/span&gt; uvx jevcrawl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also works in Claude Desktop and Cursor through a standard &lt;code&gt;mcpServers&lt;/code&gt; entry; the README has the JSON.&lt;/p&gt;

&lt;p&gt;The repo is at &lt;a href="https://github.com/RayenMlayeh/jevcrawl" rel="noopener noreferrer"&gt;github.com/RayenMlayeh/jevcrawl&lt;/a&gt;. There are several good-first-issues open: &lt;code&gt;robots.txt&lt;/code&gt; support, a Dockerfile, Windows and macOS CI, and more.&lt;/p&gt;

&lt;p&gt;I would like to know which sites it does badly on. Tell me in the comments, or open an issue with the URL and the question.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>opensource</category>
      <category>jev</category>
    </item>
  </channel>
</rss>
