Skip to content

Platform overview

The full LIFEOSAI platform in one diagram. Edge → Gateway → Compute → Runtime → Data, with external providers and DevOps on the right rails.

Browser & channel entry → User Management gateway → Agent API compute → Runtime engines → Data plane. External providers and DevOps shown as 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:

TierRoleComponents
Clients (top, outside)Where humans enterWeb Users · Tauri Desktop · iOS App · Internal Admin · Chat Users (WhatsApp/Telegram) · Phone Caller (voice bridge)
Edge TierTLS · auth · public surfaceIngress (Cloud Run + Tauri HTTP) · Auth Service (apps/auth · 3002) · Web SSR (apps/web · Next.js · 3000)
Gateway TierCentral routingUser Management (apps/user-management · 3001) — the routing hub · Direct APIs (files · models · billing · OAuth · plugins)
Compute TierAgent API (port 4000)Orchestration (heartbeat · invoker · event-bus) · Channels System (WhatsApp Baileys WS, Telegram grammy) · Phone Bridge (Gemini Live) · REST + SSE
Runtime TierCoding agents / SDKs that execute agentsClaude 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 TierPersistenceDatabase (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.

ModeWhere it runsDatabaseFiles
CloudGCP (Cloud Run + Compute Engine spot)Cloud SQL PostgresFilestore (NFS)
LocalTauri 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:

  1. Clients → Edge — HTTPS in cloud, HTTP loopback in Tauri
  2. Edge → Gateway — routed
  3. Gateway → Compute — UM proxies /api/agent/* to Agent API
  4. Compute → Runtime — orchestration invokes a harness
  5. Compute → Data — persist runs and events
  6. Platform → External Providers — LLM, OAuth, Stripe outbound
  7. External → UM — Stripe webhooks, OAuth callbacks (dashed)
  8. 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.adapterType and dispatches to the right harness
  • Event Normalizer converts non-Claude harness streams to a unified SDKMessage shape so downstream code sees one event format

This is what “any harness” actually means at the code level.