Inspiration

Twitch chat is a crowd of people who want to play together, but most interactions are just emotes and polls. We wanted to turn chat, follows and raids into a living, persistent story world that carries on between streams, with an AI that runs the world instead of just reacting to it.

What it does

MythosLive is a persistent AI world for Twitch. An AI Game Master, "Quill the Chronicler", narrates the world live. Viewers shape it through chat commands, follows and raids. A Phaser overlay shows the world on stream, and a dashboard lets the streamer manage it. The world's state persists across sessions, so the story keeps growing.

How we built it

  • Frontend: Next.js and TypeScript, with a Phaser overlay for the stream
  • Backend: FastAPI with WebSockets for real-time updates
  • Data: PostgreSQL with pgvector for world memory
  • Twitch: EventSub (WebSocket) and chat integration, with a bot account for the AI co-host
  • AI: an LLM Game Master that acts only through validated tool calls. The game engine owns all numbers and rules, so the AI can't break the game.

How we used OpenAI Codex

We built MythosLive with OpenAI Codex, working in stages: project scaffold, game engine, Twitch integration, the AI Game Master, the overlay, and the dashboard. Each stage had its own prompt, and we checked the output against the engine's rules.

Challenges

  • Keeping the AI creative without letting it invent game state, which we solved with a tool-call layer.
  • Handling Twitch events reliably in real time.
  • Designing core mechanics that work without Affiliate-only features like Channel Points.

What we learned

Strict boundaries between the AI and the game engine make live, crowd-driven AI experiences much more stable.

What's next

More world events, streamer-customizable worlds, and cross-stream raids that link worlds together.

Share this project:

Updates

Submission history