Skip to content

TAIPANBOX/sphere

Repository files navigation

Sphere

Sphere

Personal Life Intelligence System
An AI companion that monitors all 12 spheres of your life — and remembers everything.


Sphere gives each life domain its own AI agent — Health, Finance, Career, Learning, Travel, and 9 more. Every agent has long-term memory powered by Engram, a local cognitive memory database. A Meta Agent aggregates data across all spheres and surfaces daily insights about your life as a whole.


Screenshots

Onboarding

Dark-mode onboarding walks through three steps: Personal info (name, email, birthday — injected into every agent's system prompt), Dietary preferences (diet restrictions and allergies that flow into Health and Travel advice), and Sphere selection (choose which of the 12 spheres to track — changeable anytime in Settings).


Home

The Home tab combines everything in one scroll: live weather (Open-Meteo via geolocation), a Meta Agent Summary card that greets you by name and narrates your day across all spheres, a Life Score badge, active AI Agents selector, and a Today's Focus task list ranked by urgency across all spheres. Available in light and dark mode.


Spheres

All 12 active spheres as a 2-column grid with live stats, percentage scores, and colour-coded progress bars. Each card shows a real-time metric — steps and sleep for Health, reading progress for Learning, balance for Finance. Long-press to drag and reorder; order persists across sessions.


🫀 Health

The most data-rich sphere, powered by Apple HealthKit. Displays steps, heart rate, sleep duration, calories burned, HRV, and blood oxygen — all pulled live from Apple Health. Features a weekly steps bar chart vs. 10,000-step goal, water intake tracker with +/− controls, weight log with BMI, conditions and medications tracker, lab results, workouts, and a 7-day stress heatmap. Full dark mode support.


📚 Learning

Books library split into Currently Reading, Completed, and Queue with per-book progress in pages and percentage. Skills tracker grouped by category (AI/ML, Mobile Dev, Music) with proficiency dots. Pomodoro timer for focused study sessions. Weekly study time chart. Connected services: YouTube, Coursera, Reddit.


💼 Career

Task manager with Done / In Progress split and overdue counter. Active Projects with progress bars, days remaining, and role labels. Interviews pipeline with status badges (Offer / Interview / Applied). Network contacts, achievements log, career goals, and market value analysis via the Career agent.


💰 Finance

Income / Spent / Balance summary across accounts (Checking, Savings, Brokerage). Transaction feed with category icons. Budgets section with per-category bars and over-budget alerts aggregated into a single warning card. Subscriptions tracker with monthly totals and billing dates. Savings goals, debts, and investments. Dark mode support.


💜 Relationships

Contact list with relationship type (Family / Friend / Colleague / Mentor), last-contact date, and personal notes. Upcoming birthday reminders surface in Today's Focus. The agent remembers context about each person across conversations and nudges you when it's been too long since you've been in touch.


🌊 Rest

Recovery Score (0–100) with sleep duration and stress level inputs. 7-day sleep bar chart vs. personal goal. Sleep schedule editor (bedtime / wake time). Sleep log with per-night quality notes. Digital Detox tracker, Anti-Burnout hours monitor, and a library of Relaxation Techniques (4-7-8 breathing, Box breathing). Weekend Plans planner.


🎸 Hobbies

Per-hobby session log with weekly time chart and duration targets. My Hobbies list (Photography, Cooking, Guitar) with weekly goal vs. actual. Recent sessions feed with notes ("Thai green curry — turned out amazing"). Pattern Analysis powered by the Hobbies agent. Connected services: YouTube, Spotify, Strava, Adobe Lightroom.


✈️ Travel

Countries Visited map with year-of-visit tags. Dream List of destinations. Trip planner with packing list and documents checklist. The Travel agent personalises recommendations using dietary restrictions and budget level from your profile.


🧘 Mindfulness

Daily mood check-in (Low → Great) with a 7-day calendar heatmap. Today's Affirmation card — rotating affirmations with a personal collection. Breathing exercise with three modes (4-7-8, Box, Coherent) and an animated visualiser. Guided Body Scan (8 steps, ~4 min). Stress Tracker with weekly chart. Journal with AI reflection prompts. 5-day streak tracking.


🎯 Goals

Overall Life Progress score with year-elapsed context and on-track indicator. Active Goals with key results, horizon labels (this quarter / this year), and progress bars. Habits tracker with daily check-in streaks (Morning meditation, No sugar after 7pm, Read 30 min/day). Weekly and monthly review prompts. Pattern Analysis — the Goals agent analyses what's moving and what's stalled, then gives honest feedback.


⚙️ Settings — AI Agents

Connect 4 AI providers: Claude (Anthropic), ChatGPT (OpenAI), Gemini (Google), and OpenRouter (unified access to many models via one key). API keys are stored locally (encrypted Keychain / EncryptedSharedPreferences) and never sent to Sphere servers. My Spheres toggle — enable or disable any of the 12 spheres. Theme, language (English & Ukrainian), and currency settings.


👤 Profile

Profile is the shared context layer for all 12 agents. Personal info: name, email, date of birth. Body metrics: age, gender, weight, height, BMI (auto-calculated), blood type. Health: chronic conditions (Hypertension, Hypothyroidism, etc.), medications. About me: children, dietary restrictions (Vegan, Vegetarian, Gluten-free), food allergies (Nuts, Eggs, Soy). All data flows into every agent's system prompt — dietary restrictions shape Travel recommendations, conditions influence Health advice.


How It Works

┌──────────────────────────────────┐
│  Flutter App (iOS·Android·macOS) │
│  Home · Spheres · Settings ·     │
│  Profile · Chat                  │
└──────────────┬───────────────────┘
               │ HTTP (dio)
┌──────────────▼───────────────────┐
│     Python Backend (FastAPI)     │
└──────────────┬───────────────────┘
               │
┌──────────────▼───────────────────┐
│        Engram (SQLite)           │
│  episodic · semantic · temporal  │
│  spreading-activation recall     │
└──────────────┬───────────────────┘
               │ Anthropic SDK
┌──────────────▼───────────────────┐
│          Claude API              │
└──────────────────────────────────┘

Each of the 12 spheres is a separate Engram agent:

health_agent  = Engram(agent_id="health")
finance_agent = Engram(agent_id="finance")
# ... one per sphere

# Meta Agent recalls across ALL spheres
meta_context = Engram(agent_id="meta").recall(cross_agent=True, k=20)

When you message an agent:

  1. recall() fetches the most relevant memories for this conversation
  2. Those memories become part of Claude's system prompt
  3. Claude's response is streamed back to Flutter via SSE
  4. observe() stores the exchange as new memory — for next time

Engram — The Memory Layer

Engram is a local SQLite cognitive memory system built for AI agents. It models how human memory actually works — not a flat log, but a network of interconnected memories with:

Memory type What it stores
Episodic Specific events — "On Tuesday you walked 11,200 steps — your best this month"
Semantic Derived facts — "You sleep better when you avoid screens after 10 pm"
Temporal validity Memories decay or reinforce over time, just like real memory
Spreading activation Recalling one memory activates related ones — richer context

Why local memory matters

Approach Problem
Append full chat history Context window fills up; old memories lost
Cloud vector DB Privacy risk · latency · cost
No memory Agent resets every session; zero continuity
Engram (local SQLite) Private · fast · persistent · cognitively structured

Data never leaves your device. The .engram file lives on your phone.


Features

  • 12 Life Spheres — Health, Learning, Career, Finance, Relationships, Rest, Hobbies, Travel, Mindfulness, Creativity, Home, Goals
  • Real health data — steps, heart rate, sleep, calories, HRV, SpO₂ via Apple HealthKit (iOS) and Health Connect (Android)
  • 4 AI providers — Claude, ChatGPT, Gemini, OpenRouter — connect any via API key, with native sphere-action tools (e.g. log weight, record meditation) and streaming responses
  • Meta Agent Summary — cross-sphere narrative generated fresh every morning
  • Life Score — composite score from all 12 spheres with best/needs-focus breakdown
  • Live weather — Open-Meteo API via geolocation, no API key required
  • Today's Focus — urgency-ranked task list aggregated from all spheres
  • Engram memory — every conversation stored and recalled semantically
  • Cross-sphere context — dietary restrictions flow into Travel; conditions into Health advice
  • Pattern Analysis — each sphere agent can analyse your habits and give honest feedback
  • Drag-to-reorder spheres — order persisted across sessions
  • Full dark mode — adaptive iOS-style colours throughout
  • Bilingual (EN · UK) — full localization via Flutter gen-l10n (ARB + ICU plurals); infrastructure ready for more locales
  • Cross-platform — iOS, Android (Health Connect, calendar) and macOS desktop from one codebase
  • Onboarding — personal info, dietary preferences, sphere selection

Tech Stack

Flutter (mobile)

Package Version Purpose
flutter 3.x UI framework
riverpod ^2.6.1 State management
go_router ^14.8.1 Navigation
health ^12.2.0 Apple HealthKit / Health Connect
device_calendar ^4.3.3 Read device calendar (iOS/Android)
fl_chart ^0.70.2 Charts
dio ^5.8.0 Shared HTTP client (AppHttp)
geolocator latest GPS for weather
flutter_local_notifications Morning brief + hydration reminders
shared_preferences ^2.3.5 Local persistence
flutter_localizations + gen-l10n i18n (ARB + ICU, EN · UK)
intl ^0.20.2 Dates and number formatting

Backend

Component Purpose
FastAPI (Python) REST API wrapper around Engram
Engram Cognitive memory — observe() and recall()
Anthropic SDK Claude API with SSE streaming
fastembed Local ONNX embeddings (bge-small-en-v1.5)
sqlite-vec Vector similarity search in SQLite

Project Structure

lib/
  core/
    router/         — go_router (4-tab shell + onboarding routes)
    theme/          — AppColors, AppTheme (iOS Human Interface)
    locale/         — supported langs + native names (language picker)
    providers/      — userProfileProvider, settingsProvider, aiAgentsProvider
  l10n/             — generated L10n + ARB (app_en.arb, app_uk.arb)
  features/
    home_tab/       — Home: weather, Meta Agent Summary, AI agents, Today's Focus
    dashboard/      — Spheres grid with drag-to-reorder
    health/         — HealthKit integration, water tracker, conditions, medications
    finance/        — Accounts, budgets, subscriptions, savings goals
    goals/          — Goals with key results, habits tracker
    career/         — Task manager, project tracker, interviews
    learning/       — Books library, skills tracker, Pomodoro timer
    relationships/  — Contacts, birthdays, check-in reminders
    rest/           — Sleep log, digital detox, recovery score
    travel/         — Trips, countries visited, dream list
    hobbies/        — Hobby sessions with weekly goals
    mindfulness/    — Mood check-in, breathing exercises, affirmations
    creativity/     — Creative projects, idea capture
    home_sphere/    — Household tasks, plant tracker
    settings/       — AI agents, spheres, theme, language
    profile/        — Personal info, health conditions, dietary tags
    onboarding/     — 4-step first-launch flow
    agent_chat/     — Chat screen with sphere agents
  shared/
    models/         — Sphere, UserProfile, ChatMessage, ...
    widgets/        — MainShell (bottom nav), reusable components

Getting Started

Prerequisites

  • Flutter 3.x (flutter --version)
  • For iOS: Xcode 15+ and CocoaPods (pod --version)
  • For Android: Android Studio / SDK (minSdk 26, Health Connect)
  • A simulator/emulator or a physical device

Run

git clone https://github.com/TAIPANBOX/sphere.git
cd sphere
flutter pub get
flutter run

Apple Health data requires a real device with a paid Apple Developer account. Simulator shows demo data.

Backend (AI agents + Engram memory)

cd backend

# Install Python deps (first time)
make install-python

# Add your Anthropic key
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env

# Start FastAPI + Engram sidecar
make run

Once running, all sphere agents, the Meta Agent Summary, and the InsightCard use real Claude responses with Engram long-term memory.


Roadmap

Phase 1 — Core AI ✅

  • Python FastAPI + Engram sidecar
  • Claude API with SSE streaming
  • Engram memory — observe() and recall() per sphere
  • Live InsightCard — real cross-sphere insight on home screen
  • Live Meta Agent Summary — streamed from Meta Agent
  • User Profile — persisted locally, injected into every agent

Phase 2 — Full Sphere Screens ✅

  • All 12 sphere screens with live home stats
  • SharedPreferences persistence for all sphere data
  • Drag-to-reorder spheres grid

Phase 3 — Home & Settings ✅

  • 4-tab navigation (Home · Spheres · Settings · Profile)
  • Settings tab — AI Agents, My Spheres, theme, language, currency
  • Profile tab — personal info, body metrics, health conditions, dietary tags
  • Live weather on Home via Open-Meteo + geolocation
  • AI Agents selector with persistent API keys (Claude, ChatGPT, Gemini, OpenRouter)
  • Today's Focus — urgency-ranked across all spheres
  • Dark mode — full adaptive theme
  • Onboarding — 4-step setup, data persisted correctly
  • Life Score badge with best/needs-focus sphere chips

Phase 4 — Polish

  • Local notifications — morning brief + hydration reminders (scheduled)
  • Device calendar integration — events feed the daily brief and Goals
  • Full localization — EN · UK via Flutter gen-l10n (ARB + ICU)
  • Cross-platform — iOS, Android (Health Connect) and macOS
  • Real-time cross-sphere context propagation
  • Scheduled daily brief auto-generated server-side
  • Agent-initiated push notifications
  • Home Screen widget
  • Offline mode with local caching

Design Principles

Agents speak like a trusted friend, not a corporate assistant.

  • Address you by name
  • Short, direct sentences: "Looks like you slept well last night" — not "Sleep data indicates positive trend indicators"
  • Remember past conversations and reference them naturally
  • Celebrate wins genuinely; give honest feedback without alarmism
  • Never say "as a language model" or "I'm not able to"

Privacy first. All memory is local SQLite. No data leaves the device unless you explicitly connect a third-party service.

One system, not 12 apps. The value of Sphere isn't any single sphere — it's that all 12 spheres know about each other through the Meta Agent and Engram cross-agent recall.


Related

  • Engram — the cognitive memory library powering Sphere's agents

License

MIT

About

Personal Life Intelligence System — 12 AI-powered life spheres with Engram cognitive memory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors