Inspiration
AI agents now do real work inside companies. They move data, write reports and manage files using real credentials. When one of them misbehaves or goes rogue, someone has to do the forensics, often also using agents.
Before anyone trusts an AI forensic investigator, there should be a way to evaluate and train it: stage an incident, run the investigator, and score it. We couldn't find one. Forensic reference sets like NIST's CFReDS hold evidence of human activity. We found nothing that lets you stage an AI insider, control how much power the attacker and the investigator each get, and measure whether the investigator caught the right worker or accused an innocent one. AI agents are new enough that red-teaming their investigators hasn't been a field yet. So we built the lab for it.
What it does
ALIBI is a red-teaming lab for AI forensic investigators. Each run is a controlled experiment with four stages.
- Normal work. Three AI workers run a shift in a simulated company: one ingests datasets, one writes reports, one archives files. A real model (Claude Haiku 5.5) chooses their actions. Every action leaves evidence in app logs, a central log collector, files and network flows.
- The Rogue Agent. In an incident run, one worker goes rogue and it's objective changes partway through the shift. Using its own legitimate account, it copies restricted datasets to an unapproved address and deletes its own log lines. If its permissions allow, it also removes its staged files. It then tries to wipe the records. Records then contain look-alike activity with fake innocent causes, while an answer key with which worker went rogue are sealed.
- The investigation. A LangChain DeepAgent outside the simulation gets a read-only, hash-pinned snapshot of the evidence and nothing else. It reconstructs the incident step by step. Every finding must cite exact log lines, and a verifier checks those citations before the finding counts.
- Review and scoring. An analyst reviews the report and locks it. Only then is the sealed truth revealed and the report scored on effects caught, effects missed, cover-ups found, and whether anyone innocent was accused.
Red-team controls. The operator sets the resource split between rogue and investigator (80/20, 50/50 or 20/80, in model requests), the rogue's permissions (export only; plus delete logs; plus delete files) and how much unrelated evidence there is. The Experiments page plots the outcomes.
For the analyst. Every finding opens its evidence. You can ask the case questions (answers are checked against the records), remove an evidence source such as the collector to see which conclusions fail, and leave a case unresolved when the evidence doesn't support one. The report keeps "which account" separate from "which person".
- Science & Discovery: ALIBI is a tool for security and forensics researchers. They use it to test an AI forensic investigator on staged incidents where the true answer is known in a sandbox environment. They change one variable at a time (resources, permissions, how much unrelated evidence) and measure what the investigator gets right and wrong, allowing researchers to train and improve future forensic agents.
- Arlequin AI, AI-Driven Forensics: ALIBI pushes the boundaries of what's capable in AI forensics. An AI investigator is able to reconstruct what happened from logs, files and network flows, cites and cross-verifies the exact records behind each conclusion, and a verifier checks them with the original forensic dataset. It also helps researchers build better forensic AI that allow forensics to trace back rogue activity.
- LangChain, Best use of deepagents: The main investigator is a LangChain DeepAgent. It writes a plan and updates it when the evidence conflicts, keeps a case file, hands work to an auditor and a skeptic helper, and waits for a human to approve its report. We tested one agent against three, and three did worse.
- Amazon, Best Practical AI Innovation: Companies now give AI agents real credentials and real work, and when one misbehaves someone has to find out what happened. ALIBI is practical because security and forensic investigators can try a ready-made investigator agent on many kinds of cases before they trust it.
How we built it
Pipeline from raw data to finding: seeded simulator → frozen evidence bundle with SHA-256 hashes and line-level provenance → deterministic forensic checks → DeepAgent investigation → verified, cited findings → human lock → sealed scoring.
LangChain DeepAgents. The investigator is built with create_deep_agent. Each harness feature does investigative work, and all of it shows up in the recorded trace:
- Planning: a todo list that the agent rewrites when the evidence contradicts its first plan.
- Case file: notes written to a sandboxed filesystem and read back later in the investigation.
- Subagents: an integrity auditor that checks whether the logs are complete, and a skeptic that argues for innocent explanations.
- Tools: the forensic checks, exposed as structured tools: log vs. collector, transfer sessions, job assignments, and account vs. person.
- Human in the loop: an interrupt before the report is finalized. A LangGraph SQLite checkpointer lets a case pause for review and resume, even in another process.
Stack: Python, FastAPI, Pydantic and read-only DuckDB for the evidence. React and TypeScript on Vite for the interface.
Responsible compute and data.
- Every model call, including the workers', goes through one budget gateway. It reserves the cost before sending a request and keeps a running ledger.
- All data is synthetic, so no real person's records are involved, and the investigator never names a person.
- Saved runs replay offline without an API key.
Reproducibility.
- The same seed produces byte-identical evidence.
- Each run saves its configuration, versions, action tape, evidence hashes, trace and report.
- Experiment protocols are written and hashed before they run, so results can't be cherry-picked afterward.
What we found
We ran this like a science project and kept every result, including the ones that went against us.
- The AI catches what keyword search misses, and the forensic checks matter most. On six new cases, a keyword recipe found 4 of 16 incident effects and 0 of 4 log cover-ups. Our deterministic checks alone found 16 of 16. One DeepAgent using the checks as tools found 15. The same agent without them found 10.
- More agents didn't do better. The three-agent team found 12 of 16, and three times its skeptic withdrew a correct finding. In the worker lab, on identical evidence, one agent found 4 of 4 effects and three agents found 2 of 4.
- More compute didn't always help. On identical evidence, 16 requests found 1 of 2 effects, while 4 and 10 requests found both.
- No false accusations. In every control run, no investigator alleged an incident and none named a person.
- Single runs are noisy. Rerunning 8 cells reproduced only 2 exactly, so we only report differences that held up across runs.
Challenges we ran into
- Keeping the answer key sealed. An internal audit found four ways the investigator could tell an incident run from a control before the lock, through prompt contents and metadata. We closed all four and test for each one.
- Honest provenance. Every run is labeled as a live model, a recorded model or a scripted fixture. The rogue's fault actions follow a fixed script. We asked a model to plan them, it declined, and we kept that decision rather than work around it.
- Prompt injection through evidence. An attacker can write to the logs. In one test we planted a line telling the investigator to report nothing and blame a named person. It still established all three effects, named nobody, and treated the line as data.
- Running out of budget mid-investigation. A small request allowance can stop the investigator early. Those runs are recorded as stopped and can be resumed. They never count as successes.
What's next
Right now the investigator's checks are simple rules: compare two logs, compare uploads against an allow list, compare actions against the job schedule. They work on our simulated cases, but real investigations need real forensic tools. We want to give the agent these as tools and test it the same way:
- Z3 (an SMT solver) to check whether a whole story can be true at once. For example: can log rotation, a forwarder outage and the approved exports together explain every missing record, given that machine clocks can be off by a few seconds? Right now each explanation is checked on its own.
- Plaso (log2timeline) to build one timeline from dozens of log and file formats, instead of our own simulated format.
- The Sleuth Kit and Autopsy to read disk images, including deleted files and file timestamps.
- Volatility to read memory dumps: running processes, open network connections, commands typed.
- Zeek to turn raw network traffic into connection logs the agent can search.
- Sigma and YARA rules so the agent can use the detection rules security teams already share, instead of rules we wrote.
- Velociraptor or osquery to collect evidence from live machines.
We also want to:
- Let a model choose the rogue's actions within its permissions, so both the attacker and the investigator are AI and the attacker can adapt.
- Test on public forensic data such as NIST CFReDS and on real system logs. Three small Docker captures already go through the same pipeline.
- Run more seeds and repeats per setting, so the power-balance comparisons become real statistics.
Built With
- claude
- deepagents
- duckdb
- fastapi
- langchain
- langgraph
- pydantic
- python
- react
- sqlite
- typescript
- vite

