web_search=True the agent gets a Browser Use web search helper instead:
resultsholds one text entry per hit: title, URL and matching excerpts. The agent opens pages in the browser for their full content.num_results: default 8, max 20.category:'company','people','news'or'publication'.
Billing and keys
- Billed per search to your Browser Use key. Each charge reported as
browser_use.charge_usdin a response is added toresult.cost_usd; a response without it adds nothing, and an unknown model cost staysNone. - It uses the gateway model’s key, else your Browser Use key. Without one,
run()raises before any browser starts. - Before the browser starts, a free check detects a missing endpoint, rejected key or exhausted budget. Transient errors do not block the run; an individual search can still fail.
- The key never enters the agent’s Python worker: the parent process makes the request.
Notes
- Off by default. When off, the system prompt is unchanged.
- It can’t be combined with
Browser(allowed_domains=...):run()raises aValueErrorbefore any browser starts, because search would reach sites the browser may not open.