Home/Docs/System Architecture

System Architecture

Full technical architecture of the Personal AI Operating System


Overview

The system is a layered architecture: hardware at the base, a gateway in the middle, specialized agents above that, and integrations connecting outward to the world.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  USER INTERFACES                                                    β”‚
β”‚  Signal Β· iMessage Β· Email Β· Mission Control (web) Β· Voice          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  GATEWAY LAYER: OpenClaw                                            β”‚
β”‚                                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚ Session  β”‚  β”‚  Agent   β”‚  β”‚   Cron   β”‚  β”‚   TTS    β”‚           β”‚
β”‚  β”‚  Mgmt   β”‚  β”‚  Router  β”‚  β”‚Scheduler β”‚  β”‚  Engine  β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AGENT LAYER                                                        β”‚
β”‚                                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ Chief  β”‚ β”‚  Olivia β”‚ β”‚ Marcus  β”‚ β”‚  Riley  β”‚ β”‚ Matlock β”‚     β”‚
β”‚  β”‚ (Chief) β”‚ β”‚(Enforce)β”‚ β”‚(Researc)β”‚ β”‚ (Write) β”‚ β”‚ (Legal) β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚Sterling β”‚ β”‚  Vega   β”‚ β”‚  Sage   β”‚ β”‚  Forge  β”‚ β”‚ Maxwell β”‚     β”‚
β”‚  β”‚(BizOps) β”‚ β”‚(Finance)β”‚ β”‚(Teach)  β”‚ β”‚(Infra)  β”‚ β”‚  (PR)   β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”‚
β”‚  β”‚  Quinn  β”‚ β”‚ Taylor  β”‚ β”‚  Inbox  β”‚ β”‚   Dev   β”‚                 β”‚
β”‚  β”‚(Family) β”‚ β”‚(Sched)  β”‚ β”‚(Email)  β”‚ β”‚ (Code)  β”‚                 β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  INTEGRATION LAYER                                                  β”‚
β”‚                                                                     β”‚
β”‚  M365/Planner  β”‚  Home Assistant  β”‚  Email  β”‚  Invoice Ninja       β”‚
β”‚  DocuSeal      β”‚  Obsidian        β”‚  n8n    β”‚  SearXNG             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  HARDWARE LAYER                                                     β”‚
β”‚                                                                     β”‚
β”‚  Mac mini M4         Proxmox Node 1      Proxmox Node 2            β”‚
β”‚  (primary compute)   (services 1)        (services 2)              β”‚
β”‚  OpenClaw, MC,       HA, n8n,            Plex, Invoice             β”‚
β”‚  Chatterbox TTS      AdGuard, Metabase   Ninja, DocuSeal           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Gateway: OpenClaw

OpenClaw is the central nervous system. All traffic passes through it.

Key Responsibilities

Session Management

  • Each agent maintains its own session context
  • Memory injection: daily files + MEMORY.md loaded at session start
  • Session history stored locally

Agent Routing

  • Default agent receives all messages
  • Routing rules: keyword-based, semantic, or agent-decided
  • Agent-to-agent delegation (Chief can hand off to Marcus)

Cron Scheduler

  • Runs scheduled tasks autonomously
  • Each cron: target agent, schedule (cron syntax), message/task
  • Morning briefing, email digest, weekly review, etc.

Channel Multiplexing

  • Signal, iMessage, Email, Web UI on one gateway
  • Each channel can have its own default agent
  • TTS output configurable per channel

TTS Integration

  • ElevenLabs-compatible API (Chatterbox TTS locally)
  • Per-agent voice configuration
  • Inline [[tts:voiceId=X]] directives in responses

Memory Architecture

Session Start
    β”‚
    β”œβ”€β”€ Load MEMORY.md          (long-term curated facts)
    β”œβ”€β”€ Load memory/YYYY-MM-DD.md  (today's log)
    β”œβ”€β”€ Load memory/YYYY-MM-DD.md  (yesterday's log)
    └── Inject into agent context

During Session
    β”‚
    └── Agent writes key events to memory/YYYY-MM-DD.md

Heartbeat (periodic)
    β”‚
    β”œβ”€β”€ Review recent daily files
    β”œβ”€β”€ Distill important events
    └── Update MEMORY.md (long-term)

Three memory tiers:

  1. Daily files (memory/YYYY-MM-DD.md): Raw logs, temporary context
  2. MEMORY.md: Curated long-term facts, decisions, lessons learned
  3. Obsidian vault: Deep notes, project docs, research, synced via iCloud

Agent Architecture

Each agent is:

id: agent-id
name: Display Name
model: claude-[haiku|sonnet|opus]-[version]
voice: voice-id (optional)
description: "One-line for routing"

system: |
  [Full system prompt]
  PERSONA: ...
  DOMAIN: ...
  BOUNDARIES: ...
  ESCALATION: ...
  STYLE: ...

Model Distribution (Adam's system)

Opus 4.6:   Riley, Matlock, Maxwell    (3 agents β€” high-quality output)
Sonnet 4.6: Chief, Vega, Forge, Dev, Olivia, Marcus, Sterling, Sage (real-time + balanced)
Haiku 4.5:  Quinn, Taylor, Inbox       (3 agents β€” high-volume, cheap)

Tip: Opus 4.7 is now available and is the most capable model for complex reasoning β€” consider it for Matlock (legal) and Riley (long-form writing).


Integration Patterns

Pull Integration

Agent requests data when asked:

User β†’ Chief β†’ "What tasks are due today?"
Chief β†’ [calls Planner API] β†’ Returns tasks
Chief β†’ Synthesizes response β†’ User

Push Integration (Cron-based)

System proactively delivers data:

Cron (7 AM) β†’ Chief β†’ [gets calendar + tasks + weather]
Chief β†’ Synthesizes briefing β†’ Signal message β†’ User

Event-Driven (n8n)

External events trigger agent actions:

Email with [TASK] arrives β†’ n8n webhook detects
n8n β†’ POST to OpenClaw/Chief β†’ "Create task: [parsed task]"
Chief β†’ Creates Planner task β†’ Confirms via Signal

Security Architecture

Network Zones

INTERNET
    β”‚
    β”œβ”€β”€ Cloudflare Tunnel (public services only)
    β”‚   β”œβ”€β”€ clients.yourdomain.com β†’ Invoice Ninja
    β”‚   └── contracts.yourdomain.com β†’ DocuSeal
    β”‚
    └── Tailscale VPN (admin access only)
        β”œβ”€β”€ n8n (192.168.x.120:5678)
        β”œβ”€β”€ Home Assistant (192.168.x.124:8123)
        └── Proxmox (192.168.x.55, 192.168.x.70)

LAN (192.168.1.x)
    β”œβ”€β”€ Mac mini (192.168.x.100) β€” primary compute
    β”œβ”€β”€ Proxmox 1 (192.168.x.55)
    └── Proxmox 2 (192.168.x.70)

Data Residency

Data TypeStays LocalCloud
Memory filesβœ… Mac mini❌
Voice audioβœ… Chatterbox local❌
Contractsβœ… Proxmox 2❌
Invoicesβœ… Proxmox 2❌
Agent promptsβœ… Mac mini❌
AI reasoningβ€”βœ… Claude API only
Messagesβœ… Signal E2ESignal servers
Notesβœ… iCloud encryptediCloud

Request Flow: Full Example

"Research the Agilent Q1 earnings report"

1. User sends Signal message
2. OpenClaw receives via Signal channel
3. Default routing β†’ Chief
4. Chief reads message
5. Chief recognizes research request
6. Chief delegates to Marcus ("Research: Agilent Q1 earnings")
7. Marcus executes: web search + synthesis
8. Marcus returns structured brief to Chief
9. Chief synthesizes final response
10. Chief responds via Signal (text + optional Obama TTS)
11. Chief logs key points to memory/YYYY-MM-DD.md

Total: ~8-15 seconds API calls: 2 (Chief + Marcus) Cost: ~$0.02 (Sonnet 4.6 + Sonnet 4.5)