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

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_asyncthreadsThreadsClientjoin_stream
    Methodā—Since v0.3

    join_stream

    Copy
    join_stream(
      self,
      thread_id: str,
      *,
      last_event_id: str | None = None,
    View source on GitHub
    stream_mode
    :
    ThreadStreamMode
    |
    Sequence
    [
    ThreadStreamMode
    ]
    =
    'run_modes'
    ,
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    params
    :
    QueryParamTypes
    |
    None
    =
    None
    )
    ->
    AsyncIterator
    [
    StreamPart
    ]

    Parameters

    NameTypeDescription
    thread_id*str

    The ID of the thread to get the stream for.

    last_event_idstr | None
    Default:None

    The ID of the last event to get.

    headersMapping[str, str] | None
    Default:None
    paramsQueryParamTypes | None
    Default:None

    Get a stream of events for a thread.

    
    for chunk in client.threads.join_stream(
        thread_id="my_thread_id",
        last_event_id="my_event_id",
    ):
        print(chunk)

    Optional custom headers to include with the request.

    Optional query parameters to include with the request.