Skip to main content

Ergonomic agent harness on top of agentharness-core: Agent, @tool, and testable, replayable runs. Imports as `agentharness`.

Project description

agentharness

The ergonomic, batteries-included layer over agentharness-core.

from agentharness import Agent, tool

@tool
def add(a: int, b: int) -> str:
    """Add two numbers."""
    return str(a + b)

agent = Agent(model=my_model, tools=[add], system="You are helpful.")
run = agent.run("What is 2 + 3?")
print(run.result)          # "2 + 3 = 5."
run.trace.save("run.jsonl")  # the whole run is recorded and replayable
  • @tool turns a typed Python function into a tool — the JSON schema is generated from type hints, no hand-written schemas.
  • Agent wraps a model + tools + optional system prompt. run() executes to completion; stream() yields live events; arun()/astream() are the async variants.
  • Built entirely on the deterministic core, so every agent you build is inspectable and replayable for free (from agentharness_core import replay).

Test agents like ordinary code, with no network:

from agentharness.testing import FakeModel, assert_used_tool, assert_answer

agent = Agent(model=FakeModel([...]), tools=[add])
run = agent.run("What is 2 + 3?")
assert_used_tool(run, "add")
assert_answer(run, "2 + 3 = 5.")

Project details


Download files

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

Source Distribution

agentharness_sdk-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

agentharness_sdk-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentharness_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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}

File hashes

Hashes for agentharness_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55e5a7243be2013c60d41a52071bee6889f7b4d97c54849c5892316af6b310ce
MD5 91f98fe10655e7670207d737704fbea2
BLAKE2b-256 daf2ad9868e5d3bb4dd4151c6a8734f077dec2ab2ae928f67d7919ef450bb7cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentharness_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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}

File hashes

Hashes for agentharness_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a84839be3e1e077c913eba1bc1ba1a9920a1711c933787ccc58b565146ac379
MD5 b2d0e38b70926941442e6b56951c1353
BLAKE2b-256 3c743e6e7b6254e081b0b2332c1d989d7227fa8b864958c0e660fd5b2c6b7a75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page