Add Brave Search web-search partner extension (aws-brave/) - #7
Open
SaRedfiche wants to merge 1 commit into
Open
Conversation
Adds a partner extension under aws-brave/ giving the workshop agents live web search via the Brave Search API, wired as an AgentCore Gateway Lambda target surfaced through a Strands A2A Research Agent. - web_search_lambda/: stdlib-only Brave client + Lambda handler (key from Secrets Manager) - research_agent/: web_search @tool, MCP tool schema, A2A server - tests/: unit tests (Brave client, Lambda handler, tool/schema) - workshop/l3-orchestration/6_web_search_agent.ipynb: end-to-end deploy lab - README: architecture, native AgentCore Web Search vs partner contrast, security, cleanup aws-only/ is untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a partner extension under
aws-brave/that gives the workshop's agents live web search via the Brave Search API, following the framework's partner-extension pattern — an AgentCore Gateway Lambda target surfaced through a Strands A2A "Research Agent." The coreaws-only/track is untouched.What's included
code/web_search_lambda/— stdlib-only Brave client + Lambda handler (anycompany_brave_web_search); reads the API key from Secrets Manager at runtime.code/research_agent/—web_search@tool, MCP tool schema, and the A2A server (cloned from the base Order/Refund agent pattern).code/tests/— 20 unit tests (Brave client, Lambda handler, tool-arg builder, schema) — no AWS or network needed.workshop/l3-orchestration/6_web_search_agent.ipynb— end-to-end deploy lab: key entry → Lambda → Gateway target → MCP smoke test → Research Agent deploy (CodeBuild) → Registry → direct A2A invoke → cleanup.README.md— architecture, a native AgentCore Web Search vs. Brave (partner) contrast, security, cost, and cleanup.How it wires in
Routing through the Gateway means the tool inherits L4 PII masking and L5 tracing, consistent with the base agents.
Testing
cd aws-brave/code && python3 -m venv .venv && .venv/bin/python -m pip install -r requirements-test.txt && .venv/bin/python -m pytest tests/ -v→ 20 passed.tools/calland the deployed Research Agent both return live Brave results with citations.Security notes
GetSecretValueon the Brave secret only.