Skip to Main Content

# Bodega — Herd Immunity for AI Agents What if one AI agent could learn from being scammed and automatically protect every other agent in its network? Bodega is a network of three AI-powered convenience stores that demonstrates how AI agents can learn from mistakes, share verified protections, and govern their own memory. Customers interact with AI shopkeepers through text or voice to purchase products, apply discounts, and request refunds. Initially, these agents are intentionally vulnerable to fake discount codes, fraudulent refunds, and social-engineering attacks. When a scam succeeds, Bodega detects the unauthorized transaction and records a privacy-conscious incident summary. MongoDB Atlas Agent Memory and Vector Search identify related attacks, even when they are reworded. An AI learner then generates new guardrail rules. Before deployment, each candidate is evaluated against 120 previously unseen cases, including 60 legitimate customer interactions, using the exact same AI model and prompt. Only rules that pass the evaluation criteria are promoted across all three stores. Our live hackathon results: - Scam success dropped from 60% to 0% on the held-out evaluation. - All three stores became protected approximately 41 seconds after the initial attack. - Guardrail propagation across individual stores took approximately 320 milliseconds. - One-click rollback reversed the learned protection across the network in approximately **250 milliseconds. - During a flash sale, 100 simultaneous buyers competed for 10 hoodies. Exactly 10 purchases succeeded, with zero overselling and fully consistent financial records. - We also measured the impact on legitimate shoppers: refusals changed from 2 of 60 before learning to 3 of 60 afterward. Memory governance is central to Bodega. Stores share verified protective rules, never private customer conversations or identities. Raw conversations expire after 24 hours, while MongoDB schema validation prevents sensitive text from entering incident memory. Operators can require human approval before deploying new rules, inspect the evidence behind each decision, delete a shopper's chat history and anonymize their incidents, or roll back protections when necessary. Bodega also demonstrates recovery when stores go offline, real-time security monitoring, and an **ElevenLabs-powered voice shopkeeper** that lets customers speak naturally with AI agents. Technology: MongoDB Atlas, Atlas Agent Memory, Vector Search, Change Streams, ACID transactions, schema validation, TTL indexes, Claude, ElevenLabs, TypeScript, React, and Express. Built during Agents in Context Toronto 2026. Bodega doesn't just give AI agents memory. It makes that memory measurable, governable, reversible, and safe to share.

Team

MahyarKasrabshz

More from Agents in Context Toronto: a MongoDB Hackathon

We simulate real world agent to agent systems built on MongoDB, Langchain (harnesses) ready for use in production to defend all systems. A swarm of real AI…

Legacy Siege project preview

suture is an incident-recovery agent that finishes the job even when its worker crashes mid-run. Cleaning up a leaked key takes a chain of writes across…

suture project preview

Venues play one playlist for everyone, and the apps that let guests shape the music keep their likes on view with no easy way to take them back. Musory: your…

Musory project preview

Robots are starting to learn from people, and fleets can share what one robot learns with every other robot. Nobody can yet answer three questions: who taught…

One Lesson project preview

Phylax Tower is a safety net for airport control towers. In March 2026 at LaGuardia, a jet was cleared to land, and two minutes later a fire truck was cleared…

Phylax Tower project preview

New hires hit the ground at light speed. New devs lose their first days juggling broken setup guides, each solving the same problems alone. Day One finishes…

Day One project preview