DEV Community

Swetha
Swetha

Posted on AI-assisted

Screaming Meemies: Multi-Agent ghosts that gossip, lie and whisper alibis behind your back

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

I interpreted the theme as Halloween horror and ghosts. If we think of ghosts as agents, then ghosts communicating with each other and with people (in an eerie way!) becomes a multi-agent architecture.

My inspiration is The Haunting of Hill House, my favorite show ever, by Mike Flanagan and his team. In the story, several ghosts already living in the house disrupt the family's reality by manipulating them and pushing them to extremes. The ghosts even talk to each other! My idea is inspired by this, but I wanted to make it fun and exciting instead.

Screaming Meemies is a mystery game you play in the terminal. It's 8 AM on Halloween day, and your grandma's dentures are missing. Four ghosts live in her house: a petty housekeeper, a sarcastic gardener, a snobby butler and a great-great-aunt who just wants candy. Each one is an AI agent with its own personality, secrets, lies, truth and memory. You question them, and they gossip and whisper to each other behind your back to protect each other from getting caught. You get three guesses to catch the thief, and the thief changes every game.

Demo

Code

Screaming Meemies

It's 8 AM on Halloween. Grandma smiles at you and she has no teeth. Her dentures went missing overnight, and the ghosts living in her house know who took them.

I built this for the Hacktoberfest 2026 DEV challenge (Ghost in the Machine) It's a mystery game you play in the terminal. Each ghost is its own AI agent with its own personality, secret, cover story and memory. They gossip about you, whisper to each other to keep their stories straight, mess with your reality a little, and only give you clues if you earn them. The thief is different every game, so you can't just remember the answer.

The idea came from The Haunting of Hill House. I love how the ghosts there are tied to the family's past and show up in ways that make you question what you just saw. I wanted that feeling but…

How I Built It

The ghosts. Every ghost runs on Qwen 3.8 27B (qwen/qwen3.8-27b), an open-weight model, served through Groq. I used PydanticAI for the agents. Every ghost reply has to come back in a fixed shape: what the ghost decides to do (lie, deflect, reveal, or whisper to another ghost about its conversation with you), what it says, and an optional haunting. If a reply doesn't fit, PydanticAI sends it back and the model tries again. Each ghost is described in a JSON file: its personality, a few example lines in its voice, the facts it knows, and two roles (guilty and innocent), each with a secret, a cover story and a goal. The game picks the thief at random every time. The example lines are there to shape each ghost's sense of humor.

How the ghosts talk to each other. The house works as a shared channel, like a ghost group chat. When you talk to one ghost, the others overhear what you asked. Ghosts also have a whisper tool for messaging one other ghost privately, and they decide for themselves when to use it. In my first demo test, Agnes whispered to the Butler on her very first turn, before I had even accused anyone.

Memory. Games are saved in MongoDB Atlas. You can quit halfway and come back to the same mystery, with the same thief and the same number of wrong guesses, so quitting can't reset them: if you made two wrong guesses, you'll still have only one left. When a game ends, its conversations are deleted. Only the last culprit is saved, so the next game picks someone else.

Atlas players collection
Each player's active game (game ID, culprit, wrong guesses). Once a game ends,active becomes null and only last_culprit stays.

Atlas conversations collection
One saved conversation per player, game and ghost, so a paused game picks up exactly where it stopped.

The leak checker. In my first test, Agnes had been told never to admit she hid the dentures, and she ended her reply with "They're likely in the vase", revealing the truth. So I built a checker: before you see any reply, it checks whether the thief mentioned its hiding place. If it did, the reply is rejected, and the ghost has to rewrite it. Every catch is logged in Sentry.

Sentry leak event

Debugging with Sentry. Every ghost turn is traced in Sentry: how long it took, how many tokens it used, and any tool calls like whispers.

Sentry AI Agents dashboard

Sentry traces table

In my testing, a ghost turn took between 0.27 and 2.58 seconds. The model made 3 calls using 5,234 tokens in total, about 1.2K–1.7K tokens per call. The ghosts used the whisper tool twice on their own, and the checker caught the Butler leaking his hiding place ("tureen") before I ever saw it.

Two bugs I found this way:

  1. My second ghost kept failing with a rate-limit error after the first message. The error explained that the free tier allows 1,000 output tokens per minute, and a single request was already over that limit before the model wrote its response. The ghost replies are fixed to 40 words, so I capped them at 300 tokens to fix it.

  2. Sentry's Pydantic AI integration recorded the agent runs and tool calls, but showed 0 LLM calls and 0 tokens for my setup. I added a small manual span around each turn. It records the model name and the token counts that Groq sends back with every reply, so the dashboard can show tokens per turn.

Why Does Open Innovation Matter?

With open source, anyone can take an idea, even a crazy one, and actually build it. It gives you wings to fly. I don't have the RAM or compute to run big models myself, and open source makes innovation available and equal for everyone.

For this project, I couldn't run a model on my laptop, so I used Qwen3.8-27B, an open-weight model, served on Groq for free. Because the model is open, I could try two models and pick the one that fit. Anyone can clone the repo and play without paying anything. And if Groq ever stops hosting it, someone with a bigger machine can still run the same ghosts!

The Spirit of It

Building this brought back memories of my favorite show. I really enjoyed designing the agents as ghosts, giving each one a quirky persona, and keeping it all light for Halloween. My favorite moments were when a ghost accidentally revealed its own secret ("They're likely in the vase"), which showed me I had to build the leak checker, and when the ghosts started whispering to each other behind my back. That is the whole idea of the project: a group of agents that manipulate you while being ridiculous and funny (Halloween Theme).

Prize Categories

  • Best Use of Sentry Agent Tracing: every ghost turn is traced (latency, tokens, tool calls), every caught leak is logged, and the traces helped me find the rate-limit bug and the missing token data.
  • Best Use of MongoDB Atlas: Atlas is the long-term memory for the agents. I used it to save games, per-ghost conversations, wrong-guess counts, and to cleanup when a game ends.

Top comments (0)