Inspiration
When a teacher is unexpectedly absent, the substitute gets almost nothing useful: a sticky note, a half-remembered verbal handoff, or silence. Google Classroom organizes coursework, but it doesn't capture the operational knowledge a substitute actually needs — classroom routines, which students need extra support, what today's lesson was really about. That knowledge lives only in the teacher's head, and it's usually too late to get it out of there once they're already sick in bed.
What it does
- "I'm Out Today" — a teacher describes their intent in one sentence (or dictates it by voice). Relay combines that with their real Google Classroom coursework and their saved classroom profile to draft a substitute-ready pack.
- Grounded, not guessed — Relay only generates practice questions or a review quiz or any material when there's real, recently-posted coursework to base them on. If there isn't, it says so plainly instead of inventing plausible-sounding content about the wrong topic.
- Nothing is shareable until approved — a teacher can regenerate as many times as they want; nothing is saved to the database, and no substitute link exists, until they explicitly click Approve.
- One secure link, no account — the substitute opens today's activity, class routines, and student support notes without signing up for anything.
- Voice handover → Reintegration Brief — the substitute records a 60-second voice summary at the end of class. Relay turns it into a structured brief (what got done, who needs follow-up, what to know before tomorrow) so the teacher can catch up in under a minute instead of replaying an audio file.
How I built it
Next.js (App Router) , Supabase for auth/database/storage, Prisma as the query layer, and three integrations doing real work: Composio for Google Classroom, Groq for generation, Deepgram for voice-to-text. The core design decision was three single-purpose AI agents instead of one big prompt — a Context Builder that only gathers, a Relay Pack Agent that only drafts grounded content, and a Handover Agent that only structures the substitute's voice summary. Built and tested solo against a real Google Classroom account the entire time, not mocked data
Challenges I ran into
Strict Grounding & Hallucination Prevention: Training the Relay Pack Agent to strictly say "no relevant content found" rather than hallucinating plausible sub plans was harder than expected. Fine-tuning system prompts and tool constraints so the agent reliably refused to invent coursework without real Google Classroom context took significant iteration.
Complex Multi-Agent Pipeline Execution: Coordinating three single-purpose agents (Context Builder, Relay Pack Agent, Handover Agent) with standard application logic required careful state management. Ensuring clean data handoffs between agents without loss of context or unnecessary redundant API calls was a delicate balancing act.
Orchestrating four 3rd-Party Services: Stitching together Supabase, Composio, Groq, and Deepgram into a cohesive synchronous flow presented severe error-handling challenges—especially around OAuth session lifecycles, token refreshes, and webhooks during real-time voice processing.
Accomplishments that we're proud of
AI agents pipeline from context-building agent to relay-pack agent to handover agent, how they interact with application logic , pipeline that refuses to guess — if Relay can't ground content in something real, it says so instead of inventing it. An approval flow where nothing is ever written to the database until a teacher explicitly approves it, so an abandoned draft never lingers as a half-finished artifact. And getting five separate third-party services (Supabase, Composio, Groq, Deepgram) working together end-to-end.
What I learned
Model Context Protocol (MCP) & Agentic Workflows: Deepened my understanding of modular AI architecture—moving away from single monolithic prompts to specialized, tool-calling agents with strict boundaries.
Production Auth & OAuth Integrations: Gained hands-on experience handling complex OAuth flows with Supabase and managing third-party app integrations via Composio to interact safely with external APIs like Google Classroom.
Managed SQL & Relational Schema Design: Strengthened skills in schema design, transaction isolation, and raw/Prisma queries within a managed Supabase PostgreSQL environment.
What's next for Relay
- Wire up Composio's
connected_account.expiredwebhook for instant reconnect detection instead of catching it on the next failed call. - Multi-day absence planning, not just single-day.
- Move past Google's unverified/testing OAuth mode for real public use.
- collabration with teachers for testing and review.
Built With
- composio
- deepgram
- groq
- next.js
- postgresql
- prisma
- supabase
Log in or sign up for Devpost to join the conversation.