BLACKBOX
flight recorder for AI agents

Get Started

6/7 COMPLETE
Record your first agent run in under 5 minutes. Each step links to the right place.
86% complete
01
Install the Python SDK
One dependency (httpx). Works in any Python 3.10+ environment.
terminal
pip install blackbox-sdk
02
Configure & record your first run
Option A: context manager — explicit control over every step.
agent.py — context manager
import blackbox_sdk as bb

bb.configure(api_url="https://blackbox-gold.vercel.app
")

SYSTEM_PROMPT = "You are a helpful research assistant."

with bb.run(
    "my_agent_run_001",
    model="claude-sonnet-4-6",
    system_prompt=SYSTEM_PROMPT,
    tools=["web_search", "calculator"],
    sampling={"temperature": 0.3, "max_tokens": 1024},
) as run:
    # Your agent logic here
    run.reasoning("Searching for Q3 earnings data")
    run.tool_call("web_search",
        inputs={"query": "Q3 earnings"},
        result={"hits": [{"title": "Q3 Report", "snippet": "$4.2M revenue"}]})
    run.output(
        "Q3 earnings were $4.2M",
        tokens_in=520, tokens_out=180,
        cost_usd=0.0042, latency_ms=1340,
    )
# ↑ Run sealed automatically. Chain is provable.
Option B: auto-instrumentation — zero agent changes, patches openai + anthropic globally.
agent.py — auto-instrumentation
import blackbox_sdk as bb

# Call once at startup — before any LLM calls
bb.configure(api_url="https://blackbox-gold.vercel.app
")
bb.instrument()  # patches openai + anthropic clients

# Every client.messages.create() or client.chat.completions.create()
# is now automatically recorded as a BLACKBOX run. No other changes needed.
37 runs recorded
03
Verify the hash chain
Open the integrity panorama to confirm every recorded run is unaltered. Chain validity is recomputed from scratch on every request.
python — verify programmatically
# After recording:
is_valid = r.verify()
assert is_valid, "Chain tampered — investigate immediately"

# Or fetch the public certificate (no auth required):
import httpx
cert = httpx.get("https://blackbox-gold.vercel.app
/v1/audit/my_agent_run_001").json()
print(cert["chain_valid"])  # True
→ Open chain integrity panorama
Create a daily Merkle anchor
Anchors commit today's run chain heads into a single Merkle root. Publish the root externally to prove temporal existence.
curl
curl -X POST https://blackbox-gold.vercel.app
/v1/anchor/$(date +%Y-%m-%d) \
  -H "Authorization: Bearer YOUR_API_KEY"
→ Create today's anchor
Create a scoped API key
Create separate keys per agent with minimum required role:agent (write-only),auditor (read-only),admin (full access).
→ Admin → API Keys
06
Configure a fault webhook
Get alerted in Slack, PagerDuty, or any webhook endpoint the moment a hallucination, policy violation, or injection attempt is detected.
→ Configure alerts
Export a compliance report
Date-filtered PDF for risk committees, regulators, or auditors. Includes fault rates, chain integrity, model breakdown, and Merkle anchors.
→ Generate compliance report
GO DEEPER