Skip to content
Decision Framework

AI Agent Web Search: How to Control Sources and Freshness

Giving an AI agent web access solves stale knowledge, but it also creates a new engineering decision: what evidence should the agent be allowed to use?

Evidence boundary

A relevant result still has to pass source and freshness rules.

Inside this Insight

What the article follows

1Decide whether to search
2Control source and freshness
3Answer with citations or an evidence gap
AI Workflows

Written by

Shruti SaraswatAscent Innovate Software
Published
AI Workflows
Search evidence

A relevant search result can still be the wrong evidence.

A user asks an AI agent for a product's current price. The agent searches the web, finds a page with the right product and a detailed pricing table, then answers confidently. The page happens to be two years old.

The search itself worked. The problem appeared earlier, when the system treated relevance as enough evidence for a question about current pricing.

On August 19, AWS added runtime domain and publication-date filters to Web Search on Amazon Bedrock AgentCore. The update is useful beyond one provider because it makes a wider production decision visible: what evidence should this request be allowed to use?

Web access solves stale knowledge, but relevance is only the first test

Live web search helps when an answer depends on information published after model training. Product changes, software releases, current documentation, company announcements, market updates, and policy changes can all justify a search.

The result still needs to fit the job. A page can match the query closely and still be unsuitable because the source is weak for that task, the information is too old, or the publication date cannot be verified.

Evidence test

A search result should pass three checks before the agent treats it as evidence.

These checks separate search relevance from the product rules that decide whether a result is acceptable for the answer being built.

01

Relevance

Does the result actually answer the user's question, or does it only mention the same topic, company, or product?
A product article that mentions pricing is not enough if the current price never appears.
02

Source fit

Is this an acceptable source for the job? Some tasks need an official source, while others benefit from broader coverage.
A regulatory workflow may prefer the regulator over a secondary summary of the same rule.
03

Freshness

Is the information recent enough for the fact being checked and the consequence of getting it wrong?
A page from 2024 can be highly relevant and still be unusable for a question about availability today.

Decision point

Relevance helps find candidates. Source fit and freshness decide whether those candidates are suitable evidence for this request.

Does this question actually need the web?

Use web search when the answer depends on changing public information and the public web is the right source. Making search available does not mean every request should use it.

A simple retrieval decision can separate four common paths:

  • Private product or company knowledge → use controlled retrieval or RAG.
  • Changing public information → use web search.
  • Structured current data with an authoritative endpoint → use the API directly.
  • Stable knowledge already available to the model → use the model when the product allows it.

A question such as “What does our internal refund policy say?” belongs in a controlled knowledge source. “What did this vendor announce this week?” is a much better web-search case. “What is this customer's current account balance?” should come from the product's own system.

The distinction matters because open-web retrieval and controlled knowledge retrieval solve different jobs. The Multi-Persona AI Avatar System, for example, answers from separated expert knowledge libraries rather than searching the open web for every question.

Search decision

A useful web-search flow makes the evidence decision visible.

The agent can still decide when a search is useful, but the product should make source, freshness, and no-evidence behaviour explicit around that search.

01Question

Decide whether live public information is needed

Route private knowledge, structured product data, and stable questions to the retrieval layer that actually owns that information.
02Boundary

Choose acceptable sources

Apply an allowlist, blocklist, source preference, or broader discovery policy that matches the task.
03Time

Set the freshness requirement

Define how recent the evidence must be based on how quickly the underlying fact can change.
04Search

Retrieve and qualify evidence

Search inside the permitted scope and preserve the URL, title, publication date, and other useful source metadata.
05Result

Answer with sources or return an evidence gap

If qualifying evidence exists, keep it attached to the answer. If it does not, make that state visible instead of quietly lowering the standard.

Route principle

Search access is only one stage. The product still owns the rules around which evidence can enter the answer.

Source policy should be set before results reach the model

A source policy defines what the search tool is allowed to return for a given job. The policy may be broad for discovery work and much narrower when the answer will influence a regulated, financial, customer-facing, or operational decision.

Product documentation might prefer the vendor's official documentation. Financial research may allow regulatory filings and investor-relations pages. A market scan may deliberately allow more sources because finding different perspectives is part of the task.

How do I restrict an AI agent to trusted websites?

Put enforceable domain rules at the search or tool layer when the boundary needs to hold even if the model makes a poor decision. A prompt can guide behaviour, but it does not prevent the underlying search tool from returning a disallowed source unless the tool itself enforces that scope.

AWS now supports both target-level and request-level domain policies in AgentCore Web Search. Request-level rules can narrow the administrator's configured scope, but they cannot expand it. Include lists effectively intersect, while exclusions accumulate.

Layered source control

Organization rules and request rules should combine into one effective search scope.

This pattern is especially useful when a shared AI product serves different teams or customers that need narrower source boundaries for different tasks.

Organization policy01

Set the maximum search boundary

Administrators define the domains the search target may use or must exclude across requests.
  • Approved source families
  • Blocked domains
  • Shared governance boundary
narrows
Request policy02

Narrow the scope for this task

The current workflow or tenant can apply a smaller domain set and a date window that fits the question.
  • Task-specific domains
  • Tenant-specific restrictions
  • Publication-date bounds
enforces
Effective scope03

Search only inside the combined boundary

The runtime request can become stricter, while administrator restrictions continue to apply.
  • Allowed results only
  • Blocked sources stay blocked
  • No runtime widening
AgentCore's current filtering model follows this pattern: request filters can reduce the search space but cannot relax target-level restrictions.

Should source rules live in the prompt or the search layer?

Use the prompt to explain how the agent should behave. Use the search layer for boundaries the product needs to enforce.

A system prompt saying “use official vendor sources” is helpful guidance. A search configuration that returns only approved vendor domains is an enforceable boundary. These are complementary controls, not interchangeable ones.

Freshness should follow how quickly the fact can change

Freshness is not one number that can be applied to every search. It depends on the question, the source, and how quickly the underlying information can become outdated.

Historical reference material may remain useful for years. Product inventory can change within hours. A software support question may care more about the currently supported version than the calendar date printed on the page.

How fresh should AI web search results be?

Choose the freshness window from the life of the fact being checked. A narrower window makes sense when stale information would change the answer materially.

Question typePossible freshness expectation
Current inventory or availabilityHours or a few days
Recent company announcementDays or weeks
Current-quarter financial informationCurrent reporting period
Supported software versionCurrent support and documentation state
Historical referenceOften no freshness restriction
Regulation currently in forceCurrent authoritative source with effective dates checked

AgentCore's publication-date filter accepts inclusive from and to UTC bounds. When a date filter is active, results without a recognized publication date are excluded. AWS describes that behaviour as favouring precision over recall, so a stricter filter can return fewer results while keeping the returned set inside the requested boundary.

How do I stop an AI agent from using outdated sources?

Set the freshness rule before search, then carry it as part of the retrieval policy rather than asking the model to judge recency from snippets after the fact.

The product-level contract can stay independent of whichever provider currently performs the search.

Provider-neutral policy

Keep evidence rules inside your application, not inside one provider's field names.

The application can define source, freshness, citation, and no-evidence behaviour once, then translate that contract into AWS, OpenAI, another search provider, or an internal search layer.

search-policy.ts
typescript
type SearchPolicy = {useWeb: boolean;allowedDomains?: string[];blockedDomains?: string[];publishedAfter?: string;publishedBefore?: string;citationsRequired: boolean;onNoEvidence: "stop" | "ask_to_broaden";}; const policy: SearchPolicy = {useWeb: true,allowedDomains: ["sec.gov", "investor.example.com"],publishedAfter: "2026-07-01T00:00:00Z",citationsRequired: true,onNoEvidence: "stop",};
Define the product policy first. Provider-specific request fields should be an adapter around that policy, not the source of the business rule.

For AgentCore connector version 1.2.0, the corresponding request can include a domain allowlist and publication-date range inside the filters object.

AWS implementation example

Translate the product policy into AgentCore filters.

This request narrows search to one approved domain and a specific publication window. The surrounding product rule remains provider-neutral.

agentcore-web-search.json
json
{"query": "latest SEC enforcement actions","maxResults": 10,"filters": {  "domainFilter": {    "include": ["sec.gov"]  },  "publishedDateFilter": {    "from": "2026-08-01T00:00:00Z",    "to": "2026-08-24T23:59:59Z"  }}}
The request shape is AWS-specific. The decision behind it is not. The same product can later translate its policy into another search API or a controlled internal retrieval service.

No qualifying evidence is a valid outcome

A search-grounded product should be able to finish without an answer when the available evidence does not meet the policy. Forcing every search into a response encourages the system to use weaker sources simply because the interface expects text.

What should happen when nothing meets the policy?

Return an evidence gap that explains what was missing. The product can say that no approved source was found, that no result fit the freshness window, or that older information exists but does not satisfy the current request.

Should the agent automatically widen the search?

Usually not when the original limits represent a trust, compliance, customer, or product-quality requirement. Widening should be a visible policy change.

For example, the product can ask whether to search older official sources, expand to verified secondary sources, or hand the case to a reviewer. The agent does not need to lower the standard on its own simply because the first search returned zero qualifying results.

Keep sources attached to the answer

Source information is easiest to trust when it stays attached from retrieval through generation. If search results are stripped down to anonymous text too early, the final answer becomes harder to review and citations become harder to reconstruct.

AWS Web Search returns structured result information such as titles, URLs, snippets, and publication dates. OpenAI's web-search tooling can return the full set of URLs consulted by the search call, while its domain filters can constrain which domains are available to the tool. Google's Search Grounding returns citation annotations that connect output text to web sources.

How do I keep citations attached to the final answer?

Store source identity with the retrieved evidence before the model sees it, then let the answer reference those evidence records rather than trying to rebuild provenance afterward.

Citation data model

Keep source identity attached to retrieved evidence.

The answer can reference evidence records while the application keeps the URL, publication date, search query, and snippet available for citations and later review.

evidence.ts
typescript
type Evidence = {id: string;title: string;url: string;publishedAt?: string;snippet: string;query: string;}; type GroundedAnswer = {text: string;evidenceIds: string[];};
Preserve provenance during retrieval. Reconstructing reliable citations after the model has already synthesized anonymous text is much harder.

The rendering layer can resolve evidenceIds into citations, while the stored search trace still shows which query produced each result and what metadata was available when the answer was created.

That separation is useful for debugging too. A team can inspect whether the problem came from the search query, result ranking, source policy, publication date, or the model's synthesis.

Evaluation boundary

A web-enabled agent needs retrieval tests alongside answer-quality tests.

A final answer can sound correct even when the agent searched unnecessarily, used a blocked source, ignored a freshness requirement, or lost citation coverage. Test the search trace as its own part of the product.

Search decision

Check that changing public questions trigger web search and private or already-owned knowledge does not search the open web unnecessarily.

Source compliance

Verify that returned domains satisfy the allowed and blocked source policy for the task.

Freshness compliance

Confirm that date-sensitive evidence fits the required window and that undated results are handled according to policy.

Citation coverage

Check that claims built from web evidence retain usable source references in the final experience.

Evidence-gap behaviour

Test that the workflow stops or asks to broaden when nothing qualifies instead of silently switching to weaker evidence.

Search trace

Keep enough query and result metadata to understand why a source entered the answer when something needs review later.

Before moving on

Search policy is part of agent behaviour. It deserves the same testing discipline as prompts, tool calls, and final outputs.

When web search is the wrong retrieval layer

Web search works well for changing public information and discovery. It becomes a poor fit when the product already owns the knowledge, needs a structured transaction, or repeatedly depends on the same known sources.

Choosing the retrieval layer by habit can create extra cost, duplicated work, and less predictable answers.

When should I use RAG instead of web search?

Use controlled retrieval when the product owns or curates the source collection and needs predictable access to it. Company documentation, customer files, private policies, expert archives, and controlled research libraries are common examples.

In those systems, ingestion, metadata, permissions, retrieval, and evaluation can be designed around a known knowledge boundary. Open-web search is more suitable when discovering current public information is part of the job.

When is an API better than web search?

Use an API when the needed information is structured, authoritative, and already exposed by the system that owns it. Account balances, inventory, order state, shipping status, and other transactional information are stronger candidates for direct system access than search.

A search result about an account is never more authoritative than the account system itself.

When does web search become a data-pipeline problem?

Repeatedly searching the same known sources can be a sign that the product needs persistent ingestion instead. If the system must collect the same publishers on a schedule, normalize records, remove duplicates, detect source failures, store history, and expose that data repeatedly, a data pipeline gives the team a clearer operating model.

That is the pattern behind Ascent Innovate Software's Real Estate News Data Pipeline & API Dashboard. Source-specific collection feeds a normalized data layer that can be monitored and reused rather than rebuilding the same source work for each request.

The same distinction applies when designing AI Integration & Workflow Automation: web search, RAG, APIs, tools, and persistent pipelines should each be used where their information boundary fits the product job.

What should a production team decide before enabling web search?

The useful decisions happen before web search becomes a generic tool available to every agent. A short policy review can make later implementation, testing, and debugging much easier.

Ask:

  • Which tasks actually need changing public information?
  • Which tasks should use private retrieval instead?
  • Is there an authoritative API for any of the required data?
  • Are some domains preferred, required, or prohibited?
  • How quickly can the underlying fact change?
  • Must every result have a verifiable publication date?
  • Are citations required in the user-facing answer?
  • What happens when no evidence meets the policy?
  • Who is allowed to broaden the search?
  • Are search traces stored for debugging and evaluation?
  • Can customer or tenant rules narrow the source scope further?

These answers survive provider changes. AWS, OpenAI, Google, and other search systems can change their APIs while the product still needs the same answer to a more durable question: what evidence are we willing to accept for this job?

The useful rule is simple

Web search becomes much more dependable when the product decides what acceptable evidence looks like before the search begins.

Use the web when the task depends on changing public information. Enforce source boundaries where they matter. Set freshness according to how quickly the fact can change. Preserve citations through the answer flow. Allow the workflow to return an evidence gap instead of quietly lowering the standard.

That gives the agent more than access to the web. It gives the product a clear way to decide which evidence can shape the answer.

Sources

References used for this Insight

This Insight uses current first-party documentation for web-search filtering, source metadata, publication-date controls, and citation behaviour. The evidence-policy framework and product interpretation are Ascent Innovate Software's analysis.

  1. 01

    AWS

    Official sourceAug 19, 2026

    Domain and publish date filters for Web Search on AgentCore

    Used for AgentCore connector 1.2.0 runtime domain and publication-date filters, layered admin/runtime policy behaviour, and filter compliance semantics.

    Source
  2. 02

    Amazon Bedrock AgentCore

    Documentation

    Web Search Tool

    Used for request-level filter fields, target-level policy composition, search result structure, and current Web Search tool behaviour.

    Source
  3. 03

    OpenAI

    Documentation

    Web search

    Used for current Responses API web-search domain filtering and the sources metadata available for search calls.

    Source
  4. 04

    Google AI for Developers

    DocumentationAug 20, 2026

    Grounding with Google Search

    Used for current Google Search grounding behaviour and citation annotations that connect generated text to web sources.

    Source

Source links support the facts they are attached to. They do not imply that the source publisher endorses Ascent's interpretation or recommendations.