Add FMKB-via-AgentCore-Gateway sample deployed to AgentCore Runtime#717
Open
shraiyya wants to merge 1 commit into
Open
Add FMKB-via-AgentCore-Gateway sample deployed to AgentCore Runtime#717shraiyya wants to merge 1 commit into
shraiyya wants to merge 1 commit into
Conversation
Adds a sibling to 01-end-to-end-example-with-ac-gateway. The 01 folder runs the Strands agent locally; this folder packages the same agent and deploys it to AgentCore Runtime via the agentcore CLI (bedrock-agentcore-starter-toolkit). The sample is split into two scripted sub-folders so each piece can be exercised independently: - 01-raw-mcp/ provisions the gateway role + gateway + KB target, exercises the gateway -> KB plumbing without an agent in the loop, and tears it all down. Idempotent: re-running setup reuses the same resources by exact-name match instead of orphaning siblings. - 02-strands-agent/ is the BedrockAgentCoreApp entrypoint, deployed via agentcore configure && agentcore deploy. Includes the runtime trust policy and a least-privilege execution policy that grants bedrock-agentcore:InvokeGateway scoped to the gateway ARN.
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.
Issue #, if available: N/A
Description of changes:
Adds a sibling to
01-end-to-end-example-with-ac-gateway. The 01 folder runs the Strands agent locally; this folder packages the same agent and deploys it to Bedrock AgentCore Runtime via theagentcoreCLI (bedrock-agentcore-starter-toolkit).The sample is split into two scripted sub-folders so each piece can be exercised independently:
01-raw-mcp/— provisions the gateway IAM role + AgentCore Gateway + KB target, exercises the gateway → KB plumbing via raw MCP+SigV4 (no agent in the loop), and tears it all down. Idempotent: re-running setup reuses the same resources by exact-name match instead of orphaning siblings.02-strands-agent/—BedrockAgentCoreAppentrypoint deployed viaagentcore configure && agentcore deploy. Ships the runtime trust policy and a least-privilege execution policy that grantsbedrock-agentcore:InvokeGatewayscoped to the gateway ARN. The system prompt locks the agent to KB-grounded answers (no model-knowledge fallback).Tested end-to-end in
us-west-2against an existing FMKB knowledge base:setup_gateway.py→ gateway + target bothREADY; second run reuses the same IDs (no orphans)Retrievereturns 5 hits, top score > 0.95agentcore deploysucceeds;agentcore invokereturns substantive answers with KB citations on-topic, refuses cleanly off-topiccleanup.py+agentcore destroy --force --delete-ecr-repoleave zero orphansvalidate-policyreturns 0 findings on both policiesDependencies pinned:
botocore>=1.43.32(first release that models thebedrock-knowledge-basesconnector underCreateGatewayTarget).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.