[FEATURE] Add a WebSearch client to bedrock_agentcore.tools and a create_web_search_target() helper
@sundargthb is already working on this.
Since Sep 1, 2026.
Assessment
This issue has not been assessed yet.
Description
Is your feature request related to a problem? Please describe.
bedrock_agentcore.tools ships first-class clients for two of the built-in tools:
browser_client.pyprovidesBrowserClientcode_interpreter_client.pyprovidesCodeInterpreterClient
Web Search has no equivalent, even though it is reachable today as a Gateway connector target. To run one search from Python a developer has to create a gateway, create a target whose targetConfiguration.mcp.connector.source.connectorId is web-search with the WebSearch operation enabled, attach a GATEWAY_IAM_ROLE credential provider, wait for the target to reach READY, and then call it over MCP with SigV4-signed requests. The comparable third-party search tools are an install and a key.
Describe the solution you'd like
Two additions, both following patterns that already exist in this repo.
-
src/bedrock_agentcore/tools/web_search_client.pywith aWebSearchClient, shaped like the existing two clients in that package, so a search is one constructor and one call. The client owns the transport and the request signing, and keeps both as internal details that callers do not configure. -
A
create_web_search_target()helper onGatewayClient, directly analogous to the existingcreate_knowledge_base_target()atsrc/bedrock_agentcore/gateway/client.py. That method builds theconnectorId: "bedrock-knowledge-bases"connector withenabled: ["Retrieve"]and aGATEWAY_IAM_ROLEcredential provider, then delegates tocreate_gateway_target_and_wait(). The web search equivalent would buildconnectorId: "web-search"withenabled: ["WebSearch"]the same way. Generic target creation already works throughcreate_gateway_target_and_wait(), so this is about a typed one-call helper rather than new capability.
The helper should also expose the filtering the connector supports. For reference, aws/agentcore-cli currently models only domain exclusion: WebSearchTranslatorInput in src/cli/operations/connectors/translators.ts has a single excludeDomains field and builds parameterValues.domainFilter = { exclude: [...] }. Domain inclusion is not exposed there.
Describe alternatives you've considered
Leaving each consumer to wire up Gateway and MCP itself. There are several that need the same thing: a Strands integration, a LangChain package, aws/agentcore-cli, the four framework examples in aws/mcp-proxy-for-aws, and the documentation. If each one builds its own path, every change to how a search is reached has to be repeated in all of them. One client in the SDK means it is done once.
Additional context
This repo already carries framework integrations for AgentCore capabilities under <capability>/integrations/strands/, and pyproject.toml has the strands-agents and langgraph extras wired for exactly that. A web search client here is the natural base for those.
- Dominant language
- Python
- Stars
- 764
- Forks
- 149
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/bedrock-agentcore-sdk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/bedrock-agentcore-sdk-python#496 · 1 comment ·
-
Pydantic deprecation warning: Support for class-based `config` is deprecated, use ConfigDict instead Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/bedrock-agentcore-sdk-python#320 · 2 comments · 3 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
All issues in aws/bedrock-agentcore-sdk-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100