Repository navigation
Decision Web Search Provider
The web_search tool calls AgentCore InvokeWebSearch, not Google Custom
Search. The builder decided on 2026-11-16, after the research on
Source-AgentCore-Web-Search-Tool.
Why:
- Google was never going to work. The Custom Search JSON API is closed to new customers and ends on 2027-01-01. The builder holds no key, so the tool could not have run even on day one.
-
No secret and no new dependency. The call is SigV4-signed with the
runtime role, and
@aws-sdk/client-bedrock-agentcoreis already installed. The two search SSM parameters are gone, and the runtime now needs only the weather and news parameters to boot. - Queries stay in AWS. There is no third-party vendor, account or card.
- Cost. The first 5,000 queries a month are free per account, then $7.00 per 1,000.
This is a cost-model change, so a decision record comes before code. The builder chose to handle it under spec 003 (task T178a, deviation C46) rather than a new spec.
| Piece | Where |
|---|---|
| Tool |
webSearchTool.ts sends InvokeWebSearchCommand with web-search.v1, at most 5 results and a query of at most 200 characters. It forwards the abort signal and drops any result with no URL |
| Client | One BedrockAgentCoreClient per process in index.ts, built on first use like Polly's, and injected into the fetcher so tests need no network |
| IAM |
bedrock-agentcore:InvokeWebSearch on arn:aws:bedrock-agentcore:<Region>:aws:tool/web-search.v1 in agent-stack.ts
|
| Hard stop |
DENIED_ACTIONS in hard-stop.ts denies the action, because searches bill past the free allowance |
The hard-stop denial was added by the engineer rather than asked for. The rule is that the hard stop denies every spend-bearing action, and this one bills. Remove it only if search is deliberately kept alive during a spend stop.
Results without a URL are dropped because AWS's acceptable-use terms require the source link to be shown with each result.
| Option | Why not |
|---|---|
| Google Custom Search | Closed to new customers; ends 2027-01-01 |
| AgentCore Gateway connector | Same index and price, but it needs a gateway and an MCP client for no gain on one agent |
| Brave, Exa, Tavily | Each needs a key in SSM, a vendor account and, for Brave, a card. Revisit only if InvokeWebSearch quality is poor |
| Serper, SerpApi | They scrape Google, which carries terms risk |
| Vertex AI Search | Covers at most 50 domains, and adds a second cloud |
Prices and terms for the rejected options are on the source page, read on 2026-11-16.
None of these blocks deployment, but each should be closed before the persona relies on search:
- Quality is untested. Nobody has made a live call. It is free inside the 5,000 but spends quota, so it needs the builder's approval (T180).
- Free-plan eligibility of the free queries is unconfirmed. AWS says "every AWS account". Per Decision-AWS-Account-Plan, this is not grounds to reject the option.
Closed by T181 (main-repo 84e15a0, builder decisions of 2026-11-16):
-
Citation display. The agent emits a
sourcesSSE event carrying each result's title and URL, and the UI shows the links. The terms are met whatever the persona says. - Metering. Each search is priced at 7,000 µUSD ($7.00 per 1,000, ignoring the free allowance) and reserved before the call. A session may make at most 10 searches.
-
Known limitation. Searches in a cancelled or failed turn are not added
to the session's
webSearchescount. The spend reservation still covers them.
See also: Component-Agent-Runtime, Concept-Budget-Ceiling, Gotchas, Index.
- Concept-Cloud-Only-Inference
- Concept-Budget-Ceiling
- Concept-Personality-Gate
- Concept-IP-And-Legal-Posture
- Concept-Supply-Chain-Discipline
- Concept-Graceful-Degradation
- Concept-Observability
- Concept-Testing-And-TDD
- Concept-Credential-Hygiene
Editing in the browser? Wiki edits are live and bypass wiki:lint. Read
Guide-Wiki-Contributing first.