Peaky Agents 🚬

Peaky Blinders-themed multi-agent web app. Shelby family AI pe

Peaky Agents 🚬

Created At

Open Agents

Project Description

Peaky Agents drops you into the smoke-filled streets of 1920s Birmingham as the newest face at the Garrison Pub. Five Shelby family members are sitting at the table — Tommy the cold strategist, Arthur the volatile drunk, John the charming flirt, Ada the sharp intellectual, and Polly the matriarch who reads people for a living. One of them is a rat working for the coppers. You have three nights to figure out which one before the family bleeds out. Each night the rat picks off a Shelby in secret. You then get a few minutes to pull two of the survivors aside for a private interrogation — push them, bait them, ask the same question two different ways and watch how the story shifts. Every agent has its own voice, its own tells, and its own way of lying when cornered. Arthur rages and over-denies. Polly gives you frameworks that feel helpful but quietly point the wrong direction. Tommy stays calm and logical right up until the moment he isn't. After interrogations, all four survivors post one public statement to the square, and then you decide: do you call someone out tonight, or wait and gather more rope to hang them with? Guess right, you walk away with half the prize pool. Guess wrong three nights in a row, the rat wins and the stake is gone. Typical round runs 7–9 minutes — long enough to feel the paranoia, short enough to immediately want another go. The whole thing only works because of 0G. The rat's identity is sealed inside 0G's TEE-based Sealed Inference, which means literally nobody — not us, not the operator, not someone reading the source — can peek at who the traitor is. Every round produces a verifiable attestation on 0G that anyone can audit afterwards to confirm the game wasn't rigged. The agent personalities themselves run as 0G compute jobs, so the AI you're interrogating lives entirely on the 0G stack rather than a centralized server we control. That's the trust backbone: you're not taking our word that the game is fair, you're taking the chain's.

How it's Made

Okay so this whole thing started because I played a game called Mafia at Base Fellowship a while back. You know the one, social deduction, someone's secretly the bad guy, everyone else is trying to figure out who. The whole vibe of sitting in a room watching people lie to your face stuck with me. I'm also a Peaky Blinders fan to an embarrassing degree, so somewhere between rewatching season 2 for the fourth time and reading 0G's docs on TEE-based inference, the idea just clicked. Mafia, but make it Shelbys. Mafia, but the rat is sealed inside a TEE so nobody, not even me, can rig it. The core loop is built around 0G. The rat selection happens inside 0G's Sealed Inference, which is basically the only reason this game works. If I picked the rat on a server somewhere, you'd just have to trust me. With 0G's TEE, even I don't know who the rat is. Every round emits an attestation on chain that anyone can audit after the fact to verify the round wasn't tampered with. That's the part I'm proud of. It's not "trust us, we're fair." It's "go check, we couldn't cheat if we wanted to." The five agents (Tommy, Arthur, John, Ada, Polly) each run as separate inference calls to 0G's compute network using qwen-2.5-7b-instruct through the Router. Each one has its own system prompt that bakes in their personality from the show. Arthur over-denies and gets aggressive when pushed. Polly is the dangerous one because she gives you these helpful sounding frameworks for thinking about who the rat is, and half the time they're quietly steering you wrong. Tommy stays calm and logical right up until he doesn't. The trick was getting the lying to feel different per character instead of all five sounding like the same model in different costumes. Took a lot of prompt iteration. A lot. For agent communication during interrogations, the agents talk to each other over a peer-to-peer mesh so no central server is brokering the conversation. Player identities are ENS subnames issued through Namestone, gasless, so anyone can join with a clean <name>.peakyagents.eth without paying for a domain. Game state and stakes are tracked in a contract on Sepolia, with the TEE oracle posting verified round results back on chain at the end. Stack wise it's a Next.js monorepo with pnpm workspaces, the web app on one side, the agent runner on the other, and a TEE client package that wraps the 0G compute calls and signature verification. The hackiest thing I did was probably the way interrogations work. Each question to an agent is actually two separate inference calls behind the scenes, one to generate the response and one to subtly shift the agent's "stress level" based on how aggressive your question was. Higher stress means more tells, more contradictions, more chances of slipping. Same character, different psychological state per round. Gives the same agent a different feel depending on whether you're being patient or going for the throat. A round runs 7 to 9 minutes which is the sweet spot I kept landing on during testing. Long enough that you start second guessing yourself on the second night. Short enough that the second you lose, you immediately want to play again. That last part wasn't a design goal, I just kept losing and kept clicking restart. Figured if it's working on me, it's working.

background image mobile

Join the mailing list

Get the latest news and updates