LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • 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
Pythonlanggraphgraph_nodeStateNodeSpec
Class●Since v0.6

StateNodeSpec

Copy
StateNodeSpec(
  self,
  runnable: StateNode[NodeInputT, ContextT],
  metadata: dict[str, Any] | None,
  input_schema: type[NodeInputT],
  retry_policy: RetryPolicy | Sequence[RetryPolicy] | None,
  cache_policy: CachePolicy | None,
  ends: tuple[str, ...] | dict[str, str] | None = EMPTY_SEQ,
  defer: bool = False
)

Bases

Generic[NodeInputT, ContextT]

Constructors

constructor
__init__
NameType
runnableStateNode[NodeInputT, ContextT]
metadatadict[str, Any] | None
input_schematype[NodeInputT]
retry_policyRetryPolicy | Sequence[RetryPolicy] | None
cache_policyCachePolicy | None
endstuple[str, ...] | dict[str, str] | None
deferbool

Attributes

attribute
runnable: StateNode[NodeInputT, ContextT]
attribute
metadata: dict[str, Any] | None
attribute
input_schema: type[NodeInputT]
attribute
retry_policy: RetryPolicy | Sequence[RetryPolicy] | None
attribute
cache_policy: CachePolicy | None
attribute
ends: tuple[str, ...] | dict[str, str] | None
attribute
defer: bool
View source on GitHub