Skip to main content

LLM Protocol Suite

LLM Protocol Suite solves the data-definition drift that appears when different agent projects each invent their own message, tool-call, runtime, usage, and provider-response shapes.

It provides a small, explicit protocol layer for agent systems: Pydantic v2 models for model messages, multimodal content parts, tool calls, runtime envelopes, tool execution policy, usage, errors, and provider adapters. The goal is to let internal agent projects exchange structured LLM data without depending directly on any one provider SDK or framework's private format.

This package is not an agent framework. It does not call model APIs, execute tools, manage retries, request approvals, or orchestrate workflows. It defines and validates the shared data language those systems can build on.

Install

pip install -e ".[dev]"

Example

from llm_protocol_suite import ModelMessage, ModelRequest, TextPart

request = ModelRequest(
    model="deepseek-chat",
    messages=[
        ModelMessage(role="user", content=[TextPart(text="Hello")]),
    ],
)

print(request.model_dump())

OpenAI Mapping

from llm_protocol_suite import ModelMessage, ModelRequest, TextPart
from llm_protocol_suite.adapters.openai import to_openai_chat_request

request = ModelRequest(
    model="gpt-4.1-mini",
    messages=[ModelMessage(role="user", content=[TextPart(text="Hello")])],
)

payload = to_openai_chat_request(request)

Non-goals

v0.1 does not call provider APIs, execute tools, run retries, manage approvals, or orchestrate agents.

Metadata

Release files for llm-protocol-suite 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-protocol-suite 0.1.0
File Size Uploaded
llm_protocol_suite-0.1.0.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-protocol-suite 0.1.0
File Interpreter ABI Platform
llm_protocol_suite-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 kB

Release files / llm_protocol_suite-0.1.0.tar.gz

Download URL llm_protocol_suite-0.1.0.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d19efc22ccdfac0b2f32bc22b897b9d51157ca5ff649a32cff46761d68ded432
BLAKE2b-256 checksum
How to use checksums
bd8e0e4584d27be56e2c6343d5dcde0173507f1598b1852fff2c43a169857bd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / llm_protocol_suite-0.1.0-py3-none-any.whl

Download URL llm_protocol_suite-0.1.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61666dd58385d338a0c96aeb03eca2d563f9060d6dfbfde9add21e11ac2f8737
BLAKE2b-256 checksum
How to use checksums
86a8a0a30d3eb55834d68088b615393747aaaacece2f7cdf5fec44016ce442e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page