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
Pythonlanggraphruntimeget_runtime
Functionโ—Since v0.6

get_runtime

Get the runtime for the current graph run.

Copy
get_runtime(
    context_schema: type[ContextT] | None = None,
) -> Runtime[ContextT]

Used in Docs

  • LangChain v1 migration guide

Parameters

NameTypeDescription
context_schematype[ContextT] | None
Default:None

Optional schema used for type hinting the return type of the runtime.

View source on GitHub