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
PythonlanggraphtypesRetryPolicy
Class●Since v0.2

RetryPolicy

Configuration for retrying nodes.

Copy
RetryPolicy()

Bases

NamedTuple

Used in Docs

  • Thinking in LangGraph
  • Use the functional API
  • Use the graph API

Attributes

attribute
initial_interval: float

Amount of time that must elapse before the first retry occurs. In seconds.

attribute
backoff_factor: float

Multiplier by which the interval increases after each retry.

attribute
max_interval: float

Maximum amount of time that may elapse between retries. In seconds.

attribute
max_attempts: int

Maximum number of attempts to make before giving up, including the first.

attribute
jitter: bool

Whether to add random jitter to the interval between retries.

attribute
retry_on: type[Exception] | Sequence[type[Exception]] | Callable[[Exception], bool]

List of exception classes that should trigger a retry, or a callable that returns True for exceptions that should trigger a retry.

View source on GitHub