4.1 Request Lifecycle
What the application does
At a high level, the application accepts a request and turns it into a multi-step workflow:
- coordinator
- flight specialist
- hotel specialist
- activity specialist
- synthesizer
The main flow looks like this:
A helpful way to explain this is:
- Flask receives the request
plan_travel_internal()builds the workflow state- LangGraph executes the nodes
- each node updates the state
- the final itinerary is returned as JSON
Knowledge Check
Where does the LangGraph workflow actually start executing in this API flow?
Click here to see the answer
It starts inside plan_travel_internal(). The Flask route only receives
the request and extracts parameters. plan_travel_internal() initializes
the workflow state and invokes the LangGraph graph, which then runs the nodes
(coordinator, specialists, synthesizer) that update the state until
the final itinerary is produced.