After an AI agent incident, you need to reconstruct exactly what happened: what the agent did, in what order, what triggered the behavior change, and what impact it had. This is post-incident forensics, and the quality of your investigation depends on the quality of your audit trail.
Every action the agent attempted is recorded in the receipt chain. Each receipt includes:
Before trusting the audit data, verify the hash chain:
curl https://control-plane/api/receipts/verify?session_id=sess_abc123
If the chain is intact, the records have not been tampered with since they were created. If there are breaks, identify which receipts were modified and treat the data with appropriate caution.
Export the receipts and build a chronological timeline:
curl https://control-plane/api/receipts?session_id=sess_abc123&format=timeline
Look for the inflection point: the moment the agent's behavior changed. Common inflection patterns:
Examine the receipt immediately before the behavior change. If the agent processed external content, scan that content retroactively:
const triggerReceipt = receipts.find(r => r.id === 'rec_inflection_point');
const scan = aegis.scan(triggerReceipt.args.content);
// Check if injection patterns are present that were not caught at runtime
From the inflection point forward, catalog every action:
For each harmful action after the inflection point, ask:
During an investigation:
This evidence may be needed for regulatory reporting, customer communication, or legal proceedings.
Explore more guides on AI agent safety, prompt injection, and building secure systems.
View All Guides