← Workflow examples

Agent with web search

Answers from fresh data on the web and shows its sources — for when the answer is not in your documents.

Graph preview

How it works

A web-search tool is attached to the agent over a link_extension wire. It is not a step in the graph: the model decides whether to call it, and may call it several times in one turn until it has enough material.

  1. EntryAgent.
  2. Agent calls Search when it needs to, and reads the results.
  3. Answer returns the final text.

What to configure after import

  • Say in the system prompt when to search: without that the model either searches on every question or never at all.
  • If you need citations and source excerpts, look at openrouter_web_search — it returns both the answer and the sources.