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 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
    PythonlanggraphpregelmainPregelaget_subgraphs
    Method●Since v0.6

    aget_subgraphs

    Get the subgraphs of the graph.

    Copy
    aget_subgraphs(
      self,
      *,
      namespace: str | None = None,
      recurse: bool = False
    ) -> AsyncIterator[tuple[str, PregelProtocol]]

    Parameters

    NameTypeDescription
    namespacestr | None
    Default:None

    The namespace to filter the subgraphs by.

    recursebool
    Default:False

    Whether to recurse into the subgraphs. If False, only the immediate subgraphs will be returned.

    View source on GitHub