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_syncthreadsSyncThreadsClientstream
    Method●Since v0.4

    stream

    Copy
    stream(
      self,
      thread_id: str | None = None,
      *,
      assistant_id: str,
      
    View source on GitHub
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    run_start_timeout
    :
    float
    |
    None
    =
    None
    ,
    transport
    :
    Literal
    [
    'sse'
    ,
    'websocket'
    ]
    =
    'sse'
    )
    ->
    SyncThreadStream

    Parameters

    NameTypeDescription
    thread_idstr | None
    Default:None

    optional explicit thread identifier. Defaults to a fresh UUIDv4.

    assistant_id*str

    assistant the run will use. Required.

    headersMapping[str, str] | None
    Default:None
    transportLiteral['sse', 'websocket']
    Default:'sse'

    Open a v3 thread-centric streaming session.

    optional headers forwarded on every command and SSE request for this stream session.

    event transport to use, "sse" (default) or "websocket".