Agent Template · crawler node · web search as a model capability · per-call spend cap · result budget

Web Researcher: A Crawler the Model Calls

A local model that searches the web when a question needs current facts. A crawler node runs Apify's web-browser actor as a tool the model calls with one search query; the result count and the spend cap stay fixed on the node, and the model reads a trimmed result. Needs an Apify API token: after installing, set it as the secret of the sample-apify connection.

How It Works

A local model answers the question, and a crawler node is wired into its tools as web_search. When a question needs current facts, the model calls it with one short search query. The crawler runs Apify’s web-browser actor, which searches the web and reads the top three pages as Markdown.

The model sees one field, query. The result count, the output format, and a $0.05 charge cap per search are fixed on the node, out of the model’s reach. It reads back each result’s title, URL, and page text, trimmed to 6,000 characters across the three pages, and answers with the URLs it used.

Apify is a hosted service: the search query goes to Apify, which crawls on its own servers, and each search bills the Apify account behind your token. The installer creates the connection without a token; until you set one, every search returns an error the model sees, and it says it couldn’t search.

Try It

  1. In TheYgent, open Settings → Samples.
  2. Fill the model slot below with a model from your registry, then click Install on Web researcher.
  3. Open the installed agent, select the web_search node, and use Set token to store your Apify API token.
  4. Run it with the example input.
What did the latest Python release change?

The Graph

Every node in the agent and where its output goes, read from the template itself.

sample-web-researcher

Node Type Sends its output to
Question input Research and answer
Research and answer llm Answer
Web search (Apify) crawler Research and answer (on use, as a tool)
Answer output —

More Templates

two models in one run

Hybrid reasoner

Two Models in One Run — Two models in one run: a local triage model classifies every request and a router sends easy ones to your local model and hard ones (coding, analysis, long-form) to an API model.

See the template →
data privacy

Private SQL analyst

Data Privacy by Construction — A data-privacy pattern: the API model sees ONLY the database schema and your question — never a single row — and writes a SELECT statement; a deterministic guardrail refuses any statement that does not start with SELECT; the query then runs on a local SQLite MCP server and a LOCAL model reads the rows and answers.

See the template →
human in the loop

Expense approver

Human in the Loop — Human in the loop with a real approve/reject: a local model assesses the risk of an expense request, the run then WAITS durably for a human decision, and a router either executes the (placeholder) payment step or refuses.

See the template →
MCP from OpenAPI (REST)

Tool belt

Step Tools vs. LLM-Driven Tools — The two ways to use a tool, in one agent: a GraphQL API turned into an MCP server runs as a flow STEP (it always executes), while a REST API turned into an MCP server is WIRED TO the local model as a capability the model decides to call.

See the template →
multi-model consensus

Second opinion

Multi-Model Consensus — Ask a local model AND an API model the same question independently, then a local judge reconciles the two answers into one — flagging any disagreement.

See the template →
PII firewall

PII firewall

Privacy as a Router — A privacy router: a deterministic PII guardrail inspects every request BEFORE any model runs.

See the template →
vision in a pipeline

Visual inspector

Vision in a Pipeline — Vision inside a pipeline, not a chat window: a local vision model inspects an image against your acceptance criteria, emits a structured pass/fail verdict, and a router sends the run down the matching branch — the skeleton of a visual QC line.

See the template →
speech-to-text

Voice desk

Voice In, Voice Out — Voice in, voice out: speech-to-text transcribes the audio, a model answers in spoken prose, text-to-speech reads it back.

See the template →
local image generation

Art department

Local Image Generation — Local image generation in a pipeline: a local model turns your rough brief into one vivid, concrete image prompt, and a local diffusion model paints it.

See the template →
local RAG (pgvector)

Handbook Q&A

Retrieval as a Model Capability — Retrieval as a model capability, fully local: the installer creates a retrieval source in your own Postgres (pgvector), seeds it with a fictional TheYgent company handbook, and wires it to a local model as a search tool the model decides to call — answers cite the handbook section they came from.

See the template →
self-correcting loop

Editorial loop

A Self-Correcting Agent — A self-correcting agent: a bounded LOOP re-runs a writer-critic child agent — draft, harsh self-critique, rewrite — until the child approves its own draft or three rounds are up.

See the template →
parallel fan-out (map)

Batch briefing

Durable Fan-Out with a Cost Ceiling — Durable parallel fan-out with a cost ceiling: a MAP node fans one child agent out per topic (two at a time), collecting a brief for each — a crashed worker resumes only the unfinished branches.

See the template →