LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • 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

    Type variable used to represent the state in a graph.

    attribute
    StateT_co
    attribute
    StateT_contra
    attribute
    ContextT

    Type variable used to represent graph run scoped context.

    Defaults to None.

    attribute
    ContextT_contra
    attribute
    InputT

    Type variable used to represent the input to a StateGraph.

    Defaults to StateT.

    attribute
    OutputT

    Type variable used to represent the output of a StateGraph.

    Defaults to StateT.

    attribute
    NodeInputT

    Type variable used to represent the input to a node.

    attribute
    NodeInputT_contra

    Type Aliases

    typeAlias
    StateLike: TypeAlias

    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.

    View source on GitHub