Skip to content

Sovereign v2 — Session 1 Discovery (R940 greenfield)

Status: Approved (2026-08-20). Canonical reference for Session 2+.
Session 2: Complete 2026-08-20 — see SOVEREIGN_V2_SESSION2_NOTES.md. Do not start Session 3 without Ryan’s explicit go.
Ryan decisions locked: greenfield on R940 (not PC migration); PC sell on Ryan’s timeline; no unicorn data preservation; auth standalone (no last1.id); no Windows client (permanent); models 7B+24B only (no Anthropic in v2.0).

Supersedes (for data path): unicorn Chroma/SQLite import sections in SOVEREIGN_ARCHITECTURE_V2.md. That doc’s two-VM + systemd + Tailscale posture remains valid; treat § “Data migration from unicorn” as retired.


Ryan approvals (2026-08-20) — locked

# Question Decision
1 Models 7B + 24B tiered. Skip Anthropic teacher for v2.0 (add later only if 24B is genuinely inadequate). Prefer local-only for sovereignty story.
2 Cursor email-to-Cursor Drop for v2.0. Direct Cursor via IDE (agent-01 + Mac). Revisit only if mobile-without-Cursor need emerges.
3 Monday.com Drop completely. Muster via last1ent-mcp only. Dead code out.
4 This discovery doc Merge to main as canonical Session 2+ reference.

v2.0 hard scope commitment (not aspirational)

v2.0 = MVP only (~45–70h). Ryan tests end-to-end for one week before declaring shippable.

In scope

  • Mac Tauri client (chat + streaming)
  • Fresh Odysseus on sovereign-app
  • Fresh MemPalace on sovereign-mem (pgvector, empty start)
  • Muster + Gmail + Calendar integrations
  • Apple Reminders only if cheap (otherwise skip)
  • 7B + 24B via Ollama on inference-01
  • BWS SOVEREIGN_R940_*
  • Observability (Prometheus + Grafana + Loki)

Explicitly out of v2.0 (v2.1+)

  • Voice (STT/TTS/wake)
  • Agents beyond basic Sov Manager routing
  • Full 14+8 agent taxonomy
  • iOS Tauri, PWA
  • Anthropic teacher
  • Windows client (permanent)
  • Cursor email delegation

Planned session sequence (after Ryan kickoff)

Session Focus
2 Odysseus fresh install + Mistral config on sovereign-app
3 MemPalace fresh install on sovereign-mem
4 Mac Tauri client (engine URL)
5 Muster + Gmail + Calendar MCP
6 BWS + observability
7 E2E testing + docs
Ryan one-week gate → then v2.1+ (voice likely first)

Executive verdict (architecture)

Topic Decision
Odysseus Fork + strip (thelast1org/odysseus), not a from-scratch rewrite. Preserve client API contracts; delete Windows/unicorn/Monday surface and mega-SPA.
Agents (later) Keep v1 session-folder pattern when restoring; v2.0 = Manager routing only.
Models 7B + 24B. No Anthropic in v2.0. 24B already on inference-01.
MemPalace Fresh pgvector on sovereign-mem. Discard PC palace.
Clients Shared React/Vite. Mac only in v2.0.
Voice Deferred to v2.1+.
Ops board Muster only via last1ent-mcp.
Effort v2.0 ~45–70h.

Repo map (where v1 lives)

Piece Location
Odysseus engine GitHub thelast1org/odysseusnot cloned on agent-01
MemPalace GitHub thelast1org/mempalace (mirror of OSS ~3.4.1; PyPI newer ~3.7.x)
Sovereign UI /home/ryan/code/last1/Sovereign (also thelast1org/sovereign) — Tauri v2 + React/Vite
Platform MCP /home/ryan/code/last1/last1ent-mcp — Muster + observability tools
R940 arch SOVEREIGN_ARCHITECTURE_V2.md
Target VMs sovereign-app 104 / 192.168.1.70; sovereign-mem 105 / 192.168.1.71; inference-01 Ollama

Sub-task A — Codebase discovery

A1. Odysseus (engine)

Shape: FastAPI monolith, uvicorn :7000, AGPL upstream DNA (pewdiepie-archdaemon/odysseus) forked as Unicorn/Sovereign.

Surface Role
/api/chat, /api/chat_stream Core chat + tool loop
/api/sovereign/* Hub (~70 endpoints): agents, intel, Monday, stack, habitus, reminders, bootstrap
/api/memory Native Odysseus memory (Chroma) — separate from MemPalace
/api/mcp Embedded MCP manager
/api/stt, /api/tts Voice
/sov/ Static Sovereign UI embed

Agent model (not a separate runtime): chat sessions tagged by folder:

Tier Count Folder
Sov Manager 1 sov:manager
Property 14 sov:<slug> (ecosystem registry)
Functional 8 (+ Monday Ops scout as scheduled task) sov:functional/<id>

Delegation: tool sov_delegate → nested stream_agent_loop on target session + MemPalace wing recall.

LLM: llm_core.py detects Ollama native / Anthropic / OpenAI-compat. Teacher escalation (teacher_escalation.py): local student fails → cloud teacher. Fits tiered routing.

Tools: ~68 native schemas + MCP (mcp__server__tool). Tool index via Chroma RAG.

Do not carry to R940:

  • Windows process lifecycle (engine/restart PowerShell, platform_compat, OpenBB/CamoFox Windows stack)
  • Full Odysseus SPA / cookbook / gallery / compare / deep-research UI
  • Filesystem Chroma MemPalace on %USERPROFILE%
  • Bootstrap scripts referenced but missing from git (bootstrap-property-agents.py, mempalace-recall-query.py, …)
  • Hardcoded unicorn.tailc3bbdc.ts.net

Carry:

  • Session-folder agent contracts + sov_delegate semantics
  • Auth header X-Odysseus-Session + chat stream stop/resume
  • Sovereign hub JSON shapes already consumed by Sovereign/src/lib/odysseus-api.ts
  • MCP manager patterns + STT/TTS route contracts
  • Teacher-escalation idea
  • Apple Reminders API surface (/api/sovereign/reminders) if Mac bridge retained

A2. MemPalace

Layer v1 reality
Vectors Default Chroma on disk; first-party pgvector backend exists
KG Always SQLite (knowledge_graph.sqlite3) — not migrated by pgvector backend
Graph extras tunnels.json, hallways.json, identity.txt on local palace path
Odysseus call Mostly uv tool run --from mempalace==3.4.1 subprocess; missing scripts/mempalace-recall-query.py on main

Carry: wings/rooms/drawers, hallways/tunnels concepts, MCP tool surface, pgvector backend, auto-recall inject pattern.
Discard: unicorn palace files (Ryan: no data).
Fix on R940: commit JSON recall adapter or call MemPalace in-process; set MEMPALACE_BACKEND=pgvector + MEMPALACE_PGVECTOR_DSNsovereign-mem; accept KG/tunnels still local on app VM unless extended later.

A3. Sovereign UI (Tauri v2)

Already a shared React 18 + Vite 6 + Zustand + TanStack Query app with Tauri 2 shell (package.json / src-tauri). Platforms: Windows (host), Mac/iOS remote. PWA via /sov/ on engine.

Area Finding
Engine I/O Fat client contract in odysseus-api.ts (~1700 LOC)
Voice sov-voice.ts (browser SpeechSynthesis TTS + Web Speech wake) + sov-engine-stt.ts (MediaRecorder → /api/stt)
Wake String match on phrases sawhv / sove / sovereign / sovnot Porcupine/OpenWakeWord
Agents UI functional-agents.ts (8) + ecosystem property cards (14) + Monday Ops card
Reminders Hub panel + /api/apple-reminders/* / /api/sovereign/reminders
Heavy UI Neural 3D hub (@react-three/*) — impressive, expensive; defer polish for MVP

v2 client work: retarget VITE_ENGINE_URLsovereign.tailc3bbdc.ts.net (or app MagicDNS); drop Windows packaging; swap Monday cards for Muster; slim hub for daily chat first.

A4. Voice stack

Piece v1
STT Engine faster-whisper (POST /api/stt/transcribe) preferred when available; Web Speech fallback
TTS Browser speechSynthesis primary for Sov; engine TTS (Kokoro / endpoint) optional
Wake Continuous listen + phrase detect on transcript

No Porcupine in tree. Dedicated wake-word models are a v2.1+ upgrade if false wakes become painful.

A5. Agents

Tier IDs / notes
Manager sov:manager + sov_delegate
Property (14) last1_org, last1_id, veteransco, last_vet, radiocheck, realoutcomes, matr, onset, biz_matr, last1_capital, last1_studio, last1_app, last1_enterprises, last1_holdings
Functional (8) intel_triage, advisory_panel, registry_sync, collab_pulse, signal, workflow_scout, quant_scout, renaissance_advisor
Extra Monday Ops Scout (scheduled) — replace with Muster scout

Worth carrying as product model. Rewrite bootstrap as first-class Python (checked-in), not missing unicorn scripts.

A6. Carry vs rewrite summary

Carry Rewrite / drop
Client API contracts Windows host assumption
Folder-agent + sov_delegate Full Odysseus SPA / cookbook / gallery
MCP + tool policy ideas Chroma-on-disk MemPalace
STT/TTS routes Monday-as-core-ops (→ Muster)
Teacher escalation idea Missing bootstrap scripts (recreate)
Reminders bridge pattern Unicorn DNS / PC restart APIs
Tauri+React shared UI Dual native Odysseus memory + MemPalace without clear boundary (collapse)

Sub-task B — v2 architecture proposal

B1. Odysseus: fork vs rewrite

Recommend: fork + surgically strip on sovereign-app (systemd + uvicorn), not greenfield rewrite.

Why not rewrite Why not lift monolith as-is
Client already depends on dozens of /api/sovereign/* + chat stream shapes 2–4k LOC mega-modules; Windows; missing scripts; dual memory mess
Agent folder model works Product surface is Sovereign clients, not Odysseus UI

Strip list (Session 2+): Windows stack manager; unused SPA; cookbook/gallery; ChatGPT/Copilot lanes unless needed; Monday module → Muster; MemPalace subprocess → library/pgvector.

B2. Agent framework

Recommend: keep v1 session-folder agents for v2.

Alternative Verdict
LangGraph / pydantic-ai Overkill for MVP; rewrite cost high; loses folder/wing memory mapping
Custom new router Only if Manager routing proves unmaintainable after 24B land

Ship Manager + 2–3 property agents + 1 Muster scout in MVP; restore full 14+8 later.

B3. Model routing

Locked for v2.0: two local lanes only (no Anthropic teacher):

Lane Model Use
Fast sovereign-mistral-7b / mistral:7b-instruct-q4_K_M Chat, light classify
Deep mistral-small:24b-instruct-2501-q4_K_M (already on inference-01) Tool routing, Manager rounds

Anthropic teacher is v2.1+ only if 24B proves inadequate. Sovereignty preference: local-only.

B4. MemPalace

Recommend: fresh MemPalace ≥3.7 (or pin org mirror) + pgvector on sovereign-mem.

sovereign-app  --MEMPALACE_PGVECTOR_DSN-->  sovereign-mem:5432
               local palace path for KG/tunnels/identity markers

No unicorn import. Fix Odysseus recall bridge. Optional MemPalace MCP for Cursor later.

B5. Clients

Recommend: keep single Vite React tree.

Priority Target
1 Mac Tauri (VITE_ENGINE_URL → Tailscale HTTPS)
2 PWA (/sov/ on engine or Cloudflare later)
3 iOS Tauri
No Windows

Platform splits only where required (global shortcut, tray, Reminders bridge, iOS signing).

B6. Voice

Phase Stack
MVP Optional; if on: engine faster-whisper STT + browser TTS + phrase wake
v2.1 Always-listen polish, engine TTS (Kokoro) if browser voices suck on Mac
Later OpenWakeWord/Porcupine only if phrase-wake false-positive rate hurts

B7. MCP / integrations

Integration Path
Muster + observability + restore last1ent-mcp (already on R940 pattern)
Gmail / Google Calendar Existing Google MCP servers (OAuth in BWS SOVEREIGN_R940_*)
Filesystem Deferred past v2.0 unless needed for MVP tools
GitHub Deferred past v2.0
Apple Reminders Mac-local bridge → Odysseus if cheap
Cursor email-to-Cursor Dropped for v2.0
Monday Dropped completely

Auth: standalone session on Odysseus; Tailscale for network; no last1.id.

B8. Secrets

Follow BITWARDEN_NAMING_CONVENTION.md: SOVEREIGN_R940_* in project sovereign. Examples: SOVEREIGN_R940_SHARED_OLLAMA_BASE_URL, SOVEREIGN_R940_PROD_MEMPALACE_PGVECTOR_DSN, SOVEREIGN_R940_PROD_ANTHROPIC_API_KEY, Google OAuth, session secret.


Sub-task C — MVP (“shippable daily on Mac”)

Must work

  1. Engine healthy on sovereign-app over Tailscale HTTPS
  2. Mac Tauri login + Manager chat (stream)
  3. MemPalace auto-recall + write (fresh palace)
  4. Tools: Muster (list/update via last1ent-mcp), Gmail read, Calendar read
  5. Basic offline/error UX when engine down

Nice-if-cheap in MVP

  • Apple Reminders panel (Mac bridge already exists)
  • Fast vs deep model toggle

Explicitly defer (v2.1+)

Defer Why
Full 14 property + 8 functional agents High orchestration cost
Voice / wake Not required for daily typed use
iOS + PWA polish Mac-first
Neural 3D hub fidelity Eye candy; keep a simple hub
GitHub / filesystem / Cursor email After core loop stable
Monday Replaced by Muster

MVP effort (realistic)

Work Hours
Odysseus slim install + systemd + Tailscale serve 12–18
MemPalace fresh + pgvector + recall bridge fix 8–12
Mac Tauri retarget + auth + chat smoke 10–14
Muster + Gmail + Calendar MCP wiring 10–16
Reminders (optional) 4–6
Docs/BWS/smoke checklist 3–5
MVP total ~45–70

Sub-task D — Full parity effort (approved scope)

Beyond MVP, incremental hours:

Component Hours Notes
Odysseus further strip + harden 8–14 Tool policy, dual-memory cleanup
Full agent bootstrap (14+8) + schedules 16–28 Replace missing scripts
Voice (STT/TTS/wake polish) 12–20 Phrase wake first
Mac Tauri polish (tray, shortcuts, Reminders) 8–12
PWA 6–10 /sov/ + offline shell
iOS Tauri + signing 14–22 See existing docs/ios-signing.md
Filesystem + GitHub MCP 6–10
Cursor email-to-Cursor (if keep) 4–8
Hub/3D/intel feeds restore 10–16
Observability dashboards (Sov metrics) 4–6
Buffer / integration debt 10–15
Full parity incremental ~90–160
MVP + full ~135–230 Upper bound if everything is pristine

Reconcile with Ryan’s 60–115h: that band is credible if:

  • MVP is the “daily driver” bar (~50–70h), and
  • “Full feature set” is phased (agents/voice/iOS not same sprint), and
  • Neural hub is mostly reuse of existing UI with rewiring, not redesign.

If Session 2 tries to land full agents + voice + iOS in one push, expect >115h.


Inference-01 note (already true)

Verified tags include:

  • sovereign-mistral-7b:latest
  • mistral:7b-instruct-q4_K_M
  • mistral-small:24b-instruct-2501-q4_K_M
  • angel-mistral-7b, meridian-mistral-7b

No model download required to choose the 24B deep tier; only wiring + Modelfile alias (e.g. sovereign-mistral-small-24b) if desired.


Session 2 entry criteria (when Ryan unblocks ~early September)

  1. Approvals on open confirms (models, Cursor email, Monday drop).
  2. Clone thelast1org/odysseus (+ pin MemPalace) onto sovereign-app.
  3. Create BWS SOVEREIGN_R940_* keys (no secret values in git).
  4. Implement MVP checklist only; no iOS/voice/agent farm until Mac daily loop works.

Appendix — Key client files

Sovereign/src/lib/odysseus-api.ts      # engine contract
Sovereign/src/lib/engine-connection.ts # local vs remote URL
Sovereign/src/lib/sov-voice.ts         # TTS + Web Speech wake
Sovereign/src/lib/sov-engine-stt.ts    # faster-whisper loop
Sovereign/src/data/functional-agents.ts
Sovereign/src/data/ecosystem.ts        # 14 properties
Sovereign/src/components/WakeWordListener.tsx
Sovereign/src/components/hub/MondayOpsCard.tsx  # replace → Muster

End Session 1. No code or infra changes performed beyond this planning document.