skillfed

langchain-protocol

Python bindings for the LangChain agent streaming protocol

langchain-protocol Permissive license MIT Active 650 v0.0.18 released

Install

langchain-protocol on PyPI

pip

pip install langchain-protocol

uv

uv add langchain-protocol

poetry

poetry add langchain-protocol

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 — typing-extensions
Maintenance actively maintained — 56 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: langchain_protocol-0.0.18-py3-none-any.whl

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

About langchain-protocol

from the package's own PyPI description — quoted content, verbatim

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 &mdash; 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

  • TypedDict definitions for commands, events, results, and payload shapes
  • Literal and union aliases for...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Provides TypedDict and Literal type definitions for the LangChain agent streaming protocol, enabling type-safe interaction with protocol commands, events, and payloads without runtime client or transport logic.

Low friction installation with a single lightweight dependency (typing-extensions). Active maintenance with recent releases and no known vulnerabilities.

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal attribution requirements.

Usage

pip install langchain-protocol

from langchain_protocol import Command, SubscribeParams

params: SubscribeParams = {"channels": ["messages", "lifecycle"]}
subscribe: Command = {"id": 1, "method": "subscription.subscribe", "params": params}

Requires Python 3.10 or later (supports 3.10–3.14)

Verdict: A lightweight, actively maintained typing library for the LangChain streaming protocol with no security vulnerabilities and permissive licensing. Suitable for projects needing protocol-compliant type annotations, though it provides only type definitions and not runtime functionality.

Needs verification

  • Whether the generated types remain stable across protocol updates or if breaking changes are expected in future releases
  • Real-world adoption patterns and whether this is primarily used within LangChain ecosystem projects
langchain protocol typesagent streaming protocol bindingstyped protocol definitionslangchain type hintsprotocol message typesstreaming protocol typinglangchain agent protocol

Similar packages