Aegis AI: Clinical Decision Support
Re-architected from Next.js to Ruby on Rails
I took my production Next.js clinical AI agent and re-architected it as a full Ruby on Rails application — then ran identical clinical scenarios through both to see which architecture holds up better at the bedside.
100%
Success Rate
4.8s
Avg Latency
$0.00007
Total / 10 Runs
Original
Aegis AI — Next.js 14
Edge-latency optimized. Vercel Edge Functions, Supabase pgvector RAG, streaming AI with sub-2s TTFT.
Re-Architected
Aegis on Rails — Ruby on Rails 7
Stateful persistence. PostgreSQL backend, ActiveJob/Sidekiq workers, server-side AI orchestration with persistent audit trail.