LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Graphs
    • Functional API
    • Pregel
    • Checkpointing
    • Storage
    • Caching
    • Types
    • Runtime
    • Config
    • Errors
    • Constants
    • Channels
    • Agents
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewGraphsFunctional APIPregelCheckpointingStorageCachingTypesRuntimeConfigErrorsConstantsChannelsAgents
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraphcallbacks
    Module●Since v1.1

    callbacks

    Graph lifecycle callback interfaces and event payloads.

    This module defines the public callback surface for observing LangGraph-specific lifecycle transitions such as interrupt and resume.

    Functions

    function
    get_sync_graph_callback_manager_for_config

    Build a sync graph lifecycle callback manager from a runnable config.

    This helper filters config["callbacks"] down to handlers that inherit from GraphCallbackHandler and binds the provided run_id onto the returned manager.

    function
    get_async_graph_callback_manager_for_config

    Build an async graph lifecycle callback manager from a runnable config.

    This helper filters config["callbacks"] down to handlers that inherit from GraphCallbackHandler and binds the provided run_id onto the returned manager.

    Classes

    class
    Interrupt

    Information about an interrupt that occurred in a node.

    Changed in version v0.4.0
    • interrupt_id was introduced as a property
    Changed in version v0.6.0

    The following attributes have been removed:

    • ns
    • when
    • resumable
    • interrupt_id, deprecated in favor of id
    class
    GraphInterruptEvent

    Graph lifecycle event emitted when execution pauses for interrupts.

    class
    GraphResumeEvent

    Graph lifecycle event emitted when execution resumes from a checkpoint.

    class
    GraphCallbackHandler

    Base class for graph-level lifecycle callbacks.

    Subclass this handler to observe graph lifecycle transitions that are specific to LangGraph execution, rather than generic LangChain runnable callbacks.

    Instances can be passed through config["callbacks"] when invoking a graph. Only handlers that inherit from GraphCallbackHandler receive these lifecycle events.

    Type Aliases

    typeAlias
    GraphLifecycleStatus: TypeAlias

    Allowed lifecycle statuses reported in graph lifecycle callback events.

    typeAlias
    GraphLifecycleEvent: TypeAlias

    Union of all public graph lifecycle callback event payloads.

    Use this alias when a callback or helper can receive either interrupt or resume lifecycle events.

    typeAlias
    GraphCallbacks: TypeAlias
    View source on GitHub