Skip to main content

Agent Harness

Harness (a13n-harness) is the embeddable execution SDK behind Harness UI and Service. It builds reusable agents, runs them with current tools and Environments, streams observations, and returns state for continuation. Start with the offline quickstart; the Python import is a13n_harness.

Capability composition

Build an AgentSpec with only the behavior your application needs. For example, to expose Environment tools and working state:

from a13n_harness import AgentSpec, HarnessBuilder
from a13n_harness.capabilities import WorkingStateCapability
from a13n_harness.environment import DynamicEnvironmentCapability, DynamicEnvironmentConfiguration

executable = HarnessBuilder().build(
    AgentSpec(model="openai-responses:gpt-5"),
    output_type=str,
    capabilities=(
        DynamicEnvironmentCapability(DynamicEnvironmentConfiguration()),
        WorkingStateCapability(),
    ),
)

Supply a fresh Provider Environment to each run(..., environment=...), or use environments={...} for named mounts. Harness enters and closes adapters; your application selects their configuration, current state, access policy, and when to destroy a backing target. See Environments and Capabilities.

Model construction

Pass a native model directly through HarnessBuilder.build(model=...), or select one in AgentSpec.model. a13n_harness.infer_model() constructs a model from supported aliases and caller-owned provider factories. create_model_http_client() builds a caller-owned httpx2 client for provider requests. Configure credentials and close owned clients in your application. See Models and Model authentication.

Execution boundary and filters

Each built Agent includes the tool execution boundary, message integrity filter, and request-only image preparation. Image preparation splits tall static images, compresses images to encoded-byte and dimension limits, and retains the newest images without changing saved history or original files. Configure the selected model's HarnessModelCharacteristics.image_input with ImageInputPolicy, or set image_input=None to disable automatic preparation. See Context.

Add Capabilities for policy, context, memory, delegation, or model recovery. Toolsets are available from a13n_harness.toolsets, and managed tool contracts from a13n_harness.tools.

A completed Run returns a HarnessState with a stable thread_id. Pass it as previous_state to continue the Thread; each new Run receives a fresh run_id. The Host persists accepted state and reconstructs credentials and other current authority on resume. State and resume covers serialization and interrupted calls.

Runnable examples and guides

Versioning

Harness and a13n-stream-protocol publish together at one exact version. Harness UI releases independently. The Harness specification owns the accepted contracts.

Metadata

Release files for a13n-harness 0.5.4

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

Source distribution (sdist)

Source distribution for a13n-harness 0.5.4
File Size Uploaded
a13n_harness-0.5.4.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for a13n-harness 0.5.4
File Interpreter ABI Platform
a13n_harness-0.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / a13n_harness-0.5.4.tar.gz

Download URL a13n_harness-0.5.4.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a75ea9a5a6b0c2a997f3a3081b29b97fd93d8ef119cafcae502f95dded4ff8c7
BLAKE2b-256 checksum
How to use checksums
b4a7d71f37e1e7f75b718d09206c918628592c768539cf3ae7803cd74842cc5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / a13n_harness-0.5.4-py3-none-any.whl

Download URL a13n_harness-0.5.4-py3-none-any.whl
Size 791.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0da4c7686f51c7a0b249cfc3e26b4b5779bd5f749fa50267cb0256a5b94eb9d
BLAKE2b-256 checksum
How to use checksums
9daf4293f6fef61d5a926b07c867b3ef07dd0fa9e818276e32de2bb969718528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.13.0

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

This release

0.5.4 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.44

2 release files

0.0.43

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

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