langchain-protocol
Python bindings for the LangChain agent streaming protocol
Decision gist · record as of 2026-08-14
Yes, if you are building or integrating with LangChain agent streaming protocol clients. The package is lightweight, actively maintained, carries no security vulnerabilities, and solves the real problem of type-safe protocol conformance. Install it as a dev or runtime dependency depending on whether your type hints need to be available at runtime. Skip it if you are not working with the LangChain agent protocol.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; type checker support (mypy, pyright, etc.) recommended to leverage the bundled type annotations.
- Minimal install friction: a single pure-Python wheel with only typing-extensions as a runtime dependency.
- Active maintenance with recent releases and a healthy repository signal.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with only attribution required.
last release 2026-06-18 (57 days) · last repo commit 2026-08-13 · 650 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 55,997,982 downloads/mo, #531 on PyPI
Alternatives
Verify before relying
from langchain_protocol import Command, SubscribeParams
params: SubscribeParams = {"channels": ["messages", "lifecycle"]}
subscribe: Command = {"id": 1, "method": "subscription.subscribe", "params": params}- Whether the protocol definitions remain stable across LangChain agent versions or if breaking changes are expected.
- Whether a runtime client or transport layer is available separately or if users must implement their own.
What it is and what it does
langchain-protocol is a pure-typing package that exports Python type definitions for the LangChain agent streaming protocol. It provides TypedDict and Literal definitions for commands, events, results, and payload shapes—everything needed to write type-safe code that conforms to the protocol's wire format. The types are generated from the canonical protocol specification (protocol.cddl) and bundled with a py.typed marker so type checkers recognize the annotations.
This is not a runtime client or transport layer; it is strictly a source of typing primitives. Developers use it to annotate their own protocol implementations, ensuring that the structures they send and receive match the protocol specification. It is most useful in projects building LangChain agent integrations or custom streaming clients that need to speak the protocol correctly.
Use it for
- Type-checking custom LangChain agent clients that implement the streaming protocol.
- Validating protocol message structures in agent middleware or adapters.
- Documenting protocol-compliant message shapes in IDE autocomplete and type hints.
- Building protocol-aware tooling that needs to parse or generate protocol commands and events.
- Ensuring wire-format correctness in multi-language agent deployments by anchoring Python code to the canonical spec.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building or integrating with LangChain agent streaming protocol clients.
The package is lightweight, actively maintained, carries no security vulnerabilities, and solves the real problem of type-safe protocol conformance. Install it as a dev or runtime dependency depending on whether your type hints need to be available at runtime. Skip it if you are not working with the LangChain agent protocol.
Install
langchain-protocol on PyPI
Before you install
Minimal install friction: a single pure-Python wheel with only typing-extensions as a runtime dependency. Active maintenance with recent releases and a healthy repository signal.
Requires Python 3.10 or later; type checker support (mypy, pyright, etc.) recommended to leverage the bundled type annotations.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with only attribution required.
Quickstart
from langchain_protocol import Command, SubscribeParams
params: SubscribeParams = {"channels": ["messages", "lifecycle"]}
subscribe: Command = {"id": 1, "method": "subscription.subscribe", "params": params}
Verify before relying
- Whether the protocol definitions remain stable across LangChain agent versions or if breaking changes are expected.
- Whether a runtime client or transport layer is available separately or if users must implement their own.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0.0,>=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 57 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 55,997,982 / month, #531 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries :: Python Modules |
Evidence: langchain_protocol-0.0.18-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “langchain protocol types”
- langchain-protocolProvides Python type definitions (TypedDict, Literal) for the…
- langchain-mcp-adaptersConverts Anthropic Model Context Protocol (MCP) tools into…
- ag-ui-langgraphBridges LangGraph agent workflows to the AG-UI protocol,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also ag-ui-langgraph · langgraph · langchain · langchain-mcp-adapters · uipath-langchain-client · ag-ui-protocol · nvidia-nat-langchain · zenpyre · openccu-loom-types · openinference-instrumentation-langchain