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.17.tar.gz (6.0 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.17-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_protocol-0.0.17.tar.gz
  • Upload date:
  • Size: 6.0 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.17.tar.gz
Algorithm Hash digest
SHA256 e7cbe58c205df4b4fd87dc6d5bb23f10e13b236d0e2e1b0b9d05bc2b648f3eea
MD5 2639cf25ce9c000c13e0d7322bb30a9c
BLAKE2b-256 44b34e2429876c7a35585618caa2b9f9089f7162a6b50562b614ad82ac11c17e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_protocol-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 982a08fe152586ed10d4ff3d538c2e0b5766e5f307cdea325e10be3f2c17cae6
MD5 5a6f4cbbd84fc5ae29c9ba544ff19e5c
BLAKE2b-256 130aa1bfe72c6ec856e99773bbd96c8086421e554b3693d0142b9ea009c6ac92

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