Skip to content

Tutorial/multi agent agentcore deployment#225

Open
manoj-selvakumar5 wants to merge 2 commits intostrands-agents:mainfrom
manoj-selvakumar5:tutorial/multi-agent-agentcore-deployment
Open

Tutorial/multi agent agentcore deployment#225
manoj-selvakumar5 wants to merge 2 commits intostrands-agents:mainfrom
manoj-selvakumar5:tutorial/multi-agent-agentcore-deployment

Conversation

@manoj-selvakumar5
Copy link
Collaborator

Summary

  • Adds a new deployment tutorial that walks through building and deploying a multi-agent system on AgentCore using A2A
  • Implements an e-commerce shopping assistant with three agents: a Product Agent, an Order Agent, and an Orchestrator
  • Each agent is deployed to its own AgentCore runtime, discovers peers via agent cards, and communicates through standardized A2A JSON-RPC messages

What's included

3 Jupyter notebooks (run in order):

  1. Product Agent — A2A server that query the DummyJSON product catalog API
  2. Order Agent — A2A server with MCP integration for DynamoDB order lookup, using an async lifespan pattern to load tools after the server binds to port
  3. Orchestrator — HTTP endpoint that uses A2AClientToolProvider to discover specialist agents and route user queries via SigV4-authenticated A2A calls

Agent source files (product_agent/, order_agent/, orchestrator/):

  • Self-contained server code generated/referenced by each notebook
  • Per-agent requirements.txt for container builds

Shared utilities (utils/):

  • config.py — SSM paths and agent name constants
  • iam.py — IAM execution role creation with cross-account protection and scoped permissions
  • sigv4_auth.pyhttpx.Auth implementation for SigV4-signed inter-agent requests
  • dynamodb_setup.py — Table creation and sample data seeding
  • ssm_helpers.py — Parameter Store read/write helpers
  • streaming.py — Streaming display with in-place status updates and A2A event handling
  • callbacks.py — Tool logging callback handlers with deduplication

Sample data (sample_data/orders.json):

  • 6 orders across 3 customers with product IDs that reference the DummyJSON catalog, enabling combined multi-agent queries

Test plan

  • Run Notebook 1: Product Agent deploys and responds to A2A test queries
  • Run Notebook 2: Order Agent deploys, DynamoDB seeded, MCP tools load successfully
  • Run Notebook 3: Orchestrator deploys and routes queries to both specialist agents

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Latest scan for commit: 59a10fe | Updated: 2026-03-06 07:10:00 UTC

✅ Security Scan Report (PR Files Only)

Scanned Files

  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/01-a2a-server-product-agent.ipynb
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/02-a2a-server-order-agent.ipynb
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/03-a2a-client-orchestrator-agent.ipynb
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/README.md
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/images/architecture.png
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/orchestrator/agent.py
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/orchestrator/app.py
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/orchestrator/requirements.txt
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/order_agent/a2a_server.py
  • 01-tutorials/03-deployment/04-multi-agent-agentcore-deployment/01-a2a-orchestration/order_agent/requirements.txt
  • ... and 12 more files

Security Scan Results

Critical High Medium Low Info
0 0 0 0 0

Threshold: High

No security issues detected in your changes. Great job!

This scan only covers files changed in this PR.

@manoj-selvakumar5 manoj-selvakumar5 force-pushed the tutorial/multi-agent-agentcore-deployment branch from 7706f78 to db77d63 Compare February 13, 2026 00:21
@manoj-selvakumar5 manoj-selvakumar5 force-pushed the tutorial/multi-agent-agentcore-deployment branch from 9cbae1a to d42bbf7 Compare February 13, 2026 03:24
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add versions perhaps ?

"execution_count": null,
"metadata": {},
"outputs": [],
"source": "# Import standard libraries\nimport os\nfrom pathlib import Path\nfrom urllib.parse import quote\nfrom uuid import uuid4\n\n# Import AWS SDK\nimport boto3\n\n# Import utilities\nfrom utils import (\n PRODUCT_AGENT_NAME,\n PRODUCT_ROLE_NAME,\n SSM_PRODUCT_AGENT_URL,\n create_agentcore_role,\n)\nfrom utils.ssm_helpers import store_ssm_parameter\n\n# Get AWS account information\nsts = boto3.client(\"sts\")\naccount_id = sts.get_caller_identity()[\"Account\"]\nregion = \"us-west-2\" # Multi-agent tutorial uses us-west-2\n\n# Set paths\nNOTEBOOK_DIR = Path.cwd()\n\n# Ensure product_agent directory exists for %%writefile\n(NOTEBOOK_DIR / \"product_agent\").mkdir(exist_ok=True)\n\nprint(f\"AWS Account: {account_id}\")\nprint(f\"Region: {region}\")"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install cell is missing - I see it in prereq.. but add it as a cell. I think it's easier to "run all"

# Notebook dependencies for E-commerce Shopping Assistant deployment
boto3>=1.35.0
python-dotenv>=1.0.0
bedrock-agentcore-starter-toolkit>=0.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very broad.
with toolkit v0.1.x I get ValueError: protocol must be either HTTP or MCP.. Tested with

bedrock-agentcore==1.4.2
bedrock-agentcore-starter-toolkit==0.3.1
boto3==1.42.60

It works fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akshseh - I updated the notebooks. Added pinned versions and pip install

@manoj-selvakumar5 manoj-selvakumar5 force-pushed the tutorial/multi-agent-agentcore-deployment branch from 2d47af6 to d4cd244 Compare March 6, 2026 07:02
@manoj-selvakumar5 manoj-selvakumar5 force-pushed the tutorial/multi-agent-agentcore-deployment branch from d4cd244 to 59a10fe Compare March 6, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants