Canonical current-state architecture + system manual. Supersedes v5.4 (Jun 03). Written 2026-06-10 after a major architecture session: the GHL-independence pivot, the polling watcher, per-account spend caps, monitoring dashboards, and the bot-endpoint security lockdown. New engineer or future-you after a gap β€” start here.

0. What changed since v5.4 (the big shifts this session)


1. The product in one paragraph

Glitch is an AI employee that lives inside a GoHighLevel sub-account and runs that business's CRM 24/7. The sub-account owner talks to it from their phone (Telegram today; WhatsApp / Discord / Web chat planned) and tells it what to do; Glitch goes into the CRM and does the work β€” follows up leads, books appointments, posts social, fills forms, sends invoices β€” without the owner logging in. It's modeled on the OpenClaw pattern (brain + senses + memory + skills + hands + a safety harness) but it is our engine, not GHL's AI.


2. The two layers (the core distinction)

ClaudeBotz Glitch
Who sees it The agency / operator (Heather). Customers never see it. The customer. The only thing they see.
Surface Operator dashboard at agents.realtalkha.com (fleet management, approvals audit, AI cost per tenant, Fleet Monitor, skills, config undo) Telegram chat + the Bot Safety page + Glitch Bots page (GHL custom-menu links)
Identity into GHL Shared agency super-admin (glitch-299 automation user) β€” full access to every sub-account Its own scoped GHL Admin user assigned to ONLY that one sub-account β€’ its own AgentMail inbox + capped OpenRouter key. Isolation proven.
Role The factory / back office The product / the bot

Important: it's mostly one codebase and one brain loop (main.py β†’ run_specialist_agent_loop). The difference is identity + scope and surface, not separate engines. A sketched third tier β€” BridgeBotz (per-agency dashboard) β€” is planned, not built.


3. Architecture β€” the durable spine

Everything below depends on none of the GHL surfaces that keep getting reshaped (no workflow webhooks, no Agent Studio).

Two kinds of hands into GHL: