Skip to main content

oneharness-sdk

Async Python access to the oneharness engine, generated from and validated against the Rust-owned JSON Schema contracts. The distribution is oneharness-sdk, the import is oneharness_sdk, and every release depends on the exact same oneharness-cli version.

pip install oneharness-sdk
import asyncio

from oneharness_sdk import OneHarness


async def main() -> None:
    oneharness = OneHarness()
    report = await oneharness.run(
        {"prompt": "Summarize this repository", "harnesses": ["codex"]}
    )
    print(report["results"][0]["text"])


asyncio.run(main())

Every JSON-returning method passes --format json --compact itself, so the CLI's own default (a human-readable text view) never reaches the SDK. A run over several harnesses is a fallback chain by default — the first candidate that can run does, and the report's fallback block says which; pass "run_mode": "parallel" to run them all at once.

The client covers every verb the CLI exposes, so nothing needs a hand-built command line: run, run_mock, run_stream, list, detect, config, sync, init, usage, gate, mock, interrupt, compact, history, history_list, history_watch, history_clear, history_migrate, history_reindex, and history_pointers. That coverage is gated, not asserted here, and this list is held to the same capability manifest by every_capability_is_named_in_each_sdk_readme in crates/sdk-conformance/tests/sdk_conformance.rs. run_mock uses the deterministic responder shipped in the CLI; see Testing patterns. run_stream and history_watch are async iterators. Every envelope is validated before it is yielded; closing or cancelling an iterator terminates its subprocess.

An option whose name is a Python keyword takes the conventional trailing underscore — sync({"global_": True}) sends --global — and nothing else about the spelling changes.

async for envelope in oneharness.run_stream(
    {"prompt": "Inspect this repository", "harnesses": ["codex"]}
):
    if envelope["type"] == "event" and envelope["event"]["name"] == "shell":
        break

async for envelope in oneharness.history_watch(
    {"labels": {"graph": "release"}, "after": last_history_id}
):
    print(envelope["record"]["history_id"])

Python input keys are snake case and strict: unknown fields and misspellings fail before the CLI starts. Output dictionaries preserve additive fields from newer compatible CLI versions. history and history_watch raise HistoryNotFoundError when a session, record, or cursor cannot be resolved.

Metadata

Release files for oneharness-sdk 0.28.6

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

Source distribution (sdist)

Source distribution for oneharness-sdk 0.28.6
File Size Uploaded Provenance Actions
oneharness_sdk-0.28.6.tar.gz 124.2 kB With provenance Details for oneharness_sdk-0.28.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oneharness-sdk 0.28.6
File Interpreter ABI Platform Actions
oneharness_sdk-0.28.6-py3-none-any.whl Python 3 none any Details for oneharness_sdk-0.28.6-py3-none-any.whl

Total release size: 249.7 kB

Release files / oneharness_sdk-0.28.6.tar.gz

Download URL oneharness_sdk-0.28.6.tar.gz
Size 124.2 kB
Tags Source
SHA-256 checksum
How to use checksums
37936151158740a9e83e4371a74693ccdcf4ff043179bcd20892ff4e361c59de
BLAKE2b-256 checksum
How to use checksums
7ed4aa741710a26d4fba9b31142ba9542c24676ba4a54395621fde4f1ae55275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / oneharness_sdk-0.28.6-py3-none-any.whl

Download URL oneharness_sdk-0.28.6-py3-none-any.whl
Size 125.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5be811e20af5a63bb99d16e53d8fcdb091fbd5a28f2d4ec1f0506e471e606769
BLAKE2b-256 checksum
How to use checksums
65d06c55162cf443849f4ba4689dbba1187c9fc65de68b865b81c5c7346a7943
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for oneharness-sdk 0.28.6

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for oneharness_sdk-0.28.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

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.28.6 This release

2 release files Full 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