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 Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    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 Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    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

    View source on GitHub
    attribute
    initial_interval: float
    attribute
    backoff_factor: float
    attribute
    max_interval: float
    attribute
    max_attempts: int
    attribute
    jitter: bool
    attribute
    retry_on: type[Exception] | Sequence[type[Exception]] | Callable[[Exception], bool]

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

    Multiplier by which the interval increases after each retry.

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

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

    Whether to add random jitter to the interval between retries.

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