subgraph_builder
in the example below) and compile it.add_node
method when defining the parent graph workflowFull example: shared state schemas
Full example: different state schemas
Full example: different state schemas (two levels of subgraphs)
my_child_key
) to the child state channels (my_grandchild_key
)my_grandchild_key
) back to the child state channels (my_child_key
)grandchild_graph
)my_key
) to the child state channels (my_child_key
)my_child_key
) back to the parent state channels (my_key
)child_graph
)with checkpointer=True
. This is useful in multi-agent systems, if you want agents to keep track of their internal message histories:
graph.get_state(config)
. To view the subgraph state, you can use graph.get_state(config, subgraphs=True)
.
View interrupted subgraph state
subgraphs=True
in the .stream()
method of the parent graph. This will stream outputs from both the parent graph and any subgraphs.
subgraphs=True
to stream outputs from subgraphs.Stream from subgraphs
subgraphs=True
to stream outputs from subgraphs.