Strip headless-tool interrupts from a user-facing interrupt list.
Execute and resume all newly seen headless-tool interrupts from a values
Parses a headless-tool interrupt value from the graph. Accepts both
Creates a shared useStream instance and provides it to all descendant
Subscribe to a scoped audio-media stream. Each handle is yielded
Progressive audio playback for AudioMedia handles with a
Side-effect counterpart to useChannel. Instead of returning a
Subscribe to a custom:<name> stream extension — the most-recent
Subscribe to a scoped file-media stream. Pair with
Subscribe to a scoped image-media stream. Pair with
Resolve the lazy MediaBase.objectURL promise into a
Read metadata recorded for a specific message id — today exposes
Subscribe to a scoped messages stream.
Vue primitive that composes ChannelRegistry.acquire with
Vue Composition API binding for the v2-native stream runtime.
Accesses the shared stream instance from the nearest ancestor that
Subscribe to a scoped tools (tool-call) stream. Same target and
Subscribe to a scoped values stream — the most recent state
Subscribe to a scoped video-media stream. Pair with
Bind a VideoMedia handle to a caller-owned <video> element.
Vue SDK for building AI-powered applications with Deep Agents, LangChain and LangGraph.
The package ships a Composition-API–first binding built on top of
the v2 streaming protocol. useStream returns a small, always-on
root handle (values, messages, isLoading, error, …) and
pushes anything namespaced (subagents, subgraphs, media, submission
queue, per-message metadata) behind ref-counted use* selectors
so components only pay for the data they actually consume.
Upgrading from
0.x? Seedocs/v1-migration.mdfor the complete matrix of option, return-shape, and transport changes.
reconnectOnMount /
joinStream dance.ShallowRef /
ComputedRef, auto-disposed via onScopeDispose when the scope
unmounts.useStream<typeof agent>()
unwraps state, tool calls, and subagent state maps from an agent
brand.<img> / <audio> /
<video> players.<Suspense> friendly. hydrationPromise lets you gate
async setup() on initial hydration.npm install @langchain/vue @langchain/core
Peer dependencies: vue (^3.4.0), @langchain/core (^1.0.1).
<script setup lang="ts">
import { useStream } from "@langchain/vue";
const stream = useStream({
assistantId: "agent",
apiUrl: "http://localhost:2024",
});
function onSubmit() {
void stream.submit({ messages: [{ type: "human", content: "Hello!" }] });
}
</script>
<template>
<div>
<div v-for="(msg, i) in stream.messages" :key="msg.id ?? i">
{{ typeof msg.content === "string" ? msg.content : JSON.stringify(msg.content) }}
</div>
<button :disabled="stream.isLoading" @click="onSubmit">
Send
</button>
</div>
</template>
Reactive fields on the handle are Vue refs (ShallowRef /
ComputedRef). In <script setup>, read them with .value:
stream.messages.value, stream.isLoading.value. In <template>,
Vue auto-unwraps refs, so prefer the shorter
stream.messages / stream.isLoading form.
In-depth guides live in docs/:
useStream options and
return shape.AgentServerAdapter implementations.AgentServerAdapter against your own backend, with a worked
walkthrough of examples/ui-react-transport.useMessageMetadata + submit({ forkFrom }).provideStream,
useStreamContext, and the LangChainPlugin app-level defaults.async setup() on hydrationPromise.For complete end-to-end examples with full agentic UIs, visit the LangChain UI Playground.
MIT