Thuban Blackbox is Shield's forensic layer: npx thuban blackbox replays every recorded session, explains why Shield allowed or blocked each action, and renders a branching timeline of what an agent actually did.
"What did the agent try to do, and why did we let it?" kills a postmortem when there's no answer. Blackbox records every decision an agent made and why Shield allowed or blocked it — a replayable, explainable timeline, not a black box.
Your first 30 days of Thuban Individual is free. No card required, just a valid email address.
Every Shield-protected session already writes a hash-chained audit trail — every allowed write, every blocked command, every snapshot. But a raw audit trail is a list of JSON entries. When something goes wrong, "grep the audit log" is not an incident response process.
The raw trail has no session boundaries, no grouping, no way to see "what did this agent do, in order" without reading every entry by hand.
A BLOCKED verdict tells you Shield stopped something. It doesn't tell you which of Shield's 5 layers made that call, or what would have happened otherwise.
Which files got touched across a session? Where did a blocked action sit relative to everything around it? The raw trail doesn't answer that either.
Blackbox is the CLI layer that turns Shield's existing audit trail into something a human can actually read: npx thuban blackbox replay, explain, and timeline — no new logging, no new format, just the evidence Shield already recorded, made legible.
Blackbox is one of four independent layers in Thuban. Each does exactly one job, none of them can do another's job, and that separation is enforced structurally — not by policy or prompt instructions that a compromised agent could talk its way around.
Restricted production enforcement engine. Deterministic OS-level controls decide what an agent is allowed to do — no LLM in that decision path, so there's nothing to jailbreak.
Defence generation. Reads hostile evidence recorded by Blackbox to build new rules for Shield — it can propose a rule, but it has no execution rights of its own.
Isolated security-research environment. Attacks candidate defences generated by Forge inside a sandbox that has no path back to production.
Forensic replay and explainability. Wraps Shield's existing audit trail with replay, explain and timeline — read-only, zero execution rights on the host, ever.
Why four separate layers instead of one smart agent: a single system that enforces, learns, tests and explains would need to trust its own analysis of hostile input before acting on it. Splitting the roles means the layer that reads hostile evidence (Blackbox) is structurally incapable of acting on it, and the layer that acts (Shield) never has to reason about anything it reads — it just enforces deterministic rules.
An aircraft black box doesn't stop the crash — it survives it, and it tells investigators exactly what happened. Thuban Blackbox is the same idea applied to AI agent sessions: it records everything an agent does, and when something goes wrong, it reconstructs the incident chain in full, from first command to final effect.
Not an application log with timestamps bolted on. Not a summary. Not something an agent — or an attacker who compromised an agent — can quietly edit after the fact.
A tamper-evident, chained recording of every action attempted, every decision Shield made about it, and every outcome — replayable end to end with thuban blackbox replay, and explainable event-by-event with thuban blackbox explain.
Shield enforces. Forge learns. Crucible proves. Blackbox explains.
Blackbox does not duplicate Shield's audit and snapshot machinery — it wraps it. All three commands read from the same audit trail Shield already writes to (getAuditTrail(), listSnapshots()) and layer formatting, session grouping, and "why did this happen" analysis on top.
thuban blackbox replayChronological session playback. Groups audit entries into sessions (a 5-minute gap starts a new one), prints each ALLOWED/BLOCKED action in order, and totals actions recorded, blocked, and files modified.
thuban blackbox explainTakes an event id (or --last) and narrates which of Shield's layers made the call — Objective Boundary, File Guard, Shadow Realm, Execution Gate, Audit & Recovery — and surfaces the snapshot preserved before a blocked write.
thuban blackbox timelineRenders a unicode box-drawing tree of every session in a time window, marks critical events (blocked writes, rollbacks, credential access), and aggregates writes/blocks per file.
All three commands support --json for machine-readable output — pipe them into your own tooling, a CI step, or a compliance export. Implemented in packages/shield/blackbox.js, covered by 46 passing tests.
This is unedited output from a real Shield-protected project: two allowed actions, two blocked, then an explanation of why the blocked write was rejected.
Entries with a gap of more than 5 minutes start a new session. replay defaults to the most recent one; --session=<id> replays a specific one.
Blackbox reads the reason string Shield already writes for every verdict and maps it back to the layer that produced it — File Guard, Shadow Realm, Execution Gate, Audit & Recovery, or the Behavioural Sequence Engine.
Every protected session produces a complete, ordered record — not a sample, not a summary — and the three Blackbox commands turn it into replay, explanation, and timeline views without touching Shield's core logic.
Every file write, command execution, and rollback the agent attempted — with timestamps — recorded as it happened, grouped into sessions by thuban blackbox replay.
thuban blackbox explain maps any event back to the Shield layer that decided it — File Guard, Shadow Realm, Execution Gate, Audit & Recovery — plus the snapshot preserved before a blocked write.
Blocked writes, rollbacks, and credential-access attempts are flagged automatically in thuban blackbox timeline so the events that matter don't get lost in routine activity.
Raw audit entries become colored, readable lines: verdict, operation, target, and reason — no JSON parsing required, though --json is there when you need it.
timeline rolls up how many writes were allowed vs. blocked for every file touched in the window, so you can see which files saw the most contention.
No data leaves your machine, no cloud dependency. Blackbox only reads Shield's existing audit trail and snapshots — it has no write or execution path of its own.
Anyone can say "we log everything." Blackbox is built so the record can't be quietly edited after an incident, and so a full session can be replayed rather than pieced together from fragments.
thuban blackbox replay shows exactly what an agent did, in order, with the decision Shield made at each step.
explain surfaces the snapshot Shield preserved right before a blocked write, with the exact rollback command to run.
When an auditor asks what your AI agents did last quarter, --json output from any Blackbox command is ready to hand over.
Recordings can't be silently modified after the fact — Shield's audit trail is hash-chained, and Blackbox only ever reads it.
A log file tells you something happened. Blackbox tells you exactly what happened, which layer decided it, and how to undo it — with replay, explain, and timeline.
A log file tells you something happened. Blackbox tells you exactly what happened, why it was allowed to happen, and how to undo it.
| Capability | Nothing | App logs | Thuban Blackbox |
|---|---|---|---|
| Records attempted vs allowed vs blocked | ✗ | attempted only, usually | ✓ |
| Tamper-evident (chained records) | — | ✗ | ✓ |
| Full session replay | — | ✗ | ✓ |
| Rollback with recorded context | — | ✗ | ✓ |
| Audit-ready compliance evidence | — | requires manual assembly | ✓ |
Blackbox ships with every Shield installation — npx thuban blackbox to get started.
New to Thuban? Read the full Getting Started Guide.