Most "give my agent web access" projects die in the plumbing: procuring a third-party search API, juggling keys and rate limits, parsing inconsistent result formats, and worrying about where customer queries travel. I built a small app — JokeBot — to show that none of that is necessary anymore. The star of the app isn't the jokes. It's the managed web search behind them, see AgentCore Gateway Web Search documentation
The core feature: managed web search via Amazon Bedrock AgentCore Gateway
JokeBot takes a topic ("a dad joke about Python") and returns a joke grounded in a current fact. To do that, the agent calls a Web Search Tool exposed through Amazon Bedrock AgentCore Gateway as a standard MCP tool. What makes this the centerpiece:
- You don't maintain it. No Search API to provision, no API keys, no result parsing, no scaling. You add the
web-searchconnector to your AgentCore Gateway, and it shows up to your agent as aWebSearchtool. That's the entire integration.
- Fixed, usage-based pricing. It's a managed AWS service billed per query, predictable cost, no third-party contracts or surprise quota tiers. See pricing page https://aws.amazon.com/bedrock/agentcore/pricing/
- Queries stay inside AWS. Searches are served from an Amazon-operated web index. Customer queries are not sent to an external search engine, which removes a whole category of data-egress review.


How it fits together
Browser → CloudFront (private S3 via OAC)Browser → Cognito (login → JWT)Browser → API Gateway (JWT authorizer) → Lambda proxy → AgentCore Runtime (managed harness, Claude Opus 5) → AgentCore Gateway → Web Search ToolThe model is the orchestrator: it reasons about the prompt, decides to call
WebSearch , gets grounded results back, and writes the final answer. Web search is a tool the model reaches for — not a preprocessing step you wire by hand.What we did not have to build
- No search infrastructure. The AgentCore Gateway connector is the whole integration.
- No container, no agent runtime code. The app runs on an Amazon Bedrock AgentCore Managed harness — you declare the model, system prompt, and tools; AWS runs the agent loop. There's no Dockerfile and no orchestration code to maintain.
- No public storage. The UI is served over HTTPS by CloudFront with Origin Access Control, keeping the S3 bucket fully private.
The result: a working, authenticated, web-grounded agent whose only hand-written code is a thin request proxy. The differentiated capability, current, cited, private-by-design web search, is fully managed.
Web Search Invocations Metrics in CloudWatch
You can look up how many invocations you had in CloudWatch metrics. In the screenshots below, you can see my 19 web search invocations in my tests.

Takeaway
If your agent needs to search the web, you no longer build and operate a search stack to get there. AgentCore Gateway's managed web search turns "ground my agent in the live web" into a connector you attach and a tool your model calls, with fixed pricing (see pricing page https://aws.amazon.com/bedrock/agentcore/pricing/ ) and nothing to maintain.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article