Compiles the StateGraph into a CompiledStateGraph object.
The compiled graph implements the Runnable interface and can be invoked,
streamed, batched, and run asynchronously.
compile(
self,
checkpointer: Checkpointer = None,
*,
cache: BaseCache | None = None,
store: BaseStore | None = None,
interrupt_before: All | list[str] | None = None,
interrupt_after: All | list[str] | None = None,
debug: bool = False,
name: str | None = None
) -> CompiledStateGraph[StateT, ContextT, InputT, OutputT]| Name | Type | Description |
|---|---|---|
checkpointer | Checkpointer | Default: NoneA checkpoint saver object or flag. If provided, this If If Important: When a checkpointer is enabled, you should pass a
The |
interrupt_before | All | list[str] | None | Default: NoneAn optional list of node names to interrupt before. |
interrupt_after | All | list[str] | None | Default: NoneAn optional list of node names to interrupt after. |
debug | bool | Default: FalseA flag indicating whether to enable debug mode. |
name | str | None | Default: NoneThe name to use for the compiled graph. |