Repository navigation
v0.16.0 - Data-Driven Routing, Keyless Install & a Safer MCP Server
A new router picks the right web method for each prompt, a plain pip install webrouter searches and reads pages with no key, and the MCP server costs your agent fewer tokens and labels web content as the web's.
Upgrade with pip install -U webrouter. Some defaults changed (no router by default, a slimmer MCP server, shorter search description): see the CHANGELOG.
🚀 What's New
Data-driven routing (#430, #446)
- A new router,
data-driven, that reads your prompt and picks the right method for it: a web search, reading a page you linked, or a deeper research run. For searches, it also picks the provider, ranked by measured quality, price and speed - Routing is free and runs locally: it uses a small lookup table, trained by Nimble on about 2,700 labelled web requests, that ships with WebRouter, so there is no API key and no LLM call. See The data-driven router
from web_router import Budget, WebRouter
router = WebRouter(router="data-driven")
plan = router.plan("compare the pricing plans of the top 5 CRM tools") # see the choice, spend nothing
plan.tool # "research" (or "search" if you have no research provider key)
plan.decision.reason # "data-driven 0.1.3: research for verb=analyze, url_target=none"
result = router.run(plan, budget=Budget(max_cost_usd=1.0)) # run it, capped at $1On the MCP server, set WEB_ROUTER_MCP_ROUTER=data-driven to do the same for web_run.
Keyless install (#451)
- Search the web and read pages right after
pip install webrouter, with no key and no extras: the backends that need no key now come in the base install. See Free web access - In the command line,
webrouter providersnow shows what you can run without a key, and which key unlocks each method you can't run yet
from web_router import WebRouter
with WebRouter() as router: # no API key needed to start
results = router.search("what is retrieval augmented generation", max_results=5, timeout=10)
pages = router.extract(results.urls[:3], timeout=30) # markdown, whichever backend serves it
print(results.provider, [doc.url for doc in pages.documents])A lighter, safer MCP server (#451, #399, #401, #402, #403, #475)
- Your agent spends fewer tokens on tool descriptions every turn: the server lists only the core web tools by default, about 2.7k tokens instead of 6.4k with every key set. See The tools
- Web content is labelled: every result that carries page text, and every backend error, starts with
"origin": "web page", so the model can tell what came from the web from what the tool says - Harder to turn against your own network: the server refuses web addresses that lead to machines inside your network, including addresses written to slip past its checks, and forgets a browser session's connection details once it closes
- Full research reports reach your agent: up to 40,000 characters by default, where before only the first 4,000 arrived
- Firecrawl now searches as well as reads pages, with
FIRECRAWL_API_KEYor keyless once you turn onallow_keyless. With a key,auto(the default when you name no backend) also tries it after the free backends - Read pages that only appear once their JavaScript runs, on your own machine, with no key and no vendor call: the new
obscurabackend runs the open-source Obscura browser. Put its binary onPATHor inOBSCURA_PATHand ask for it by name;autonever uses it
from web_router import WebRouter
router = WebRouter(provider_config={"firecrawl": {"allow_keyless": True}})
router.search("rust async runtimes", provider="firecrawl", max_results=3)
router.extract("https://quotes.toscrape.com/js/", provider="obscura") # needs the obscura binaryTwo new data APIs (#396, #429)
- SearchApi: pull Google results (web, News, Maps, Shopping, Images, Videos, Scholar, Jobs, Trends, Autocomplete) and Bing, YouTube and Amazon search through one call, with
SEARCHAPI_API_KEY - VPNDetection: tell whether an IP address is a VPN, Tor or relay, one address free with no key or up to 1,000 at once on a paid plan
from web_router import WebRouter
router = WebRouter()
response = router.call_data_api("vpndetection.ip.lookup", {"ip": "146.70.116.130"}) # no key needed
response.data["is_vpn"]More features
- Know when your network is the problem, not the backends: a call that failed because a proxy or firewall blocked every backend now says so and lists the hosts to allow (
blocked_hosts), in Python and in the CLI. See Errors (#451) - Fewer junk pages: under
auto, a page that turns out to be a tracking pixel or a redirect to another site goes to the next backend (#451) - Catch a typo before your first call:
WebRouter("exa:exa-instnat")fails when you build the router, not on first use (#473) - Spending limits cover more search options: six faster search tiers from Exa, Parallel and Keenable now have estimated prices, so a spending limit no longer skips them, and
exa:exa-liteandkeenable:keenable-procan be named directly (#431)
🐛 Fixes
- Search no longer quietly ignores a filter it can't honour, or fails over one: Nimble refuses
recencyatsearch_depth="lite", You.com refuses a domain filter with a path, and a routed search drops a vendor mode its backend refuses, so the call moves to a backend that can (#440, #441, #445) extract()no longer sends afile:or otherwise non-web URL to a backend; the valid URLs in the same batch still come back (#436)- Nothing lost from results: Valyu's structured rows, such as stock prices, and Nimble's company and creator records now reach the result (#476, #457)
- A page with no title from its backend now gets one from the page itself (#451)
- A Parallel research run can no longer be checked at the wrong address (#469)
- The CLI reads JSON argument files saved with a byte order mark, as Windows Notepad does (#449)
🙌 New Contributors
Thank you to our outside contributors: @walsykerem for the MCP security fixes (#399, #401, #402, #403), @gabsferreira for SearchApi, @UmanShahzad for VPNDetection (#429) and @eilamc14 for full research reports over MCP (#475).
- @gabsferreira made their first contribution in #396, SearchApi
- @kot-tal made their first contribution in #436, safer extract URL checks
- @TheNimbleSapMan made their first contribution in #440, Nimble recency check
- @alonwo-nimble made their first contribution in #449, BOM-safe CLI JSON
- @charliek-dot made their first contribution in #450, search docs
- @yuvalbrt made their first contribution in #469, Parallel research fix
Full Changelog: v0.15.0...v0.16.0