Objective
In a sovereign or air-gapped deployment, every automated action must be accountable — a reconstructable record for oversight and after-action review — and it must stay inside the boundary. This recipe keeps that record in a tamper-evident immutable table, in the same self-hosted engine that runs the agents.
Step 1: An immutable agent-action ledger
CREATE IMMUTABLE TABLE agent_audit (
task_id TEXT,
actor TEXT, -- which agent / analyst
sources TEXT, -- cited records inside the deployment
output TEXT,
reviewer TEXT
) WITH (ENCRYPTION = 'AES256GCM');
Omit
WITH (ENCRYPTION = 'AES256GCM')ifAIDB_IMMUTABLE_MASTER_KEYis not set; the table is still append-only and hash-chained.
Step 2: Record an action
INSERT INTO agent_audit VALUES (
'TASK-4417',
'analyst-agent',
'DOC-118; DOC-204 (both in-enclave)',
'Summarized linked entities across the two source documents for analyst review.',
'Watch officer 12'
);
Step 3: Prove the record was never altered
VERIFY TABLE agent_audit;
is_valid | message
---------+----------------------------------------------------------------
true | chain verified: 1 record(s) ... per-record lineage anchored
| (tamper-evident); ...
Why it matters
Accountability without an external dependency: the record lives in the same self-hosted engine as the agents, is append-only by construction, and verifies with one query — inside the boundary, with no egress. It is the audit layer under entity link analysis and grounded offline retrieval.