Skip to main content
Pre-release

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 v0.6-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:

Public drafts:


Core Features

Feature Description
Trace decorator Wrap agent functions and record runtime events
JEP-style event Emits JEP v0.6-style J/D/T/V event objects
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

Installation

Install the published distribution:

pip install agent-blackbox-jep==0.2.0a2

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: 0.2.0a2
Status: experimental implementation seed

License

MIT

Runtime and verification notes

See HARDENING.md for supported behavior, regression checks, and compatibility boundaries.

Download files

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

Source Distribution

agent_blackbox_jep-0.2.0a2.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

agent_blackbox_jep-0.2.0a2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file agent_blackbox_jep-0.2.0a2.tar.gz.

File metadata

  • Download URL: agent_blackbox_jep-0.2.0a2.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_blackbox_jep-0.2.0a2.tar.gz
Algorithm Hash digest
SHA256 d473f976e127d989508e28c3146adf25d4d91d462e969eddd2d8981cfaacdde8
MD5 aef04ba49fa8f17a2ad3a26f5cca4429
BLAKE2b-256 3e2f67ebeeefd3fbc5c687d3d33c5f1f6945e24e0747a13eade3ea1a4c7de98f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_blackbox_jep-0.2.0a2.tar.gz:

Publisher: release.yml on hjs-spec/Agent-Blackbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_blackbox_jep-0.2.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_blackbox_jep-0.2.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ce14430b72481a7af0d8500a0ff182428f6807ec08c3495f8f4d42a39fe11b
MD5 4276f27a5480ad0e7bfa83b6f7c19b45
BLAKE2b-256 70686751de043f763500e1e183258264ed0cbcbe2c58c906f9ff46c84b6e4453

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_blackbox_jep-0.2.0a2-py3-none-any.whl:

Publisher: release.yml on hjs-spec/Agent-Blackbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0a2 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page