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
PythonlanggraphpregelremoteRemoteGraphaget_state
Method●Since v0.2

aget_state

Get the state of a thread.

This method calls POST /threads/{thread_id}/state/checkpoint if a checkpoint is specified in the config or GET /threads/{thread_id}/state if no checkpoint is specified.

Copy
aget_state(
  self,
  config: RunnableConfig,
  *,
  subgraphs: bool = False,
  headers: dict[str, str] | None = None,
  params: QueryParamTypes | None = None
) -> StateSnapshot

Parameters

NameTypeDescription
config*RunnableConfig

A RunnableConfig that includes thread_id in the configurable field.

subgraphsbool
Default:False

Include subgraphs in the state.

headersdict[str, str] | None
Default:None

Optional custom headers to include with the request.

paramsQueryParamTypes | None
Default:None

Optional query parameters to include with the request.

View source on GitHub