langchain-protocol0.0.15
langchain-protocol0.0.15
Published
Python bindings for the LangChain agent streaming protocol
pip install langchain-protocol
Package Downloads
Authors
Project URLs
Requires Python
<4.0.0,>=3.10.0
langchain-protocol
Python bindings for the LangChain agent streaming protocol.
This package provides generated TypedDict and Literal definitions for the
protocol's commands, events, results, and payload shapes. It does not include a
runtime client, transport, or helper APIs — it is intended as a source of
typing primitives only.
The types are generated from protocol.cddl, the source of truth for
the wire format. See the streaming protocol overview for the
full design, channel model, and transport details.
Installation
pip install langchain-protocol
Usage
from langchain_protocol import Command, SubscribeParams
params: SubscribeParams = {
"channels": ["messages", "lifecycle"],
}
subscribe: Command = {
"id": 1,
"method": "subscription.subscribe",
"params": params,
}
What this package includes
TypedDictdefinitions for commands, events, results, and payload shapesLiteraland union aliases for protocol enums and tagged unions- A
py.typedmarker so type checkers pick up the bundled annotations