This page documents configuration types and utilities used to access runtime information and resources within LangGraph nodes and tasks.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/langchain-ai/langgraph/llms.txt
Use this file to discover all available pages before exploring further.
get_config
Get the current runnable configuration from within a graph node or task.This function retrieves the
RunnableConfig for the currently executing node or task. The config contains metadata, callbacks, tags, and other runtime information.Important: Must be called from within a runnable context (inside a node or task). Raises RuntimeError if called outside of a runnable context.Python version requirement: Python 3.11 or later is required to use this in an async context.Defined in: langgraph/config.py:17Returns
The configuration for the current runnable context.
Raises
Raised when called outside of a runnable context, or when using Python < 3.11 in an async context.
Usage Example
get_store
Access LangGraph store from inside a graph node or entrypoint task at runtime.Can be called from inside any
StateGraph node or functional API task, as long as the StateGraph or the entrypoint was initialized with a store.Python version requirement: Python 3.11 or later is required to use this in an async context (uses contextvar propagation).Defined in: langgraph/config.py:32Returns
The store instance configured for the current graph.
Raises
Raised when called outside of a runnable context.
Usage with StateGraph
Usage with Functional API
get_stream_writer
Access LangGraph
StreamWriter from inside a graph node or entrypoint task at runtime.Can be called from inside any StateGraph node or functional API task. The StreamWriter allows you to emit custom data during graph execution when using stream_mode="custom".Python version requirement: Python 3.11 or later is required to use this in an async context (uses contextvar propagation).Defined in: langgraph/config.py:126Returns
A callable that accepts a single argument and writes it to the output stream. This is a no-op when not using
stream_mode="custom".Raises
Raised when called outside of a runnable context.
Usage with StateGraph
Usage with Functional API
RunnableConfig
Configuration for a runnable execution. This type is imported from
langchain_core.runnables.The RunnableConfig contains various runtime settings and metadata that control how a runnable (node, task, or graph) executes.Common Fields
Configurable parameters that can be set at runtime. Common keys include:
thread_id: Identifier for the execution thread (required for checkpointing)checkpoint_id: Specific checkpoint to resume fromcheckpoint_ns: Namespace for checkpoints
Tags to attach to this run for filtering and organization.
Arbitrary metadata to attach to this run.
Callback handlers to invoke during execution.
Maximum number of steps the graph can execute before raising a
GraphRecursionError. Defaults to 25.Maximum number of concurrent operations.
Usage Example
Thread Management
Theconfigurable.thread_id field in RunnableConfig is particularly important for stateful applications: