web_search tool and needs no sandbox, so it uses no machine time.
You will use: web search and streaming.
Choose a model that searches
web_search runs on the agent’s own model. Pick a model with built-in web search: on OpenRouter that is an OpenAI, Anthropic, Google, Perplexity, or xAI model. Other models may answer without searching, and the search then fails with no_search. Vercel AI Gateway and CheaperInference models cannot search at all, and saving the agent is refused.
On Orca credit, each search costs the provider’s search fee plus your model’s tokens for reading the results. See what a search costs.
The program
Examples on this page assume the settings from the shared setup.- Python
- TypeScript
Make it yours
- Limit the sources.
web_searchacceptsallowed_domains, for example your own docs site or a set of trusted publishers. - Ask follow-ups. Send the next question to the same session; the agent remembers what it already found.
- Check failed searches. A failed search leaves a
web_search_callitem withstatusincompleteand anerror. The turn still goes on. See when a search fails. - Quote exact text. Orca does not fetch the pages behind the results. If the agent must quote a page word for word, add a function tool that fetches it.