How aws-solutions-library-samples/guidance-for-multi-agent-orchestration-langgraph-on-aws works
This repository implements an AWS-hosted customer-support chat application. A customer signs in, sends a message through the React interface, and receives streamed responses coordinated by a LangGraph supervisor. The supervisor delegates to specialist agents for order management, recommendations, personalization, and troubleshooting, then returns a response. The graph also shows the application’s data, knowledge-base, and streaming layers. The README documents the overall AWS architecture; source excerpts confirm several frontend and supervisor call paths, but much of the specialist-agent and infrastructure wiring was not sampled.
Main entry points: ecs-stack.ts ECS agent services · client.py Agent HTTP client · src/agent.py Personalization · src/agent.py Order management
Components 22
Customer interface
- React chat app
frontend/src/App.tsx - WebSocket chat
frontend/src/components/Chat/WebSocketChatInterface.tsx - Authentication
frontend/src/components/auth/AuthenticatorWrapper.tsx - Supervisor events
frontend/src/hooks/useSupervisorAgentEvents.ts
Agent orchestration
- Supervisor API
agents/supervisor-agent/src/main.py - LangGraph supervisor
agents/supervisor-agent/src/agent.py - Agent HTTP client
agents/supervisor-agent/src/client.py
Specialist agents
- Order management
agents/order-management-agent/src/agent.py - Product recommendations
agents/product-recommendation-agent/src/agent.py - Personalization
agents/personalization-agent/src/agent.py - Troubleshooting
agents/troubleshooting-agent/src/agent.py - Order data tools
agents/order-management-agent/src/postgresql_tools.py - Recommendation data
agents/product-recommendation-agent/src/database.py - Customer profile data
agents/personalization-agent/src/database.py
Data and AI services
- Aurora PostgreSQL
infra/lib/database-stack.ts - Bedrock knowledge bases
infra/lib/bedrock-knowledge-base-stack.ts - Amazon Bedrock
- Session checkpoints
agents/supervisor-agent/src/dynamodb_session_saver.py
AWS application platform
- AppSync streaming
infra/lib/streaming-api-stack.ts - ECS agent services
infra/lib/ecs-stack.ts - CloudWatch monitoring
infra/lib/monitoring-stack.ts
Other components
- Customer
Connections 31
- Customer → React chat app: uses
README.md - React chat app → Authentication: requires sign-in
frontend/src/App.tsx - React chat app → WebSocket chat: routes to
frontend/src/App.tsx - WebSocket chat → Supervisor events: uses events
frontend/src/components/Chat/WebSocketChatInterface.tsx - Supervisor events → AppSync streaming: publishes request
frontend/src/hooks/useSupervisorAgentEvents.ts - AppSync streaming → Supervisor API: streams chat
README.md - Supervisor API → LangGraph supervisor: processes requests
agents/supervisor-agent/src/main.py - LangGraph supervisor → Agent HTTP client: calls agents
agents/supervisor-agent/src/agent.py - Agent HTTP client → Order management: HTTP dispatch
agents/supervisor-agent/src/client.py - Agent HTTP client → Product recommendations: HTTP dispatch
agents/supervisor-agent/src/client.py - Agent HTTP client → Personalization: HTTP dispatch
agents/supervisor-agent/src/client.py - Agent HTTP client → Troubleshooting: HTTP dispatch
README.md - Order management → Order data tools: uses tools
- Product recommendations → Recommendation data: uses data
- Personalization → Customer profile data: uses data
- Order data tools → Aurora PostgreSQL: queries
README.md - Recommendation data → Aurora PostgreSQL: queries
README.md - Customer profile data → Aurora PostgreSQL: stores profiles
- LangGraph supervisor → Session checkpoints: checkpoints sessions
agents/supervisor-agent/src/agent.py - Order management → Amazon Bedrock: uses AI
README.md - Product recommendations → Amazon Bedrock: uses AI
README.md - Personalization → Amazon Bedrock: uses AI
README.md - Troubleshooting → Amazon Bedrock: uses AI
README.md - Troubleshooting → Bedrock knowledge bases: retrieves guidance
README.md - Personalization → Bedrock knowledge bases: retrieves knowledge
README.md - ECS agent services → Supervisor API: hosts service
README.md - ECS agent services → Order management: hosts service
README.md - ECS agent services → Product recommendations: hosts service
README.md - ECS agent services → Personalization: hosts service
README.md - ECS agent services → Troubleshooting: hosts service
README.md - CloudWatch monitoring → ECS agent services: observes services
README.md