Skip to content
masterclass Buddy

LangGraph · Class

CompiledStateGraph

StateGraph.compile turns a graph builder into an executable CompiledStateGraph. The result supports Runnable operations such as invoking, streaming, batching, and asynchronous execution.

Last updated

Since
v1.2

Syntax

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, transformers: Sequence[Callable[[tuple[str, ...]], Any]] | None = None) -> CompiledStateGraph[StateT, ContextT, InputT, OutputT]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • StateGraph
  • CompiledStateGraph
  • Checkpointer
  • BaseCache
  • BaseStore
  • Runnable
  • thread_id

Source: compile | langgraph | LangChain Reference. Checked 2026-11-03.