PandaProbe Harness
Self-healing for AI agents. The harness wraps any PandaProbe-instrumented agent in an operational envelope that evaluates every turn, alerts the agent when quality degrades, and lets it diagnose its own failures and write — and prove — its own operating rules. Fully automatic, no human in the healing loop.
📚 Documentation · 📦 PyPI · 💬 Discussions
How it works
- Evaluate — after each turn, the harness scores the session on the
PandaProbe platform (
agent_reliability,agent_consistency) in a detached task that never blocks your agent. - Notice — breaches and declining trends post a structured diagnostic notice to a workspace mailbox. Nothing is ever injected into the agent's conversation.
- Heal — guided by a standing protocol in its system prompt, the agent pulls the notice, inspects its own flagged traces, and records a mitigation rule.
- Validate — the rule enters as a candidate: the harness replays the captured failure (or watches the next live sessions) and promotes it only when it demonstrably helps. Validated rules re-enter the prompt on every future run; a replayable eval-set guards old wins against regressions.
The core has zero runtime dependencies and reaches the platform exclusively
through the pandaprobe CLI.
Installation
pip install pandaprobe-harness
# framework adapters are optional extras:
pip install "pandaprobe-harness[langgraph]" # [langchain] [deepagents] [crewai]
# [claude-agent-sdk] [openai-agents] [all]
You'll also need the pandaprobe CLI
installed and authenticated, and an agent traced with the
PandaProbe SDK.
Quickstart
from pandaprobe_harness import Harness
from pandaprobe_harness.agent_tools.native import as_anthropic_tools
harness = Harness.create() # provisions the workspace
system_prompt = harness.system_context() + MY_PROMPT # protocol + references + banner
specs, dispatch = as_anthropic_tools(harness.toolset) # the self-diagnostic tools
tools = my_tools + specs
async def one_turn(session_id: str, user_input: str) -> str:
# `settle=True` waits for this turn's evaluation and any notice before
# returning, so a rule learned now is in force for the next turn.
async with harness.turn(session_id, settle=True):
return await my_agent_step(system_prompt, tools, user_input)
The system context carries the protocol, the tool list, and an index of the
agent's rule files — never the rule bodies. The agent pulls those on demand with
harness_rules_read, so the workspace stays its own.
Using a framework? Harness.for_langgraph(), for_langchain(),
for_deepagents(), for_crewai(), for_claude_agent_sdk(), and
for_openai_agents() wire turn detection for you.
➡ Full guides, concepts, and the configuration reference live in the documentation.
Try it offline
The examples/ directory ships fully-offline, credential-free demos:
make example # the pull loop, end to end
uv run python examples/closed_loop_self_heal.py # candidate → validate → promote → regression
uv run python examples/calibration_demo.py # threshold calibration
Operator CLIs
| Command | Purpose |
|---|---|
pandaprobe-harness-agent |
The agent-facing toolset for sandboxed shells. |
pandaprobe-harness-eval |
Replay the eval-set against the current rules — the regression guard. |
pandaprobe-harness-calibrate |
Measure and tune the breach thresholds, with or without labels. |
Benchmarks
An A/B study measuring the harness's effect on agent reliability across
AppWorld, Terminal-Bench (via Harbor), and τ²-bench lives in
benchmarks/ — a self-contained uv project that installs the
released harness from PyPI. Run it from the repo root with make bench-setup,
make bench-smoke, and make bench-report (see
benchmarks/README.md).
Development
make install # uv sync
make test # full offline suite — no network, no real CLI
make lint typecheck # ruff + mypy --strict
See CONTRIBUTING.md for the project invariants and PR process, and CHANGELOG.md for release history.
License
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 pandaprobe_harness-0.7.0.tar.gz.
File metadata
- Download URL: pandaprobe_harness-0.7.0.tar.gz
- Upload date:
- Size: 701.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c4eeed9c9e0b1b025a92662e4d76e6bddefda9f0b1405a8429f7311386b5385
|
|
| MD5 |
80fa26a7922cc3ac857285a03b748058
|
|
| BLAKE2b-256 |
1239ac708388dccef673a62da8cfaaf57022da7099afad966e547556ba3d53e8
|
Provenance
The following attestation bundles were made for pandaprobe_harness-0.7.0.tar.gz:
Publisher:
release.yml on chirpz-ai/pandaprobe-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pandaprobe_harness-0.7.0.tar.gz -
Subject digest:
1c4eeed9c9e0b1b025a92662e4d76e6bddefda9f0b1405a8429f7311386b5385 - Sigstore transparency entry: 2292901523
- Sigstore integration time:
-
Permalink:
chirpz-ai/pandaprobe-harness@1da7e1bf394efced2b093d9bceebd01d0a7414aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/chirpz-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1da7e1bf394efced2b093d9bceebd01d0a7414aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file pandaprobe_harness-0.7.0-py3-none-any.whl.
File metadata
- Download URL: pandaprobe_harness-0.7.0-py3-none-any.whl
- Upload date:
- Size: 135.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d2ebad50723c471e64fec337916c86278cd43b3c968d96d2280e0c59dd15aa7
|
|
| MD5 |
29654831b07e6eaccb6921895c9b342b
|
|
| BLAKE2b-256 |
7b0d6741422cf24265c8ba6f9405ed9b4afaa4e89f0556b3179ed64fb46ca7fb
|
Provenance
The following attestation bundles were made for pandaprobe_harness-0.7.0-py3-none-any.whl:
Publisher:
release.yml on chirpz-ai/pandaprobe-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pandaprobe_harness-0.7.0-py3-none-any.whl -
Subject digest:
0d2ebad50723c471e64fec337916c86278cd43b3c968d96d2280e0c59dd15aa7 - Sigstore transparency entry: 2292901679
- Sigstore integration time:
-
Permalink:
chirpz-ai/pandaprobe-harness@1da7e1bf394efced2b093d9bceebd01d0a7414aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/chirpz-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1da7e1bf394efced2b093d9bceebd01d0a7414aa -
Trigger Event:
push
-
Statement type: