You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,6 +5,7 @@ This demo showcases **LangGraph subgraphs** through an interactive travel planni
5
5
## What are LangGraph Subgraphs? 🤖
6
6
7
7
**Subgraphs** are the key to building modular, scalable AI systems in LangGraph. A subgraph is essentially "a graph that is used as a node in another graph" - enabling powerful encapsulation and reusability.
8
+
For more info, check out the [LangGraph docs](https://langchain-ai.github.io/langgraph/concepts/subgraphs/).
8
9
9
10
### Key Concepts
10
11
@@ -15,172 +16,77 @@ This demo showcases **LangGraph subgraphs** through an interactive travel planni
15
16
16
17
## Demo Architecture 🗺️
17
18
18
-
This travel planner demonstrates both **shared state**and**specialized routing**patterns:
19
+
This travel planner demonstrates **supervisor-coordinated subgraphs**with**human-in-the-loop**decision making:
19
20
20
-
### Parent Graph: Trip Coordinator
21
-
-**Role**: Analyzes user requests and routes to appropriate travel specialists
22
-
-**Intelligence**: Uses keyword analysis to determine which specialist to activate
23
-
-**State Management**: Maintains the complete travel plan across all subgraphs
21
+
### Parent Graph: Travel Supervisor
22
+
-**Role**: Coordinates the travel planning process and routes to specialized agents
23
+
-**State Management**: Maintains a shared itinerary object across all subgraphs
24
+
-**Intelligence**: Determines what's needed and when each agent should be called
24
25
25
-
### Subgraph 1: 🚗 Transportation Specialist
26
-
-**Specialization**: Flights, trains, car rentals, buses, cruises, and travel logistics
All subgraph agents share and contribute to a common state object. When any agent updates the shared state, these changes are immediately reflected in the frontend through real-time syncing. This ensures that:
75
60
76
-
## Try These Examples! 💡
77
-
78
-
### Transportation Focus
79
-
- "Find me flights from New York to Tokyo"
80
-
- "I want to take the train through Europe"
81
-
- "Plan a road trip from Los Angeles to San Francisco"
82
-
83
-
### Accommodation Focus
84
-
- "Find luxury hotels in downtown Manhattan"
85
-
- "I want to camp in Yosemite National Park"
86
-
- "Book an Airbnb near the Eiffel Tower"
87
-
88
-
### Activities Focus
89
-
- "What are the must-see attractions in Rome?"
90
-
- "Find the best restaurants in Tokyo"
91
-
- "Plan adventure activities in Costa Rica"
92
-
93
-
### Multi-Domain Requests
94
-
- "Plan a romantic weekend in Santorini"
95
-
- "Organize a family vacation to Disney World"
96
-
- "Create a backpacking itinerary through Southeast Asia"
97
-
98
-
## Visual Features 👁️
99
-
100
-
### Real-Time Subgraph Activity
101
-
-**Glowing indicators** show which subgraph is currently active
102
-
-**Animated routing paths** display request flow from coordinator to subgraphs
103
-
-**Live travel plan updates** as each subgraph contributes
104
-
105
-
### Travel Plan Visualization
106
-
-**Dynamic travel overview** with destination and traveler indicators
107
-
-**Comprehensive travel details** showing transportation, accommodation, and activities
108
-
-**Smart destination emojis** that match popular travel destinations
109
-
-**Planning progress tracking** across all travel aspects
110
-
111
-
### Mobile Responsive
112
-
-**Collapsible chat interface** for mobile users
113
-
-**Touch-friendly controls** with gesture support
114
-
-**Optimized layouts** for different screen sizes
115
-
116
-
## Technical Implementation ⚙️
117
-
118
-
### Backend (Python)
119
-
-**LangGraph workflow** with embedded subgraphs
120
-
-**Smart routing logic** using travel-specific keyword analysis
121
-
-**State management** with shared travel plan object
122
-
-**Tool definitions** for each travel domain specialist
123
-
-**Event streaming** for real-time UI updates
61
+
-**Flight selections** from the Flights Agent are visible to subsequent agents
62
+
-**Hotel choices** influence the Experiences Agent's recommendations
63
+
-**All updates** are synchronized with the frontend UI in real-time
64
+
-**State persistence** maintains the travel itinerary throughout the workflow
124
65
125
-
### Frontend (React + TypeScript)
126
-
-**CopilotKit integration** for seamless chat experience
127
-
-**Real-time state synchronization** with `useCoAgent`
0 commit comments