Inspiration

Education systems are facing a crisis: teachers and counsellors are overwhelmed, managing hundreds of students with fragmented data spread across multiple systems (LMS, SIS, spreadsheets). Often, by the time a failing grade or behavioural issue is flagged, the student is already on the path to dropping out.

How we built it

We built RIN using a modern, agent-driven stack designed for real-time data processing and dynamic UI generation.

Frontend & Core Framework: We used Next.js (App Router) with React Server Components, styling it completely from scratch using vanilla CSS and inline styles to achieve our distinct, warm aesthetic without relying on Tailwind. Generative UI Engine: We integrated the Thesys C1 SDK. This is the secret sauce that allows RIN's chat interface to stream back not just text, but fully interactive React components—like data tables, risk score gauges, and even a functional slide presentation viewer—all generated dynamically from the LLM's response. AI Agents & Tools: We used the Mastra framework to orchestrate our LLM interactions. We built custom database tools (like getStudentProfile and getInterventions) that the AI can call autonomously to fetch precise, real-time student data before answering an educator's question. External Integrations: We used Composio to handle the complex OAuth flows and API interactions required to connect RIN to the real world. This allows the AI to autonomously draft emails via Gmail/Outlook, schedule meetings in Google Calendar, and send Slack alerts. Database & Persistence: The backend is powered by Neon (Serverless Postgres) and Drizzle ORM for student data, while Supabase Storage handles the persistence of generated PDF reports and PPTX slide decks.

Challenges we ran into

Building an agentic application with dynamic user interfaces brought several unique challenges:

Generative UI State Management: Getting an LLM to reliably stream a custom Domain Specific Language (DSL) that correctly renders complex React components—without breaking the chat UI mid-stream—required extensive prompt engineering and strict JSON schema enforcement. Tool Execution & Latency: Giving an AI access to a dozen different tools (database lookups, Google Calendar, Twilio) meant the LLM sometimes struggled to pick the right one, or it would hallucinate tool inputs. Providing the AI with near real-time context about the user's state (e.g., "the user is currently viewing student ID 123") while keeping the time-to-first-token under a second was a major architectural hurdle. Artifact Persistence Flow: Wiring up the "Report Generation" feature was incredibly complex. We had to intercept the AI's slide deck output, buffer the file in memory on the server, upload it asynchronously to a Supabase bucket, update our Postgres database, and finally return a secure public URL to the frontend without blocking the main chat thread.

Accomplishments that we're proud of

Sub-Second Agentic Workflows: We built a system that feels as fast as a traditional CRUD dashboard, despite relying on heavy, multi-step LLM reasoning loops under the hood. The Artifacts System: We are incredibly proud of the feature that allows an educator to type "Generate a slide deck for Jasmine" and watch a fully-formatted, 10-slide presentation literally stream into the chat window, ready to be immediately downloaded as a tangible PPTX file. Action-Oriented AI: Unlike standard chatbots that just summarize data, RIN can actually do work. Seeing the AI autonomously fetch a student's declining GPA, recognize the user's connection to Google Calendar, and seamlessly draft a parent-teacher meeting invite on the calendar is magical.

What we learned

The Power of Server-Side React with LLMs: We learned how to deeply integrate Streaming APIs with React Server Components. Traditional string-based chat is dead; users expect AI to return functional application interfaces. Graceful Degradation in AI Tools: We learned that when giving AI access to external APIs (like sending an SMS), you must build robust error handling. If an external API fails, the AI must be programmed to gracefully apologize to the user and offer an alternative, rather than breaking the application.

What's next for RIN

Cohort-Level Predictive Modeling: Currently, RIN is great at analyzing individual students on command. Next, we want to implement background agent workers that analyze data across the entire school to predict systemic trends and automatically push alerts to administrators. Direct SIS/LMS Integrations: We plan to build native integrations with systems like Canvas and PowerSchool so RIN can ingest assignment completion data and attendance records in real-time, second-by-second. Multi-Agent Debates: We want to introduce specialized sub-agents (e.g., an "Academic Agent" vs. a "Behavioral Agent"). When a complex student case arises, these two agents could debate the root cause of the issue and collaborate to present the human educator with a perfectly balanced intervention plan.

Built With

  • c1
  • composio
  • css
  • drizzle
  • mastra
  • neon
  • next.js
  • resend
  • sdk
  • storage
  • supabase
  • thesys
  • twilio
  • vanilla
Share this project:

Updates