,

Wiring Web Search on Amazon Bedrock Into Your Agent

A robot assistant connected to a glowing globe representing Web Search on Amazon Bedrock

Web Search on Amazon Bedrock landed in the August 10, 2026 AWS Weekly Roundup, and it’s the kind of feature that quietly kills an entire category of side projects — the ones where someone on your team spent three sprints building a homegrown web-scraping-and-chunking pipeline just so the model could tell you who won yesterday’s game. Now GPT-5.4, GPT-5.5, and GPT-5.6 (Sol, Terra, and Luna variants) running on Bedrock can reach out to the live internet as a first-party tool call during inference. No proxy service, no scraper fleet, no cron job re-indexing news sites at 2 AM. Let’s get into how it actually wires up.

What Web Search on Amazon Bedrock actually is

Conceptually, this isn’t new territory for Bedrock — it’s the same tool-use pattern that Amazon Bedrock Agents has used for years to call Lambda functions or query a Knowledge Base. The model decides mid-inference that it needs external information, emits a tool call, the tool executes, and the result gets fed back into the context window before the model finishes its answer. What’s new is that AWS is now shipping a first-party live web-search tool instead of leaving retrieval entirely up to you. You still get citations, still get a tool-invocation trace, still control the blast radius with Bedrock Guardrails — but you’re no longer the one maintaining the retrieval half of that RAG stack.

That distinction matters. A Knowledge Base grounds the model in documents you own. Web Search grounds it in documents nobody owns, updated constantly, which is exactly what you want when someone asks about current pricing, a recent outage, or a regulation that changed last Tuesday.

Wiring the tool into an inference call

The exact parameter names AWS ships in general availability may shift slightly from preview — this is days-old functionality, so treat the syntax below as illustrative of the shape, and check the current Bedrock API reference before you ship. Structurally, though, it follows the same tool-config pattern Bedrock’s Converse API already uses for function calling:

import boto3

bedrock = boto3.client("bedrock-runtime", region_name="us-east-1")

response = bedrock.converse(
    modelId="anthropic.gpt-5-5-terra-v1:0",
    messages=[
        {"role": "user", "content": [{"text": "What's the current AWS re:Invent 2026 keynote lineup?"}]}
    ],
    toolConfig={
        "tools": [
            {
                "webSearch": {
                    "name": "web_search",
                    "maxResults": 5,
                    "allowedDomains": ["aws.amazon.com", "reinvent.awsevents.com"],
                    "citationMode": "inline"
                }
            }
        ],
        "toolChoice": {"auto": {}}
    }
)

If you’re orchestrating through Bedrock Agents rather than a raw Converse call, the web search tool slots in as another action group alongside your Lambda functions and Knowledge Base associations — the agent’s planning step decides, per turn, whether it needs to search the web, query your private index, or answer from what it already knows.

Latency and cost: live browsing isn’t free

Here’s the part that gets glossed over in launch blog posts. A tool call to the open internet is not the same latency profile as a vector lookup against a Knowledge Base you’ve already indexed. You’re adding a network round trip to a third-party search backend, possibly multiple page fetches if the model decides one result isn’t enough, and then re-tokenizing whatever comes back before the model can finish generating. In practice, budget for meaningfully higher p95 latency on any turn that triggers a web search versus one that doesn’t — likely low seconds rather than sub-second.

Cost follows the same shape. You’re paying for the search invocation itself, plus the extra input tokens from whatever content gets pulled back into context (search snippets are usually a few hundred tokens each, but full-page fetches can balloon fast). Compare that to a cached Knowledge Base query, where your only marginal cost is the retrieval call and a context window you’ve already sized. My advice: don’t let the model search on every single turn by default. Set toolChoice to auto rather than forcing it, write a system prompt that nudges the model to only reach for the web when the question clearly needs current information, and log which turns actually invoke the tool so you can see your real invocation rate before you get surprised by the bill.

An AI agent routing between live web search and private documents

Handling citations and source URLs

This is the part you actually have to build UI around. When the web search tool fires, the response payload comes back with the source URLs attached — typically as structured citation metadata alongside the generated text rather than the model just narrating “according to some website.” Don’t skip surfacing this. A confidently-wrong answer with no citation is a liability; a confidently-correct answer with a visible source is a feature people trust.

for block in response["output"]["message"]["content"]:
    if "text" in block:
        print(block["text"])
    if "citations" in block:
        for c in block["citations"]:
            print(f"  source: {c['url']} (retrieved {c['retrievedAt']})")

Persist those citations alongside the generated response in whatever conversation store you’re using. If you’re running this behind Bedrock Guardrails, you can also apply content filters to the fetched web content before it reaches the model — same as you’d filter a document ingested into a Knowledge Base, except now the “document” is whatever the open internet handed back, which is a lot less predictable than your own S3 bucket.

Where this fits in your architecture

Web Search on Amazon Bedrock isn’t a replacement for Knowledge Bases — it’s a second retrieval tool sitting next to it. Your private product docs, contracts, and internal wikis still belong in a Knowledge Base where you control access and quality. Anything time-sensitive and public — pricing pages, news, current events, competitor announcements — is what this tool is for. The interesting engineering work is in the routing logic that decides which one to call, and we cover that split in detail in the companion piece on hybrid grounding architecture. For now: wire it in behind a feature flag, log every invocation, and watch your latency dashboards before you flip it on for every user.

Error handling and degraded modes

Treat the web search tool like any other network dependency, because that’s exactly what it is. Search backends time out, individual page fetches 404, and sometimes a domain you’ve allowlisted just goes down at the worst possible moment. None of that should take your whole response down with it. Wrap the tool call with a sane timeout, and give the model an explicit fallback instruction for when the tool returns nothing useful:

instruction = (
    "If the web search tool returns no results or times out, tell the user "
    "you weren't able to retrieve current information rather than guessing "
    "from memory. Never present training-data knowledge as if it were the "
    "result of a live search."
)

That last line matters more than it looks. Without it, a model that fails to get search results will often just quietly fall back to its stale training data and answer anyway — with the same confident tone it would use for a genuinely current answer. That’s the exact failure mode you added this tool to prevent, so make the fallback behavior explicit rather than assuming the model will do the sensible thing on its own.

Caching and re-invocation

Not every query needs a fresh fetch every time. If your app sees repeated variants of the same question in a short window, consider a thin cache keyed on the normalized query, with a TTL measured in minutes, not hours. That keeps you close to real-time freshness while cutting redundant invocations and their latency and cost. Just keep the TTL short enough that “current” doesn’t quietly become “twenty minutes stale and still calling itself live” — a smaller version of the same problem this tool exists to fix.

At Enkompass (enkompass.net), this is our home turf. We’ve shipped production Bedrock and SageMaker workloads that actually move the needle, not just demo well. If you’d rather have seasoned cloud people handle it instead of learning the hard way at 2 AM, let’s talk. Reach out through our contact page or call us directly at +1-828-436-5667 — we’ll help you turn this from a someday-project into a done-deal.

Ready when you are

Let’s map your route to AWS

A free 60-minute architecture review with a senior engineer. No slides, no SDR, just a plan.