uhp
The Unified Harness Protocol in one import.
your product ──▶ UHP ──▶ ┌── Codex
├── Claude Code
├── Hermes
└── the harness that ships next year
A harness is a complete agent runtime — a loop that plans, calls tools, edits files and reports back. Each one already knows how to do the work; what none of them agree on is how a product should drive one. UHP answers that once: how to start a task, follow its progress, continue the conversation, cancel it, get the files it produced, and understand why it failed.
UHP is not a model API and does not replace one. A model API gives you a turn: messages in, tokens out, tools you have to run yourself. UHP gives you a task: work in, and a running agent that uses its own tools, keeps its own session, and hands back results and files.
pip install uhp
Use it
import os
from uhp import connect
client = connect("http://localhost:3000", os.environ["UHP_API_KEY"])
harness = client.harnesses()[0]
for event in client.stream("Summarise README.md", harness_id=harness["id"]):
if event["type"] == "response.output_text.delta":
print(event["delta"], end="", flush=True)
Ask a server what it is before handing it a credential — discovery is unauthenticated by design:
from uhp import probe
probe("http://localhost:3000")
# {'protocol': 'uhp', 'versions': ['2026-08-11'], 'conformance_class': 'full', 'capabilities': {...}}
What's in the box
This package is the front door. It re-exports three focused ones so a caller needs a single dependency:
| Package | What it is |
|---|---|
unifiedharnessprotocol |
The specification as data — versions, classes, statuses, events, error codes, endpoints |
harnessclientprotocol |
SSE decoding, dropped-event detection, output assembly, idempotency, retry policy |
harnessrouter |
The HTTP client and CLI |
connect() returns that client; UhpClient is the same class under the protocol's name.
CLI
export UHP_BASE_URL=http://localhost:3000
export UHP_API_KEY=…
uhp discover
uhp harnesses
uhp stream "Summarise README.md" --harness chrn_…
It does not require anyone's cloud
UHP is an HTTP contract. A conformant server is any server that answers the requests in the specification with the responses in the specification — in containers, in subprocesses, on a queue, or on someone else's infrastructure. Nothing in the wire format requires a hosted service, an account, a licence key, or a call home. A client written against the specification works with any implementation that passes the conformance suite.
Specification
https://github.com/HarnessRouter/harnessrouter/tree/main/protocol
Apache-2.0.
Metadata
Release files for uhp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uhp-0.1.0.tar.gz | 8.1 kB | Without provenance | Details for uhp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uhp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for uhp-0.1.0-py3-none-any.whl |
Total release size: 17.0 kB
Release files / uhp-0.1.0.tar.gz
| Download URL | uhp-0.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b921b705ad86806a9fa7ca0b9f81e73b278f909cf6bca04470c31a82660d312b
|
|
BLAKE2b-256 checksum How to use checksums |
c6f3fe99cd45fe6767b1ea6757663f64b4fe8c06f37c9dc2ab0fa74398a8ecfb
|
| 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 / uhp-0.1.0-py3-none-any.whl
| Download URL | uhp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40d9aa1a62327c348874ea1f1c7535243b03caadb5db8829241a18b3ae9893de
|
|
BLAKE2b-256 checksum How to use checksums |
07f8bcd199b168d7d7d254083bc22c7c116858fa66651bf4947a80eae9a94022
|
| 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 uhp 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.