Registry / llm-agents / langchain-protocol

langchain-protocol

JSON →
library0.0.15pypypiunverified

Python client bindings for the LangChain agent streaming protocol. Provides a client to interact with remote agents following the protocol specification. Version 0.0.15 supports Python >=3.10, <4.0. New releases are frequent (multiple per month) with backward-incompatible changes expected.

pip install langchain-protocol
INSTALL
IMPORT
SIG · LANGCHAIN-PROTOCOL
L
langchain-protocol
llm-agentspythonv0.0.15
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from langchain_protocol import Client
from langchain_protocol import Client

Creates a client and performs a simple agent interaction.

import os from langchain_protocol import Client client = Client( url=os.environ.get("PROTOCOL_URL", "http://localhost:8000"), headers={"Authorization": f"Bearer {os.environ.get('PROTOCOL_API_KEY', '')}"} ) # List available agents agents = client.agents.search() print(agents) # Create a thread and run thread = client.threads.create() run = client.runs.create( thread_id=thread["thread_id"], agent_id=agents[0]["agent_id"], input={"messages": [{"role": "user", "content": "Hello"}]} ) print(run) # Stream results for event in client.runs.stream(thread["thread_id"], run["run_id"]): print(event)
Debug
Known issues
gotchaThe Client constructor expects a 'url' argument (not 'base_url'). Using 'base_url' may silently fall back to default.
fix
Use client = Client(url='...')
affects: all
breakingThe package version follows the protocol spec versioning, not semantic versioning. Minor increments (0.1.x -> 0.2.0) may include breaking API changes.
fix
Always pin a specific version and consult the changelog before upgrading.
affects: >=0.2.0
deprecatedThe 'runs.create' endpoint moved from /threads/{tid}/runs to /runs in version 0.2.0. Old path is deprecated.
fix
Use client.runs.create() without thread_id argument for stateless runs, or pass thread_id as argument.
affects: >=0.2.0
gotchaAuthentication headers must be passed as dict to the Client constructor. The library does not read environment variables automatically.
fix
Explicitly pass headers={'Authorization': 'Bearer <token>'} on client creation.
affects: all
Upgrade
Version history
0.0.15latest on PyPI · released May 1, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
2
Resources
langchain-protocol — pip install langchain-protocol · libregistry