Model-driven SDK for building AI agents
- Lightweight, production-ready framework
- Supports multiple models and providers (Anthropic, OpenAI, Bedrock, etc.)
- Built-in tools: calculator, http_request, shell, current_time
- MCP server integration
- Streaming and async support
- Comprehensive observability
pip install strands-agents
pip install strands-agents-toolsfrom strands import Agent, tool
from strands_tools import calculator, current_time
agent = Agent(tools=[calculator, current_time])
response = agent("What is 25 * 48 and what time is it?")@tool
def letter_counter(text: str, letter: str) -> int:
"""Count occurrences of a letter in text"""
return text.lower().count(letter.lower())
agent = Agent(tools=[letter_counter])Enterprise-grade agent deployment platform
- Zero infrastructure management
- Built-in memory, security, observability
- Browser automation and code interpreter
- Gateway for MCP protocol integration
- Identity and authentication
- Auto-scaling and monitoring
pip install bedrock-agentcore-starter-toolkit
pip install bedrock-agentcore# Configure agent
agentcore configure -e my_agent.py
# Deploy to AWS
agentcore launch
# Test deployment
agentcore invoke '{"prompt": "Hello!"}'from strands import Agent
from bedrock_agentcore import BedrockAgentCoreApp
agent = Agent()
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
response = agent(payload.get('prompt', 'Hello'))
return str(response)
if __name__ == '__main__':
app.run()Deploy local Strands agents to enterprise AgentCore platform:
# Local development with Strands
from strands import Agent
from strands_tools import http_request
agent = Agent(tools=[http_request])
# Deploy to AgentCore
from bedrock_agentcore import BedrockAgentCoreApp
app = BedrockAgentCoreApp()
@app.entrypoint
def my_agent(payload):
return agent(payload.get('prompt'))Connect external tools via Model Context Protocol:
# MCP configuration
{
"mcpServers": {
"strands-agents": {
"command": "uvx",
"args": ["strands-agents-mcp-server"]
}
}
}Route agent requests through AgentCore Gateway:
# Gateway configuration
gateway_config = {
"name": "MyGateway",
"protocolType": "MCP",
"authorizerType": "CUSTOM_JWT"
}calculator- Mathematical operationshttp_request- API callsshell- System commandscurrent_time- Date/time functionsuse_computer- Desktop automation
- Browser Tool - Web automation with Playwright
- Code Interpreter - Python code execution
- Memory - Conversation persistence
- Gateway - MCP protocol routing
- Identity - Authentication & authorization
from bedrock_agentcore.tools.browser_client import browser_session
with browser_session("us-west-2") as client:
ws_url, headers = client.generate_ws_headers()
# Use with Playwright or Nova Actfrom bedrock_agentcore.tools.code_interpreter_client import code_session
with code_session("us-west-2") as client:
result = client.invoke("print('Hello from AgentCore!')")from strands.telemetry import StrandsTelemetry
telemetry = StrandsTelemetry()
telemetry.setup_otlp_exporter()
telemetry.setup_console_exporter()
agent = Agent(model="claude-3-sonnet")
response = agent("Analyze this data") # Automatically traced- Built-in CloudWatch integration
- OpenTelemetry support
- Performance metrics
- Error tracking
# Strands only
python my_agent.py
# AgentCore local testing
agentcore launch --local# Deploy to AgentCore Runtime
agentcore configure -e my_agent.py
agentcore launch
# Import existing agents
agentcore import-agent --agent-id ABCD1234- Start with Strands for rapid prototyping
- Use AgentCore for production deployment
- Leverage MCP for tool integration
- Enable observability from day one
- Test locally before deploying
- Use typed strategies for memory configuration
- Implement proper error handling
- Model access: Ensure proper AWS credentials
- Tool registration: Check tool imports and decorators
- Memory limits: Configure appropriate instance sizes
- Network access: Verify VPC and security group settings
import logging
logging.getLogger("strands").setLevel(logging.DEBUG)This comprehensive framework combination provides everything needed to build, deploy, and scale production AI agents from prototype to enterprise.