Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uhp-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uhp-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file uhp-0.1.0.tar.gz.

File metadata

  • Download URL: uhp-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for uhp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b921b705ad86806a9fa7ca0b9f81e73b278f909cf6bca04470c31a82660d312b
MD5 5f14d67f5236691b5ce9802e43870588
BLAKE2b-256 c6f3fe99cd45fe6767b1ea6757663f64b4fe8c06f37c9dc2ab0fa74398a8ecfb

See more details on using hashes here.

File details

Details for the file uhp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: uhp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for uhp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40d9aa1a62327c348874ea1f1c7535243b03caadb5db8829241a18b3ae9893de
MD5 ec2d257d5f84e416174e0495883ed566
BLAKE2b-256 07f8bcd199b168d7d7d254083bc22c7c116858fa66651bf4947a80eae9a94022

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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