LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/svelteUseStreamReturn
Interfaceā—Since v0.4

UseStreamReturn

Copy
interface UseStreamReturn

Properties

Methods

View source on GitHub
property
assistantId: string
property
client: Client
property
error: unknown
property
hydrationPromise: Promise<void>
property
interrupt: Interrupt<InterruptType> | undefined
property
interrupts: Interrupt<InterruptType>[]
property
isLoading: boolean
property
isThreadLoading: boolean
property
messages: BaseMessage<MessageStructure<MessageToolSet>, MessageType>[]
property
subagents: ReadonlyMap<keyof SubagentStates & string extends never ? string : keyof SubagentStates & string, SubagentDiscoverySnapshot>
property
subgraphs: ReadonlyMap<string, SubgraphDiscoverySnapshot>
property
subgraphsByNode: ReadonlyMap<string, readonly SubgraphDiscoverySnapshot[]>
property
threadId: string | null
property
toolCalls: AssembledToolCall[]
property
values: StateType
method
getThread→ ThreadStream<Record<string, unknown>> | undefined
method
respond→ Promise<void>
method
stop→ Promise<void>
method
submit→ Promise<void>

Svelte binding return type for useStream. Reactive projections are exposed as getters on a stable object so templates can read stream.messages directly without a .value / .current hop and $derived wrappers auto-track the getter read.

Destructuring (const { messages } = stream) breaks reactivity — this is a Svelte 5 constraint and applies to every getter-object pattern. Access fields through the live stream handle instead.

Promise that settles when the current thread's initial hydration completes. Useful in SvelteKit load() handlers (or any async-init site) to block until the controller has reconciled with server-held state.

v2 escape hatch — returns the bound ThreadStream.