Skip to content

AI Agent System

Somewhere around the third agent, this stopped being a haus automation project and started being a personnel management problem. Sanctum runs a multi-agent AI system split across two platforms — five specialized agents on the VM, one on the Mac — each with a defined role, shared skills, and the quiet confidence of software that doesn’t know it’s running on consumer hardware in a Quebec basement.

The agent council — six minds, one mission

The VM hosts five agents. Yes, five. Each named after a Star Wars Jedi, because if you’re going to build a council of AI minds inside a Mac Mini, you might as well commit to the bit.

AgentRoleResponsibilities
YodaMainGeneral intelligence, coordination, primary user interface
WinduSecurityNetwork monitoring, threat assessment, security briefings
Qui-GonEfficiencyResource optimization, automation suggestions, cost analysis
CilghalHealthGenomic analysis, health monitoring, wellness insights
MundiFinanceFinancial tracking, budget analysis, investment monitoring

All VM agents run through the OpenClaw gateway as a systemd user service. The gateway manages agent lifecycle, message routing, and plugin access. It is, effectively, the Jedi Temple — if the Jedi Temple ran on 12 gigs of RAM and needed its secrets decrypted from a YAML file.

AgentRoleResponsibilities
JocastaCRMContact management, relationship intelligence

Jocasta runs through the DenchClaw gateway on the Mac (port 1977) with its own configuration profile. She has direct access to Mac-native services and the Affinity CRM integration. Named after the Jedi archivist, because someone has to remember everyone’s birthday.

Agents use a tiered model strategy with automatic fallback to maintain availability during outages or rate limits. The philosophy: if one brain goes dark, there’s always a dumber one willing to try.

Each agent is assigned a tier that determines its primary model and fallback chain. All routing goes through the Sanctum Proxy on port 4040.

TierPrimary ModelFallback ChainAgents
council-brainQwen 3.5 Plus (OpenRouter)claude-opus-4-6 → qwen35-plus → LM Studio → council-27bYoda, Jocasta
council-secureQwen 3.5 Plus (OpenRouter)qwen35-plus → LM StudioWindu
council-routineQwen 3.5 Plus (OpenRouter)qwen35-plus → council-27bQui-Gon, Cilghal, Mundi
council-heartbeatCouncil 27B (local)council-27bAll (heartbeat/status)

Claude Code connects directly as claude-opus-4-6 (not through a tier), with its own fallback chain to qwen35-plus → gemini-25-pro.

ModelPortUse Case
Qwen 3.5 35B (A3B)1234 (LM Studio)General reasoning fallback
Qwen 3.5 27B 4-bit + LoRA1337 (MLX)Agent-personalized local inference

The Council-27B MLX server provides LoRA adapters fine-tuned for each of the six agents, enabling personalized responses at the local tier. Every agent gets its own voice. This is either sophisticated engineering or the early stages of a personality disorder. Possibly both.

The Sanctum Proxy is the primary routing layer for all agent model requests. It is a single Rust binary on port 4040 that handles request sanitization, content-based routing, prompt caching, PII scrubbing, assistant prefill stripping, model resolution, fallback routing, and analytics.

See the Services page for the full 7-step request pipeline.

Each platform runs its own gateway instance:

PlatformGatewayPortBindConfig Location
MacDenchClaw1977LAN~/.openclaw/
VMOpenClawvariesLAN~/.openclaw/

The VM gateway runs as a systemd user service with linger enabled, starting automatically at boot. It uses a SOPS wrapper script to decrypt secrets before launch.

The Mac gateway runs as a LaunchAgent. Both gateways use the same OpenClaw codebase but with independent configurations. Two embassies, one language.

The Council Bridge enables communication between Jocasta (Mac) and Yoda (VM). Since gateways block plaintext WebSocket connections to non-loopback IPs, all cross-instance communication routes through SSH. Because nothing says “cutting-edge AI” like shelling out to a protocol from 1995.

Jocasta → SSH to [email protected]
openclaw agent --agent main --message "..."
Yoda → SSH to [email protected]
PATH=<node path> openclaw agent --agent main --message "..."

The bridge skill maintains a heartbeat every 2 hours to confirm bidirectional connectivity. If the heartbeat fails, an alert is raised through the watchdog system.

Agents have access to shared plugins that extend their capabilities:

PluginDescription
SupermemoryPersistent memory across conversations
Neo4j KGKnowledge graph via Graphiti (port 31416)

Plugins are configured at the gateway level and available to all agents on that gateway instance.

Agents access executable skills from the shared skills repository. Skills provide domain-specific tools that agents can invoke during conversations. See the Skills Development guide for details on the skill system architecture.

Skills are loaded from:

  • The built-in skills directory in the OpenClaw installation
  • Extra skills directories configured in openclaw.json (pointing to ~/Projects/openclaw-skills)

The Holocron is the family-facing chat interface — the part of this system that doesn’t require a terminal. It runs on the Mac at port 1977, using a separate DenchClaw profile (~/.openclaw-dench/) with token authentication and LAN binding.

SettingValue
Port1977
Hostnameholocron (Firewalla DNS), holocron.local (mDNS)
AuthToken-based
Accesshttp://holocron/ from LAN

The Holocron provides a simplified interface for household members to interact with the agent system without needing direct gateway access. Because explaining SSH to your family is a different kind of support ticket.