A compiled graph is a node
Florence runs your waves with a supervisor-plus-reviewers orchestration (/reviewed-implementation). This module builds a working toy of it in LangGraph: a supervisor dispatching an implementer subgraph and a reviewer subgraph with a fix loop. You understand the pattern from the inside, and you get a template for LangGraph-native agent teams.
Any graph you .compile() can be added into a parent graph exactly like a plain function node. That is the whole mechanism: composition, not a special API.
const implementer = new StateGraph(ImplState)./*…*/.compile();
const reviewer = new StateGraph(ReviewState)./*…*/.compile();
const supervisor = new StateGraph(SupervisorState)
.addNode("implement", implementer)
.addNode("review", reviewer)
.addNode("route", routeNode)
.addEdge(START, "route")
.compile();State mapping between parent and child: the subgraph has its own state schema. When the parent invokes it, matching keys flow in and out; keys the subgraph does not declare stay isolated in the parent. This is the important safety property: the implementer’s scratch state does not leak into the reviewer’s, and neither pollutes the supervisor’s.
Try it yourself
What compiled-graph-as-node tells you
A compiled graph becomes a node with no special wrapper. Let that constrain the answer.
How does the parent graph's state get into a compiled-subgraph node?
Reveal answer
It's the same mechanism as any node: the parent passes its state in, and matching keys between the parent's schema and the subgraph's schema flow across. There's no special adapter or wrapper API -- composition works because both are just StateGraph instances, and the framework maps overlapping keys automatically while keeping non-overlapping keys isolated to each side.