LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    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

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_syncstreamSyncThreadStreamsubscribe
    Method●Since v0.3

    subscribe

    Copy
    subscribe(
      self,
      channels: list[str],
      *,
      namespaces: list[list
    View source on GitHub
    [
    str
    ]
    ]
    |
    None
    =
    None
    ,
    depth
    :
    int
    |
    None
    =
    None
    )
    ->
    Iterator
    [
    Event
    ]

    Open a typed subscription against the shared SSE.

    Returns an iterator that yields raw Event dicts matching the given filter. Multiple concurrent subscribes share one HTTP connection whose union expands or rotates as subscriptions come and go.