AI Infrastructure Architecture
VPS Design, Data Layers & System Integration Spec ยท March 2026
System Overview
The egelloC AI infrastructure operates across three layers that converge at a central DigitalOcean VPS. Each layer serves a distinct mode of human-AI interaction, and the VPS acts as the connective tissue โ the egelloC Brain โ that keeps all layers in sync.
The Three Layers
Claude Team Plan
Daily AI co-worker for all staff. Chat, Projects, Cowork, Connectors.
Users: Everyone: coaches, CX, marketing, sales, leadership
Tools: Claude.ai, Desktop app
OpenClaw (3 Mac Minis)
Always-on automations. Cron jobs, event-triggered agents, background processing.
Users: Runs autonomously. Tony owns 2 Minis (Cornelius + Emerson), Victor owns 1 (Jarvis).
Tools: Cornelius, Emerson, Jarvis, cron jobs, Zapier, Claude API
Dev Layer
Build and ship. Code the automations, agents, and product features.
Users: Tony, Victor, Ray + AI team
Tools: Cursor, GitHub, Claude Code, Vercel
DigitalOcean VPS โ The Brain
The VPS hosts shared knowledge, configuration, and data that every agent and every human-facing Project draws from. It serves four functions: SOP repository, API key vault, shared context store, and webhook receiver.
Directory Structure
| Path | Purpose |
|---|---|
| /opt/egelloc/brain/sops/ | SOP Markdown files, organized by department (coaching/, sales/, cx/, marketing/) |
| /opt/egelloc/brain/playbooks/ | Decision trees and response templates (parent-comms/, financial-aid/, essay-coaching/) |
| /opt/egelloc/brain/context/ | Shared context DB (SQLite), agent state files, student data snapshots |
| /opt/egelloc/config/ | API key vault (.env files), Tailscale config, agent routing rules |
| /opt/egelloc/webhooks/ | Webhook receiver scripts (Node.js/Express), event logs, routing logic |
| /opt/egelloc/logs/ | All agent action logs, API call logs, cost tracking CSVs |
| /opt/egelloc/exports/ | Processed outputs for Claude Team Projects (synced to Google Drive) |
Networking โ Tailscale Mesh
All machines connect via Tailscale private networking. No public ports exposed except webhook endpoints (HMAC secured).
Agent Routing Rules
Cornelius is the orchestrator. When a request or event enters the system, Cornelius triages and routes to the correct agent:
Coaching, student intel, meeting prep, content
Channel: Slack @emerson
Product QA, internal tooling, ops workflows
Channel: Slack @jarvis
Leadership BI, cross-agent coordination, Tony-specific tasks
Channel: Telegram (Tony)
Data Flows
Flow 1: Automation โ Claude Team Projects
Flow 2: Webhook Event โ Agent Action
Flow 3: Dev Builds & Deploys
Shared Context Store โ Brain DB
SQLite for V1, PostgreSQL when volume demands it. agent_logs and cost_tracking are append-only.
| Table | Writers |
|---|---|
| agent_logs | All agents (auto-logged) |
| student_context | Emerson, CX workflows |
| meeting_summaries | Meeting Intelligence cron |
| sales_events | Webhook receiver |
| sop_versions | AI team only (SOP Lock) |
| cost_tracking | All API calls (auto-logged) |
| webhook_events | Webhook receiver |
Claude Team Projects โ Knowledge Map
Each Project is organized by workflow, not by department or task.
Coaching Hub
VPS SyncedCoaching philosophy, no-spike language guide, tier breakdowns, PPI program docs, essay feedback tone guide
Users: Coach Art, all coaches
Financial Aid Playbook
VPS SyncedHormozi Calculator Close script, FAS training materials, scholarship guides, financial aid strategy docs
Users: Coach David, coaches
Parent Comms
VPS SyncedRefund response templates, cancellation handling, coach reassignment scripts, progress update formats
Users: Kristen, CX, coaches
Marketing & Sales Engine
ManualWebinar scripts, Jeremy Miner framework, Facebook ad guidelines, email sequences, brand voice guide
Users: Vik, Tony, sales team
CX Onboarding
VPS SyncedOnboarding SOP, handoff summary templates, Magoosh access, student check-in schedule, churn prevention
Users: CX team
Berkeley Masterclass
ManualEvent logistics, GHL campaign assets, session breakdowns, speaker notes, venue details
Users: Tony, Vik, ops
Leadership Ops
VPS SyncedMission Control data, cost tracking reports, agent performance logs, team capacity reports
Users: Tony, Ray
Use Case Routing Map
| Use Case | Layer |
|---|---|
| Meeting Intelligence | OpenClaw |
| Coach Capacity Dashboard | OpenClaw |
| Auto QA Bot | OpenClaw |
| Sales Won Handoff | OpenClaw |
| Student Progress Alerts | OpenClaw |
| SOP Generator | OpenClaw |
| Coach Q&A Autoresponse | Claude Team |
| Parent Progress Reports | Claude Team |
| Async Coaching Feedback | Claude Team |
| Content Agent | Hybrid |
| Marketing Attribution | Dev |
| Leadership Dashboard | Dev |
Cost Optimization Strategy
Critical Compliance Rule
Anthropic enforces a ban on using Claude Pro/Max subscription OAuth tokens in third-party tools like OpenClaw. All OpenClaw agents MUST use Anthropic API keys (pay-per-token). Violating this risks account suspension with no refund.
Model Routing (per MTok)
| Model | Cost | Approval |
|---|---|---|
| Haiku 4.5 | $1 in / $5 out | None โ default |
| Sonnet 4.6 | $3 in / $15 out | Team lead |
| Opus 4.6 | $5 in / $25 out | Leadership only |
Rule of thumb: Haiku handles 80%+ of automated tasks. Only escalate to Sonnet when the task genuinely requires deeper reasoning.
Batch API
50% discount for non-real-time workflows. Haiku drops to $0.50/$2.50 per MTok. Ideal for daily digests, weekly reports, monthly parent reports.
Prompt Caching
Up to 90% off repeated context. Cache system prompts and SOP context. Cached reads drop from $1/MTok to $0.10/MTok for Haiku.
Smart Context Management
Pull only relevant SOP sections per call. Cap Haiku at 8K input, Sonnet at 20K. Summarize conversation history before passing to next call.
Cost Example: Meeting Prep
Before: Sonnet, full transcripts, no caching โ ~$66/mo. After: Haiku, cached, batch, targeted extraction โ ~$5/mo. 92% reduction.
Monthly Cost Projection
| Line Item | Monthly Cost |
|---|---|
| Claude Team โ Standard seats (~20) | ~$500/mo |
| Claude Team โ Premium seats (~4) | ~$500/mo |
| OpenClaw API โ all agent workflows | ~$50โ150/mo |
| Cursor subscriptions (~4) | ~$80โ160/mo |
| DigitalOcean VPS | ~$20โ80/mo |
| TOTAL ESTIMATED | ~$1,150โ$1,390/mo |
Month 1 Priorities
Week 1: Infrastructure Foundation
- โVerify all machines connected to VPS via Tailscale + SSH
- โSet up VPS directory structure (/opt/egelloc/brain/, /config/, /exports/, /logs/)
- โPublish centralized API key directory on VPS
- โProvision Claude Team plan with initial 5โ10 seats
- โInvite Tony, Coach Art, Coach David, Kristen, Vik, Victor, Ray as initial users
Week 2: Knowledge Layer
- โCreate first 3 Claude Team Projects: Coaching Hub, Parent Comms, Financial Aid Playbook
- โUpload foundational docs to each Project knowledge base
- โSet custom instructions per Project (tone, role, boundaries)
- โSet up Google Drive shared folder + rclone sync from VPS
- โConnect Google Drive + Slack connectors to Team org
Week 3: First Automation
- โDeliver Meeting Prep V1 via OpenClaw (Fathom โ coach briefings)
- โAudit all running cron jobs, assign cost-tracking keys, migrate to Haiku
- โSet up Brain DB (SQLite) with agent_logs and cost_tracking tables
- โDeploy webhook receiver on VPS for Close CRM events
Week 4: Convergence
- โSync Meeting Prep outputs to Google Drive โ visible in Leadership Ops Project
- โTrain core team on Claude Team usage (Projects, Cowork, connectors)
- โGenerate first weekly cost report and post to Slack
- โRetrospective: what's working, what's not, what's next
This document is a living spec. As the system evolves, update the VPS directory structure, the Projects map, and the use case routing table. The architecture is designed to grow organically โ when an agent reaches its limits, it splits; when a new function is underserved, a new Project is born.