Inspiration
We noticed teachers spend entire semesters manually creating Twine stories (interactive choose-your-adventure games) for their students, and platforms like Khan Academy charge $20-30/month for AI tutoring that's still just question-and-answer format. The AI in education market is projected to grow from $5.18 billion to $112.3 billion by 2034 (World Economic Forum, 2024), but we figured there was space for something that generates interactive learning games automatically and makes assessment actually match what the student explored.
What it does
You enter a topic, and AI agent works together to build a playable choose-your-adventure story in Twine format (interactive fiction tool) where you learn by making choices. After you finish playing through it, the system generates quiz questions based on the actual paths you took through the story and emails you the results with flashcards.
How we built it
Our frontend team built the UI in Nuxt (Vue framework) with a topic spinner and quiz page, while our backend team chained together four Gemini AI LLM that refine prompts, create outlines, write stories, and convert to Twine code, together acting as a agent. Someone on the team figured out how to compile Twine in Node.js by faking browser globals with JSDOM (server-side DOM emulator), and another person set up Resend (email library) to handle the email delivery system.
Challenges we ran into
Twine is maintained by a singular developer, meaning lackluster documentation. 6ish hours were spent devoted to debugging twine's compiler, wondering why it only expects to run in a browser environment We had to create a fake DOM environment with JSDOM just to compile stories on the server. Getting the AI to output valid Twine syntax with the right macros took a lot of prompt iteration, and we actually switched to agent AI approach with a small linter that feeds into a feedback cycle for the AI to self correct twine formatting errors.
Email formatting is also a issue, as hmtl doesn't play very nice emails for security reasons
Accomplishments that we're proud of
We automated what normally takes teachers a whole semester into a 30-second process, and the multi-agent pipeline actually produces coherent playable games without human intervention. The whole system runs end-to-end from topic input to email delivery, which feels pretty complete for a hackathon project.
What we learned
Chaining multiple AI agents together requires careful prompt design at each step or the quality falls apart downstream. Server-side Twine compilation isn't documented anywhere so we had to reverse-engineer how the library loads story formats. Email HTML still lives in the early 2000s with inline styles and table layouts being the only reliable approach.
What's next for Story Steps
We want to build user accounts for saving progress and create a library of generated stories so people can replay content and share what worked well with others (CRUD). We're also adding Promethues, Tempo, and Grafana (monitoring and visualization tools for tracking metrics) to track which story paths students actually take so teachers can see where people get confused or stuck. A 2024 Harvard study found students using AI tutoring learned twice as much material in the same amount of time compared to traditional classroom instruction, and with 251 million children currently out of school globally and learning gaps costing the world economy $10 trillion annually (UNESCO, 2024), our path-tracking data could help identify where personalized intervention makes the biggest difference at scale.
Built With
- gemini
- langgraph
- nuxt3
- openai-sdk
- twine/harlowe
- typescript
Log in or sign up for Devpost to join the conversation.