Architecture brief · for external review
One founder, a small team, and a client base of $10–50M machine manufacturers — served by a fleet of isolated AI brains, one self-hosted agent, and a client product that seeds a platform. This brief consolidates every architecture decision, the economics, and the failure history they were derived from.
The whole system in six lines
Separate state from compute from surface — then never let a credential cross a boundary.
Three brain tiers · three compute tiers · hard walls
Why a task can't pull from the wrong brain
Three surfaces, three deterministic routers. The critical design choice: routing is enforced by credential scoping, not by model obedience. A mis-phrased prompt cannot cross a wall, because the execution environment for a company task contains no key for the private brain — and vice versa.
APEX — a self-hosted Manus-class agent on owned infrastructure
APEX is ~100 lines of glue, deliberately: a Slack Socket-Mode listener that shells into claude -p with per-thread session resumption, on an always-on ThinkPad X1 (Ubuntu) in the founder's home. No agent framework. The intelligence is stock Claude Code; the scheduler is systemd; the state is git.
| Capability | Manus-class SaaS agent | APEX (self-hosted) |
|---|---|---|
| Multi-step live web research | Yes | Yes — real Chrome, headed, watchable via remote desktop |
| Logged-in sessions (groceries, Marketplace, airline) | Ephemeral, per-run logins | Persistent dedicated Chrome profiles — log in once, stays live across reboots |
| IP reputation | Datacenter IPs → bot walls | Residential IP (the founder's home line) |
| Multiple Gmail / calendar accounts | One account per connector | N × OAuth token files, selected per credential bundle |
| Multiple brains with hard walls | No concept | Credential-scoped routing (Fig. 2) |
| Marginal cost per task | Per-credit pricing | $0 — existing Claude Team seat |
| Purchase completion | Attempts full checkout | Deliberate stop-line: fills carts / prepares bookings; human clicks buy. Server-side carts make the handoff seamless (cart appears in the owner's own app) |
systemd restarts the listener on any exit; a silent dead-man's switch pings the founder's phone only if the box vanishes.git pull; a task is not "done" until its commit is pushed. The predecessor's fatal background sync loop (below) is structurally impossible."Vox" — OpenClaw daemon on a rented VPS, Jan–Aug 2026
| Failure (observed, logged) | Invariant derived |
|---|---|
| Claimed actions it hadn't completed | R1 — No claim without an artifact. Every action returns a link/path/row-ID or reports failure. |
| 24 sync-failure alerts over 7 weeks into a channel the founder had stopped reading; nobody noticed | R2 — The output is the heartbeat. No ops channel; the absence of expected work product is the alarm. |
| Status file claimed jobs ran on the VPS that actually ran elsewhere | R3 — Status is derived from artifact timestamps, never declared. |
| Scheduled daily briefs lost the founder's trust ("not up to date, not at a good level of trust") and were all disabled | R4 — Reactive first. Proactive jobs added one at a time, each with a stated success condition. |
| $50–95/day per-token API burn; one $22 scrape produced zero usable rows | R5 — Spend reported daily, ceiling enforced in code. Personal/company compute rides subscriptions; API is reserved for revenue-attached product COGS, capped per tenant. |
| Bespoke agent framework only the founder could repair | R6 — Thin glue over stock tooling. Losing the glue loses a script, not a system. |
| A "vacation-week" review routine ran 40 days past its scope, committing daily requests to be cancelled | R7 — Everything scheduled carries an expiry and a three-strikes auto-disable. |
A brain + a Board per client — the deliberate seed of the PVOS platform
Every PINAVOX client (industrial machine manufacturers running the Production Visibility OS™ content system) gets a cloned stack: Worker + D1 + R2 + managed RAG (Cloudflare AI Search, multilingual embeddings) + an Access-gated Board. The client's team connects their own Claude to their brain via MCP and works conversationally; the Board is the shared operational view.
| Activity | Surface | AI cost bearer |
|---|---|---|
| Drafting, discussing, "what's missing on piece S-012?" | Client's own Claude (Project + MCP connector) — full-window chat, artifacts, long texts | Client's subscription phase 1 / metered API phase 2 |
| Weekly content meeting: add ideas live, move stages | Board grid — type, Enter, next numbered row (IDs brain-assigned; human-typed IDs corrupted the pilot client's sheet) | None — no LLM in the Board |
| Reading a full article, reviewing files | Board full-page view / file manager (R2) | None |
Two levels, forever: Piece (idea, TAYA category, priority, sales-use) → Assets (channel × language, stage, date, link). No tasks, no dependencies, no automation builder. The grid stays dumb; anything intelligent — summaries, charts, "what changed since last week" — is asked in chat and answered by the brain. UI is English-only; per-language columns (DE/EN) are content-tracking data, not localization.
| Item | Phase 1 (now) | Phase 2 (product) |
|---|---|---|
| Infra per client brain | ~$0–2 / mo | ~$0–2 / mo |
| AI tokens | $0 — client's own Claude via MCP | metered API, hard-capped per tenant in code |
| Build effort | ≈ 3 days (first), then template-clone in hours | — |
| Pricing | bundled in PVOS engagement | monthly tool fee ≥ 10× capped COGS (cap guarantees margin floor) |
| Trigger to move | 3+ client brains live · MCP-side token telemetry from phase 1 sets the phase-2 price — measure, then price; never guess | |
Phase 1 is not a compromise — it is instrumentation. Client-side Claude usage through the Worker produces exact per-tenant token telemetry. The embedded-API chat ships only when that data exists, with a per-tenant spend ceiling enforced in the Worker (the same class of runaway that produced $95 days structurally cannot recur, because the cap is code, not policy).
Summarized — each item enforced, not aspirational
Before vs after
| Line | Predecessor era | This architecture |
|---|---|---|
| Agent model usage (founder ops) | $50–95 / day (API, peaks) | $0 marginal — existing Team seats |
| Hosting | $25 / mo VPS | $0 — owned X1 (+ ~$2/mo power) |
| LinkedIn proxy plan | $20–25 / mo (planned) | $0 — Tailscale free tier, residential exit |
| Cloudflare (all brains + Boards) | — | $5 / mo Workers Paid + ~$0–2 / mo per tenant |
| Client-facing AI | n/a | $0 (phase 1) → capped COGS priced into fee (phase 2) |
| New hardware | — | $0 — repurposed owned laptop |
The structural fix is not frugality — it is moving founder-side compute onto flat-rate subscriptions and reserving metered API strictly for revenue-attached, ceiling-capped product COGS. The binding constraint becomes Claude seat capacity (shared with the founder's own usage), managed by model-routing routine jobs to cheaper tiers.
Honest inventory, 5 Sep 2026
| Component | State |
|---|---|
| PINAVOX Brain (Worker + D1 + MCP OAuth, team access, nightly Librarian) | LIVE since Jul 2026 |
| Cloud routines (CEO brief, post-ideas, night-shift) | LIVE — runaway review routine killed 5 Sep (R7 now enforced) |
| Brain Librarian (nightly curation: capture wide → curate → cite sources) | LIVE — verified from run logs 5 Sep: fired every night, ~3 min/run, zero misses; curated learnings land as cited Brain entries + Slack digest + push |
| LinkedIn post-performance ingest → brain (closes the content flywheel) | NEXT — prerequisite before the brain generates weekly posts; entry count is not the gate, the feedback loop is |
| Command Center (outreach: D1 + web UI + guarded send) | LIVE — pattern-proof for the Board |
| Sensora brain (first client clone: frameworks, planner, RAG, Board) | BUILDING — phase A/B/C sequenced; framework approval + Access app pending |
| APEX on X1 (wipe → Ubuntu → listener → browser hands) | BUILDING — hardware in hand, spec locked |
| Stefan Brain split (private stack + credential bundles + routing) | NEXT — after APEX phase 1 |
| PINAVOX-internal Board (retires Notion content DBs) | NEXT — clone of Sensora Board once proven |
| Phase-2 embedded client chat (metered API) | GATED — on 3+ live brains + telemetry |
Where the advisor disagreed, and what stands
Where outside pattern-matching beats inside conviction
Reviewer confirmed: physical tenant isolation, vendor-risk posture, and the bus-factor bar ("Fatima restarts APEX without calling Stefan" — now a binary phase gate alongside the adversarial isolation test and handoff one-pager). Product-wedge question answered: stay inside delivery until 10 clients run the system — the platform emerges from real usage pain. Still open below: fleet ops at 50+, phase-2 pricing model, vendor de-risk timing.