This release is a pre-release and may not be stable for production use.
Agent Blackbox
Runtime blackbox recorder for agent workflows using JEP events, HJS evidence references, and JAC declared dependency chains.
Experimental implementation seed.
Agent Blackbox supports incident review and chain reconstruction. It does not determine legal liability, factual truth, regulatory compliance, or moral responsibility.
What This Is
Agent Blackbox records structured execution traces for agent workflows.
For each traced operation it can record:
- who executed the operation;
- when it happened;
- input/output/error digests;
- a JEP Core 0.7-style event;
- a JAC v0.5-style dependency edge;
- optional HJS-style evidence references;
- a local JSONL blackbox log;
- an incident review report.
It is designed to help operators answer:
What happened?
Which event failed?
Which prior event was this based on?
Which declared dependency path led here?
Which evidence references are available for review?
It is not designed to answer:
Who is legally liable?
Who is morally at fault?
Was the system compliant?
Was the model correct?
Was the log complete?
Relationship to JEP / HJS / JAC
JEP = atomic signed judgment events
HJS = accountability receipts, archive/privacy/evidence lifecycle
JAC = declared dependency and accountability chains
Agent Blackbox = runtime trace recorder and incident review utility
Aligned with:
- JEP Core 0.7: https://github.com/hjs-spec/jep-core
- JEP API: https://github.com/hjs-spec/jep-api
- HJS archive/evidence companion: https://datatracker.ietf.org/doc/draft-wang-hjs-accountability/
- JAC v0.5: https://github.com/hjs-spec/jac-agent-02
Public drafts:
- JEP-Core: https://datatracker.ietf.org/doc/draft-wang-jep-judgment-event-protocol/
- HJS: https://datatracker.ietf.org/doc/draft-wang-hjs-accountability/
- JAC: https://datatracker.ietf.org/doc/draft-wang-jac/
Core Features
| Feature | Description |
|---|---|
| Trace decorator | Wrap agent functions and record runtime events |
| JEP-style event | Emits JEP Core 0.7-style J/D/T/V event objects with stable Event Identity |
| JAC chain extension | Uses ext["https://jac.org/chain"] instead of deprecated task_based_on |
| HJS evidence refs | Records input/output/error digests as evidence references |
| Local blackbox log | Stores JSONL event records for later review |
| Incident review | Reconstructs declared chain fragments around an incident |
| Integrity check | Verifies event hashes and Ed25519 signatures generated by this library |
JEP Core 0.7 boundary
Fresh Agent Blackbox events use stable id and Event Identity (who,id) and do not add a mandatory Core nonce. Event Hash remains the key used by this local blackbox store because it identifies the exact signed artifact.
When a recorded parent is available locally, the JEP ref uses a typed jep:event reference with Event Identity plus an optional exact-artifact hash. JAC extension metadata continues to carry runtime dependency-chain semantics. Chain reconstruction, causality, authority, and termination cascade are not JEP Core semantics.
Historical pre-0.7 imported events preserve their original signed members, including a historical nonce when present; they are not silently rewritten into 0.7.
Installation
Install the published distribution:
pip install --pre agent-blackbox-jep
The PyPI distribution is named agent-blackbox-jep because agent-blackbox is unavailable on PyPI. Python imports remain agent_blackbox, and the CLI commands remain agent-blackbox and blame-finder.
For local development:
pip install -e .
Basic Usage
from agent_blackbox import AgentBlackbox
blackbox = AgentBlackbox(storage="./blackbox_logs")
@blackbox.trace(agent_name="CoderAgent")
def write_code(requirement: str) -> str:
return "print('hello world')"
result = write_code("write a hello world")
# Review the latest event
event_hash = list(blackbox.events.keys())[-1]
report = blackbox.review_incident(event_hash)
print(report["candidate_failure_node"])
print(report["chain"])
JAC v0.5 Chain Extension
Agent Blackbox does not use the deprecated top-level task_based_on field.
It uses:
{
"ext": {
"https://jac.org/chain": {
"based_on": "sha256:...",
"based_on_type": "jep-event",
"relation": "derived-from",
"observed_log_assumption": "partial"
}
},
"ext_crit": ["https://jac.org/chain"]
}
Incident Review Output
Example:
{
"incident": "sha256:...",
"candidate_failure_node": "CoderAgent",
"diagnostic_summary": "The selected event has status failed. Review declared parents and evidence references.",
"review_score": 0.72,
"chain": [
{
"event_hash": "sha256:...",
"agent": "PlannerAgent",
"status": "success"
},
{
"event_hash": "sha256:...",
"agent": "CoderAgent",
"status": "failed"
}
],
"boundary": {
"not_legal_liability": true,
"not_factual_causality_proof": true,
"not_compliance_determination": true
}
}
CLI
Review an incident:
agent-blackbox review sha256:...
Show a chain tree:
agent-blackbox tree sha256:...
Verify an event:
agent-blackbox verify sha256:...
Boundary Statement
A valid Agent Blackbox trace means a local runtime event was recorded and structurally linked.
It does not prove:
- legal liability;
- factual causality;
- regulatory compliance;
- complete-log availability;
- model correctness;
- moral responsibility.
A valid signature proves integrity of the event under the local key used by this library.
It does not prove the underlying claim is true.
Status
Version: see [current releases](https://github.com/hjs-spec/Agent-Blackbox/releases) (alpha).
Status: experimental implementation seed
License
MIT
Runtime and verification notes
See HARDENING.md for supported behavior, regression checks, and compatibility boundaries.
Metadata
Release files for agent-blackbox-jep 0.3.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agent_blackbox_jep-0.3.0a3.tar.gz | 15.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_blackbox_jep-0.3.0a3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.5 kB
Release files / agent_blackbox_jep-0.3.0a3.tar.gz
| Download URL | agent_blackbox_jep-0.3.0a3.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af0b81446a41b66b594c4c908a8a7185480b7f6ca397fe5cd729741b3414f88b
|
|
BLAKE2b-256 checksum How to use checksums |
22204e4a4ccf8839986eccb9a6d2ac9379723f5d0543ac60124ce6e9cb72077a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / agent_blackbox_jep-0.3.0a3-py3-none-any.whl
| Download URL | agent_blackbox_jep-0.3.0a3-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
201033c7589452aecc2657b623d717e482afd0b6c69f356d62d29476e8683b0b
|
|
BLAKE2b-256 checksum How to use checksums |
148350f1d704c7a78c6a3c29621521eef3daa355ee6c19ffd1c9861b399d83b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logSecurity for agent-blackbox-jep 0.3.0a3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for agent_blackbox_jep-0.3.0a3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.