Platform overview
The full LIFEOSAI platform in one diagram. Edge → Gateway → Compute → Runtime → Data, with external providers and DevOps on the right rails.
How to read it
The platform is five tiers from top to bottom inside the dotted LIFEOSAI Platform boundary, with two external rails:
| Tier | Role | Components |
|---|---|---|
| Clients (top, outside) | Where humans enter | Web Users · Tauri Desktop · iOS App · Internal Admin · Chat Users (WhatsApp/Telegram) · Phone Caller (voice bridge) |
| Edge Tier | TLS · auth · public surface | Ingress (Cloud Run + Tauri HTTP) · Auth Service (apps/auth · 3002) · Web SSR (apps/web · Next.js · 3000) |
| Gateway Tier | Central routing | User Management (apps/user-management · 3001) — the routing hub · Direct APIs (files · models · billing · OAuth · plugins) |
| Compute Tier | Agent API (port 4000) | Orchestration (heartbeat · invoker · event-bus) · Channels System (WhatsApp Baileys WS, Telegram grammy) · Phone Bridge (Gemini Live) · REST + SSE |
| Runtime Tier | Coding agents / SDKs that execute agents | Claude Code (claude-agent-sdk + MCP + skills + sessions) · Pi Coding Agent (open-source, pi-agent-runtime + MCP + skills + permissions) · Event Normalizer (non-Claude streams → SDKMessage) |
| Data Tier | Persistence | Database (Cloud SQL Postgres or local SQLite) · Files (Filestore NFS or ~/.lifeosai) · Secrets (env refs / keychain) |
Right rails:
- External Providers — LLM APIs (Anthropic, Gemini) · OAuth (Google, Microsoft) · Voice Telephony (SIP/WebRTC) · Firebase · Stripe · GCS
- DevOps + Cloud Infra — GitHub Actions · Artifact Registry · Cloud Run · Agent VM Pool · Terraform · Tauri Sidecars
The same architecture, two deployment modes
The platform runs identically in two modes — only the target URLs change. Browser code stays the same.
| Mode | Where it runs | Database | Files |
|---|---|---|---|
| Cloud | GCP (Cloud Run + Compute Engine spot) | Cloud SQL Postgres | Filestore (NFS) |
| Local | Tauri sidecars (macOS · Win · Linux) | SQLite | ~/.lifeosai |
Prisma 7 manages migrations for both — apps/user-management/prisma for cloud, apps/tauri/src-tauri/migrations-sqlite for local.
The 8 data flows in the diagram
The diagram traces eight numbered flows:
- Clients → Edge — HTTPS in cloud, HTTP loopback in Tauri
- Edge → Gateway — routed
- Gateway → Compute — UM proxies
/api/agent/*to Agent API - Compute → Runtime — orchestration invokes a harness
- Compute → Data — persist runs and events
- Platform → External Providers — LLM, OAuth, Stripe outbound
- External → UM — Stripe webhooks, OAuth callbacks (dashed)
- DevOps → Platform — CI publishes images, Terraform provisions infra (dashed)
Where each agent SDK / harness plugs in
The Runtime Tier is where the choose-anything story lands. Today we ship two runtimes (Claude Code, Pi Coding Agent), but the adapter contract is the same — add Codex, Gemini agent, OpenAI Agents SDK, or LangGraph and they slot into the same tier.
- harness = the runtime an agent runs inside (loads skills, spawns MCP, manages sessions)
- agent-invoker in Orchestration resolves
adapterConfig.adapterTypeand dispatches to the right harness - Event Normalizer converts non-Claude harness streams to a unified
SDKMessageshape so downstream code sees one event format
This is what “any harness” actually means at the code level.
Read next
- Hub-and-spoke view — User Management routing in detail
- LIFEOSAI substrate — the orchestration layer end-to-end
- Coding agents + agent runtimes — Claude Code vs Pi Coding Agent vs your own
- Worked example · One AI incident — one incident walked through every tier