# langgraph

> Python package

📖 [View in docs](https://reference.langchain.com/python/langgraph)

## Classes

- [`ToolOutputMixin`](https://reference.langchain.com/python/langgraph/types/ToolOutputMixin)
- [`TaskPayload`](https://reference.langchain.com/python/langgraph/types/TaskPayload)
- [`TaskResultPayload`](https://reference.langchain.com/python/langgraph/types/TaskResultPayload)
- [`CheckpointTask`](https://reference.langchain.com/python/langgraph/types/CheckpointTask)
- [`CheckpointPayload`](https://reference.langchain.com/python/langgraph/types/CheckpointPayload)
- [`ValuesStreamPart`](https://reference.langchain.com/python/langgraph/types/ValuesStreamPart)
- [`UpdatesStreamPart`](https://reference.langchain.com/python/langgraph/types/UpdatesStreamPart)
- [`MessagesStreamPart`](https://reference.langchain.com/python/langgraph/types/MessagesStreamPart)
- [`CustomStreamPart`](https://reference.langchain.com/python/langgraph/types/CustomStreamPart)
- [`CheckpointStreamPart`](https://reference.langchain.com/python/langgraph/types/CheckpointStreamPart)
- [`TasksStreamPart`](https://reference.langchain.com/python/langgraph/types/TasksStreamPart)
- [`DebugStreamPart`](https://reference.langchain.com/python/langgraph/types/DebugStreamPart)
- [`GraphOutput`](https://reference.langchain.com/python/langgraph/types/GraphOutput)
- [`RetryPolicy`](https://reference.langchain.com/python/langgraph/types/RetryPolicy)
- [`CachePolicy`](https://reference.langchain.com/python/langgraph/types/CachePolicy)
- [`Interrupt`](https://reference.langchain.com/python/langgraph/types/Interrupt)
- [`StateUpdate`](https://reference.langchain.com/python/langgraph/types/StateUpdate)
- [`PregelTask`](https://reference.langchain.com/python/langgraph/types/PregelTask)
- [`CacheKey`](https://reference.langchain.com/python/langgraph/types/CacheKey)
- [`PregelExecutableTask`](https://reference.langchain.com/python/langgraph/types/PregelExecutableTask)
- [`StateSnapshot`](https://reference.langchain.com/python/langgraph/types/StateSnapshot)
- [`Send`](https://reference.langchain.com/python/langgraph/types/Send)
- [`Command`](https://reference.langchain.com/python/langgraph/types/Command)
- [`Overwrite`](https://reference.langchain.com/python/langgraph/types/Overwrite)
- [`ExecutionInfo`](https://reference.langchain.com/python/langgraph/runtime/ExecutionInfo)
- [`ServerInfo`](https://reference.langchain.com/python/langgraph/runtime/ServerInfo)
- [`Runtime`](https://reference.langchain.com/python/langgraph/runtime/Runtime)
- [`ErrorCode`](https://reference.langchain.com/python/langgraph/errors/ErrorCode)
- [`GraphRecursionError`](https://reference.langchain.com/python/langgraph/errors/GraphRecursionError)
- [`InvalidUpdateError`](https://reference.langchain.com/python/langgraph/errors/InvalidUpdateError)
- [`GraphBubbleUp`](https://reference.langchain.com/python/langgraph/errors/GraphBubbleUp)
- [`GraphInterrupt`](https://reference.langchain.com/python/langgraph/errors/GraphInterrupt)
- [`NodeInterrupt`](https://reference.langchain.com/python/langgraph/errors/NodeInterrupt)
- [`ParentCommand`](https://reference.langchain.com/python/langgraph/errors/ParentCommand)
- [`EmptyInputError`](https://reference.langchain.com/python/langgraph/errors/EmptyInputError)
- [`TaskNotFound`](https://reference.langchain.com/python/langgraph/errors/TaskNotFound)
- [`GraphInterruptEvent`](https://reference.langchain.com/python/langgraph/callbacks/GraphInterruptEvent)
- [`GraphResumeEvent`](https://reference.langchain.com/python/langgraph/callbacks/GraphResumeEvent)
- [`GraphCallbackHandler`](https://reference.langchain.com/python/langgraph/callbacks/GraphCallbackHandler)
- [`LangGraphDeprecationWarning`](https://reference.langchain.com/python/langgraph/warnings/LangGraphDeprecationWarning)
- [`LangGraphDeprecatedSinceV05`](https://reference.langchain.com/python/langgraph/warnings/LangGraphDeprecatedSinceV05)
- [`LangGraphDeprecatedSinceV10`](https://reference.langchain.com/python/langgraph/warnings/LangGraphDeprecatedSinceV10)
- [`LangGraphDeprecatedSinceV11`](https://reference.langchain.com/python/langgraph/warnings/LangGraphDeprecatedSinceV11)
- [`IsLastStepManager`](https://reference.langchain.com/python/langgraph/managed/is_last_step/IsLastStepManager)
- [`RemainingStepsManager`](https://reference.langchain.com/python/langgraph/managed/is_last_step/RemainingStepsManager)
- [`ManagedValue`](https://reference.langchain.com/python/langgraph/managed/base/ManagedValue)
- [`AnyValue`](https://reference.langchain.com/python/langgraph/channels/any_value/AnyValue)
- [`LastValue`](https://reference.langchain.com/python/langgraph/channels/last_value/LastValue)
- [`LastValueAfterFinish`](https://reference.langchain.com/python/langgraph/channels/last_value/LastValueAfterFinish)
- [`UntrackedValue`](https://reference.langchain.com/python/langgraph/channels/untracked_value/UntrackedValue)
- [`BaseChannel`](https://reference.langchain.com/python/langgraph/channels/base/BaseChannel)
- [`BinaryOperatorAggregate`](https://reference.langchain.com/python/langgraph/channels/binop/BinaryOperatorAggregate)
- [`NamedBarrierValue`](https://reference.langchain.com/python/langgraph/channels/named_barrier_value/NamedBarrierValue)
- [`NamedBarrierValueAfterFinish`](https://reference.langchain.com/python/langgraph/channels/named_barrier_value/NamedBarrierValueAfterFinish)
- [`EphemeralValue`](https://reference.langchain.com/python/langgraph/channels/ephemeral_value/EphemeralValue)
- [`Topic`](https://reference.langchain.com/python/langgraph/channels/topic/Topic)
- [`MessageGraph`](https://reference.langchain.com/python/langgraph/graph/message/MessageGraph)
- [`MessagesState`](https://reference.langchain.com/python/langgraph/graph/message/MessagesState)
- [`UIMessage`](https://reference.langchain.com/python/langgraph/graph/ui/UIMessage)
- [`RemoveUIMessage`](https://reference.langchain.com/python/langgraph/graph/ui/RemoveUIMessage)
- [`BranchSpec`](https://reference.langchain.com/python/langgraph/graph/_branch/BranchSpec)
- [`StateGraph`](https://reference.langchain.com/python/langgraph/graph/state/StateGraph)
- [`CompiledStateGraph`](https://reference.langchain.com/python/langgraph/graph/state/CompiledStateGraph)
- [`StateNodeSpec`](https://reference.langchain.com/python/langgraph/graph/_node/StateNodeSpec)
- [`ReplayState`](https://reference.langchain.com/python/langgraph/_internal/_replay/ReplayState)
- [`AsyncQueue`](https://reference.langchain.com/python/langgraph/_internal/_queue/AsyncQueue)
- [`Semaphore`](https://reference.langchain.com/python/langgraph/_internal/_queue/Semaphore)
- [`SyncQueue`](https://reference.langchain.com/python/langgraph/_internal/_queue/SyncQueue)
- [`StrEnum`](https://reference.langchain.com/python/langgraph/_internal/_runnable/StrEnum)
- [`RunnableCallable`](https://reference.langchain.com/python/langgraph/_internal/_runnable/RunnableCallable)
- [`RunnableSeq`](https://reference.langchain.com/python/langgraph/_internal/_runnable/RunnableSeq)
- [`PregelScratchpad`](https://reference.langchain.com/python/langgraph/_internal/_scratchpad/PregelScratchpad)
- [`TypedDictLikeV1`](https://reference.langchain.com/python/langgraph/_internal/_typing/TypedDictLikeV1)
- [`TypedDictLikeV2`](https://reference.langchain.com/python/langgraph/_internal/_typing/TypedDictLikeV2)
- [`DataclassLike`](https://reference.langchain.com/python/langgraph/_internal/_typing/DataclassLike)
- [`DeprecatedKwargs`](https://reference.langchain.com/python/langgraph/_internal/_typing/DeprecatedKwargs)
- [`entrypoint`](https://reference.langchain.com/python/langgraph/func/entrypoint)
- [`final`](https://reference.langchain.com/python/langgraph/func/entrypoint/final)
- [`NodeBuilder`](https://reference.langchain.com/python/langgraph/pregel/main/NodeBuilder)
- [`Pregel`](https://reference.langchain.com/python/langgraph/pregel/main/Pregel)
- [`StreamMessagesHandler`](https://reference.langchain.com/python/langgraph/pregel/_messages/StreamMessagesHandler)
- [`WritesProtocol`](https://reference.langchain.com/python/langgraph/pregel/_algo/WritesProtocol)
- [`PregelTaskWrites`](https://reference.langchain.com/python/langgraph/pregel/_algo/PregelTaskWrites)
- [`Call`](https://reference.langchain.com/python/langgraph/pregel/_algo/Call)
- [`LazyAtomicCounter`](https://reference.langchain.com/python/langgraph/pregel/_algo/LazyAtomicCounter)
- [`SyncAsyncFuture`](https://reference.langchain.com/python/langgraph/pregel/_call/SyncAsyncFuture)
- [`ChannelRead`](https://reference.langchain.com/python/langgraph/pregel/_read/ChannelRead)
- [`PregelNode`](https://reference.langchain.com/python/langgraph/pregel/_read/PregelNode)
- [`PregelProtocol`](https://reference.langchain.com/python/langgraph/pregel/protocol/PregelProtocol)
- [`StreamProtocol`](https://reference.langchain.com/python/langgraph/pregel/protocol/StreamProtocol)
- [`RemoteException`](https://reference.langchain.com/python/langgraph/pregel/remote/RemoteException)
- [`RemoteGraph`](https://reference.langchain.com/python/langgraph/pregel/remote/RemoteGraph)
- [`ChannelWriteEntry`](https://reference.langchain.com/python/langgraph/pregel/_write/ChannelWriteEntry)
- [`ChannelWriteTupleEntry`](https://reference.langchain.com/python/langgraph/pregel/_write/ChannelWriteTupleEntry)
- [`ChannelWrite`](https://reference.langchain.com/python/langgraph/pregel/_write/ChannelWrite)
- [`FunctionNonLocals`](https://reference.langchain.com/python/langgraph/pregel/_utils/FunctionNonLocals)
- [`NonLocals`](https://reference.langchain.com/python/langgraph/pregel/_utils/NonLocals)
- [`Edge`](https://reference.langchain.com/python/langgraph/pregel/_draw/Edge)
- [`TriggerEdge`](https://reference.langchain.com/python/langgraph/pregel/_draw/TriggerEdge)
- [`PregelLoop`](https://reference.langchain.com/python/langgraph/pregel/_loop/PregelLoop)
- [`SyncPregelLoop`](https://reference.langchain.com/python/langgraph/pregel/_loop/SyncPregelLoop)
- [`AsyncPregelLoop`](https://reference.langchain.com/python/langgraph/pregel/_loop/AsyncPregelLoop)
- [`Submit`](https://reference.langchain.com/python/langgraph/pregel/_executor/Submit)
- [`BackgroundExecutor`](https://reference.langchain.com/python/langgraph/pregel/_executor/BackgroundExecutor)
- [`AsyncBackgroundExecutor`](https://reference.langchain.com/python/langgraph/pregel/_executor/AsyncBackgroundExecutor)
- [`FuturesDict`](https://reference.langchain.com/python/langgraph/pregel/_runner/FuturesDict)
- [`PregelRunner`](https://reference.langchain.com/python/langgraph/pregel/_runner/PregelRunner)

## Functions

- [`get_config()`](https://reference.langchain.com/python/langgraph/config/get_config)
- [`get_store()`](https://reference.langchain.com/python/langgraph/config/get_store)
- [`get_stream_writer()`](https://reference.langchain.com/python/langgraph/config/get_stream_writer)
- [`ensure_valid_checkpointer()`](https://reference.langchain.com/python/langgraph/types/ensure_valid_checkpointer)
- [`interrupt()`](https://reference.langchain.com/python/langgraph/types/interrupt)
- [`get_runtime()`](https://reference.langchain.com/python/langgraph/runtime/get_runtime)
- [`create_error_message()`](https://reference.langchain.com/python/langgraph/errors/create_error_message)
- [`get_sync_graph_callback_manager_for_config()`](https://reference.langchain.com/python/langgraph/callbacks/get_sync_graph_callback_manager_for_config)
- [`get_async_graph_callback_manager_for_config()`](https://reference.langchain.com/python/langgraph/callbacks/get_async_graph_callback_manager_for_config)
- [`is_managed_value()`](https://reference.langchain.com/python/langgraph/managed/base/is_managed_value)
- [`add_messages()`](https://reference.langchain.com/python/langgraph/graph/message/add_messages)
- [`push_message()`](https://reference.langchain.com/python/langgraph/graph/message/push_message)
- [`push_ui_message()`](https://reference.langchain.com/python/langgraph/graph/ui/push_ui_message)
- [`delete_ui_message()`](https://reference.langchain.com/python/langgraph/graph/ui/delete_ui_message)
- [`ui_message_reducer()`](https://reference.langchain.com/python/langgraph/graph/ui/ui_message_reducer)
- [`recast_checkpoint_ns()`](https://reference.langchain.com/python/langgraph/_internal/_config/recast_checkpoint_ns)
- [`patch_configurable()`](https://reference.langchain.com/python/langgraph/_internal/_config/patch_configurable)
- [`patch_checkpoint_map()`](https://reference.langchain.com/python/langgraph/_internal/_config/patch_checkpoint_map)
- [`merge_configs()`](https://reference.langchain.com/python/langgraph/_internal/_config/merge_configs)
- [`patch_config()`](https://reference.langchain.com/python/langgraph/_internal/_config/patch_config)
- [`get_callback_manager_for_config()`](https://reference.langchain.com/python/langgraph/_internal/_config/get_callback_manager_for_config)
- [`get_async_callback_manager_for_config()`](https://reference.langchain.com/python/langgraph/_internal/_config/get_async_callback_manager_for_config)
- [`ensure_config()`](https://reference.langchain.com/python/langgraph/_internal/_config/ensure_config)
- [`chain_future()`](https://reference.langchain.com/python/langgraph/_internal/_future/chain_future)
- [`run_coroutine_threadsafe()`](https://reference.langchain.com/python/langgraph/_internal/_future/run_coroutine_threadsafe)
- [`get_field_default()`](https://reference.langchain.com/python/langgraph/_internal/_fields/get_field_default)
- [`get_enhanced_type_hints()`](https://reference.langchain.com/python/langgraph/_internal/_fields/get_enhanced_type_hints)
- [`get_update_as_tuples()`](https://reference.langchain.com/python/langgraph/_internal/_fields/get_update_as_tuples)
- [`get_cached_annotated_keys()`](https://reference.langchain.com/python/langgraph/_internal/_fields/get_cached_annotated_keys)
- [`get_fields()`](https://reference.langchain.com/python/langgraph/_internal/_pydantic/get_fields)
- [`create_model()`](https://reference.langchain.com/python/langgraph/_internal/_pydantic/create_model)
- [`is_supported_by_pydantic()`](https://reference.langchain.com/python/langgraph/_internal/_pydantic/is_supported_by_pydantic)
- [`default_cache_key()`](https://reference.langchain.com/python/langgraph/_internal/_cache/default_cache_key)
- [`set_config_context()`](https://reference.langchain.com/python/langgraph/_internal/_runnable/set_config_context)
- [`is_async_callable()`](https://reference.langchain.com/python/langgraph/_internal/_runnable/is_async_callable)
- [`is_async_generator()`](https://reference.langchain.com/python/langgraph/_internal/_runnable/is_async_generator)
- [`coerce_to_runnable()`](https://reference.langchain.com/python/langgraph/_internal/_runnable/coerce_to_runnable)
- [`default_retry_on()`](https://reference.langchain.com/python/langgraph/_internal/_retry/default_retry_on)
- [`apply_checkpointer_allowlist()`](https://reference.langchain.com/python/langgraph/_internal/_serde/apply_checkpointer_allowlist)
- [`curated_core_allowlist()`](https://reference.langchain.com/python/langgraph/_internal/_serde/curated_core_allowlist)
- [`build_serde_allowlist()`](https://reference.langchain.com/python/langgraph/_internal/_serde/build_serde_allowlist)
- [`collect_allowlist_from_schemas()`](https://reference.langchain.com/python/langgraph/_internal/_serde/collect_allowlist_from_schemas)
- [`task()`](https://reference.langchain.com/python/langgraph/func/task)
- [`should_interrupt()`](https://reference.langchain.com/python/langgraph/pregel/_algo/should_interrupt)
- [`local_read()`](https://reference.langchain.com/python/langgraph/pregel/_algo/local_read)
- [`increment()`](https://reference.langchain.com/python/langgraph/pregel/_algo/increment)
- [`apply_writes()`](https://reference.langchain.com/python/langgraph/pregel/_algo/apply_writes)
- [`prepare_next_tasks()`](https://reference.langchain.com/python/langgraph/pregel/_algo/prepare_next_tasks)
- [`prepare_single_task()`](https://reference.langchain.com/python/langgraph/pregel/_algo/prepare_single_task)
- [`prepare_push_task_functional()`](https://reference.langchain.com/python/langgraph/pregel/_algo/prepare_push_task_functional)
- [`prepare_push_task_send()`](https://reference.langchain.com/python/langgraph/pregel/_algo/prepare_push_task_send)
- [`checkpoint_null_version()`](https://reference.langchain.com/python/langgraph/pregel/_algo/checkpoint_null_version)
- [`task_path_str()`](https://reference.langchain.com/python/langgraph/pregel/_algo/task_path_str)
- [`sanitize_untracked_values_in_send()`](https://reference.langchain.com/python/langgraph/pregel/_algo/sanitize_untracked_values_in_send)
- [`map_debug_tasks()`](https://reference.langchain.com/python/langgraph/pregel/debug/map_debug_tasks)
- [`is_multiple_channel_write()`](https://reference.langchain.com/python/langgraph/pregel/debug/is_multiple_channel_write)
- [`map_task_result_writes()`](https://reference.langchain.com/python/langgraph/pregel/debug/map_task_result_writes)
- [`map_debug_task_results()`](https://reference.langchain.com/python/langgraph/pregel/debug/map_debug_task_results)
- [`rm_pregel_keys()`](https://reference.langchain.com/python/langgraph/pregel/debug/rm_pregel_keys)
- [`map_debug_checkpoint()`](https://reference.langchain.com/python/langgraph/pregel/debug/map_debug_checkpoint)
- [`tasks_w_writes()`](https://reference.langchain.com/python/langgraph/pregel/debug/tasks_w_writes)
- [`get_colored_text()`](https://reference.langchain.com/python/langgraph/pregel/debug/get_colored_text)
- [`get_bolded_text()`](https://reference.langchain.com/python/langgraph/pregel/debug/get_bolded_text)
- [`identifier()`](https://reference.langchain.com/python/langgraph/pregel/_call/identifier)
- [`get_runnable_for_entrypoint()`](https://reference.langchain.com/python/langgraph/pregel/_call/get_runnable_for_entrypoint)
- [`get_runnable_for_task()`](https://reference.langchain.com/python/langgraph/pregel/_call/get_runnable_for_task)
- [`call()`](https://reference.langchain.com/python/langgraph/pregel/_call/call)
- [`empty_checkpoint()`](https://reference.langchain.com/python/langgraph/pregel/_checkpoint/empty_checkpoint)
- [`create_checkpoint()`](https://reference.langchain.com/python/langgraph/pregel/_checkpoint/create_checkpoint)
- [`channels_from_checkpoint()`](https://reference.langchain.com/python/langgraph/pregel/_checkpoint/channels_from_checkpoint)
- [`copy_checkpoint()`](https://reference.langchain.com/python/langgraph/pregel/_checkpoint/copy_checkpoint)
- [`validate_graph()`](https://reference.langchain.com/python/langgraph/pregel/_validate/validate_graph)
- [`validate_keys()`](https://reference.langchain.com/python/langgraph/pregel/_validate/validate_keys)
- [`get_new_channel_versions()`](https://reference.langchain.com/python/langgraph/pregel/_utils/get_new_channel_versions)
- [`find_subgraph_pregel()`](https://reference.langchain.com/python/langgraph/pregel/_utils/find_subgraph_pregel)
- [`get_function_nonlocals()`](https://reference.langchain.com/python/langgraph/pregel/_utils/get_function_nonlocals)
- [`is_xxh3_128_hexdigest()`](https://reference.langchain.com/python/langgraph/pregel/_utils/is_xxh3_128_hexdigest)
- [`draw_graph()`](https://reference.langchain.com/python/langgraph/pregel/_draw/draw_graph)
- [`add_edge()`](https://reference.langchain.com/python/langgraph/pregel/_draw/add_edge)
- [`DuplexStream()`](https://reference.langchain.com/python/langgraph/pregel/_loop/DuplexStream)
- [`read_channel()`](https://reference.langchain.com/python/langgraph/pregel/_io/read_channel)
- [`read_channels()`](https://reference.langchain.com/python/langgraph/pregel/_io/read_channels)
- [`map_command()`](https://reference.langchain.com/python/langgraph/pregel/_io/map_command)
- [`map_input()`](https://reference.langchain.com/python/langgraph/pregel/_io/map_input)
- [`map_output_values()`](https://reference.langchain.com/python/langgraph/pregel/_io/map_output_values)
- [`map_output_updates()`](https://reference.langchain.com/python/langgraph/pregel/_io/map_output_updates)
- [`gated()`](https://reference.langchain.com/python/langgraph/pregel/_executor/gated)
- [`next_tick()`](https://reference.langchain.com/python/langgraph/pregel/_executor/next_tick)
- [`run_with_retry()`](https://reference.langchain.com/python/langgraph/pregel/_retry/run_with_retry)
- [`arun_with_retry()`](https://reference.langchain.com/python/langgraph/pregel/_retry/arun_with_retry)

## Types

- [`Checkpointer`](https://reference.langchain.com/python/langgraph/types/Checkpointer)
- [`GraphLifecycleStatus`](https://reference.langchain.com/python/langgraph/callbacks/GraphLifecycleStatus)
- [`GraphLifecycleEvent`](https://reference.langchain.com/python/langgraph/callbacks/GraphLifecycleEvent)
- [`GraphCallbacks`](https://reference.langchain.com/python/langgraph/callbacks/GraphCallbacks)
- [`Messages`](https://reference.langchain.com/python/langgraph/graph/message/Messages)
- [`AnyUIMessage`](https://reference.langchain.com/python/langgraph/graph/ui/AnyUIMessage)
- [`StateNode`](https://reference.langchain.com/python/langgraph/graph/_node/StateNode)
- [`AnyFuture`](https://reference.langchain.com/python/langgraph/_internal/_future/AnyFuture)
- [`RunnableLike`](https://reference.langchain.com/python/langgraph/_internal/_runnable/RunnableLike)
- [`StateLike`](https://reference.langchain.com/python/langgraph/_internal/_typing/StateLike)
