Skip to main content

unifiedharnessprotocol

The Unified Harness Protocol, as data.

A harness is a complete agent runtime — a loop that plans, calls tools, edits files and reports back. UHP is the HTTP contract for driving one: start a task, follow it, continue the conversation, cancel it, collect the files it produced.

This package contains no network code. It is the specification's vocabulary in machine-readable form, so that a client, a server, or a test suite can agree on the strings without each one retyping them out of the prose and getting one subtly wrong.

pip install unifiedharnessprotocol
from unifiedharnessprotocol import (
    PROTOCOL_VERSION, Events, TaskStatus, ERROR_CODES,
    is_terminal, is_retryable, check_discovery, check_sequence,
)

PROTOCOL_VERSION                          # '2026-08-11'
is_terminal(TaskStatus.IN_PROGRESS)       # False
is_retryable(code="quota_exhausted")      # False — nothing changes until the quota does

What's in it

Export What it is
PROTOCOL_VERSION, VERSION_HEADER The version this package describes, and the header that carries it
CONFORMANCE_CLASSES, CLASS_CAPABILITIES core / extended / full, and what each obliges a server to implement
CAPABILITIES The capability keys of the discovery document
TaskStatus, TERMINAL_STATUSES in_progress, completed, failed, incomplete, cancelled
Events, TERMINAL_EVENTS The streaming event vocabulary
ERROR_TYPES, ERROR_CODES, RETRYABLE_CODES The failure taxonomy and which parts are worth retrying
ID_PREFIXES, object_type_for_id Which kind of object an id points at
Endpoints Every path, so nobody spells one wrong

Two checks worth running

Does the server's class claim match its capabilities? A class claim that contradicts the capability list tells a client two different things, and it is cheap to notice.

import json, urllib.request
from unifiedharnessprotocol import check_discovery

with urllib.request.urlopen("http://localhost:3000/v1/uhp") as response:
    ok, problems = check_discovery(json.load(response))

Did the stream drop an event? sequence_number starts at 0 and increases by exactly 1. That rule exists so a client can tell a lost event from a quiet agent — but only if it checks.

check_sequence(events)     # (False, [7, 8])

Specification

https://github.com/HarnessRouter/harnessrouter/tree/main/protocol

Apache-2.0.

Metadata

Release files for unifiedharnessprotocol 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 unifiedharnessprotocol 0.1.0
File Size Uploaded Provenance Actions
unifiedharnessprotocol-0.1.0.tar.gz 9.7 kB Without provenance Details for unifiedharnessprotocol-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unifiedharnessprotocol 0.1.0
File Interpreter ABI Platform Actions
unifiedharnessprotocol-0.1.0-py3-none-any.whl Python 3 none any Details for unifiedharnessprotocol-0.1.0-py3-none-any.whl

Total release size: 20.2 kB

Release files / unifiedharnessprotocol-0.1.0.tar.gz

Download URL unifiedharnessprotocol-0.1.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ad5f54a2133c8c5baf97eab164567c5d870ee7cd0e79fe2272854b6120335342
BLAKE2b-256 checksum
How to use checksums
f12a1ffa99d5f34d270da814cac44629cb748d90e4861f00bcce0cd8f186830d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

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

Download URL unifiedharnessprotocol-0.1.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b844f1f4aa61204a51c8342c6c6406da79c695df3883d28579a709382b26a12
BLAKE2b-256 checksum
How to use checksums
9f8c93cd1e608853bc986af5f91f8c7445cc634b07d094af033ee25882a0058b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for unifiedharnessprotocol 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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