Python bindings for the LangChain agent streaming protocol
Project Links
Meta
Requires Python: <4.0.0,>=3.10.0
Classifiers
Development Status
- 3 - Alpha
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Programming Language
- Python :: 3
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
Topic
- Scientific/Engineering :: Artificial Intelligence
- Software Development :: Libraries :: Python Modules
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
0.0.15
May 01, 2026
0.0.14
Apr 29, 2026
0.0.13
Apr 28, 2026
0.0.12
Apr 25, 2026
0.0.11
Apr 23, 2026
0.0.10
Apr 23, 2026
0.0.9
Apr 23, 2026
0.0.8
Apr 16, 2026
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
typing-extensions
(<5.0.0,>=4.7.0)