The biological intelligence layer for the agentic economy
Agent OS Architecture • Full Vision • MVP Scope • Possibilities
Architecture distilled from 12 open-source agent projects into OneSync's health agent OS
Hundreds of millions of people wear devices that measure them all night, open an app in the morning, glance at a score, and make the exact same decisions they were going to make anyway.
Meanwhile, every AI agent (Lindy, Manus, OpenClaw) can schedule your meetings and draft your emails. None know when you're cognitively depleted. They'll schedule your hardest meeting when your nervous system is wrecked.
We built an entire industry around collecting signals from inside your body — and left people completely alone with it.
Dashboard retention at Day 30: 3-12% across the industry. Headspace 7.65%, Calm 8.34%. People stop opening the app. Statista, SensorTower app retention benchmarks 2025
~500M smartwatches worldwide collecting HR, HRV, sleep every night. The data sits in HealthKit / Health Connect. No system reads it and proactively does something useful. Counterpoint Research, Global Smartwatch Shipments 2025
YC 2026: ~50% of latest batch is AI agents. NVIDIA GTC 2026: autonomous agents declared the next infra layer. All operate without the most important context: the human's cognitive state. YC RFS 2026, NVIDIA GTC 2026 keynote
Real message formats. Telegram delivery. Feedback buttons for learning.
Every morning at wake time. Uses overnight data (most reliable). The hero feature.
Only when confidence ≥ 0.60 AND 2h cooldown clear AND not during sleep. Max 3/day.
User messages bot anytime. Full context: CRS + health + memory. All 8 tools available.
Beyond health messages — you talk to the agent to give it tasks, ask it to schedule meetings around your CRS, teach it new skills ("when I say 'board prep', pull my stats and draft talking points"), and automate anything in your life. It connects to your calendar, email, Slack, task manager — and knows your body while doing it. You teach it once, it remembers forever. Over time, it becomes a full personal operating system that acts on your behalf — with the one signal no other agent has: your biology.
No one combines deep body awareness + proactive external messaging + device-agnostic + cross-platform.
| Body | Proactive | External | Devices | Platform | |
|---|---|---|---|---|---|
| OneSync | Deep | Telegram | Yes | Any | Both |
| WHOOP | Deep | In-app | No | WHOOP | Both |
| Oura | Deep | No | No | Oura | Both |
| Nori (YC) | Agg. | Limited | No | Multi | iOS |
| Lindy | None | Yes | Yes | N/A | Web |
WHOOP Coach: confirmed in-app only, $199-359/yr, GPT-4 powered. Nori: iOS only, no Android, data sync issues reported by users. Apple Health+: scaled back per Bloomberg Feb 2026.
1. Device-agnostic — any HealthKit / Health Connect wearable
2. External messaging — Telegram (104M users in India alone)
3. Price — free / ₹399/mo vs WHOOP $199-359/yr
4. CRS is transparent — algorithm published, open-source after Phase G. No competitor does this.
5. Cross-platform from Day 1 — Android + iOS simultaneously
Apple Health+ scaled back. WHOOP is device-locked. Nori is iOS-only. The combination of body awareness + proactive agency + open ecosystem is unoccupied.
We don't build until we know people care. Phase A is a Wizard of Oz test — manual CRS messages on Telegram, no app, no code.
Founder + teammates with Apple Watch / Pixel Watch / Fitbit. Manually compute CRS from wearable data each morning. Send personalized morning brief via Telegram. Track: do they read it? Do they reply? Do they find it useful?
If nobody cares about "Your CRS is 58, protect your 10am slot" — we stop and rethink the product, not the code.
Message format that works. Timing that works. Whether people even want proactive health messages. Whether CRS zones feel meaningful. All before a single line of code.
| Claim | Status |
|---|---|
| HRV drops under acute stress | PROVEN |
| Sleep quality predicts next-day cognition | PROVEN |
| Circadian rhythm affects performance | PROVEN |
| Wrist HRV correlates with ECG HRV | PROVEN |
| Our CRS weights (35/25/25/15) are right | ASSUMED |
| CRS zone thresholds (80/50) are meaningful | ASSUMED |
| Proactive messages improve outcomes | ASSUMED |
| Rules pre-filter saves 60-80% of AI calls | ASSUMED |
| Personal baselines stabilize in 7 days | PARTIAL |
The science is solid. Our specific formula is a hypothesis. The WoO test validates the product, not the algorithm.
OneSync is not a health app. It's a personal cognitive operating system — an AI agent that understands your biology, your work, and your goals, and proactively optimizes your day before you have to think about it.
Reads HRV, HR, sleep, activity from any wearable. Computes CRS. Detects stress. All on-phone, offline.
Claude-powered agent with personality, memory, learning. Proactively messages you. Learns your patterns over months.
Calendar, email, Slack, tasks. Agent that knows your body AND your world. Schedules recovery before you crash.
The entire product in 5 steps. No jargon.
Heart rate, heart rate variability (HRV), sleep stages, steps. Data sits in HealthKit (iPhone) or Health Connect (Android). Today, nobody does anything useful with it.
A 0-100 score: how sharp are you RIGHT NOW? Based on how you slept, your nervous system state (HRV), your circadian rhythm, and how active you've been. Computed on your phone — works offline, no server needed.
A rules engine checks every 15 minutes. 60-80% of the time, everything's fine — no AI call, $0 cost. When your CRS drops or stress is detected, Claude Haiku generates a personalized message with one specific action you can take.
Morning brief at wake time. Stress alert when your body signals trouble. You can also message the bot anytime: "Why am I so tired?" and get an answer grounded in YOUR data, not generic advice.
Every interaction tunes the system. Over weeks, the agent knows YOUR stress patterns, YOUR recovery strategies, YOUR communication style. The longer you use it, the smarter it gets. Switching cost becomes total.
Best data: true HRV (RMSSD), 4-stage sleep, beat-to-beat heart data. Full CRS confidence.
Samsung deliberately withholds HRV from Health Connect. We use HR as a proxy. CRS works but with lower confidence. Samsung Sensor SDK in Phase 2 fixes this.
HR only, no HRV, unreliable sleep staging. Basic CRS — stress detection limited. Still useful for morning briefs.
Cognitive Readiness Score. Grounded in SAFTE-FAST (US Army biomathematical fatigue model, peer-reviewed). Hursh et al., Aviation Space Env Med, 2004
CRS = Sleep(0.35) + HRV(0.25) + Circadian(0.25) + Activity(0.15)
| Component | Inputs | Key Logic |
|---|---|---|
| Sleep (35%) | Duration, stages, efficiency, debt | 7h target, 49h/week, ±2h bedtime deviation = -20 |
| HRV (25%) | RMSSD (Apple), HR proxy (Samsung) | Personal baseline, time-of-day normalization (afternoon dip is normal) |
| Circadian (25%) | Chronotype + time of day | Peak windows: early 6-9am, normal 10am-1pm, late 8-11pm. -40 outside peak. |
| Activity (15%) | Steps, sedentary, exercise | 8K steps target, <4K = -30 penalty. Exercise context for stress masking. |
All baselines are personal, not population norms. No commercial wearable CRS is peer-reviewed or algorithm-transparent. Bent et al., npj Digital Medicine, 2025
1. Personal baselines — your normal, not population average
2. Time-of-day normalization — afternoon HRV dip is biological, not stress
3. Activity exclusion — exercising? HR spike is expected, not stress
4. 10-min persistence gate — single spikes are noise
5. 2h cooldown between alerts — max 3/day
6. Require cardiac signal — HRV or HR, not just inactivity
7. User feedback loop — thumbs up/down tunes thresholds (0.02 change rate)
8. Rules pre-filter — CRS > 60 AND conf < 0.3 → skip Claude entirely ($0)
Adapted from OpenFang's PromptContext (25 fields, 14 sections). Cache-optimized: stable system msg + dynamic user msg = near-100% cache hits on system prompt. Anthropic auto prompt caching, 2026
| # | Field | Tokens |
|---|---|---|
| 1-4 | Soul base + zone modifier + mode template + safety rules | ~500 |
| 5 | Tool definitions (3-8 dynamic subset) | ~400 |
| 6-8 | User profile + core memory excerpt + health baselines | ~300 |
| # | Field | Tokens |
|---|---|---|
| 9-11 | Current CRS + biometric snapshot + trigger context | ~300 |
| 12-13 | Last interaction + pending followups | ~200 |
| 14-15 | Conversation history (3 turns) + calendar | ~500 |
Total: ~2500 tokens max. U-shaped attention: critical rules at START, biometrics at END. Stable content in middle. From Agent-Skills-for-CE: "lost-in-middle" effect — middle positions drop to 76-82% recall accuracy
Every memory entry: learned_on, last_validated, confidence, confidence_decay. Stale patterns auto-demote. From Paperclip PARA: hot/warm/cold decay
User says "started magnesium" → agent calls update_memory BEFORE responding. Context never lost. From CoPaw AGENTS.md
pending_followups tracks every suggestion. Morning brief checks outcomes. 3+ successful → promote to validated pattern. From Agency-Agents Sales Coach
L0 (~20 tok): "High-stress day, CRS 42". L1 (~100 tok): component breakdown. L2 (on-demand): raw data. 83% token reduction. From OpenViking benchmarks: LoCoMo10
| Zone | CRS | Voice | Message Length |
|---|---|---|---|
| Energized | 80+ | Coach — challenges you | 3 lines |
| Steady | 60-79 | Friend — warm, informative | 3 lines |
| Flagging | 40-59 | Advisor — honest, protective | 2-3 lines |
| Depleted | <40 | Caretaker — gentle, minimal | 1-2 lines |
| Crisis/No Data | — | Honest — admits uncertainty | Adaptive |
Zone selected by CRS + data quality. Mode selected by trigger type. From Agency-Agents: Whimsy Injector + Brand Guardian patterns
Track message style, timing, intervention type, cognitive load tolerance. First 14 days + ongoing.
"Take 3 slow breaths" not "improve your stress management". <2 min, zero willpower.
[Signal] + [Meaning] + [Action] + [Buttons]. Max 3 lines. CRS <40 → max 2 lines.
Follow up 2h/24h later. Acknowledge effort not outcomes. Off-ramp always OK.
Not a form. The agent's first act of intelligence. Dynamic questions that adapt based on answers. Writes directly to core_memory. Same agent, different soul file (SOUL_ONBOARDING).
Goals, chronotype, medications, communication style, stress triggers. Dynamic branching — "better sleep" triggers sleep follow-ups, not generic questions.
"You slept 5.8h last night. Is that typical?" — uses real wearable data to make questions contextual.
"Your HRV dropped at 2pm. What was happening?" — triggered by first real stress detection.
"How's OneSync working? What should I do differently?" — course-correct with 2 weeks of data.
Agent learns HOW you communicate during the interview itself. Terse answers → brief mode. Detailed → data-rich. Emotional → warm. Calibrated before first morning brief.
Naturally surfaces medications (beta-blockers affect HR), pregnancy (changes HRV), conditions. A checkbox gets skipped. A conversation gets honest answers.
Agent has a useful profile from Day 1 — not Day 14. Goals, chronotype, meds, style all set before the first morning brief arrives.
| WHOOP | Oura | Nori | OneSync | |
|---|---|---|---|---|
| Onboarding | Static form | Static form | Static form | AI interview |
| Adapts to answers | No | No | No | Yes |
| Progressive waves | No | No | No | Day 0/3/7/14 |
| Calibrates personality | No | No | No | From interview |
| Layer | Technology | Why This Choice |
|---|---|---|
| Mobile | React Native + Expo SDK 53+ | Cross-platform from Day 1. Custom dev client for native modules. |
| iOS Native | Swift (HealthKit) | HKHeartbeatSeriesQuery → beat-to-beat IBI → true RMSSD. Gold standard HRV. |
| Android Native | Kotlin (Health Connect + WorkManager) | 15-min background sync. Samsung HR proxy for missing HRV. |
| Local DB | op-sqlite + SQLCipher | AES-256 on device. Health data encrypted at rest. Not WatermelonDB (perf), not Realm (lock-in). |
| Styling | NativeWind v4 | Tailwind for RN. Not Gluestack-UI (too heavy), not StyleSheet (too verbose). |
| State | Zustand + TanStack Query + MMKV | Client + server + KV. No Redux complexity. |
| Backend | Supabase (Postgres + Edge Functions + RLS) | Row-level security built in. pg_cron + pgmq. Free tier → $25/mo at 200 users. |
| AI | Claude Haiku 4.5 (@anthropic-ai/sdk) | Messages API + tool_use. Direct calls, no middleware, no Agent SDK (stateless Edge Functions). |
| Bot | grammY (Deno) | Telegram bot. Webhook-based. Free API forever. |
| Scheduling | pg_cron + pgmq | Built into Supabase. Morning briefs, stress checks every 15 min. |
| Tier | Source | Agent Language |
|---|---|---|
| HIGH | Apple Watch (beat-to-beat IBI → RMSSD) | "Your HRV dropped 25%" |
| MODERATE | Pixel Watch, Fitbit (algorithm varies) | "Your HRV appears lower" |
| LOW | Samsung (NO HRV in Health Connect, HR proxy) | "Based on heart rate patterns..." |
| DEGRADED | Missing, stale >6h, watch off | "I'm missing data — how are you?" |
Samsung HRV gap confirmed via Health Connect API testing, March 2026. Deliberate Samsung omission, not a bug.
| 2000 cached tokens × $0.0001/tok | $0.0002 |
| 1000 fresh tokens × $0.001/tok | $0.001 |
| 350 output tokens × $0.005/tok | $0.00175 |
| Total per call | ~$0.003 |
Anthropic Haiku 4.5 pricing: $1/$5 per MTok (input/output). Cache reads: 0.1x.
| Phase | Deliverable | Gate |
|---|---|---|
| A | WoO (5-7 users, manual CRS) | 3+ say morning briefs useful |
| B1/B2 | HealthKit + Health Connect | CRS updates every 15min, real data |
| C | Dashboard (CRS gauge, sleep, trends) | Real data, auto-updating |
| D | Agent Core + Telegram (8 tools) | Bot responds with health context |
| E | Proactive: morning brief + stress alerts | Brief at wake time, alerts work |
| F-H | Onboarding, 14-day self-test, beta | <5min onboard, FP <20%, 5-7 users |
| Free tier | ~$0.27/user/mo AI cost | Acquisition |
| Pro ₹399/mo ($4.34) | ~$0.90/user/mo | 79% margin |
| Break-even | ~50 Pro subscribers | |
| Total MVP build cost | $966 (vs $50K-$150K industry avg) | |
Each level requires the previous to work. This is the roadmap from health bot to cognitive co-pilot to autonomous agent.
"Your HRV dropped 22% in the last 30 min."
Responds to current state. Threshold-triggered.
"It's Monday 1:30pm — your HRV typically drops now. Break before next meeting?"
Recognizes YOUR recurring patterns.
"Sleep debt + 4 meetings tomorrow → CRS will crash by 2pm. Reschedule hardest meeting to morning?"
Forecasts future state.
Auto-blocks calendar for recovery. Auto-declines low-priority meetings when depleted. Auto-adjusts notification cadence.
Acts with pre-authorized permissions.
The agent knows your body. Next: it knows your world. Every workspace API is free.
Read schedule → "You have 4 back-to-back meetings, CRS is 52. Want me to add a 15-min break at 2pm?"
Write → Auto-block recovery time when CRS predicted to crash.
Scan for urgent items → Include in morning brief: "3 emails need response before 11am."
Suggest: "Your CRS is 87 right now — tackle the hard reply first."
DND when CRS < 40. Auto-status: "In deep work — back at 2pm."
Surface: "You were mentioned in #engineering 3 times during your focus block."
Priority reranking based on CRS: "Your CRS is 87 — tackle the P0 bug now, save admin tasks for afternoon dip."
CRS-adaptive playlists: focus music when peak, calm ambient when flagging, nothing when depleted.
Auto-log health patterns to your knowledge base. "Added: Monday afternoon crashes correlate with back-to-back meetings."
Every integration = a new tool in the agent's toolkit. The 8 MVP tools expand to 50+ with workspace connectors.
One generalist agent → specialized health agents coordinated by an orchestrator. From Swarms: MixtureOfAgents + HierarchicalSwarm. From OpenFang: Hands per domain.
Bedtime optimization. Sleep debt tracking. Chronotype-aware scheduling. Circadian rhythm coaching.
Real-time intervention. Breathing exercises. Meeting spacing. Recovery protocols. Pattern discovery.
Movement nudges. Exercise recovery. Sedentary alerts. Step goals adaptive to CRS.
Caffeine timing. Hydration reminders. Meal impact on HRV. Alcohol/sleep correlation tracking.
3 Haiku specialists ($0.002 each) + 1 Sonnet synthesizer ($0.003) = $0.009/brief. 88% cheaper than single Opus ($0.075). Swarms MixtureOfAgents benchmark
The Agent OS is domain-agnostic. The CRS + proactive messaging + learning memory pattern applies to every persona that cares about cognitive performance.
Study session optimization. Exam prep scheduling based on sleep debt. "Your CRS peaks at 10am — do problem sets now, reading later."
Training load vs recovery balance. HRV-guided intensity. "HRV is 15% below baseline — scale back today's session."
Team-level CRS dashboards (anonymized). Meeting culture insights. "Your team's average CRS drops 18% on Wednesdays — too many all-hands?"
Longitudinal HRV tracking for studies. Medication impact monitoring. Open-source CRS as a research instrument.
Decision quality scoring. Board prep optimization. "Your CRS is 38 — delay the investor call to tomorrow morning."
Work-from-home burnout detection. Break scheduling. Social isolation alerts (activity + HRV patterns).
Same Agent OS. Different soul files. Different tool sets. Different domains. The architecture scales horizontally across personas.
The Agent OS is tool-agnostic. Each tool is a function the agent can call via tool_use. Adding a new integration = adding a new tool definition.
Dynamic tool loading: only 3-8 loaded per call. From HumanLayer: "Vercel reduced 17 tools to 2 → 100% success rate (up from 80%), 3.5x faster." We load by intent, not by default.
We synthesized production-proven patterns from the best open-source agent projects + NVIDIA's enterprise agent framework.
Hands pattern: autonomous scheduled tasks. Triple-layer memory. Loop guard (SHA256). 25-field prompt builder. 16 security systems.
Heartbeat execution. PARA memory with decay (hot/warm/cold). Goal ancestry. Adapter pattern. Wakeup coalescing.
L0/L1/L2 context tiers: 83% token reduction. Filesystem-paradigm memory. Intent-driven retrieval.
Pre-reasoning hooks. Proactive recording. Bootstrap onboarding. Skills system with progressive loading.
Layered architecture. Auto-compaction. Steering queues. Brain → Orchestrator → Execution. Learning flywheel. Workspace files as config.
Personality Spectrum. Behavioral Nudge Engine. Quality gates. Healthcare compliance. Communication styles.
Progressive disclosure. Data confidence tiers. Annotation-style learning. BM25 relevance.
Versioned blueprints with plan-apply-rollback. Declarative per-hand policies. Operator-in-the-loop escalation. Multi-model routing middleware. A/B testing infrastructure.
Token budgets. U-shaped attention. Provider failover. Multi-channel routing. MixtureOfAgents. 40-60% utilization rule.
From NVIDIA NemoClaw — enterprise agent governance framework. Deferred to Phase 2 (premature for 5 MVP users), but critical at scale.
All agent config (soul files, tools, thresholds, routing) stored in agent_blueprints table. Every change is versioned. Roll back instantly if a new soul file causes bad messages. A/B test different personalities. Full audit trail of what changed when.
Each Hand (stress monitor, morning brief, sleep coach) has explicit allowed tools, data scopes, and constraints enforced at runtime. Stress monitor can only read CRS + send alerts. It cannot update memory or access calendar. Principle of least privilege per autonomous task.
High-stakes recommendations (suggest doctor visit, alert emergency contact, reschedule important meeting) require explicit user approval. "Ask the first time, remember the preference." Builds trust while maintaining safety.
Route by complexity + cost: Haiku for routine (40%), Sonnet for nuanced (25%), DeepSeek for cost-sensitive (20%), Opus for complex synthesis (3%). Provider failover on errors. Cost tracking per model per user.
Every config change follows: plan (preview what changes) → apply (deploy to subset) → observe (monitor metrics) → promote or rollback. Same pattern as Terraform for infrastructure. No surprise regressions.
34 hours of governance infrastructure for 5 users is premature. MVP hardcodes everything. Once we have 50+ users and need A/B testing, rollbacks, and multi-model routing — NemoClaw patterns become essential. The architecture is designed for this expansion.
Health data is sensitive. These are non-negotiable.
| 1 | SQLCipher AES-256 | All health data encrypted on device |
| 2 | Supabase RLS | auth.uid() = user_id on every table |
| 3 | Output validation | Banned medical phrases scanned before delivery |
| 4 | Emergency bypass | Suicidal ideation → immediate safety response |
| 5 | Audit logging | Every agent invocation: model, tools, tokens, time |
| 6 | Rate limiting | Per-user message + cost caps |
| 7 | No health data in logs | console.log, Sentry, analytics — NEVER health values |
| 8 | Taint tracking | Label data at source (HealthKit/HC), track through pipeline |
| 9 | Loop guard | SHA256 duplicate tool call detection |
| 10 | Prompt injection scanner | Detect override attempts in user messages |
| 11 | Approval gates | High-stakes recs need explicit confirmation |
| 12 | Session repair | Recover from corrupted conversation state |
Security patterns from OpenFang (16 systems). Health language rules from Agency-Agents healthcare compliance agent.
ALWAYS: "Not a medical device" disclaimer. NEVER diagnose. Wellness framing, not clinical.
The end state: an AI that knows your body, your work, your patterns, and your goals — and optimizes your entire day before you wake up. Not a health app. Not a productivity tool. A personal cognitive operating system that makes you perform at your best, every day, without you having to think about it.
5-7 people. Wear your watch consistently for 5-7 days. Shivansh manually computes CRS from your wearable data every morning and sends you a personalized brief on Telegram. You tell us: useful or not?
HealthKit connector (iOS) first, then Health Connect (Android). Real wearable data flowing into encrypted local DB. CRS updating every 15 minutes automatically.
Claude-powered agent, Telegram bot, proactive messaging. 14-day self-test, then 5-7 user beta. Gate: morning brief open rate > 60%.
Wear your watch to bed. Use it consistently for at least 7 days. Apple Watch or Pixel Watch / Fitbit gives us the best data. Samsung works too — just lower HRV confidence.
Tap the buttons. Tell us when a message is useless. Tell us when it's annoying. Tell us when it's actually helpful. The agent literally learns from your feedback — every thumbs-down makes it smarter.
If the morning brief feels like noise, say so. If the stress alert is wrong, say so. We'd rather kill a bad feature than ship one nobody uses. Build → Break → Fix → Repeat.
Nothing is sacred. Everything evolves with the code.
Full docs: localhost:3333 • with AI Q&A chatbot built in
OneSync • The biological intelligence layer for the agentic economy