The workflow that wires the nodes
The workflow is the graph that runs the two nodes in order. A LangGraph StateGraph starts, runs the index-video node, then the auditor node, then ends, passing the VideoAuditState from one to the next. Two nodes, but each does heavy work.
Last updated: 15 Oct, 2026 · LLMOps
The auditor was the second node. This lesson is the orchestration: the one place the order of the steps is defined, so no node calls the next one by hand.
Nodes, then edges
from langgraph.graph import StateGraph, END
# the graph carries the VideoAuditState from node to node
workflow = StateGraph(VideoAuditState)
# the two nodes, registered by name
workflow.add_node("index_video", index_video_node)
workflow.add_node("audit_content", audit_content_node)
# the flow: enter at index, then audit, then end
workflow.set_entry_point("index_video")
workflow.add_edge("index_video", "audit_content")
workflow.add_edge("audit_content", END)
app = workflow.compile() # the runnable compliance graphThe flow is the whole control: an entry point at index, an edge from index to audit, and an edge from audit to end. Because the graph passes the state, the transcript the index node wrote is there for the auditor automatically; nothing hands it over by hand, which the video names as the point of using a graph.
Why a graph for two nodes
- The order lives in one place. Changing the flow, adding a node, is an edge change, not a rewrite of the nodes.
- The state is the hand-off. No node needs to know who runs next or pass data along manually; the graph does it.
- It is ready to grow. A third node, a retry branch or a human-approval step slots in as another node and edge, the shape from Conditional edges.
Related
- Previous: Node two: the auditor
- Next: Observing the project in production
- See also: StateGraph
- Add a third node, a reporter that emails the report, and name the two edges that change.
- Explain how the auditor node receives the transcript without the index node passing it directly.
You understood something today that you didn't yesterday.