name: AG Dev Hub Architecture Plan
description: Full architecture plan for multi-agent infrastructure — Claude Code + Gemini CLI on VPS, Telegram control, LLM Wiki shared memory, n8n workflows, voice assistant future
type: project
Architecture Overview
┌──────────────────────────────────────────────────┐
│ VPS (HOSTiQ kVPS70) │
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Claude Code │──────▶│ Gemini CLI │ │
│ │ (orchestrator)│ delegates│ (heavy dev) │ │
│ │ Max/Sonnet4.6 │◀──────│ Ultra/Gemini3│ │
│ └──────┬───────┘ └──────────────┘ │
│ │ │
│ ┌──────┴───────┐ ┌──────────────┐ │
│ │ Channels │ │ LLM Wiki │ │
│ │ (Telegram) │ │ (git repo) │ │
│ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │
│ ┌──────┴───────┐ ┌──────┴───────┐ │
│ │ n8n │ │ Caddy │ │
│ │ (workflows) │ │ (reverse │ │
│ │ │ │ proxy+SSL) │ │
│ └──────────────┘ └──────────────┘ │
└────────────────────────┼──────────────────────────┘
│ git sync
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Cowork │ │ Obsidian │ │ Telegram │
│ (desktop) │ │ (mobile+ │ │ (phone) │
│ │ │ desktop) │ │ │
└──────────┘ └──────────┘ └──────────┘
Role Distribution
- Claude Code (Max, Sonnet 4.6): orchestrator, Telegram interface, wiki maintenance, planning
- Gemini CLI (Ultra, Gemini 3): heavy coding tasks, large context analysis, delegated by Claude Code
- n8n: scheduled workflows, API connectors, data pipelines (Pediatric News, Ad Analytics, Zest Content)
- Caddy: HTTPS reverse proxy with auto SSL for web services
Google Accounts Mapping on Server
- Personal (gmail) → Claude Code OAuth
- Subscription → Gemini CLI OAuth (AI Ultra for Business)
- Work (corporate) → gcloud for GCP resources ($100/mo budget)
Shared Memory Strategy (LLM Wiki pattern by Karpathy)
- Markdown wiki in /srv/wiki/ with cross-links
- Git repo synced to GitHub → pulled by Cowork and Obsidian
- Each project has its own directory: lunar-hubble, ad-analytics, pediatric-news, zest-content
- Claude Code auto-updates wiki pages after significant work
- Future: add LightRAG for semantic search when wiki exceeds 100 pages
Budget
- Claude Max: $100/mo
- Google AI Ultra: already subscribed
- HOSTiQ kVPS70: 815 грн/mo (~$19)
- Total: ~$119/mo
Future Additions
- Voice layer: faster-whisper (STT) + ukrainian-tts (TTS) for Telegram voice messages
- Requires VPS upgrade to kVPS90 (8 GB RAM) for ~$25/mo
- Obsidian as wiki viewer on desktop and mobile
- LightRAG MCP for semantic search over wiki