inspiration

The first 72 hours after release from prison are the most critical for preventing recidivism. Yet, caseworkers are severely overworked—spending hours doing manual paperwork, calling shelters, and digging through outdated PDFs to find local resources for a single client. We realized that if we could automate the logistics, scheduling, and resource discovery, caseworkers could spend their time doing what actually matters: providing human connection and mentorship.

What it does

ReentryOS is an intelligent coordination platform for parole officers and social workers. When a new client is added, the caseworker simply clicks "Start Intake Pipeline," which triggers a 7-Agent Autonomous Swarm:

Search Agent: Scours the web for real-time, local resources (second-chance employers, open shelter beds, nearest DMVs, and free clinics). Benefits Agent: Analyzes the client's record to determine immediate eligibility for Medicaid, SNAP, or SSI. Housing Agent: Ranks nearby housing options based on the client's specific restrictions and medical needs. Risk Agent: Computes a 0-100 risk score based on the lack of ID, housing status, and medical conditions. Plan Agent: Synthesizes all this data into a concrete, prioritized 72-hour timeline. Calendar & SMS Agent: Automatically books appointments (like DMV visits and check-ins) on the caseworker's Google Calendar and schedules a drip campaign of SMS reminders to the client via Twilio. Docs Agent: Finalizes all paperwork and prepares the dashboard for caseworker review. All of this happens in under 90 seconds, streamed live to a beautiful, glassmorphic dashboard via Server-Sent Events (SSE).

How we built it

Frontend: Next.js with React, Tailwind CSS, and Framer Motion for micro-animations. We focused heavily on a premium, dark-mode aesthetic (Sapphire blue and Slate) that looks like a high-end operating system rather than a boring enterprise tool. Backend & Database: Next.js App Router API routes powered by Supabase for PostgreSQL data storage and authentication. AI & Agents: Powered by Google Gemini 3.5 Flash and OpenAI (GPT-4o) using strict JSON structured outputs to ensure the plan data is perfectly formatted. Integrations: Twilio for the SMS drip campaigns and Google Calendar API for automated appointment scheduling. Real-time: We used Server-Sent Events (SSE) to stream the thought processes of all 7 agents directly to the UI, giving caseworkers a transparent view of the AI's progress. Challenges we ran into Hallucinations & Formatting: LLMs are notoriously bad at outputting perfect JSON 100% of the time. We had to implement aggressive Zod validation, defensive sanitization (like clamping risk scores and truncating strings), and automatic retry loops to ensure the pipeline never crashed. Rate Limits: Running 7 agents concurrently hit the Gemini free-tier rate limits fast. We built a robust dynamic backoff system that intercepts 429 errors, parses the required wait time, and automatically retries—with a seamless fallback to OpenAI if Gemini is exhausted. Architecture: Separating Next.js server-side code (Node-only libraries for Twilio/Supabase admin) from client-side bundles caused brutal Webpack crashes early on, requiring a strict architectural split of our database clients.

3Accomplishments that we're proud of

Zero-Hallucination Resource Mapping: By forcing the AI to strictly use the live search results, we stopped it from making up fake phone numbers or addresses for critical resources like shelters and clinics. True Automation: The fact that a caseworker can click one button and have calendar invites sent and SMS messages queued up automatically is a game-changer. What we learned Building multi-agent systems requires extreme fault tolerance. We learned how to build self-healing API routes that gracefully degrade or swap models (Gemini -> OpenAI) under the hood without breaking the user experience.

What's next for ReentryOS State Integration: Connecting directly to state prison release APIs to automatically queue up pipelines before the individual even walks out the door. Biometric Check-ins: Allowing clients to reply to the Twilio SMS with a selfie to confirm they arrived at their scheduled appointments or parole meetings. Mobile Client App: A dedicated, lightweight mobile app for the returning citizens to access their own 72-hour plan interactively.

Built With

Share this project:

Updates