🧭 Navigation:
Home | Vision LLM Theory | Local Testing | Deployment UI | Deployment | CDK Stacks | 🔵 Runtime | S3 Files | Lambda Analyzers | Prompting System
Docker container running the Strands agent for PDF analysis orchestration with WebSocket streaming.
runtime/
├── Dockerfile.websocket # Container definition (WebSocket streaming)
├── build_and_push_websocket.sh # Build and push to ECR
├── requirements.txt # Python dependencies
└── agent/
├── __init__.py
└── main-websocket.py # Strands agent entry point (WebSocket)
Important
The ECR stack must be deployed before building the container.
# Build and push (requires ECR stack deployed first)
./build_and_push_websocket.sh
# Then deploy Runtime stack
cd .. && cdk deploy badgers-runtime-websocket| Property | Value |
|---|---|
| Base Image | python:3.11-slim |
| Architecture | linux/arm64 |
| Port | 8080 |
| User | bedrock_agentcore (non-root) |
| Health Check | GET /ping every 30s |
strands-agents— Agent frameworkbedrock-agentcore[strands-agents]— AgentCore SDKmcp— Model Context Protocol clientboto3— AWS SDKhttpx— HTTP clientaws-opentelemetry-distro— X-Ray tracing
Set by Runtime stack:
| Variable | Description |
|---|---|
AWS_DEFAULT_REGION |
AWS region |
GATEWAY_URL |
MCP Gateway endpoint |
COGNITO_CREDENTIALS_SECRET_ARN |
Secrets Manager ARN for OAuth credentials |
AGENTCORE_MEMORY_ID |
Memory ID for session persistence |
# Build with custom tag
./build_and_push_websocket.sh v1.0.0
# Manual build
docker build -f Dockerfile.websocket --platform linux/arm64 -t pdf-analysis-agent .Edit agent/main-websocket.py to change:
- System prompt
- Model selection
- Tool handling
- Session management
- Add to
requirements.txt - Rebuild and push:
./build_and_push_websocket.sh - Redeploy Runtime stack
# View Runtime logs
aws logs tail /aws/bedrock-agentcore/runtimes/<runtime_id> --follow
# Check container locally
docker run -p 8080:8080 pdf-analysis-agent
# Verify ECR image
aws ecr describe-images --repository-name pdf-analysis-agent-<deployment_id>