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_syncstreamSyncThreadStream
    Class●Since v0.3

    SyncThreadStream

    Copy
    SyncThreadStream(
      self,
      *,
      http: SyncHttpClient,
      thread_id: str,
      assistant_id: str

    Constructors

    Attributes

    Methods

    View source on GitHub
    ,
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    run_start_timeout
    :
    float
    |
    None
    =
    None
    ,
    explicit_thread_id
    :
    bool
    =
    False
    ,
    transport_kind
    :
    Literal
    [
    'sse'
    ,
    'websocket'
    ]
    =
    'sse'
    )
    constructor
    __init__
    NameType
    httpSyncHttpClient
    thread_idstr
    assistant_idstr
    headersMapping[str, str] | None
    run_start_timeoutfloat | None
    explicit_thread_idbool
    transport_kindLiteral['sse', 'websocket']
    attribute
    thread_id: thread_id
    attribute
    assistant_id: assistant_id
    attribute
    interrupted: bool
    attribute
    interrupts: list[InterruptPayload]
    attribute
    run
    attribute
    agent
    attribute
    values
    attribute
    messages
    attribute
    tool_calls
    attribute
    subgraphs
    attribute
    subagents
    attribute
    extensions
    attribute
    output: Any

    Fetch terminal thread state (blocking); waits for lifecycle completion.

    attribute
    events: Iterator[Event]

    Raw iterator of every Event the server emits for this thread.

    method
    close

    Tear down the thread stream. Idempotent.

    method
    subscribe

    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.

    Synchronous context manager for one thread's v3 streaming session.

    Construct via client.threads.stream(thread_id=None, *, assistant_id, ...) rather than instantiating directly.