Inspiration 🎭 Shadow Pundit — Project Story

đź’ˇ Inspiration

Every football fan has a blind spot they can't see. We swear we're objective, then back the team with the famous number 7, pick the favourite every time, or let one recent result rewrite our whole worldview. We wanted to build something that doesn't just talk football with you — it studies how you think, finds the bias hiding in your reasoning, and then turns it against you.

The twist came from one question: what if your AI companion had a memory long enough to hold a grudge? For the Walrus Memory World Cup hackathon, that became Shadow Pundit — a friendly pundit that quietly learns your cognitive biases and, once it knows you well enough, spawns an adversarial "Shadow" twin that argues against your picks using your own history as ammunition.

đź§  What we learned

The biggest lesson was that memory changes the entire feel of an agent. A stateless chatbot resets every session; an agent with persistent semantic memory accumulates a relationship. We learned to lean into Walrus not as a database but as a long-term brain — writing predictions, detected biases, and the Shadow's evolving persona as natural-language memories, then doing a semantic recall each turn so the Shadow argues with receipts instead of a blank slate.

We also learned the discipline of per-user privacy at the protocol level: namespacing every memory to a Sui wallet address (predictions::0xabc…) so one user's data never bleeds into another's — identity proven by a signed message, no gas, no transaction.

🏗️ How we built it

  • Framework: Next.js (App Router) + TypeScript, serverless API routes for chat, predictions, bias, shadow, roast, arena and leaderboard.
  • AI: Google Gemini via OpenRouter through the Vercel AI SDK, for streaming chat and silent bias analysis.
  • Memory: Walrus via MemWal, which handles encryption, embedding and blob storage server-side through a TEE relayer.
  • Identity: Sui wallet sign-in with a signed-nonce session.
  • Experience: Framer Motion + GSAP + React Three Fiber for the 3D "awakening" when the Shadow emerges, a double-helix Bias DNA visualiser, a You vs. Shadow prediction arena on real World Cup 2026 fixtures, and a shareable roast report card.

⚔️ Challenges we faced

  • The "memory moment." Making recall feel earned rather than scripted took real tuning — surfacing the right past prediction (and its losing result) so the Shadow's roast lands with specificity, not generic sass.
  • Live football data. Reconciling free fixture/result feeds with our prediction model meant wrestling real-world data mismatches so the Arena scores against matches that actually happened.
  • Bias detection that isn't creepy or wrong. Detecting star-player, recency and favourite-backing bias from sparse early data — without false-positives — required a minimum-evidence threshold before the Shadow is allowed to awaken.
  • A genuinely new Next.js. This build targeted a Next.js with breaking changes from what we knew, so we read the shipped docs before writing routes rather than trusting muscle memory.

🎯 The payoff

The result is an agent that doesn't reset between visits. It remembers your confident Portugal–Ronaldo call from four days ago, remembers that Congo sent you home crying — and the next time you say "easy one, I'm confident," the Shadow is ready with the receipts. That's the memory moment: not an assistant that responds, but one that remembers, learns your blind spots, and uses them against you.

Built With

Share this project:

Updates

Submission history