A travel planning agent demonstrating the journey from local PoC to production-ready deployment using Amazon Bedrock AgentCore and Strands Agents SDK.
This demo showcases two implementations:
- Local PoC Agent (
travel_agent_local.py): Simple agent with inline tools for rapid prototyping - Production Agent (
travel_agent_production.py): Enterprise-ready agent with:- Memory: Short and long-term context via AgentCore Memory
- Gateway: Centralized MCP-compatible tools via Lambda
- Identity: OAuth authentication with Cognito
- Observability: Built-in monitoring and logging
- AWS account with credentials configured
- Python 3.10+
- Docker or Finch (for local testing)
- Model Access: Anthropic Claude 3.7 enabled in Amazon Bedrock
- AWS Permissions:
BedrockAgentCoreFullAccessandAmazonBedrockFullAccess
pip install -r requirements.txtNo setup required - just run:
python travel_agent_local.pyInteract via CLI:
You: I want to fly from New York to Paris on 2025-06-15
Agent: [response]
Setup AWS resources:
python scripts/setup_memory.py
python scripts/setup_cognito.py
python scripts/setup_gateway.pyThis creates:
- AgentCore Memory with USER_PREFERENCE and SEMANTIC strategies
- Cognito User Pool and Client for OAuth
- Lambda function with travel tools
- AgentCore Gateway with MCP endpoint and JWT auth
- IAM roles and SSM parameters
Test Production Agent Locally:
python travel_agent_production.pyThen in another terminal:
curl -X POST http://localhost:8080/invocations \
-H "Content-Type: application/json" \
-d '{"prompt": "Tell me about Tokyo"}'Deploy production agent to AWS:
python scripts/deploy_runtime.pyThis will:
- Create IAM execution role
- Build and deploy Docker container
- Configure Memory, Gateway, and Cognito integration
- Wait for deployment to be READY
Test deployed agent:
python scripts/test_runtime.pyTo delete all created resources:
# If deployed to Runtime
agentcore destroy
# Cleanup AWS resources
python scripts/cleanup_gateway.py
python scripts/cleanup_cognito.py
python scripts/cleanup_memory.py- "I want to fly from New York to Paris on 2025-06-15"
- "Tell me about Tokyo"
- "What are the top attractions in Sydney?"
- "Find me flights from Los Angeles to Sydney next month"
- "I'm planning a trip to London, what should I know?"
- New York ↔ Paris
- London ↔ Tokyo
- Los Angeles ↔ Sydney
Additional destinations available for information: Paris, Tokyo, Sydney, London, New York
| Feature | Local PoC | Production |
|---|---|---|
| Interface | CLI | HTTP API |
| Tools | Inline Python functions | Lambda via Gateway (MCP) |
| Memory | None | Short & long-term via AgentCore |
| Authentication | None | OAuth with Cognito |
| Scalability | Single instance | Auto-scaling Runtime |
| Monitoring | Basic logs | Full observability |
| Deployment | Local CLI only | AWS-hosted |
- Short-Term Memory: Conversation context within sessions
- Long-Term Memory:
- USER_PREFERENCE: Traveler preferences and behavior
- SEMANTIC: Factual information from conversations