web_router.integrations.anthropic gives a Claude agent the same two tools,
as plain custom tool definitions, and the guide that says when to use which:
tools
alike, and the module needs no SDK and no extra: your Anthropic client sends
them, and call / acall run each call here, on your keys. The options rule
is the LangChain tools’ — the model supplies the query or the URLs, you fix the
rest — and so is the rendering, byte for byte. Input the model got wrong comes
back as an error result it can fix; a backend failure does too; your own setup
mistake raises (see What the model reads when a call fails).
The tools are named web_router_search and web_router_extract, never
web_search, so an agent that also holds Claude’s built-in search cannot
confuse the two (see Tool names).
Answer is opt-in. methods=["search", "extract", "answer"] adds
web_router_answer: one question in, the backend’s written answer and its
citations out, each snippet cut to result_chars. It goes to answer_provider,
else to provider when that backend answers, else to the router’s default
answer backend, and the tools raise NoAnswerProviderError when they are built
if there is none to use. It sends only the question; the search options are not
passed to it.
routing_guide() (or tools.guide(), for exactly the tools you expose) is a
first version of the judgment half: cheapest tool first, one fact per search,
read a page only when its snippet falls short. Research and browse join the
tools once the guide can say when one is worth its bill.
Back to Agent integrations.