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

aupdate_state

Update the state of a thread.

This method calls POST /threads/{thread_id}/state.

Copy
aupdate_state(
  self,
  config: RunnableConfig,
  values: dict[str, Any] | Any | None,
  as_node: str | None = None,
  *,
  headers: dict[str, str] | None = None,
  params: QueryParamTypes | None = None
) -> RunnableConfig

Parameters

NameTypeDescription
config*RunnableConfig

A RunnableConfig that includes thread_id in the configurable field.

values*dict[str, Any] | Any | None

Values to update to the state.

as_nodestr | None
Default:None

Update the state as if this node had just executed.

View source on GitHub