Agent Harness Bridge
agent-harness-bridge gives applications one small, submit-tool-oriented API
for three different agent runtimes:
- OpenAI Agents SDK, including OpenAI-compatible endpoints such as Volcengine Ark
- Claude Agent SDK
- DeepSeek Harness (
dsh)
It deliberately does not hide backend lifecycle differences. Each adapter owns its native session continuation, MCP transport, timeout, cleanup and recovery logic, while applications keep their prompts, domain tools and submit validation.
Install
Install only the runtime you need, or all validated adapters:
pip install 'agent-harness-bridge[openai]==0.1.0'
pip install 'agent-harness-bridge[claude]==0.1.0'
pip install 'agent-harness-bridge[deepseek]==0.1.0'
pip install 'agent-harness-bridge[all]==0.1.0'
The dsh adapter also imports deepseek_harness. DeepSeek's current SDK
depends on a platform-specific runtime wheel, so the bridge does not force
that wheel onto every installation. Install the SDK using the method supported
by the target host. On older-glibc clusters, load polyfill-glibc/0.1 before
using its runtime or point DSH_BIN at a validated source build.
Configuration
Harness and model selection are independent:
HARNESS=openai MODEL=doubao-seed-2-1-turbo-260628 python your_workflow.py
HARNESS=openai MODEL=doubao-seed-2-1-pro-260628 python your_workflow.py
HARNESS=deepseek MODEL=doubao-seed-2-1-turbo-260628 python your_workflow.py
HARNESS=claude MODEL=claude-sonnet-5 python your_workflow.py
The default remains OpenAI Agents SDK with
doubao-seed-2-1-turbo-260628. Model identifiers are intentionally open
strings rather than a hard-coded catalog.
Contract
Applications provide ToolSpec objects and designate one successful submit
tool as the completion condition:
from harness_bridge import ToolSpec, run_agent
async def submit(args):
return {
"content": [{"type": "text", "text": "accepted"}],
"_submitted": args,
}
result = await run_agent(
tools=[ToolSpec("submit_answer", "Submit the checked answer", {"answer": str}, submit)],
submit_tool="submit_answer",
prompt="Check the evidence and submit the answer.",
cwd="/absolute/read-only/workdir",
)
Tool handlers return an MCP-shaped result containing text or image content,
an optional is_error, and an optional private _submitted value captured by
the host after successful validation. A handler that raises is reported to
the model as an error result under every backend; it never aborts the run.
run_agent() validates the tool table before importing any SDK: the submit
tool must be present, tool names must be unique, allowed_builtin must be a
subset of read, glob, grep, tasks, and application tools may not
reuse the name of a requested builtin.
allowed_builtin selects Claude Code's own Read/Glob/Grep/Task tools under
HARNESS=claude. The OpenAI and dsh adapters serve same-named, cwd-confined
host tools implemented in pure Python (Grep needs no rg on the host), so
prompts stay portable across backends.
backend_capabilities() exposes runtime facts that callers can check before a
run. Unsupported built-in capabilities fail closed.
Design boundary
The bridge owns only runtime concerns. Domain workflows should continue to own:
- prompts and scientific or business policy
- tool handler implementations
- submit validation
- output files and resume manifests
Backend-specific defenses remain adapter-local. In particular, OpenAI Responses continuation and context reset, Claude SDK teardown and permissions, and dsh MCP startup/watchdog/SSE recovery are not reduced to a lowest-common- denominator loop.
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 agent_harness_bridge-0.1.0.tar.gz.
File metadata
- Download URL: agent_harness_bridge-0.1.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192d6c8c17ff6c08eab33bbc90a176cfa95701b8ff92689ffe3bdd034d592174
|
|
| MD5 |
ce23816eeb3bb55123a22404163c9dad
|
|
| BLAKE2b-256 |
07b7682b3a46717d662f2ecebacff39d96c54015bf30c1f1f3c11b0a2ee4d018
|
File details
Details for the file agent_harness_bridge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_harness_bridge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c131b04cf0cb97299a070e91093347a29188667acf4a4dbf8cedeb6a8a05df4
|
|
| MD5 |
1e797f5824b269135e68aeede1f5054d
|
|
| BLAKE2b-256 |
3594587edecd5c78b4b1ca2a1e1bf90b39e8a3044eae1fba0795f4454db8722f
|