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
Pythonlanggraphtyping
Module●Since v0.5

typing

Attributes

attribute
StateT
attribute
StateT_co
attribute
StateT_contra
attribute
ContextT
attribute
ContextT_contra
attribute
InputT
attribute
OutputT
attribute
NodeInputT
attribute
NodeInputT_contra

Type Aliases

typeAlias
StateLike: TypeAlias
View source on GitHub

Type variable used to represent the state in a graph.

Type variable used to represent graph run scoped context.

Defaults to None.

Type variable used to represent the input to a StateGraph.

Defaults to StateT.

Type variable used to represent the output of a StateGraph.

Defaults to StateT.

Type variable used to represent the input to a node.

Type alias for state-like types.

It can either be a TypedDict, dataclass, or Pydantic BaseModel. Note: we cannot use either TypedDict or dataclass directly due to limitations in type checking.