Skip to main content

Web Search & Fetch

Myrm includes web_search and web_fetch as built-in tools. They work together: search finds sources, fetch reads pages — both filter content before it reaches the LLM.

Why It Matters

Most agents pass raw search snippets or full HTML into the model. That wastes tokens and hurts answer quality. Myrm runs a local filter pipeline:
Result: ~40–50% fewer tokens on web-heavy tasks, $0/month local operation. :::note Honest comparison Hermes, OpenClaw, OpenCode, and Claude Code all have basic web search/fetch tools. Myrm’s advantage is the full local filter pipeline — not merely having the tools, but cleaning content before it hits the LLM. :::

Engines

Supports 7 providers (configure in Settings → Search): Myrm offers dedicated X/Twitter real-time search via xAI’s Responses API — retrieve posts, threads, and trending discussions with inline citations. Two authentication paths: Capabilities: date range filters, handle inclusion/exclusion (max 10), image/video understanding in matching posts, inline citations with source URLs, degraded-result detection (warns when filters yield no sourced data). OAuth tokens are AES-256-GCM encrypted at rest, auto-refreshed before expiry, and reused across 5 xAI services (X Search, Image Gen, Video Gen, TTS, STT) — one login unlocks the full xAI multimodal stack.

Intent Detection (Zero LLM Cost)

Myrm auto-detects 7 intent types and adjusts engine parameters:
  • Code, News, Academic, Finance, Security, Social, General
Say “latest AI security CVEs” — no mode picker needed.

5-Layer Intelligent Routing

Unlike competitors that use a single retrieval path, Myrm employs 5 layers of routing intelligence — all without a separate Planner LLM call:

Web Fetch vs Browser (Smart Routing)

When both web_fetch and browser tools are enabled, Myrm guides the Agent without coupling to System Prompt: How it works: Tool descriptions + Dynamic Hints (injected only when the paired tool is available) + symmetric Loop Guard suggestions + separate browser pool isolation (CRAWL vs AGENT). Hermes only hints browser→web_extract; OpenClaw has no cross-tool hints. This means: no extra latency, no prompt cache break, and more flexible than a static pre-planner.

Retrieval Modes

Precision mode uses semantic reranking (score threshold 0.6) — low-relevance chunks are dropped.

Domain Diversity Sort

Multi-query results are automatically reordered to prevent any single domain from dominating. Each subsequent result from the same domain is penalized by an exponential decay factor (default 0.8):
  • 1st result from example.com — full score
  • 2nd result from example.com — score × 0.8
  • 3rd result from example.com — score × 0.64
This ensures the Agent sees diverse sources rather than multiple pages from one website. No configuration needed — enabled by default in combine_search_results_unified.

Visual references (no dedicated image search tool)

When reference images are needed, the agent uses web_search → web_fetch / browser to obtain image URLs from pages, then image_tool for generation — same pattern as OpenClaw / Hermes; no separate DuckDuckGo image-search dependency.

Resilience

  • Engine fallback — primary fails → automatic switch
  • 15-minute result cache — repeat queries cost nothing
  • 30s health probe — detects unavailable engines early

Web Fetch

3-Tier Architecture

AdaptiveRouter learns per-domain costs and picks the optimal tier automatically.

Optional L4 Remote Fallback (Default OFF)

When L1–L3 all fail, you can opt in to a remote reader fallback (Settings → Search → Web Fetch Remote Escalation): Firecrawl v2 highlights:
  • Zero-config start — works without an API key; Firecrawl’s free tier gives you 1,000 requests/month
  • Custom API Base — point to your own self-hosted Firecrawl instance for enterprise privacy or higher throughput
  • One-click verify — the Settings UI tests connectivity against your configured endpoint (including self-hosted)
Design guarantees (vs competitors that always hit cloud APIs):
  • Default OFF — no extra Turn1 tools, prompt cache unchanged
  • Per-session cap (1–50) — prevents runaway remote billing
  • SSRF guard before any remote call
  • No built-in bulk crawl — use search+fetch+browser locally, or Firecrawl MCP for site-wide indexing
  • Plane deny switchMYRM_WEB_FETCH_ESCALATION=denied for enterprise hard blocks
OpenClaw/Hermes often depend on Firecrawl for hard pages and always require an API key; Myrm keeps local-first, supports keyless free-tier out of the box, and treats cloud as an explicit, capped last resort.

Privacy Protection

Explicit Opt-In Design: Search only activates when you manually configure and enable a provider in Settings. Unlike some alternatives that silently send queries to free engines (e.g., DuckDuckGo) behind your back, Myrm never makes network calls without your explicit configuration. No API key configured = no search at all. Transparent Fallback: When a primary provider fails and falls back to your configured backup, you receive a real-time notification in the chat — never a silent switch. When a proxy is configured, L2/L3 automatically enable DNS over HTTPS (DoH) — DNS queries are encrypted so ISPs and network administrators cannot see which sites you visit. Zero configuration, zero performance overhead.

Ad/Tracker Domain Blocking

L2 and L3 automatically block 3500+ known advertising and tracking domains at the network level (Peter Lowe’s curated list). Ad scripts never load — pages render faster, DOM stays clean, and token consumption drops. Zero configuration, enabled by default in standard mode.

fetch_and_extract (Smart Extraction)

When reranker + embedding are configured, web_fetch supports fetch_and_extract:
  1. 3-tier crawl (HTTP → Browser → Stealth)
  2. Chunk page content
  3. BM25 + vector hybrid retrieval (Qdrant embeddings)
  4. Reranker re-ranking → top relevant passages only
This replaces cloud LLM summarization (e.g. Hermes web_extract + Gemini) with zero-LLM local filtering.

Content Cleaning

Before text enters the Agent context:
  1. DOM pruning — removes nav, ads, footer, sidebar
  2. HTML → Markdown — structured, LLM-friendly
  3. Smart truncationmax_chars with was_truncated flag
  4. Binary routing — PDFs parsed separately (no garbled HTML)
  5. YouTube fast-path — auto-detects YouTube URLs, extracts timestamped subtitles directly via API; falls back to HTML fetcher if transcript unavailable
  6. Bilibili fast-path — auto-detects Bilibili video URLs, extracts timestamped subtitles via public API (view + player); supports AI-generated subtitles with SessionVault cookies; falls back to browser crawl if unavailable

Caching

  • Request coalescing (concurrent same-URL = one fetch)
  • Stale-While-Revalidate
  • ETag / Last-Modified conditional requests
  • 35+ tracking params stripped from URLs

Deep Research: 5-Phase Lifecycle

Myrm’s Deep Research runs a structured CLARIFY → PLAN → EXPLORE → RESEARCH → REPORT pipeline — not a single-shot “search and summarize”:

Research Studio (Three-Column Workbench)

The /research route provides a dedicated three-column layout optimized for deep research workflows:
  • PC: three columns side-by-side with draggable dividers (left 240–480px, right 280–600px)
  • Mobile: auto-degrades to tab switching (768px breakpoint)
  • Context sync: checking a resource in the pool automatically injects it into the chat context via mentionReferences; unchecking removes it without affecting other @ references
  • Output actions: download artifacts or save them to your Wiki with one click (scoped to the active agent)

Mid-Research Controls

  • Plan confirmation gate — review, edit, or approve the research plan before execution begins
  • HITL callback — pause after any cycle to adjust direction
  • Budget guardmax_budget_usd + threshold warnings
  • Cancel + keep — stop anytime, partial results preserved
  • ReplanMiddleware — auto-detects drift and self-corrects

vs MiroFlow (GAIA/BrowseComp benchmark leader)

vs Competitors

Where Hermes Differs (not stronger)

  • Plugin backends (Exa/Tavily/Firecrawl) — more cloud vendors, but all require API keys
  • web_extract skips local embedding setup by using LLM summarization instead — easier setup, costs tokens per page
  • SSRF + URL secret blocking — mature, same class as Myrm (not a differentiator)

Auto Strip Ads & Redundancy

Plain language: We don’t dump whole pages into the AI — we extract body text, strip ads and nav, dedupe, and keep only passages that match your question.

Zero-Config Comparison (corrected)

Myrm is more zero-config on fetch — cleaning works locally without cloud APIs.

Retrieval Sufficiency Guard (RSG)

In deep search mode, Myrm automatically verifies whether retrieved content is sufficient to answer the user’s question — before the main LLM starts composing a response.

How It Works

After each web_search or web_fetch call (when search_depth == "deep"):
  1. A lightweight LLM (your configured lite_model) evaluates the retrieved snippets against the original query
  2. Returns a structured verdict: sufficient / insufficient + missing aspects + suggested follow-up queries
  3. Detects negative constraint violations (e.g. “exclude React” but results contain React content)
  4. Result is appended to tool output for the main Agent to act on

Key Design Choices

Negative Constraints (Unique Capability)

Vector search and BM25 cannot handle exclusion criteria like “recommend frameworks except React”. RSG explicitly extracts these constraints and checks results against them:
The Agent sees this violation and knows to search again with better filtering.

vs Competitors

No competitor (Hermes, OpenClaw, Claude Code, Perplexity) has an equivalent post-retrieval sufficiency check. They rely entirely on the main LLM to judge whether it has enough information — which is unreliable because:
  1. LLMs tend to answer confidently even with insufficient data (hallucination)
  2. No explicit negative constraint checking is possible without a dedicated evaluator
  3. No structured guidance for what to search next

PTC Integration

In Programmatic Tool Calling scripts:
No extra API round-trips — search and fetch run inside the sandbox.

Configuration

  1. Open Settings → Search — pick engine, API keys, SearxNG URL
  2. Enable Reranker in retriever settings for Precision mode on long docs
  3. Web Fetch works out of the box (browser tier uses Patchright if installed)

Migration Tips

See Competitor Comparison for full migration benefits.