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.29.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 oneharness-sdk 0.29.0
File Size Uploaded Provenance Actions
oneharness_sdk-0.29.0.tar.gz 124.4 kB With provenance Details for oneharness_sdk-0.29.0.tar.gz

Built distribution (wheel)

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

Total release size: 250.2 kB

Release files / oneharness_sdk-0.29.0.tar.gz

Download URL oneharness_sdk-0.29.0.tar.gz
Size 124.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5db11d6c5abc1c853fcfe35971e408d90de1ddb02200bfbf71f64f9e0484ea7d
BLAKE2b-256 checksum
How to use checksums
6f32bdb9b2793d5195c787f7450f24993849712805391d95c94c8e127061595b
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 14, 2026.

Transparency log

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

Download URL oneharness_sdk-0.29.0-py3-none-any.whl
Size 125.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f1c0a5772fc642f6aa7d6425a2ab263b940c1d7cbc87838ce1f8f4723c08d00
BLAKE2b-256 checksum
How to use checksums
0fca2fb5ba2b55f82d6e3e39a541fc47758a2d3c98df1d665563b2cb15ae1af9
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 14, 2026.

Transparency log

Security for oneharness-sdk 0.29.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.

Full provenance

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

Select from 2 files

Attestation for oneharness_sdk-0.29.0.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 14, 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.29.0 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