Provider implementations and common tools for AgentHarness (Anthropic, OpenAI, Ollama) behind optional extras.
Project description
agentharness-contrib
Provider implementations and common tools for AgentHarness. Each provider lives behind an optional extra, so the core stays dependency-free.
pip install "agentharness-contrib[anthropic]"
from agentharness import Agent, tool
from agentharness_contrib import AnthropicModel
@tool
def add(a: int, b: int) -> str:
"""Add two numbers."""
return str(a + b)
agent = Agent(model=AnthropicModel("claude-opus-4-8"), tools=[add])
run = agent.run("What is 2 + 3?")
print(run.result)
run.trace.save("run.jsonl") # real model call, fully recorded and replayable
AnthropicModel maps the core Model protocol onto Anthropic's Messages API. Pass
client= to inject a preconfigured anthropic.Anthropic (or a test double); extra
keyword arguments are forwarded to messages.create (e.g. thinking=..., system=...).
The Messages API translation is pure and SDK-free, so an agent's provider boundary is unit-tested without network calls.
Planned: OpenAI ([openai]) and Ollama / OpenAI-compatible providers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentharness_contrib-0.1.0.tar.gz.
File metadata
- Download URL: agentharness_contrib-0.1.0.tar.gz
- Upload date:
- Size: 6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0289e0ccfdd2b7fc2ed5443f0709c1b8a75994510ae22b7a0a22ef2a666f794c
|
|
| MD5 |
705d897e9ab121b4976cf7860002bb2f
|
|
| BLAKE2b-256 |
c6337417efb94685579e405424ec73ae0b4b8602fa945a683543f129f27c9187
|
File details
Details for the file agentharness_contrib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentharness_contrib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955b65176900c297d176602a2a65c59bc185f58edcffa163b6e0f64240fd2f36
|
|
| MD5 |
a952d5d3e7ba1a7ab1fb6208609bca68
|
|
| BLAKE2b-256 |
c4b0383ce9ce419713786dab2188a2d17dc1042b8593d10122c836f18761a8b8
|