SOMNI AI

Sleep Health Intelligence
Detecting tomorrow's health crisis in tonight's sleep.
Multi-agent clinical evidence synthesis from wearable sleep data

Your smartwatch knows something. Do you?

  • 100M+ people have wearables; data is underused
  • "I slept 6 hours" — compared to what? What does it mean for health?
  • Traditional apps give charts; we give clinical intelligence

The Opportunity

Early detection before disease manifests. Preventive, equitable access to health intelligence.

One pipeline. Five AI systems. Evidence-based reports.

Step 1
Upload
Apple Health
Fitbit / Oura
Step 2
Statistical
z-scores, SHDI
Phenotype
Step 3
Multi-Agent
5 AI systems
Orchestrated
Step 4
Reports
Patient +
Clinical

AI Systems in the Loop

Claude
Orchestrator
OpenAI
GPT 5.2 Reasoning
PubMed
Literature
BrightData
Guidelines
Perplexity
Consensus
Greylock — 5+ APIs + Feedback Loop

Agent that reasons about feedback

  • Sequence: Claude (orchestrator) → OpenAI GPT 5.2 (medical reasoning) → PubMed (literature) → BrightData (guidelines) → Perplexity Sonar (consensus)
  • Autonomous: Order chosen dynamically each run — no fixed script
  • Feedback loop: assess_evidence_quality tool evaluates consistency; returns refine_query / broaden_query / proceed
  • When conflicts detected, Claude refines search and re-queries before writing reports
"Our agent doesn't follow a fixed script. It decides when to call each API and when to re-search based on evidence quality."
OpenAI — Creative Use of API

GPT 5.2 as medical reasoning engine

  • We use GPT 5.2 with a dedicated developer (system) prompt
  • Framed as research associations and risk domain ranking — no diagnosis, no disease probabilities
  • Structured reasoning: Ranked risk domains, confidence levels, screening suggestions
  • Explicit reasoning trace returned
  • reasoning_effort set for extended reasoning

GPT 5.2 Output Structure

{
  ranked_risk_domains: [...],
  confidence_levels: {...},
  preventive_screening: [...],
  reasoning_trace: "..."
}
"We use GPT 5.2 creatively as a clinical reasoning engine: a specialized system prompt keeps it in the lane of research associations while we get explicit step-by-step reasoning."
Anthropic — Best Agent + Human Flourishing

Autonomous agent & human-centered design

Best Agent

  • Claude orchestrator with 5 tools
  • No hand-coded sequence — agent chooses when to call each API
  • Real problem: turning messy wearable data into evidence-based health intelligence
Autonomous tool loop:
PubMed → GPT 5.2 → BrightData → Perplexity → Assess → Refine → Re-query

Human Flourishing

  • Patient report at 8th-grade reading level
  • Opening validates the user: "not to diagnose or alarm"
  • Hopeful tone, clear next steps
  • Designed to be read with a family member
"Taking an interest in your sleep patterns is a positive step… designed to help you and your healthcare provider have informed conversations — not to diagnose or alarm."
"The brain of the app is a Claude agent. The heart is an empathetic patient report you could read with a parent or partner."
Vercel — Production-Ready Platform

One deploy, zero backend servers

  • Single deployment: Next.js 14 App Router + serverless API routes
  • No Python on Vercel — analysis runs in TypeScript (lib/sleep-analysis/)
  • API routes: analyze, get-analysis, generate-reports, export-pdf (Node runtime for PDF)
  • Caching: Analysis and reports cached (in-memory or optional Vercel KV) for fast repeat views

Tech Stack

✓ Next.js 14
✓ TypeScript analysis
✓ Serverless functions
✓ Edge-ready

Developer Experience

✓ Single codebase
✓ No separate backend
✓ Instant deploys
✓ Zero config
"The whole app runs on Vercel. One deploy, no separate backend — we brought the analysis engine into the frontend repo in TypeScript."

Real-world data in the loop

BrightData — Innovative Use

Guidelines & Disparities

  • Pull public health guidelines (CDC/AHA-style)
  • Ground recommendations in current clinical standards
  • Disparity data: population-level risk context
  • Real API when key is set; mock for demo fallback
Perplexity — Sonar Excellence

Consensus Engine

  • Query for consensus and controversy in literature
  • Reports reflect where evidence agrees and where it's debated
  • Citations feed into report calibration
  • Real-world value: honest uncertainty
"BrightData grounds us in guidelines and disparities; Perplexity Sonar tells us where the evidence agrees and where it's still debated."
OpenEvidence — Clinical Data → Product

Clinical data into understanding & care

Clinical Data In

PubMed
Guidelines
Sonar Consensus

Product Out

Patient Report
Clinical Report

Patient Report

Improves understanding and next steps

Clinical Report

Supports decision-making and care delivery
GRADE-style evidence, screening suggestions
"We don't invent evidence — we turn existing clinical data into two reports that improve understanding for the patient and decisions for the clinician."
TreeHacks Most Impactful

Early detection, not late diagnosis

Early
Patterns
Sleep trajectory shifts
Research associations
Preventive action
Late
Disease
Clinical diagnosis
Reactive treatment
Higher burden

Why It Matters

  • Thesis: Sleep is an early warning system. We detect trajectory shifts before clinical disease.
  • Impact: Reduce burden on healthcare; support preventive, equitable access; bridge gaps where sleep labs are scarce.
  • Responsible: Not diagnostic; research associations; disclaimers; confidence and uncertainty in every report.
"We're not diagnosing — we're surfacing research-backed patterns so people can act earlier and have better conversations with their doctors."

Under the hood

Statistical Engine

  • 30-day baseline (mean, std, RMSSD)
  • z-scores with SEM for last 7 days
  • SHDI (Sleep Health Deviation Index): weighted composite
  • Phenotype classification: fragmentation / deep reduction / REM instability / efficiency
  • Aligned with Nature Medicine SleepFM-style longitudinal deviation

Orchestrator & Parsers

  • Claude Messages API: 5 tools, multi-turn loop, up to 15 turns
  • Pipeline step logging: pipelineSteps[] and UsageMetrics
  • Feedback-driven refinement via assess_evidence_quality
  • Parsers: Apple Health XML, Fitbit CSV, Oura CSV (14-day minimum)

SHDI Components (Weighted)

30%
Fragmentation
25%
Deep Sleep
20%
REM
15%
Efficiency
10%
Variability

See it in action

1
Upload
30-day CSV/XML
2
Analysis
SHDI, z-scores
Phenotype
3
Patient Report
Empathetic
8th-grade
4
Clinical Report
GRADE
Evidence table
5
Pipeline Logs
5 API calls
Tracked
One file. Five APIs. Two reports.
No diagnosis — just evidence and next steps.

SOMNI AI

Detecting tomorrow's health crisis in tonight's sleep.
Multi-agent clinical evidence synthesis
Early detection • Evidence-based • Human-centered
Questions?