Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →To give an AI agent current web information without filling its context with unnecessary text, connect a live-search tool and control what search results or fetched pages are passed to the model. A prompt alone does not enable search: the agent must have the tool configured. OpenAI documents a search-context setting; Anthropic documents filtering that can discard irrelevant material before it enters the context window. Neither provider publishes a guaranteed token-savings figure for this workflow.
How live search can use fewer tokens
A search-enabled agent can retrieve current information instead of relying only on what the model learned during training. But retrieved text also uses context. The practical goal is not to minimize context at any cost; it is to provide enough relevant evidence to answer the task, while excluding material the model does not need.
As an Amazon Associate I earn from qualifying purchases.
There are two useful controls: limit the amount of search context returned, and filter retrieved content before it reaches the model. These reduce unnecessary context as a mechanism, not as a promise of a particular number or percentage of tokens saved. The right amount depends on the query and the evidence needed.
Configure search as a tool, not a prompt instruction
In OpenAI’s Agents API documentation, web search is an explicitly configured tool. The documentation states that omitting the web_search tool turns built-in search off, even if an instruction tells the agent to search. The tool can be configured for live, cached, or disabled access, and its context_size setting offers low, medium, and high; the documented default is medium. See OpenAI’s web-search guide for current API details.
#1 Best Overall
Start with the smallest context setting that can plausibly support the task, then increase it if results are too thin or the answer lacks evidence. The labels describe context configuration, not a guaranteed token count or quality level. Check the documentation for the API path and settings you actually use, since tool behavior and defaults can change.
Filter results before they enter the context window
Anthropic documents dynamic filtering for a newer version of its web-search tool. In supported configurations, code can keep relevant results and discard other material before it reaches the model. This is useful when a search returns many candidates but only a few are pertinent to the question. Availability depends on the documented model, platform, and tool version; consult Anthropic’s web-search documentation for current support and setup.
Filtering should preserve evidence, not merely shorten text. Keep the result’s source and the passages that support the answer; discard unrelated results and boilerplate. If filtering removes qualifications, dates, or context needed to interpret a claim, the smaller input may produce a less reliable answer.
Fetch a page only when search results are not enough
Search and fetch serve different purposes. Search helps locate potentially useful sources. Fetch retrieves content from a particular page when a result snippet or search response does not provide enough evidence. Anthropic documents web fetch and content filtering for this path; see Anthropic’s web-fetch documentation.
Rank #3
- Search first. Use the search result to identify relevant pages and determine whether the returned evidence answers the question.
- Fetch selectively. Retrieve a specific page when you need fuller context, not every page that appeared in search.
- Filter fetched content. If the supported fetch workflow allows filtering, keep passages relevant to the question and necessary qualifications rather than forwarding an entire page by default.
- Ground the answer. Retain source information and ensure citations point to evidence that actually supports the final claims.
Choose a search setup that fits the task
There is no universally best configuration in the cited documentation. Compare the options against the task’s needs:
- Freshness: Decide whether the answer needs live access or whether a cached mode is adequate. OpenAI documents live, cached, and disabled modes.
- Context control: OpenAI documents low, medium, and high context-size choices. Anthropic documents dynamic filtering for supported search-tool configurations.
- Depth of evidence: Use search results when they contain enough information; use fetch when a particular page needs closer examination.
- Source visibility: Preserve citations and inspect whether the cited material supports the answer. Both providers document citations in their search workflows.
- Compatibility and operations: Verify supported models, platforms, tool versions, parameters, and current API constraints in the relevant provider documentation.
Measure token use without sacrificing answer quality
The documentation describes mechanisms for limiting or filtering context, but it does not establish a token-savings percentage or prove that smaller context always improves answers. Measure your own agent on representative tasks before claiming a reduction or changing defaults broadly.
Quick Recap
Best Value
- Choose representative queries, including cases that need a brief fact and cases that need multiple sources or fuller page context.
- Run the same tasks with your baseline and candidate search settings.
- Log input tokens and output tokens, along with latency and whether the answer is complete.
- Check citation quality: confirm that cited sources support the claims and that filtering did not remove relevant qualifications.
- Compare the trade-off. Keep the lower-context configuration only where it retains the evidence and answer quality the task requires.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools




