Coder's Magic Cookie đźĄ
Coder's Magic Cookie is a Gemini-powered LangGraph agent providing humorous debugging stories and technical fixes via a CopilotKit interface.
Project Description
Coder’s Magic Cookie is a fortune-teller of bugs. You describe how you’re stuck — “the test passes locally”, “this fix keeps not fixing it”, “I can not install my usb mouse” — and a Gemini-backed LangGraph agent answers in three short paragraphs:
~70 words of brutally funny slapstick about a fictional dev who suffered worse (Mira of the third-floor coworking, punching the monitor and bruising her fist; Joren of the converted closet, headbutting the keyboard until it printed fifteen pages of aaaaa).
A bold cryptic aphorism in broken-English fortune-cookie cadence, signed by an invented master who never repeats — “Master Vex of the Cracked Compiler say: When bug hide, lamp also hide.”
A real, concrete technical fix for the user’s actual situation — woven into italic prose, no bullet lists, no code blocks. The user can extract a real action from it.
The premise is that humor and a soft re-frame restore the momentum debugging steals. You walk away with both a smile and a lead.
The agentic-interface angle
We took the CopilotKit hackathon starter kit and added a second LangGraph graph (graphId: “story”) sharing the same Gemini-Flash runtime as the kit’s lead-triage agent — but with no backend tools and a swapped system prompt. The BFF registers both agents under one CopilotKit endpoint. A new /story route uses
Tech stack
CopilotKit v2 (chat + AG-UI runtime) · LangGraph (two graphs in one process) · Google Gemini 3.1 Flash-Lite · Hono BFF · Next.js 15 / Turbopack · Notion MCP (existing kit feature, unchanged) · Manufact / mcp-use (existing) · Postgres-backed thread persistence
Repo
https://github.com/jakubbinter-gc/Generative-UI-Global-Hackathon-Starter-Kit/tree/claude/funny-spence-694fc3
Two commits on top of main:
fix: Windows-cross-platform dev scripts + langgraph blocking flag — three port/script defaults that block a fresh clone on Windows
feat: Coder’s Magic Cookie — story-doctor agent at /story — the feature itself
Prior Work
For three weeks before the hackathon, the team lead bought every bag of fortune cookies in three Prague Asian-supermarkets and read them all, looking for something that would resemble actual coding wisdom. The cookies said things like “a smile is a curve that sets everything straight” and “you will receive unexpected good news” — none of which compiled. We tried to feed the printed slips to a language model. The model also did not compile. One member of the team punched the desk in mild frustration and discovered that the desk was, in fact, harder than a fist. Another spent four hours convinced the bug was in the code and not in his coffee. By Friday we had collected 117 fortune slips, three bruises, zero working features, and a strong belief that the cookies needed to be re-trained from scratch.
So when the hackathon began, the only real prior work we brought to the table was the upstream Generative UI Global Hackathon Starter Kit by jerelvelarde — CopilotKit + LangGraph + Gemini + Notion MCP, all wired up. Everything in our project that is not the starter kit (a second LangGraph agent, the new /story route, the system prompt that turned a plain chatbot into Coder’s Magic Cookie, three Windows-blocker fixes in package.json and the BFF) was written during the event. The fortune cookies, sadly, contributed nothing usable. Master Phin of the Empty Pipe say: “Cookie that hold no wisdom is still cookie. Eat it anyway.”
Team
Products & Tools
Additional Links
GitHub repo (fork branch with the build)