Building Production AI Agents with AWS Strands SDK
Duration: 1 hour and 20 minutes (80 minutes)
Format: Hands-on workshop with live coding
Target Audience: Developers, AI Engineers, Solution Architects
By the end of this workshop, you will be able to:
- Build AI agents using the model-driven AWS Strands SDK approach
- Integrate multiple LLM providers (Bedrock, OpenAI, NVIDIA NIM, OpenRouter)
- Create custom tools and extend agent capabilities
- Implement multi-agent orchestration patterns using agents-as-tools
- Deploy agents to production using AWS Lambda
- Understand A2A protocol for agent interoperability
- Integrate MCP (Model Context Protocol) for enhanced tool capabilities
Get started in under 2 minutes with zero local setup!
- Fork this repository: Fork strands-workshop
- Launch Codespace: Click "Code" β "Create codespace on main"
- Wait for setup (2-3 minutes): All dependencies install automatically
- Configure AWS: Run
aws configure
and enable Claude 3.7 Sonnet in Bedrock Console - Verify & Start:
python setup/verify_setup.py
then begin Module 1
π Detailed Codespaces Setup Guide
Skip this section if using Codespaces above
- Python 3.10+ installed
- AWS Account with Bedrock access
- Docker (for MCP server integration)
- API Keys (optional but recommended):
- OpenAI API key
- NVIDIA NIM API key
- OpenRouter API key
- Fork and clone this repository
- Create virtual environment:
python -m venv .venv && source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Configure AWS credentials:
aws configure
- Enable Claude 3.7 Sonnet in AWS Bedrock Console
- Verify setup:
python setup/verify_setup.py
Master individual agent development
- Module 1: Hello Agent (10 min) - Your first working agent with basic model integration
- Module 2: Custom Tools (10 min) - Extend agent capabilities with @tool decorator and MCP integration
Build collaborative agent systems
- Module 3: Research Team (20 min) - Real multi-agent coordination using agents-as-tools pattern with MCP
- Module 4: Lambda Deployment (20 min) - Production deployment patterns and serverless architecture
Production deployment and interoperability
- Module 5: A2A Preview (20 min) - Agent-to-agent communication with decoupled architecture
strands-workshop/
βββ README.md # This file
βββ setup/ # Setup verification scripts
β βββ verify_setup.py # Complete setup verification
β βββ test_providers.py # Test provider access
β βββ troubleshooting.md # Common issue resolution
βββ exercises/ # Progressive workshop modules
βββ module1-basics/
β βββ README.md # Module 1 documentation
β βββ exercise1-hello-agent.py # Basic agent creation
β βββ exercise1-simple-multi-provider.py # Multi-provider example
βββ module2-tools/
β βββ README.md # Module 2 documentation
β βββ MCP_INTEGRATION.md # MCP integration guide
β βββ exercise2-custom-tools.py # Custom tool development
β βββ optional-module2-mcp-integration.py # Optional MCP exercise
βββ module3-multi-agent/
β βββ README.md # Module 3 documentation
β βββ exercise3-research-team.py # Multi-agent orchestration
βββ module4-deployment/
β βββ exercise4-lambda-deployment-tutorial.md # Deployment guide
βββ module5-advanced/
βββ README.md # Module 5 documentation
βββ exercise5-a2a-preview.py # A2A protocol overview
βββ main.py # A2A system entry point
βββ src/ # Decoupled agent implementation
βββ orchestrator.py # Main orchestration logic
βββ research_agent.py # Research specialist
βββ analysis_agent.py # Analysis specialist
βββ factcheck_agent.py # Fact-checking specialist
βββ qa_agent.py # Quality assurance specialist
-
Verify Setup:
python setup/verify_setup.py
-
Test Provider Access:
python setup/test_providers.py
-
Start with Module 1:
cd exercises/module1-basics python exercise1-hello-agent.py
# Virtual environment setup
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install all dependencies
pip install -r requirements.txt
# Core Strands SDK
pip install strands-agents
# Provider-specific dependencies
pip install 'strands-agents[openai]' # OpenAI integration
pip install 'strands-agents[litellm]' # NVIDIA NIM and OpenRouter
pip install 'strands-agents-tools' # Built-in tools
# AWS integration
pip install boto3 # AWS SDK for Bedrock
Create a .env
file in the workshop root:
# AWS (configured via aws configure)
AWS_REGION=us-east-1
# Optional API Keys
OPENAI_API_KEY=sk-...
NVIDIA_API_KEY=nvapi-...
OPENROUTER_API_KEY=sk-or-...
- AWS Strands SDK: Model-driven agent framework with intelligent routing
- Amazon Bedrock: Enterprise LLM service (Claude 3.7 Sonnet)
- OpenAI: GPT-4 models for comparison and fallback
- NVIDIA NIM: GPU-accelerated inference
- OpenRouter: Cost-effective model gateway
- MCP (Model Context Protocol): Tool integration and external service access
- AWS Lambda: Serverless deployment and production scaling
- A2A Protocol: Agent-to-agent communication standard
Each module builds progressive complexity:
- Module 1: Hello Agent β Master core SDK concepts and basic agent creation
- Module 2: Custom Tools β Extend capabilities with @tool decorator and MCP integration
- Module 3: Multi-Agent β Real orchestration using agents-as-tools pattern
- Module 4: Lambda Deployment β Production deployment patterns and serverless architecture
- Module 5: A2A Preview β Advanced interoperability and decoupled agent systems
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β User βββββΆβ Agent βββββΆβ Bedrock β
β Input β β (Strands) β β Claude β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β User βββββΆβ Agent βββββΆβ Bedrock β
β Input β β +Tools β β Claude β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ
β Custom Toolsβ
β MCP Server β
βββββββββββββββ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β User βββββΆβOrchestrator βββββΆβ Bedrock β
β Input β β Agent β β Claude β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ
β Specialist β
β Agents β
β (@tool) β
βββββββββββββββ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Client βββββΆβ Lambda βββββΆβ Bedrock β
β Request β β Handler β β Claude β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ
β Agent Logic β
β +Tools β
βββββββββββββββ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β User βββββΆβOrchestrator βββββΆβ Research β
β Input β β Process β β Agent β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βββββββββββΆ βββββββββββββββ
β β Analysis β
β β Agent β
β βββββββββββββββ
β
βββββββββββΆ βββββββββββββββ
β Fact-Check β
β Agent β
βββββββββββββββ
- ModuleNotFoundError: Run
pip install -r requirements.txt
- AWS Credentials: Run
aws configure
and ensure Bedrock access - Bedrock Access: Enable Claude 3.7 Sonnet in AWS Bedrock Console
- API Keys: Check environment variables in
.env
file - Docker Issues: Required for MCP server integration (DuckDuckGo, Sequential Thinking)
- MCP Connection: Ensure Docker is running for MCP server-based tools
- Check
setup/troubleshooting.md
for detailed issue resolution - Use setup verification scripts:
python setup/verify_setup.py
- Review individual module READMEs for specific guidance
- AWS Strands SDK Documentation
- Amazon Bedrock User Guide
- Model Context Protocol (MCP) Documentation
- A2A Protocol Documentation
Ready to build production AI agents? Let's get started! π