A StateGraph where every node receives a list of messages as input and returns one or more messages as output.
MessageGraph is a subclass of StateGraph whose entire state is a single, append-only* list of messages.
Each node in a MessageGraph takes a list of messages as input and returns zero or more
messages as output. The add_messages function is used to merge the output messages from each node
into the existing list of messages in the graph's state.
MessageGraph(
self,
)Add a new node to the StateGraph.
Add a directed edge from the start node (or list of start nodes) to the end node.
Add a conditional edge from the starting node to any number of destination nodes.
Add a sequence of nodes that will be executed in the provided order.
Specifies the first node to be called in the graph.
Sets a conditional entry point in the graph.
Marks a node as a finish point of the graph.
Compiles the StateGraph into a CompiledStateGraph object.