Skip to main content
Searching in the browser takes many steps and trips anti-bot checks. With web_search=True the agent gets a Browser Use web search helper instead:
  • results holds 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_usd in a response is added to result.cost_usd; a response without it adds nothing, and an unknown model cost stays None.
  • 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 a ValueError before any browser starts, because search would reach sites the browser may not open.