$ npm install @langchain/protocol
@langchain/protocolTypeScript bindings for the LangChain agent streaming protocol.
This package publishes the generated TypeScript schema bindings from
protocol.cddl so TypeScript applications can type protocol commands, events,
results, and content blocks consistently.
protocol.tsCommand, Message, and protocol eventsThis package does not currently ship a runtime client, transport, or helper APIs. It is intended for typing protocol payloads and generated bindings only.
npm install @langchain/protocol
Use type-only imports when consuming the protocol schema:
import type {
Command,
Message,
SubscribeParams,
MessagesEvent,
} from "@langchain/protocol";
You can then use the exported types to model protocol payloads in your own transport or client implementation:
import type { Command, SubscribeParams } from "@langchain/protocol";
const params: SubscribeParams = {
channels: ["messages", "lifecycle"],
};
const subscribeCommand: Command = {
id: 1,
method: "subscription.subscribe",
params,
};
The canonical protocol definition lives at protocol.cddl. The TypeScript
bindings in this package are generated from that schema.
© 2010 - cnpmjs.org x YWFE | Home | YWFE