langchain-protocol 0.0.15


pip install langchain-protocol

  Latest version

Released: May 01, 2026


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

  • TypedDict definitions for commands, events, results, and payload shapes
  • Literal and union aliases for protocol enums and tagged unions
  • A py.typed marker so type checkers pick up the bundled annotations
Extras: None
Dependencies:
typing-extensions (<5.0.0,>=4.7.0)