Skip to main content

Python bindings for the LangChain agent streaming protocol

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_protocol-0.0.13.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_protocol-0.0.13-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file langchain_protocol-0.0.13.tar.gz.

File metadata

  • Download URL: langchain_protocol-0.0.13.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langchain_protocol-0.0.13.tar.gz
Algorithm Hash digest
SHA256 7448ca507407a6aaa28a73884d74765540e65da891a14a6e062a196412bc554c
MD5 9f6374062aeb106100302b318cbaa52e
BLAKE2b-256 ba7dac74b64f9d3150cc90c172490e7321b26ccc76ecef87c3629c83eda6948f

See more details on using hashes here.

File details

Details for the file langchain_protocol-0.0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_protocol-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 47d4f2a05827bf3a66b238082bf59e8313fd3a14e1b268bdd65c85b67a6b1f6c
MD5 7039f1f76ed2eb889e9222376e323ef5
BLAKE2b-256 d20489db2cf7d839aef9c6544b9e3495f522ec3e408cbab34c9c05e41a3d87b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page