AiLibi
Can an LLM agent's accusation be traced to something it actually saw or heard? A deterministic social-deduction simulation built to measure that.
What it is
Seven crewmates and two impostors move through a small map of rooms. Crewmates do tasks; impostors kill, deceive, and sabotage. Reporting a body or calling an emergency meeting starts a structured discussion and a vote. Each agent sees only what its position allows: the room it is in, who is there, and what it can hear. Crew win by finishing tasks or ejecting every impostor; impostors win through parity or an unresolved sabotage.
The research question is whether an LLM agent's accusations actually follow from something it saw or heard. The ballot asks for a citation on any vote to eject: a line the voter saw or heard. In the 50 recorded nine-player games, all 397 votes to eject carry one. The spectator view links each of those votes to the line it cites, so you can open the ballot, inspect the scene, and judge for yourself. A resolvable citation can still be irrelevant, and a real sighting can still support a bad inference. The point is that the chain is there to check.
Every game is a replay: the same seed, configuration, and recorded model responses rebuild the same bytes, so any claim about a game can be re-derived from its recording.
How it's built
- engine
- observation firewall
- agents / meetings
- orchestrator
- eval / API
- spectator UI
- A pure, deterministic tick. The engine advances frozen state and actions with no wall clock or globals, and the full RNG state is serialized into every state hash, so a committed replay can be rebuilt and checked byte for byte.
- An observation "firewall," enforced three ways. Import-linter contracts forbid agents from importing the engine; planted import-leak tests must be rejected by the build; recursive scans of every observation packet look for hidden fields.
- Two-tier agents. A rule-based tactical policy decides movement and tasks every tick. LLM strategic reasoning runs only at meetings, from typed memory and derived beliefs.
- Four provider adapters behind one cost-budgeted client. Every real run carries token, cost, and wall-time limits; ordinary checks run against a deterministic fake provider with no network.
- Prompts versioned per model family. A recording names the prompt version and model that produced it, so results from different models are never silently pooled.
Python 3.11, FastAPI and Pydantic, React/Vite/PixiJS, strict mypy, pytest and Hypothesis, GitHub Actions. The architecture note states the layering and the enforced boundaries.
My role
This project was built with AI coding agents (Claude Code and Codex) as the implementers. My work was the specification, the architecture decisions, the evaluation methodology, and the acceptance gates. The audits in the repo were written by separate AI reviewers, not by independent human reviewers, and the README says the same.
Links
- Live demo: the recorded spectator, with a guided tour.
- Repository: code, replays, audits, and the offline verification steps.
- docs/architecture.md: layering, enforced boundaries, determinism.
- docs/ml-program.md: the learned-policy search and why nothing was adopted.