Overview
LangGraph provides two types for advanced graph control flow:Command— Combines a state update with routing in a single return value. Instead of using conditional edges, a node can return aCommandwith anupdateandgototo update state and control which node runs next.Send— Enables map-reduce (fan-out) patterns by dispatching work to a node with custom state. Returning a list ofSendobjects from an edge function runs the target node once perSend, in parallel.
Galileo support
Galileo’s
GalileoCallback and GalileoAsyncCallback handle Command and Send automatically. No additional configuration is needed — just pass the callback as usual and all control flow data is captured.Using Command
Command lets a node update state and route to the next node in one step, replacing the need for separate conditional edges.
classify node returns a Command that sets the category field and routes to either billing_handler or general_handler. Galileo captures the full Command return value, including the routing decision.
Using Send
Send enables fan-out patterns where multiple instances of a node run in parallel, each with different input state.
fan_out returns a list of Send objects — one per topic. LangGraph runs the summarize node for each topic in parallel, and the results are aggregated via a list-concatenation reducer. Galileo logs each parallel execution.
Command with tool messages
When a tool returns aCommand, it can include a ToolMessage in the state update. Galileo automatically extracts the ToolMessage for proper tool-call logging.
ToolMessage) and update other parts of the graph state at the same time.
What gets logged
Galileo serializesCommand and Send objects and captures their fields in the trace:
Command fields
Send fields
All fields are serialized recursively, including nested messages and complex objects.
Next steps
Logging
Set up GalileoCallback for LangChain and LangGraph logging.
Middleware
Use GalileoMiddleware for automatic LangGraph agent logging.
Experiments
Run and track experiments with LangChain.