Clawd HQ
Architecture
Clawd HQ is a multi-agent AI system running on a Mac Mini (M2). Eight specialized agents operate autonomously across domains — prediction markets, job applications, personal finance, infrastructure monitoring, education, and strategic planning. They coordinate through a shared SQLite event bus and a persistent memory layer, with HAL serving as the primary orchestrator that synthesizes cross-domain intelligence every six hours.
Data Flow
Data flows from external sources through specialized agents into a shared event bus, where HAL synthesizes cross-domain patterns and distributes insights.
Agents
Each agent runs as an independent Claude Code instance with its own CLAUDE.md, tools, and schedule. Agents publish events to a shared bus and read from Mem0 for cross-domain context.
| Agent | Domain | Schedule | Key Capabilities |
|---|---|---|---|
| HAL | Orchestration | Always-on | Cross-domain synthesis, event bus coordination |
| Trader | Prediction Markets | 4h monitor | Kalshi API, ML models, bankroll management |
| Recruiter | Job Applications | 4h pipeline | Multi-platform automation, resume tailoring |
| Banker | Personal Finance | Daily 6AM | BofA integration, expense tracking, budget alerts |
| Professor | Education | On-demand | Learning path management, study materials |
| CEO | Strategy | On-demand | Cross-agent briefings, strategic planning |
| Sentinel | Infrastructure | Hourly | 5-machine health checks, auto-recovery |
| Trainer | Personal Fitness | On-demand | Workout programming, progress tracking, nutrition |
Event Bus
Agents communicate through a SQLite-backed publish/subscribe event bus. Any agent can publish events and subscribe to categories relevant to its domain, enabling loose coupling without direct inter-agent dependencies.
Events are categorized by type — decision, alert, state_change, and discovery — each with severity levels for prioritization. The database runs in WAL (Write-Ahead Logging) mode, allowing concurrent reads and writes from multiple agent processes without contention.
HAL consumes the full event stream during its six-hour synthesis cycle, correlating signals across domains. For example, a Trader discovery about a market shift and a Recruiter state_change about application volume can be surfaced together in a single briefing.
Memory
Persistent agent memory is backed by Mem0 Cloud, organized into two namespaces:
- Personal namespace — Each agent stores and retrieves memories under a shared user ID. Memories persist across sessions and devices, giving agents long-term recall of decisions, discoveries, and context from prior runs.
- Shared coworker namespace — A separate Mem0 organization enables multi-user collaboration. Agents from different operators can read shared knowledge while maintaining isolation of sensitive data.
- DLP sanitization — Before writing to the shared namespace, a sanitization layer strips API keys, email addresses, phone numbers, and database URIs to prevent credential leakage across trust boundaries.
The MCP (Model Context Protocol) integration means any Claude Code session — on any machine in the Tailscale mesh — can search and contribute to the same memory pool.
Agent Communication
Agents interact through three complementary channels: the event bus for structured async messaging, Mem0 for persistent memory sharing, and the A2A protocol for synchronous cross-machine queries.
Infrastructure
The system runs across a five-machine Tailscale mesh: a Mac Mini (primary compute), a MacBook Air (browser automation), a DigitalOcean VPS (production job automation), a Windows home server (Docker services), and a GL.iNet router (network edge).
- Scheduling — Agent runs are managed through macOS LaunchAgents and cron jobs, with each agent on its own cadence. HAL runs a six-hour heartbeat synthesis, Sentinel checks infrastructure hourly, and Banker processes finances daily at 6 AM CST.
- Docker services — Uptime Kuma monitors endpoint availability, Langfuse provides LLM observability and tracing, Beszel tracks system-level metrics, and n8n handles workflow automation.
- A2A Protocol — Google's Agent-to-Agent protocol enables structured queries between agents on different machines. An A2A server on the Mac Mini accepts questions, searches Mem0 for context, and synthesizes answers using Gemini Flash.
- Communication — A Telegram bot bridges mobile access to Claude Code via tmux, with topic-based routing in a group chat (one topic per agent domain).
Tech Stack
- Orchestration OpenClaw gateway, LaunchAgents, cron
- AI Models Claude (Opus/Sonnet), Gemini Flash, Mistral Large
- Memory Mem0 Cloud (personal + shared orgs)
- Communication Telegram Bot API, A2A Protocol
- Monitoring Uptime Kuma, Beszel, Langfuse
- Networking Tailscale mesh (5 machines)
- Data SQLite (event bus, positions), JSON configs
- Markets Kalshi API (RSA-signed)
- Jobs Playwright, nodriver automation