René's URL Explorer Experiment


Title: StateGraph | langgraph | LangChain Reference

Open Graph Title: StateGraph | langgraph

X Title: StateGraph | langgraph

Description: Python API reference for graph.state.StateGraph in langgraph. Part of the LangChain ecosystem.

Open Graph Description: Python API reference for graph.state.StateGraph in langgraph. Part of the LangChain ecosystem.

X Description: Python API reference for graph.state.StateGraph in langgraph. Part of the LangChain ecosystem.

Opengraph URL: https://reference.langchain.com/python/langgraph/graph/state/StateGraph

direct link

Domain: reference.langchain.com

og:imagehttps://reference.langchain.com/og/python/langgraph/graph/state/StateGraph
og:image:width1200
og:image:height630
og:image:altStateGraph | langgraph
og:typearticle
twitter:cardsummary_large_image
twitter:imagehttps://reference.langchain.com/og/python/langgraph/graph/state/StateGraph

Links:

LangChain Reference home pagehttps://reference.langchain.com/
GitHubhttps://github.com/langchain-ai
Main Docshttps://docs.langchain.com/oss/python/langgraph
Deep Agentshttps://reference.langchain.com/python/deepagents
LangChainhttps://reference.langchain.com/python/langchain/overview
LangGraphhttps://reference.langchain.com/python/langgraph/overview
Integrationshttps://reference.langchain.com/python/integrations/overview
LangSmithhttps://reference.langchain.com/python/langsmith
Overviewhttps://reference.langchain.com/python/langgraph/overview
Overviewhttps://reference.langchain.com/python/langgraph
Graphshttps://reference.langchain.com/python/langgraph/graphs
Functional APIhttps://reference.langchain.com/python/langgraph/func
Pregelhttps://reference.langchain.com/python/langgraph/pregel
Checkpointinghttps://reference.langchain.com/python/langgraph/checkpoints
Storagehttps://reference.langchain.com/python/langgraph/store
Cachinghttps://reference.langchain.com/python/langgraph/cache
Typeshttps://reference.langchain.com/python/langgraph/types
Runtimehttps://reference.langchain.com/python/langgraph/runtime
Confighttps://reference.langchain.com/python/langgraph/config
Errorshttps://reference.langchain.com/python/langgraph/errors
Constantshttps://reference.langchain.com/python/langgraph/constants
Channelshttps://reference.langchain.com/python/langgraph/channels
Agentshttps://reference.langchain.com/python/langgraph/agents
LangGraph Checkpointhttps://reference.langchain.com/python/langgraph.checkpoint
LangGraph Storehttps://reference.langchain.com/python/langgraph.store
Checkpoint Postgreshttps://reference.langchain.com/python/langgraph.checkpoint.postgres
Store Postgreshttps://reference.langchain.com/python/langgraph.store.postgres
Checkpoint SQLitehttps://reference.langchain.com/python/langgraph.checkpoint.sqlite
LangGraph Prebuilthttps://reference.langchain.com/python/langgraph.prebuilt
LangGraph CLIhttps://reference.langchain.com/python/langgraph-cli
LangGraph SDKhttps://reference.langchain.com/python/langgraph-sdk
LangGraph Supervisorhttps://reference.langchain.com/python/langgraph-supervisor
LangGraph Swarmhttps://reference.langchain.com/python/langgraph-swarm
https://chat.langchain.com/
Overviewhttps://reference.langchain.com/python/langgraph
Graphshttps://reference.langchain.com/python/langgraph/graphs
Functional APIhttps://reference.langchain.com/python/langgraph/func
Pregelhttps://reference.langchain.com/python/langgraph/pregel
Checkpointinghttps://reference.langchain.com/python/langgraph/checkpoints
Storagehttps://reference.langchain.com/python/langgraph/store
Cachinghttps://reference.langchain.com/python/langgraph/cache
Typeshttps://reference.langchain.com/python/langgraph/types
Runtimehttps://reference.langchain.com/python/langgraph/runtime
Confighttps://reference.langchain.com/python/langgraph/config
Errorshttps://reference.langchain.com/python/langgraph/errors
Constantshttps://reference.langchain.com/python/langgraph/constants
Channelshttps://reference.langchain.com/python/langgraph/channels
Agentshttps://reference.langchain.com/python/langgraph/agents
LangGraph Checkpointhttps://reference.langchain.com/python/langgraph.checkpoint
LangGraph Storehttps://reference.langchain.com/python/langgraph.store
Checkpoint Postgreshttps://reference.langchain.com/python/langgraph.checkpoint.postgres
Store Postgreshttps://reference.langchain.com/python/langgraph.store.postgres
Checkpoint SQLitehttps://reference.langchain.com/python/langgraph.checkpoint.sqlite
LangGraph Prebuilthttps://reference.langchain.com/python/langgraph.prebuilt
LangGraph CLIhttps://reference.langchain.com/python/langgraph-cli
LangGraph SDKhttps://reference.langchain.com/python/langgraph-sdk
LangGraph Supervisorhttps://reference.langchain.com/python/langgraph-supervisor
LangGraph Swarmhttps://reference.langchain.com/python/langgraph-swarm
langgraphhttps://reference.langchain.com/python/langgraph
graphhttps://reference.langchain.com/python/langgraph/graph
statehttps://reference.langchain.com/python/langgraph/graph/state
StateThttps://reference.langchain.com/python/langgraph/typing/StateT
ContextThttps://reference.langchain.com/python/langgraph/typing/ContextT
Generichttps://docs.python.org/3/library/typing.html#typing.Generic
StateThttps://reference.langchain.com/python/langgraph/typing/StateT
ContextThttps://reference.langchain.com/python/langgraph/typing/ContextT
InputThttps://reference.langchain.com/python/langgraph/typing/InputT
OutputThttps://reference.langchain.com/python/langgraph/typing/OutputT
A2A endpoint in Agent Serverhttps://docs.langchain.com/langsmith/server-a2a
Backward compatibilityhttps://docs.langchain.com/oss/python/langgraph/backward-compatibility
Build a multi-source knowledge base with routinghttps://docs.langchain.com/oss/python/langchain/multi-agent/router-knowledge-base
Checkpointershttps://docs.langchain.com/oss/python/langgraph/checkpointers
Custom workflowhttps://docs.langchain.com/oss/python/langchain/multi-agent/custom-workflow
View source on GitHubhttps://github.com/langchain-ai/langgraph/blob/5bd231cbfd913e05ebc662f519eb9a655bc766df/libs/langgraph/langgraph/graph/state.py#L131
InputThttps://reference.langchain.com/python/langgraph/typing/InputT
OutputThttps://reference.langchain.com/python/langgraph/typing/OutputT
Unpackhttps://reference.langchain.com/python/typing-extensions/Unpack
DeprecatedKwargshttps://reference.langchain.com/python/langgraph/_internal/_typing/DeprecatedKwargs
typehttps://docs.python.org/3/library/functions.html#type
StateThttps://reference.langchain.com/python/langgraph/typing/StateT
typehttps://docs.python.org/3/library/functions.html#type
ContextThttps://reference.langchain.com/python/langgraph/typing/ContextT
typehttps://docs.python.org/3/library/functions.html#type
InputThttps://reference.langchain.com/python/langgraph/typing/InputT
typehttps://docs.python.org/3/library/functions.html#type
OutputThttps://reference.langchain.com/python/langgraph/typing/OutputT
typehttps://docs.python.org/3/library/functions.html#type
StateThttps://reference.langchain.com/python/langgraph/typing/StateT
typehttps://docs.python.org/3/library/functions.html#type
ContextThttps://reference.langchain.com/python/langgraph/typing/ContextT
typehttps://docs.python.org/3/library/functions.html#type
InputThttps://reference.langchain.com/python/langgraph/typing/InputT
typehttps://docs.python.org/3/library/functions.html#type
OutputThttps://reference.langchain.com/python/langgraph/typing/OutputT
DeprecatedKwargshttps://reference.langchain.com/python/langgraph/_internal/_typing/DeprecatedKwargs
attributeedges: set[tuple[str, str]]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/edges
attributenodes: dict[str, StateNodeSpec[Any, ContextT]]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/nodes
attributebranches: defaultdict[str, dict[str, BranchSpec]]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/branches
attributechannels: dict[str, BaseChannel]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/channels
attributemanaged: dict[str, ManagedValueSpec]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/managed
attributeschemas: dict[type[Any], dict[str, BaseChannel | ManagedValueSpec]]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/schemas
attributewaiting_edges: set[tuple[tuple[str, ...], str]]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/waiting_edges
attributecompiled: boolhttps://reference.langchain.com/python/langgraph/graph/state/StateGraph/compiled
attributestate_schema: type[StateT]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/state_schema
attributecontext_schema: type[ContextT] | Nonehttps://reference.langchain.com/python/langgraph/graph/state/StateGraph/context_schema
attributeinput_schema: type[InputT]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/input_schema
attributeoutput_schema: type[OutputT]https://reference.langchain.com/python/langgraph/graph/state/StateGraph/output_schema
methodset_node_defaultsSet default node policies that apply to every node in this graph. Per-node values passed to add_node always take precedence over these defaults. Defaults are applied at compile() time. Policies set here are not inherited by subgraphs. retry_policy and timeout defaults apply to all nodes, including error-handler nodes. cache_policy and error_handler defaults only apply to regular nodes -- caching error-handler results is unsafe, and handlers must never catch themselves.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/set_node_defaults
methodadd_nodeAdd a new node to the StateGraph.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/add_node
methodadd_edgeAdd a directed edge from the start node (or list of start nodes) to the end node. When a single start node is provided, the graph will wait for that node to complete before executing the end node. When multiple start nodes are provided, the graph will wait for ALL of the start nodes to complete before executing the end node.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/add_edge
methodadd_conditional_edgesAdd a conditional edge from the starting node to any number of destination nodes.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/add_conditional_edges
methodadd_sequenceAdd a sequence of nodes that will be executed in the provided order.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/add_sequence
methodset_entry_pointSpecifies the first node to be called in the graph. Equivalent to calling add_edge(START, key).https://reference.langchain.com/python/langgraph/graph/state/StateGraph/set_entry_point
methodset_conditional_entry_pointSets a conditional entry point in the graph.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/set_conditional_entry_point
methodset_finish_pointMarks a node as a finish point of the graph. If the graph reaches this node, it will cease execution.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/set_finish_point
methodvalidatehttps://reference.langchain.com/python/langgraph/graph/state/StateGraph/validate
methodcompileCompiles the StateGraph into a CompiledStateGraph object. The compiled graph implements the Runnable interface and can be invoked, streamed, batched, and run asynchronously.https://reference.langchain.com/python/langgraph/graph/state/StateGraph/compile

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.