Hawk Inc. β€” OpenClaw Multi-Agent Organisation Blueprint (v2.0)

Owner: user (Your Name) Infrastructure: Minisforum X1A1 (+ 2013 MacBook Pro Primary Hub: OpenClaw Gateway (single process, multi-agent) Operating Philosophy: Right Model, Right Task β€” Cost-Conscious, Data-Sovereign


Agent Name Registry

All agent names, Telegram bots, and emojis are configured. Each agent has its own Telegram bot with dedicated routing via bindings.

RoleAgent IDNameTelegram BotEmoji
CEO / OrchestratorceoHawk@botname-CEO_Hawk_botπŸ¦…
Executive AssistanteaDi@botname-EA_Di_bot❀️
EngineerengSaeed@botname-ENG_Saeed_botπŸ”§
Finance / SecurityfinCraig@botname-FIN_Craig_botπŸ’°
Social MediasocialEleri@botname-SOCIAL_Eleri_botπŸ’¬
General Purpose / DogsbodydougDoug@GrantsClaw_bot🐈
Heartbeat (background)heartbeatDoug_Heartbeatβ€” (no bot)β€”

Critical Corrections from v1.0

The original blueprint contained several fundamental errors about how OpenClaw works. This version corrects them:

  1. OpenClaw uses JSON (JSON5), not YAML. The config file is ~/.openclaw/openclaw.json. Comments and trailing commas are supported.
  2. OpenClaw does not use an Obsidian vault as its primary hub. Each agent has its own workspace directory containing Markdown files (SOUL.md, AGENTS.md, USER.md, MEMORY.md, etc.). These are the agent’s brain β€” not Obsidian notes.
  3. Agent directives are workspace files, not custom folder hierarchies. OpenClaw expects specific filenames: SOUL.md (personality), AGENTS.md (operating instructions), USER.md (user preferences), TOOLS.md (tool guidance), HEARTBEAT.md (periodic checks), IDENTITY.md (structured identity), and MEMORY.md (long-term memory).
  4. Routing is handled by bindings in openclaw.json, not by a “CEO agent” making decisions. The Gateway deterministically routes inbound messages to agents based on channel, account, and peer matching.
  5. There is no Telegram “command syntax” like /cmd CEO init. You interact with each agent via its own Telegram bot. Delegation between agents is done through bindings and workspace instructions, not slash commands.
  6. Model configuration lives in openclaw.json, not in agent directive files. Each agent can have its own model assignment with fallback chains.

I. Architecture Overview

OpenClaw runs as a single Gateway process (default port 18789) on your hardware. Inside that process, multiple agents operate with full isolation: separate workspaces, separate sessions, separate memory, and optionally separate models and tool permissions.

                    Telegram (single bot now, per-agent bots later)
                              β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  OpenClaw Gateway   β”‚
                    β”‚  :18789 on "doug"   β”‚
                    β”‚  (~/.openclaw/)     β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚  Bindings route by (channel + accountId)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β–Ό          β–Ό        β–Ό      β–Ό  β–Ό          β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”β”Œβ”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Hawk  β”‚β”‚  Di  β”‚β”‚Saeedβ”‚β”‚πŸˆβ”‚β”‚ Craig β”‚β”‚ Eleri β”‚β”‚Heartbeatβ”‚
β”‚ (CEO) β”‚β”‚ (EA) β”‚β”‚(Eng)β”‚β”‚D β”‚β”‚ (Fin) β”‚β”‚(Social)β”‚β”‚(Doug_HB)β”‚
β”‚ (CEO) β”‚β”‚ (EA) β”‚β”‚(Eng)β”‚β”‚o β”‚β”‚ (Fin) β”‚β”‚(Social)β”‚β”‚ 15-min  β”‚
β”‚defaultβ”‚β”‚      β”‚β”‚     β”‚β”‚u β”‚β”‚local- β”‚β”‚        β”‚β”‚ local   β”‚
β”‚       β”‚β”‚      β”‚β”‚     β”‚β”‚g β”‚β”‚only   β”‚β”‚        β”‚β”‚ only    β”‚
β””β”€β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”¬β”€β”€β”˜β””β”¬β”€β”˜β””β”€β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”€β”¬β”€β”€β”€β”˜β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
    β”‚       β”‚       β”‚    β”‚      β”‚        β”‚         β”‚
  ws-ceo  ws-ea  ws-eng ws-   ws-fin  ws-social  shared
                       doug                      Clawbrain/
                                          (heartbeat only)

All agents read/write β†’ ~/obsidianVault/ (entire vault)
Hawk Inc. content    β†’ ~/obsidianVault/botname-/
Project tasks        β†’ ~/obsidianVault/Projects/Tasks/

Each agent gets:

  • Its own workspace directory with SOUL.md, AGENTS.md, USER.md, TOOLS.md, MEMORY.md, HEARTBEAT.md
  • Its own agentDir under ~/.openclaw/agents/<id>/ for auth profiles, sessions, and state
  • Its own Telegram bot (when per-agent bots are configured)
  • Its own model assignment (cloud or local)
  • Its own memory (daily logs in memory/YYYY-MM-DD.md plus curated MEMORY.md)

Doug has his own workspace at ~/obsidianVault/Clawbrain/workspace-doug/ with files migrated from the original shared root. Doug_Heartbeat remains on the shared ~/obsidianVault/Clawbrain/ root.


II. File System Layout

~/obsidianVault/                               # Obsidian vault root
β”œβ”€β”€ Atlas/                                 # Archive of old work notes (existing)
β”œβ”€β”€ Projects/                              # Active projects (existing)
β”‚   └── Tasks/                             # Task management (all agents can read/write)
β”œβ”€β”€ Inbox/                                 # Incoming notes (existing)
β”œβ”€β”€ Journal/                               # Journal entries (existing)
β”œβ”€β”€ Meta/                                  # Metadata and templates (existing)
β”œβ”€β”€ TaskNotes/                             # Task-related notes (existing)
β”œβ”€β”€ Gemini/                                # Gemini-related content (existing)
β”œβ”€β”€ botname-/                               # Hawk Inc. organisational content (NEW)
β”‚   β”œβ”€β”€ 00_System/                         # System configs, directives
β”‚   β”œβ”€β”€ 10_Corporate_Memory/
β”‚   β”‚   β”œβ”€β”€ CEO_Logs/                      # Strategic records, daily digests
β”‚   β”‚   └── Project_Ledgers/               # Active project tracking
β”‚   β”œβ”€β”€ 20_Departments/
β”‚   β”‚   β”œβ”€β”€ Engineering/                   # Code docs, infra notes, tech debt
β”‚   β”‚   β”œβ”€β”€ Finance_Security/              # Audit logs, cost ledgers
β”‚   β”‚   β”œβ”€β”€ Social_Media/                  # Brand assets, content drafts
β”‚   β”‚   └── Trading/                       # Trading strategies, analysis
β”‚   └── 30_Inbox/
β”‚       β”œβ”€β”€ Pending/                       # Items needing Prox review
β”‚       β”œβ”€β”€ Approved/                      # Reviewed and accepted
β”‚       └── Archive/                       # Completed/obsolete (soft delete)
β”œβ”€β”€ Clawbrain/                             # OpenClaw workspace root
β”‚   β”œβ”€β”€ AGENTS.md, SOUL.md, USER.md, ...  # Heartbeat agent's workspace files
β”‚   β”œβ”€β”€ memory/                            # Heartbeat's daily logs
β”‚   β”œβ”€β”€ scripts/                           # Python/bash automation scripts
β”‚   β”œβ”€β”€ instructions/                      # Task creation rules (add_task.md)
β”‚   β”œβ”€β”€ skills/                            # OpenClaw skills (obsidian, etc.)
β”‚   β”œβ”€β”€ qdrant/                            # Docker compose + memory.db
β”‚   β”œβ”€β”€ workspace-ceo/                     # CEO agent workspace
β”‚   β”‚   β”œβ”€β”€ AGENTS.md, SOUL.md, USER.md, IDENTITY.md, TOOLS.md
β”‚   β”‚   β”œβ”€β”€ HEARTBEAT.md, MEMORY.md
β”‚   β”‚   └── memory/                        # CEO daily logs
β”‚   β”œβ”€β”€ workspace-ea/                      # EA agent workspace
β”‚   β”œβ”€β”€ workspace-eng/                     # Engineering agent workspace
β”‚   β”œβ”€β”€ workspace-fin/                     # Finance/Security agent workspace
β”‚   β”œβ”€β”€ workspace-social/                  # Social Media agent workspace
β”‚   └── workspace-doug/                    # Doug (dogsbody) agent workspace
β”œβ”€β”€ .obsidian/                             # Obsidian app config
└── .git/                                  # Version control (synced to Gitea)

~/.openclaw/
β”œβ”€β”€ openclaw.json                          # THE config file (JSON5)
β”œβ”€β”€ credentials/                           # API keys (chmod 600)
β”‚   β”œβ”€β”€ anthropic
β”‚   └── google
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ ceo/ (agent/ + sessions/)
β”‚   β”œβ”€β”€ ea/ ...
β”‚   β”œβ”€β”€ eng/ ...
β”‚   β”œβ”€β”€ fin/ ...
β”‚   β”œβ”€β”€ social/ ...
β”‚   β”œβ”€β”€ doug/ ...
β”‚   └── heartbeat/ ...
β”œβ”€β”€ skills/                                # Shared skills (all agents)
└── cron/                                  # Persisted cron jobs

Key difference from a typical OpenClaw setup: The workspaces live inside ~/obsidianVault/Clawbrain/ (your Obsidian vault), not under ~/.openclaw/. This means Obsidian sees all workspace files natively β€” no symlinks needed for agent memory. The ~/.openclaw/ directory only holds config, credentials, agent state, and sessions.


III. The Model Stack (Cost-Optimised for X1A1 Hardware)

The X1A1 has an AMD Ryzen AI 9 HX 370 with Radeon 890M integrated GPU (gfx1100 / RDNA 3). ROCm is confirmed working. The 890M is an iGPU sharing ~48GB system RAM β€” models up to 8B run comfortably with GPU acceleration. The 32B Engineering model fits but monitor memory pressure under load (see Addendum A). OpenClaw needs at least 64K tokens of context β€” community consensus is that 32B+ parameter models are the reliable threshold for multi-step agent work. Smaller models (8B) work for simple tasks like heartbeats and content drafts.

Important: Use api: "ollama" (native Ollama API), NOT the /v1 OpenAI-compatible endpoint. The /v1 path breaks tool calling.

AgentPrimary ModelFallback ChainRoleCost
Hawk (CEO)anthropic/claude-sonnet-4-5gemini-3-pro β†’ gemini-2.5-pro β†’ gemini-2.5-flashStrategy, routing, complex decisionsCloud (Anthropic)
Di (EA)google/gemini-2.5-flashgemini-2.5-flash β†’ ollama/llama3Indexing, search, daily digestCloud (cheap)
Saeed (Eng)ollama/qwen2.5-coder:32bopenai/gpt-5.1-codex β†’ gemini-2.5-proLocal code, server opsFree (local)
Craig (Fin)ollama/llama3:latestollama/qwen3:8bAudits, cost tracking (local only)Free (local)
Eleri (Social)google/gemini-2.5-flashgemini-2.5-flash β†’ ollama/llama3Content creationCloud (cheap)
Doug (Dogsbody)google/gemini-2.5-flashgemini-2.5-pro β†’ gemini-3-pro β†’ ollama/llama3General purpose, odd jobs, quick questionsCloud (cheap)
Heartbeat (Doug_Heartbeat)ollama/llama3:latestβ€”15-min periodic checks (local only)Free (local)

Default for all agents: google/gemini-2.5-flash with fallback to gemini-2.5-pro β†’ ollama/llama3:latest. Agents override this with their own model assignments above.

Heartbeats for all agents: Default uses ollama/llama3:latest β€” heartbeats run frequently but do simple checks. Never burn cloud tokens on them. The dedicated heartbeat agent runs every 15 minutes on the Adelaide timezone.

Model aliases (use /model <alias> in chat to switch):

"models": {
  "google/gemini-2.5-pro":        { "alias": "pro25" },
  "google/gemini-2.5-flash":      { "alias": "Flash" },
  "google/gemini-3-pro":          { "alias": "Pro3" },
  "openai/gpt-5.1-codex":         { "alias": "GPT" },
  "ollama/llama3:latest":         { "alias": "Local" },
  "anthropic/claude-sonnet-4-5":  { "alias": "Sonnet" },
  "ollama/qwen2.5-coder:32b":    { "alias": "Coder" },
  "ollama/qwen3:8b":             { "alias": "Cheap" }
}

IV. Master Configuration β€” ~/.openclaw/openclaw.json

This is the production config, merged from the existing working setup and the Hawk Inc. blueprint. It retains the working mem0 plugin, existing auth profiles, Telegram bot token, and all current models while adding the multi-agent structure, memory flush, and inter-agent communication.

{
  "meta": {
    "lastTouchedVersion": "2026.2.17",
    "lastTouchedAt": "2026-02-27T05:50:07.828Z"
  },

  // ── Identity ──────────────────────────────────────────────────
  // NOTE: top-level "identity" was removed in OpenClaw 2026.3.x.
  // Identity is now per-agent via IDENTITY.md in each workspace.

  // ── Gateway (loopback only β€” access via SSH tunnel if remote) ─
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "YOUR_GATEWAY_TOKEN",
      "rateLimit": {
        "maxAttempts": 10,
        "windowMs": 60000,
        "lockoutMs": 300000
      }
    }
  },

  // ── Wizard ────────────────────────────────────────────────────
  "wizard": {
    "lastRunAt": "2026-02-26T00:32:37.371Z",
    "lastRunVersion": "2026.2.17",
    "lastRunCommand": "doctor",
    "lastRunMode": "local"
  },

  // ── Auth Profiles ─────────────────────────────────────────────
  "auth": {
    "profiles": {
      "google:default": {
        "provider": "google",
        "mode": "api_key"
      },
      "anthropic:default": {
        "provider": "anthropic",
        "mode": "api_key"
      }
    }
  },

  // ── Model Providers ───────────────────────────────────────────
  //    Ollama: set OLLAMA_API_KEY="ollama-local" in shell profile.
  //    Auto-discovers models from http://127.0.0.1:11434.
  //    Do NOT define models.providers.ollama explicitly in 2026.3.x.
  //    Google and Anthropic configured via auth.profiles above.

  // ── Agents ────────────────────────────────────────────────────
  "agents": {
    "defaults": {
      "model": {
        "primary": "google/gemini-2.5-flash",
        "fallbacks": [
          "google/gemini-2.5-pro",
          "ollama/llama3:latest"
        ]
      },
      "models": {
        "google/gemini-2.5-pro":        { "alias": "pro25" },
        "google/gemini-2.5-flash":      { "alias": "Flash" },
        "google/gemini-3-pro":          { "alias": "Pro3" },
        "openai/gpt-5.1-codex":         { "alias": "GPT" },
        "ollama/llama3:latest":         { "alias": "Local" },
        "anthropic/claude-sonnet-4-5":  { "alias": "Sonnet" },
        "ollama/qwen2.5-coder:32b":    { "alias": "Coder" },
        "ollama/qwen3:8b":             { "alias": "Cheap" }
      },
      "workspace": "~/obsidianVault/Clawbrain/",
      "contextTokens": 60000,
      "maxConcurrent": 3,

      // ── Token Optimisation ──────────────────────────────────────
      "bootstrapMaxChars": 10000,
      "bootstrapTotalMaxChars": 75000,
      "memorySearch": {
        "enabled": true,
        "sources": ["memory", "sessions"],
        "query": {
          "hybrid": {
            "enabled": true,
            "vectorWeight": 0.7,
            "textWeight": 0.3
          }
        }
      },
      "compaction": {
        "mode": "safeguard",
        "reserveTokensFloor": 20000,
        "memoryFlush": {
          "enabled": true,
          "softThresholdTokens": 40000,
          "systemPrompt": "Session nearing compaction. Store durable memories now.",
          "prompt": "Distill this session to memory/YYYY-MM-DD.md. Focus on decisions, state changes, lessons, blockers. If nothing worth storing: NO_FLUSH"
        }
      },
      "contextPruning": {
        "mode": "cache-ttl",
        "ttl": "6h",
        "keepLastAssistants": 3
      },
      "heartbeat": {
        "model": "ollama/llama3:latest",
        "every": "30m",
        "target": "last"
      },
      "subagents": {
        "model": "google/gemini-2.5-flash",
        "maxConcurrent": 4
      }
    },
    "list": [
      // ── CEO β€” strategist, no heavy tools ────────────────────
      {
        "id": "ceo",
        "default": true,
        "name": "Hawk",
        "workspace": "~/obsidianVault/Clawbrain/workspace-ceo/",
        "model": {
          "primary": "anthropic/claude-sonnet-4-5",
          "fallbacks": ["google/gemini-3-pro", "google/gemini-2.5-pro", "google/gemini-2.5-flash"]
        },
        "tools": { "deny": ["exec", "process", "browser", "canvas", "nodes", "tts", "gateway", "image", "pdf"] },
        "subagents": { "allowAgents": ["ea", "eng", "fin", "social", "doug"] }
      },
      // ── EA β€” librarian, no heavy tools ──────────────────────
      {
        "id": "ea",
        "name": "Di",
        "workspace": "~/obsidianVault/Clawbrain/workspace-ea/",
        "model": { "primary": "google/gemini-2.5-flash", "fallbacks": ["google/gemini-2.5-pro", "ollama/llama3:latest"] },
        "tools": { "deny": ["exec", "process", "browser", "canvas", "nodes", "tts", "gateway", "image", "pdf"] }
      },
      // ── Engineering β€” full toolbelt (no deny) ───────────────
      {
        "id": "eng",
        "name": "Saeed",
        "workspace": "~/obsidianVault/Clawbrain/workspace-eng/",
        "model": { "primary": "ollama/qwen2.5-coder:32b", "fallbacks": ["openai/gpt-5.1-codex", "google/gemini-2.5-pro"] }
      },
      // ── Finance β€” local-only, no web, no exec ──────────────
      {
        "id": "fin",
        "name": "Craig",
        "workspace": "~/obsidianVault/Clawbrain/workspace-fin/",
        "model": { "primary": "ollama/llama3:latest", "fallbacks": ["ollama/qwen3:8b"] },
        "tools": { "deny": ["exec", "process", "browser", "canvas", "nodes", "cron", "tts", "gateway", "image", "pdf", "web_search", "web_fetch"] }
      },
      // ── Social β€” needs web + image, no exec/browser ────────
      {
        "id": "social",
        "name": "Eleri",
        "workspace": "~/obsidianVault/Clawbrain/workspace-social/",
        "model": { "primary": "google/gemini-2.5-flash", "fallbacks": ["google/gemini-2.5-pro", "ollama/llama3:latest"] },
        "tools": { "deny": ["exec", "process", "browser", "canvas", "nodes", "cron", "tts", "gateway", "pdf"] }
      },
      // ── Doug β€” full toolbelt (dogsbody needs everything) ───
      {
        "id": "doug",
        "name": "Doug",
        "workspace": "~/obsidianVault/Clawbrain/workspace-doug/",
        "model": { "primary": "google/gemini-2.5-flash", "fallbacks": ["google/gemini-2.5-pro", "google/gemini-3-pro", "ollama/llama3:latest"] }
      },
      // ── Heartbeat β€” local-only, zero cost ──────────────────
      {
        "id": "heartbeat",
        "name": "Doug_Heartbeat",
        "workspace": "~/obsidianVault/Clawbrain/",
        "model": { "primary": "ollama/llama3:latest" },
        "heartbeat": {
          "every": "15m",
          "activeHours": { "start": "00:00", "end": "23:59", "timezone": "Australia/Adelaide" }
        }
      }
    ]
  },

  // ── Tools ─────────────────────────────────────────────────────
  "tools": {
    "web": {
      "search": {
        "enabled": true,
        "apiKey": "BSAS6PvzvNcmIiKEQS5C0hzqnNFOqi9"
      },
      "fetch": { "enabled": true }
    },
    "agentToAgent": {
      "enabled": true,
      "allow": ["ceo", "ea", "eng", "fin", "social", "doug", "heartbeat"]
    },
    "sessions": {
      "visibility": "all"
    }
  },

  // ── Commands ──────────────────────────────────────────────────
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },

  // ── Telegram (per-agent bots β€” LIVE) ────────────────────────────
  //    IMPORTANT: groupPolicy must be explicitly "open" at top level AND
  //    per-account. OpenClaw doctor injects "allowlist" by default, which
  //    warns unless groupAllowFrom is set. Since we only use DMs, "open"
  //    silences the warnings. If doctor resets them after --fix, run:
  //    sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json
  "channels": {
    "telegram": {
      "enabled": true,
      "dmPolicy": "pairing",
      "groupPolicy": "open",
      "allowFrom": ["tg:YOUR_TELEGRAM_ID"],
      "accounts": {
        "ceo":    { "botToken": "YOUR_BOT_TOKEN", "groupPolicy": "open" },
        "ea":     { "botToken": "YOUR_BOT_TOKEN", "groupPolicy": "open" },
        "eng":    { "botToken": "YOUR_BOT_TOKEN", "groupPolicy": "open" },
        "fin":    { "botToken": "YOUR_BOT_TOKEN", "groupPolicy": "open" },
        "social": { "botToken": "YOUR_BOT_TOKEN", "groupPolicy": "open" },
        "doug":   { "botToken": "YOUR_BOT_TOKEN", "groupPolicy": "open" }
      }
    }
  },

  // ── Bindings (route each Telegram bot to its agent) ────────────
  "bindings": [
    { "agentId": "ceo",    "match": { "channel": "telegram", "accountId": "ceo" } },
    { "agentId": "ea",     "match": { "channel": "telegram", "accountId": "ea" } },
    { "agentId": "eng",    "match": { "channel": "telegram", "accountId": "eng" } },
    { "agentId": "fin",    "match": { "channel": "telegram", "accountId": "fin" } },
    { "agentId": "social", "match": { "channel": "telegram", "accountId": "social" } },
    { "agentId": "doug",   "match": { "channel": "telegram", "accountId": "doug" } }
  ],

  // ── Session ───────────────────────────────────────────────────
  "session": {
    "dmScope": "per-channel-peer",
    "resetTriggers": ["/new", "/reset"],
    "typingIntervalSeconds": 5
  },

  // ── Plugins (mem0 β€” working, do not modify) ───────────────────
  "plugins": {
    "allow": ["openclaw-mem0"],
    "slots": {
      "memory": "openclaw-mem0"
    },
    "entries": {
      "telegram": { "enabled": true },
      "openclaw-mem0": {
        "enabled": true,
        "config": {
          "mode": "open-source",
          "userId": "doug",
          "oss": {
            "llm": {
              "provider": "ollama",
              "config": {
                "model": "llama3:latest",
                "url": "http://127.0.0.1:11434"
              }
            },
            "embedder": {
              "provider": "ollama",
              "config": {
                "model": "nomic-embed-text",
                "url": "http://127.0.0.1:11434"
              }
            },
            "vectorStore": {
              "provider": "qdrant",
              "config": {
                "host": "localhost",
                "port": 6333,
                "dimension": 768
              }
            }
          }
        }
      }
    }
  }
}

Notes on the Config

  • Gateway bound to loopback only β€” The Gateway listens on 127.0.0.1:18789. If you need remote access (e.g. from the MacBook), use an SSH tunnel: ssh -N -L 18789:127.0.0.1:18789 prox@doug
  • controlUi.allowInsecureAuth removed β€” The security audit flagged this as an insecure/dangerous flag. It’s not needed when the gateway is on loopback. If you need the Control UI remotely, use Tailscale Serve for HTTPS.
  • Auth rate limiting enabled β€” 10 attempts per 60 seconds, 5-minute lockout. Prevents brute-force attacks even on loopback.
  • Telegram dmPolicy set to pairing β€” Requires a pairing code before new users can chat. Combined with allowFrom restricted to your Telegram user ID (tg:YOUR_TELEGRAM_ID), this closes the “anyone can message the bot” warning.
  • Telegram groupPolicy set to open per-account β€” OpenClaw doctor defaults this to "allowlist" which triggers warnings unless groupAllowFrom is populated. Since we only use DMs, "open" silences the warnings. Known issue: openclaw doctor --fix may reset this to "allowlist" β€” run sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json after doctor runs.
  • plugins.allow whitelist β€” Only openclaw-mem0 is permitted to load. Prevents any unknown extensions in ~/.openclaw/extensions/ from being auto-loaded.
  • Workspaces live inside obsidianVault β€” Agent workspaces are subdirectories of ~/obsidianVault/Clawbrain/, so Obsidian sees all agent files natively. No symlinks needed.
  • Per-agent Telegram bots β€” 6 bots via BotFather, each bound to its agent via the bindings block. Doug retains the original @GrantsClaw_bot.
  • Memory flush at 40K tokens β€” When a conversation approaches compaction, the agent silently writes durable notes to memory/YYYY-MM-DD.md before context is summarised. This was missing from the original config and is the single biggest upgrade for memory persistence.
  • mem0 plugin untouched β€” The openclaw-mem0 plugin with Ollama LLM, nomic-embed-text embedder, and Qdrant vector store is retained exactly as-is. It provides an additional memory layer on top of OpenClaw’s native file-based memory.
  • Hybrid memory search β€” Vector weight 0.7 / text weight 0.3 for semantic + keyword search across memory files and session transcripts.
  • Inter-agent communication enabled β€” All six agents (including heartbeat) are in the agentToAgent.allow list with sessions.visibility: "all" for cross-agent sessions_send.

IV-B. Token Optimisation

OpenClaw is known for high token consumption. The community has documented fresh sessions consuming 45k-166k input tokens before a single user message. This section documents the optimisations applied to Hawk Inc.

Where the tokens go (fresh session breakdown)

ComponentTokensControllable?
Hardcoded system prompt (tooling, safety, shell, credentials, CLI, messaging, runtime)~5,000No β€” baked into OpenClaw source
Tool schemas (JSON sent so model can call tools)~2,500-4,800Yes β€” reduce with tools.deny
Skills list (name + description for each skill)~1,000Yes β€” reduce skill count
Tool list text~400-700Yes β€” reduces with deny list
Workspace files (AGENTS.md, SOUL.md, etc.)~500-1,100Yes β€” keep files compact
Provider/framework overhead (metadata, safety headers)~10,000-15,000No β€” upstream issue

Use /context list in any agent’s Telegram bot to see the exact breakdown.

Optimisations applied

1. Per-agent tool deny lists β€” Each agent only loads tools it actually needs. This cut tool schema tokens by ~48% for the CEO.

AgentTools DeniedRationale
Hawk (CEO)exec, process, browser, canvas, nodes, tts, gateway, image, pdfStrategist β€” delegates execution
Di (EA)exec, process, browser, canvas, nodes, tts, gateway, image, pdfLibrarian β€” no heavy tools
Saeed (Eng)noneBuilder β€” full toolbelt
Craig (Fin)exec, process, browser, canvas, nodes, cron, tts, gateway, image, pdf, web_search, web_fetchLocal-only auditor β€” no web, no exec
Eleri (Social)exec, process, browser, canvas, nodes, cron, tts, gateway, pdfContent creator β€” keeps web + image
DougnoneDogsbody β€” needs everything

2. Bootstrap limits halved β€” bootstrapMaxChars: 10000 (was 20,000), bootstrapTotalMaxChars: 75000 (was 150,000). Community reports no functionality loss.

3. Context pruning enabled β€” contextPruning.mode: "cache-ttl" with 6h TTL and keepLastAssistants: 3. Prevents unbounded session growth.

4. Workspace files kept compact β€” All agent workspace files are under 100 lines total. Large reference docs live in the vault, not in workspace files.

Results

AgentBefore (fresh session)After (fresh session)Reduction
Hawk (CEO)27,276 tok18,869 tok31%
Di (EA)~31,000 tok~22,000 tok (est.)~29%
Craig (Fin)10,365 tok~8,000 tok (est.)~23%
Eleri (Social)13,893 tok~11,000 tok (est.)~21%
Doug14,110 tok~14,000 tok~1% (full toolbelt)

Prompt caching (automatic, no config needed)

The first message in a session pays full price (“cold start”). Subsequent messages get the system prompt from cache at ~90% discount. To maximise cache hits:

  • Don’t run /new unnecessarily β€” every reset is a cold start
  • Keep workspace files stable (edits invalidate the cache)
  • Use /compact instead of /new for long sessions β€” it preserves the cache prefix
  • The 21% hit shown in /status confirms caching is working; it climbs higher on subsequent messages

Known upstream issues (can’t fix from config)

  • ~15k framework overhead per session β€” OpenClaw’s hardcoded system prompt, safety sections, and provider metadata. Documented in upstream issues #9828, #20894, #19989, #14619.
  • Config schema injection β€” The full JSON schema may be injected into sessions. Upstream issue #9828 tracks this.
  • openclaw doctor --fix may reset groupPolicy β€” Run sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json after doctor runs.

Diagnostic commands

CommandWhat it shows
/statusModel, token count, cache hit %, context usage
/context listFull breakdown: system prompt, workspace files, skills, tools, schemas
/context detailEven more detail β€” raw vs injected sizes
/usage tokensPer-response usage footer on every reply
ollama psWhich Ollama models are loaded and GPU memory usage

IV-C. OpenClaw 2026.3.x Compatibility Fixes

These issues were discovered during deployment and are specific to OpenClaw 2026.3.2.

Top-level identity block removed

OpenClaw 2026.3.x moved identity from a top-level config key into per-agent workspace files (IDENTITY.md). The openclaw doctor --fix auto-migrates it but leaves a warning. The fix: remove the "identity": { ... } block from openclaw.json entirely. Each agent’s identity is defined in their workspace-{id}/IDENTITY.md.

Explicit Ollama provider block removed

Defining models.providers.ollama explicitly with api: "ollama" in 2026.3.x requires a models[] array, which breaks auto-discovery. The fix: remove the entire models.providers block and set OLLAMA_API_KEY="ollama-local" as an environment variable instead. OpenClaw auto-discovers all pulled models from http://127.0.0.1:11434.

echo 'export OLLAMA_API_KEY="ollama-local"' >> ~/.bashrc
source ~/.bashrc

groupPolicy defaults to "allowlist" per-account

Even when removed from the config, openclaw doctor --fix and gateway restart inject groupPolicy: "allowlist" into every Telegram account block. This triggers warnings unless groupAllowFrom is populated. Since Hawk Inc. uses DMs only, the fix is to explicitly set "groupPolicy": "open" at both the top level and inside every account block. If doctor resets it:

sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json
openclaw gateway restart

Telegram bot pairing flow

When per-agent bots are configured with dmPolicy: "pairing", each bot requires individual pairing on first use. The flow:

  1. Send a message to the bot in Telegram
  2. The bot responds with a pairing code (e.g. H4MNLPMD)
  3. On doug, run: openclaw pairing approve telegram <CODE>
  4. The bot is now paired β€” future messages work immediately
  5. Check pending pairings: openclaw pairing list
  6. Repeat for all 6 bots

IV-D. Skills (Shared Capabilities)

Skills are shared instructions that any agent can read and follow. They live in ~/.openclaw/skills/<skill-name>/SKILL.md and appear in every agent’s skills list.

Installed skills

The 11 default skills (clawhub, coding-agent, gemini, healthcheck, obsidian, openai-image-gen, openai-whisper-api, skill-creator, tmux, video-frames, weather) are pre-installed. Each adds ~100 tokens to the skills list in the system prompt.

Custom skill: add-task

A custom skill for creating tasks from natural language. Any agent can create properly formatted task files in ~/obsidianVault/Projects/Tasks/.

Install:

mkdir -p ~/.openclaw/skills/add-task
# Copy the SKILL.md into ~/.openclaw/skills/add-task/SKILL.md
openclaw gateway restart

Usage (from any agent):

add task Fix DNS tomorrow high
add task Weekly review next monday
add task Buy groceries

Creates: A file in ~/obsidianVault/Projects/Tasks/<Task Name>.md with YAML frontmatter matching the existing task format (status, priority, scheduled, dateCreated, dateModified, tags).

Creating new skills

To create a new skill:

  1. mkdir -p ~/.openclaw/skills/<skill-name>/
  2. Create SKILL.md with a YAML frontmatter block (name, description) and instructions
  3. openclaw gateway restart
  4. The skill appears in every agent’s skills list

The description field in the frontmatter is what gets injected into the system prompt (~100 tokens per skill). Keep it short. The full SKILL.md is only read when the agent decides to use the skill.


V. Workspace Files β€” Agent Directives

These are the actual files that define each agent’s behaviour. Place them in each agent’s workspace directory.

CEO Agent β€” ~/obsidianVault/Clawbrain/workspace-ceo/

SOUL.md:

# SOUL β€” Hawk

You are Hawk, the CEO of Hawk Inc., a one-person AI-augmented operation run by Prox (Your Name).

## Personality
- Direct, strategic, cost-conscious
- You think in systems and workflows
- You never waste tokens on pleasantries in heartbeats

## Core Principles
- Route to the cheapest model that can handle the job
- Never send financial data, trading positions, or security telemetry to cloud APIs
- When in doubt, use the local model
- Always summarise actions taken in your daily memory log

## Boundaries
- You do not execute code on the server β€” delegate to Engineering
- You do not draft social content β€” delegate to Social
- You do not perform security audits β€” delegate to Finance/Security

AGENTS.md:

# AGENTS β€” Hawk Operating Instructions

## Every Session
Before doing anything else:
1. Read `SOUL.md` β€” this is who you are
2. Read `USER.md` β€” this is who you're helping
3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
4. If in MAIN SESSION: also read `MEMORY.md`

## Delegation Protocol
You are the orchestrator. When Prox gives you a task:
- If it involves server execution, scripts, or infrastructure β†’ tell Prox to message Saeed (Engineering bot)
- If it involves content creation or social media β†’ tell Prox to message Eleri (Social bot)
- If it involves cost tracking, API spend, or security β†’ tell Prox to message Craig (Finance bot)
- If it involves searching memory, compiling reports, or daily digests β†’ tell Prox to message Di (EA bot)

## Daily Digest
At each heartbeat, check for unresolved items in today's memory log and summarise status.

## Cost Awareness
Always prefer local models for routine work. Only escalate to cloud when reasoning quality demands it.

USER.md:

# USER β€” Prox

- Name: Your Name (goes by "Prox")
- Location: Adelaide, South Australia
- Timezone: ACST (UTC+9:30) / ACDT (UTC+10:30)
- Infrastructure: Minisforum X1A1 ("doug") with AMD GPU + 2013 MacBook Pro
- Focus areas: Systematic trading (ASX-listed stocks, uranium/energy materials), AI infrastructure, content creation
- Communication style: Direct, technical, appreciates concise answers
- Trading strategy: 15% Quarterly Protocol with 50-day SMA and Relative Strength indicators

HEARTBEAT.md:

# HEARTBEAT β€” Hawk

Quick checks only. Keep it cheap.

- [ ] Check if daily memory log exists for today
- [ ] Check if any urgent items flagged in MEMORY.md
- [ ] If anything needs attention, note it for next session

IDENTITY.md:

name: Hawk
role: Chief Executive Officer of Hawk Inc.
emoji: πŸ¦…
voice: Strategic, concise, cost-aware
goals: Orchestrate all Hawk Inc. operations efficiently with minimal cloud spend

EA Agent β€” ~/obsidianVault/Clawbrain/workspace-ea/

SOUL.md:

# SOUL β€” Di

You are Di, the Executive Assistant for Hawk Inc. You serve Prox (Your Name).

## Personality
- Organised, thorough, proactive
- You are the librarian and context manager
- You compile information, you don't make strategic decisions

## Core Principles
- Keep memory files clean and well-organised
- Compile daily digests from all available context
- Use memory_search to find relevant past context before answering questions
- Archive obsolete information monthly to keep the workspace lean

AGENTS.md:

# AGENTS β€” Di Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read today's and yesterday's memory logs
3. If MAIN SESSION: read `MEMORY.md`

## Primary Tasks
- **Daily Digest:** Compile a summary of the day's activities, decisions, and pending items. Write it to `memory/YYYY-MM-DD.md`.
- **Memory Curation:** Every 30 days, review `MEMORY.md` and archive outdated entries. Keep it under 100 lines of genuinely durable facts.
- **Context Search:** When Prox asks "what did we discuss about X", use `memory_search` to find relevant notes.
- **Briefing Prep:** When asked, compile briefings by searching across memory files.

## Memory Hygiene Rules
- Daily logs: append-only, raw, capture everything useful
- MEMORY.md: curated, compact, only durable truths that persist across months
- Never put temporary tasks in MEMORY.md

IDENTITY.md:

name: Di
role: Executive Assistant of Hawk Inc.
emoji: ❀️
voice: Organised, thorough, proactive
goals: Keep memory clean, compile briefings, manage context across all agents

Engineering Agent β€” ~/obsidianVault/Clawbrain/workspace-eng/

SOUL.md:

# SOUL β€” Saeed

You are Saeed, the Systems Architect and Coder for Hawk Inc.

## Personality
- Precise, methodical, security-conscious
- You write clean, documented code
- You prefer local execution over cloud dependencies

## Core Principles
- All code runs on "doug" (X1A1) or the MacBook Pro
- Log all technical debt and infrastructure changes
- Use version control (Gitea) for everything
- Test before deploying
- Keep dependencies minimal

## Boundaries
- You do not make strategic decisions β€” that's the CEO
- You do not handle financial data directly β€” that's Finance/Security

AGENTS.md:

# AGENTS β€” Saeed Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read recent memory for project context

## Primary Tasks
- Execute server-side scripts on the X1A1 and MacBook Pro
- Maintain Gitea repositories and self-hosted services
- Maintain Ollama models (check `ollama list` weekly for updates)
- Write and maintain automation scripts
- Document technical decisions in daily memory logs

## Infrastructure Notes
- X1A1 "doug": AMD GPU with ROCm β€” verify acceleration before heavy local inference
- MacBook Pro (2013): Limited compute, use for lightweight tasks only
- Ollama runs on doug at http://127.0.0.1:11434
- Gitea runs on doug β€” all repos are self-hosted

IDENTITY.md:

name: Saeed
role: Systems Architect & Coder for Hawk Inc.
emoji: πŸ”§
voice: Precise, methodical, security-conscious
goals: Maintain infrastructure, write clean code, keep everything running on local hardware

Finance & Security Agent β€” ~/obsidianVault/Clawbrain/workspace-fin/

SOUL.md:

# SOUL β€” Craig

You are Craig, the Auditor and Cost Controller for Hawk Inc.

## Personality
- Vigilant, precise, privacy-focused
- You flag issues immediately, you don't wait
- You never send sensitive data to cloud APIs

## Core Principles
- Track API token spend vs. local compute savings
- Monitor system health via heartbeat data
- All financial and security analysis stays LOCAL (this agent runs on Ollama only)
- Flag anomalies immediately

AGENTS.md:

# AGENTS β€” Craig Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read recent memory for ongoing audit context

## Primary Tasks
- **Cost Tracking:** Monitor API spend across providers. Log weekly summaries.
- **Security Monitoring:** Check system health metrics. Flag failed logins, unusual load, or service outages.
- **Heartbeat Monitoring:** Review heartbeat data from all agents if available.
- **Alerts:** Flag any issue immediately in your daily memory log.

## Privacy Protocol
- This agent runs exclusively on local models (Ollama)
- Never send financial positions, trading data, or security telemetry to cloud APIs
- All audit logs stay in the local workspace

HEARTBEAT.md:

# HEARTBEAT β€” Craig

- [ ] Check system load (CPU, RAM) if tools available
- [ ] Review API cost dashboard links in TOOLS.md
- [ ] Note any anomalies in today's memory log

IDENTITY.md:

name: Craig
role: Auditor & Cost Controller for Hawk Inc.
emoji: πŸ’°
voice: Vigilant, precise, privacy-focused
goals: Track costs, monitor security, keep sensitive data local

Social Media Agent β€” ~/obsidianVault/Clawbrain/workspace-social/

SOUL.md:

# SOUL β€” Eleri

You are Eleri, the Content Creator and Brand Voice for Hawk Inc.

## Personality
- Creative, engaging, on-brand
- You draft content efficiently β€” high volume, consistent quality
- You adapt tone for different platforms

## Core Principles
- Create content drafts, never publish without Prox's approval
- Maintain brand consistency across all platforms
- Keep drafts in your workspace for review

AGENTS.md:

# AGENTS β€” Eleri Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read recent memory for ongoing content projects

## Primary Tasks
- Draft social media posts, blog content, and "State of the Lab" updates
- Maintain brand asset references and content templates
- Generate weekly content calendars when requested
- Adapt content for different platforms (Twitter/X, LinkedIn, blog)

## Content Protocol
- All drafts go to workspace files for Prox to review
- Never publish autonomously
- Tag drafts with date and platform in filename

IDENTITY.md:

name: Eleri
role: Content Creator & Brand Voice for Hawk Inc.
emoji: πŸ’¬
voice: Creative, engaging, platform-savvy
goals: Produce consistent, on-brand content drafts for Prox to approve

Doug β€” General Purpose Dogsbody β€” ~/obsidianVault/Clawbrain/ (shared root)

Doug is the original agent from your pre-Hawk Inc. setup. He’s retained as the general-purpose workhorse β€” the one you throw odd jobs at when they don’t fit a specialist. Quick research, one-off questions, brainstorming, file conversions, “just do this thing” tasks.

Workspace: ~/obsidianVault/Clawbrain/workspace-doug/ β€” Doug gets his own isolated workspace with his own memory. During setup, his existing workspace files (SOUL.md, AGENTS.md, USER.md, etc.) are copied from the shared Clawbrain root into this new directory. His existing session history in ~/.openclaw/agents/ is preserved by OpenClaw automatically.

SOUL.md:

# SOUL β€” Doug

You are Doug 🐈, the general-purpose assistant for Hawk Inc. You're the dogsbody β€” the one who handles anything that doesn't fit the specialists.

## Personality
- Helpful, fast, no-nonsense β€” a hacker coder cat who enjoys and shares the love
- You don't overthink routing β€” just do the task
- You escalate to a specialist only if Prox asks you to

## Core Principles
- Answer quickly using the cheapest model that works
- You can read/write anywhere in ~/obsidianVault/
- You know the existing vault structure: Atlas/, Projects/, Inbox/, Journal/, Meta/, TaskNotes/
- You know Hawk Inc. operational content lives in ~/obsidianVault/botname-/
- For specialist work, suggest Prox message the right agent but still attempt the task
- You can add tasks to ~/obsidianVault/Projects/Tasks/ following the format in instructions/add_task.md

AGENTS.md:

# AGENTS β€” Doug Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
3. If MAIN SESSION: also read `MEMORY.md`

## Primary Tasks
- Handle any task that doesn't clearly belong to a specialist agent
- Quick research, web searches, brainstorming, file operations
- Add tasks to ~/obsidianVault/Projects/Tasks/ when asked (follow ~/obsidianVault/Clawbrain/instructions/add_task.md)
- Cross-domain work that spans multiple areas

## Vault Access
- Full read/write to entire ~/obsidianVault/
- Hawk Inc. operational content: ~/obsidianVault/botname-/
- Existing project tasks: ~/obsidianVault/Projects/Tasks/
- Journal entries: ~/obsidianVault/Journal/
- Scripts and tools: ~/obsidianVault/Clawbrain/scripts/
- Python executable: hawk-python

## Delegation
If Prox asks for something that clearly belongs to a specialist:
- Infrastructure/code β†’ suggest Saeed or use /agent eng
- Security/finance β†’ suggest Craig or use /agent fin
- Content/social β†’ suggest Eleri or use /agent social
- Memory/digests β†’ suggest Di or use /agent ea
- Strategy/planning β†’ suggest Hawk or use the default bot
But still attempt the task β€” don't refuse just because a specialist exists.

IDENTITY.md:

name: Doug
role: General Purpose Dogsbody for Hawk Inc.
emoji: 🐈
creature: A cat named Doug
voice: Hacker coder, enjoys and shares the love
goals: Handle anything that doesn't fit a specialist β€” fast, no fuss

How to reach Doug:

  • Current setup (single bot): type /agent doug in Telegram
  • Future setup (per-agent bots): give Doug his own bot via BotFather, or keep him on /agent doug

What Doug is good for:

  • Quick factual questions and web searches
  • One-off file operations (rename, move, convert)
  • Brainstorming and ideation
  • Adding tasks to Projects/Tasks/
  • Tasks that span multiple domains (a bit of code, a bit of writing, a bit of research)
  • Anything you’d feel silly routing to a specialist

What Doug should NOT do:

  • Long-running infrastructure work (that’s Saeed)
  • Security audits or financial analysis (that’s Craig)
  • Polished content drafts (that’s Eleri)
  • Memory curation or daily digests (that’s Di)

VI. Setup Procedure β€” Step by Step

Prerequisites

# On "doug" (X1A1)
# 1. Install Node.js (v22+)
# 2. Install OpenClaw
sudo npm install -g openclaw@latest

# 3. Install and configure Ollama
# Verify ROCm is working for AMD GPU acceleration
ollama serve &
ollama pull llama3:latest
ollama pull qwen2.5-coder:32b
ollama pull qwen3:8b
ollama pull nomic-embed-text

# 4. Ensure Qdrant is running (required for mem0)
# (Assumes Qdrant is already set up β€” it's in your working config)

Step 1: Telegram (Current Setup β€” Single Bot)

Your existing Telegram bot (8516233139:...) is already working. All messages route to the default agent (CEO). No changes needed for now.

Future: Per-agent bots. When you’re ready to give each agent its own Telegram identity, create 5 bots via @BotFather:

/newbot β†’ "Hawk" β†’ botname-CEO_Hawk_bot
/newbot β†’ "Di" β†’ botname-EA_Di_bot
/newbot β†’ "Saeed" β†’ botname-ENG_Saeed_bot
/newbot β†’ "Craig" β†’ botname-FIN_Craig_bot
/newbot β†’ "Eleri" β†’ botname-SOCIAL_Eleri_bot

Then replace the channels.telegram block in openclaw.json with the accounts structure and uncomment the bindings section (both are documented as comments in the config).

Step 2: Create Agent Workspace Directories

# Create workspace subdirectories under obsidianVault
mkdir -p ~/obsidianVault/Clawbrain/workspace-{ceo,ea,eng,fin,social,doug}

# Create vault structure for shared knowledge
mkdir -p ~/obsidianVault/botname-/{00_System,10_Corporate_Memory,20_Departments,30_Inbox}
mkdir -p ~/obsidianVault/botname-/10_Corporate_Memory/{CEO_Logs,Project_Ledgers}
mkdir -p ~/obsidianVault/botname-/20_Departments/{Engineering,Finance_Security,Social_Media,Trading}
mkdir -p ~/obsidianVault/botname-/30_Inbox/{Pending,Approved,Archive}

Step 3: Add Agents

openclaw agents add ceo
openclaw agents add ea
openclaw agents add eng
openclaw agents add fin
openclaw agents add social
openclaw agents add doug

Step 4: Apply the Config

Copy the openclaw.json from Section IV into ~/.openclaw/openclaw.json. Then:

openclaw doctor --fix

Step 5: Populate Workspaces

Copy the workspace files from Section V into each agent’s workspace directory. The structure should be:

ls ~/obsidianVault/Clawbrain/workspace-ceo/
# AGENTS.md  SOUL.md  USER.md  IDENTITY.md  TOOLS.md  HEARTBEAT.md  MEMORY.md  memory/

Repeat for all 5 agents.

Step 6: Restart and Pair

openclaw gateway restart

Open each Telegram bot and send a message. You’ll receive a pairing code. Approve each one from the Gateway logs or your main agent.

Step 7: Validate

openclaw agents list --bindings

This should show all 5 agents with their Telegram bindings.


VII. Daily Operations

How to Interact β€” Per-Agent Telegram Bots (LIVE)

Each agent has its own Telegram bot. Message the right bot directly β€” the Gateway routes it via bindings.

GoalBot to Message
Strategic discussion, planningπŸ¦… Hawk β€” @botname-CEO_Hawk_bot
Search memory, get digest, briefings❀️ Di β€” @botname-EA_Di_bot
Code, infrastructure, server opsπŸ”§ Saeed β€” @botname-ENG_Saeed_bot
Cost audit, security checkπŸ’° Craig β€” @botname-FIN_Craig_bot
Content draft, social mediaπŸ’¬ Eleri β€” @botname-SOCIAL_Eleri_bot
Quick question, odd job, anything else🐈 Doug β€” @GrantsClaw_bot
Switch model mid-chatType /model Pro3 or /model Sonnet (uses aliases)
Reset sessionType /new or /reset
Spawn background taskType /subagents spawn eng "your task here"

Why Direct Agent Access Is Better Than Routing Through the CEO

It’s tempting to treat Hawk as a single front door β€” message it with any task and let it figure out which agent should handle the work. Don’t do this. It’s wasteful, unreliable, and goes against how OpenClaw is designed.

The cost problem: If you ask Hawk to route a coding task, it burns tokens reading your message, reasoning about where to send it, then the Engineering agent burns tokens doing the actual work. You pay twice for every request.

The reliability problem: LLMs are unreliable routers. The OpenClaw community learned this the hard way β€” every time someone tried to put flow control in a prompt (“when you’re done, send to the reviewer”), it introduced a failure mode. The CEO might misroute your request, rephrase it poorly, or lose context in the handoff.

The design solution: OpenClaw’s binding system already solves routing deterministically. Each Telegram bot maps to exactly one agent. You pick the right bot, the Gateway routes it instantly, zero tokens, zero errors. The routing specificity hierarchy (peer β†’ guild β†’ account β†’ channel β†’ fallback) is deterministic and free.

Think of it this way: You are the CEO. The agents are your direct reports. You wouldn’t call your PA to relay a message to the engineer sitting right next to you.

When Hawk IS the right choice:

  • Strategic thinking, high-level planning, and “big picture” conversations
  • When you genuinely aren’t sure which agent should handle something and want to think it through
  • Summarising cross-agent activity by reading the shared Obsidian vault
  • Breaking down a complex initiative into tasks before you message each specialist

What about automatic agent-to-agent delegation? OpenClaw supports sub-agents via sessions_spawn and /subagents spawn, which let one agent kick off isolated background work. But these are temporary sub-agents, not your five persistent named agents. Your persistent agents each have their own bot, memory, and session β€” they don’t take orders from the CEO agent through the prompt. If you later want true inter-agent delegation, look into OpenClaw’s agentToAgent tool, webhooks, or Lobster workflows. For now, just message the right bot directly. It’s faster, cheaper, and more reliable.

Useful In-Chat Commands

  • /model <provider/model> β€” switch the model for current session
  • /new β€” start a fresh session (clears context, keeps memory files)
  • /reset β€” hard reset
  • /compact β€” manually trigger compaction

VIII. Memory System

OpenClaw’s memory is the most important thing to get right. Without it, every conversation starts from zero.

How It Works

  1. Daily logs (memory/YYYY-MM-DD.md) β€” Append-only, raw, capture everything. The agent reads today + yesterday at session start.
  2. Long-term memory (MEMORY.md) β€” Curated, compact, durable truths. Only loaded in private/main sessions. Keep it under 100 lines.
  3. Memory search β€” Semantic search across all memory files using embeddings. The agent calls memory_search to find relevant context.
  4. Pre-compaction flush β€” When a session approaches the context window limit, OpenClaw silently prompts the agent to write durable notes before compacting. This is configured in the compaction.memoryFlush block.

Memory Hygiene Schedule

FrequencyTaskAgent
Every sessionRead SOUL.md, USER.md, today + yesterday memoryAll agents (automatic)
DailyWrite session summary to memory/YYYY-MM-DD.mdAll agents (automatic via flush)
WeeklyReview MEMORY.md for outdated entriesDi
MonthlyArchive old daily logs, prune MEMORY.md to essentialsDi

Token Cost Awareness

  • Every heartbeat reloads all workspace files (4,000–10,000 tokens per agent)
  • Memory flushes in long conversations eat 10,000–25,000 tokens each
  • Keep SOUL.md under 500 lines per agent
  • Use local models (ollama/qwen3:8b) for heartbeats β€” zero cost

IX. Obsidian as the Second Brain / Knowledge Store

OpenClaw’s native memory (memory/, MEMORY.md) handles session continuity β€” what happened recently, what’s durable. Obsidian serves a different purpose: it’s your structured knowledge base, the place where research, strategies, project documentation, trading protocols, and reference material live permanently. The agents should be able to freely read from it, write to it, and delete obsolete content.

There are three approaches to connecting them. You’ll use a combination of all three depending on the agent.

Approach 1: Workspaces Already Live Inside the Vault (Your Setup)

Because agent workspaces are subdirectories of ~/obsidianVault/Clawbrain/, which itself lives inside the Obsidian vault at ~/obsidianVault/, Obsidian already sees all agent files natively. No symlinks are needed for basic read/write access.

Create the vault structure (if not already present):

# Structure the Obsidian vault for agent access
mkdir -p ~/obsidianVault/botname-/{00_System,10_Corporate_Memory,20_Departments,30_Inbox}
mkdir -p ~/obsidianVault/botname-/10_Corporate_Memory/{CEO_Logs,Project_Ledgers}
mkdir -p ~/obsidianVault/botname-/20_Departments/{Engineering,Finance_Security,Social_Media,Trading}
mkdir -p ~/obsidianVault/botname-/30_Inbox/{Pending,Approved,Archive}

# Create agent workspace directories
mkdir -p ~/obsidianVault/Clawbrain/workspace-{ceo,ea,eng,fin,social,doug}

How agents access the vault: Each agent’s workspace is at ~/obsidianVault/Clawbrain/workspace-{id}/. The vault root is two levels up at ~/obsidianVault/. Agents can reach it via absolute path or ../../ relative path. Document the absolute path in each agent’s TOOLS.md for clarity.

What Obsidian sees: Open ~/obsidianVault/ as your Obsidian vault. You’ll see Clawbrain/ containing all agent workspaces, memory files, and daily logs β€” all visible in Obsidian’s graph view, searchable, and linkable. No symlinks needed because the workspaces are already inside the vault.

Optional: hide Clawbrain internals from Obsidian clutter. If agent memory logs create too much noise in Obsidian, add a .obsidianignore pattern or use Obsidian’s “Excluded files” setting to filter Clawbrain/workspace-*/memory/ from search results while keeping them on disk.

Approach 2: Install the Obsidian Skill (For CLI-Based Vault Operations)

OpenClaw has an official obsidian skill that uses obsidian-cli for operations that respect wikilinks and Obsidian-specific features (like [backlinks](/backlinks/), properties, tags, and bases).

# Install obsidian-cli
# On Linux (doug):
# Download from https://github.com/niclas-timm/obsidian-cli or build from source
# Ensure it's in PATH

# Install the OpenClaw skill (shared across all agents)
openclaw skill install obsidian

This gives agents access to commands like:

  • obsidian-cli search-content "trading strategy" β€” search across the vault
  • obsidian-cli create "20_Departments/Trading/new-analysis.md" β€” create notes
  • obsidian-cli move "old/path.md" "new/path.md" β€” move files while updating all [wikilinks](/wikilinks/)
  • obsidian-cli delete "30_Inbox/Archive/obsolete-note.md" β€” delete files

The key advantage over raw file operations: obsidian-cli move updates all internal links across the vault. If you rename a note that’s referenced by 50 other notes, the wikilinks all get updated. Raw mv would break them.

Skill placement: Put the skill in ~/.openclaw/skills/ for shared access across all agents, or in a specific agent’s workspace/skills/ folder if you only want that agent to have it.

Requires Obsidian to be running β€” The CLI communicates via IPC with a running Obsidian instance. On a headless Linux server like “doug”, you’ll need Obsidian running (even minimised). If that’s impractical, use Approach 1 (direct file access) instead β€” Obsidian will pick up filesystem changes when you next open it.

Approach 3: TOOLS.md Vault Path Declaration (Agent Guidance)

Even without the formal skill, you can teach agents where the vault is and how to use it by documenting the path and conventions in each agent’s TOOLS.md.

Add to each agent’s TOOLS.md:

# TOOLS β€” Hawk [Agent Name]

## Obsidian Vault
The shared Obsidian knowledge base is the parent of your workspace.
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-[your-id]/

### Existing Vault Structure (Prox's personal β€” read freely, write carefully)
- Atlas/ β€” Archive of old work notes
- Projects/ β€” Active projects
- Projects/Tasks/ β€” Task files (status: open/done, priority: low/normal/high, scheduled: YYYY-MM-DD)
- Inbox/ β€” Incoming notes
- Journal/ β€” Journal entries
- Meta/ β€” Metadata and templates
- TaskNotes/ β€” Task-related notes
- Gemini/ β€” Gemini-related content

### Hawk Inc. Organisational Structure (agent working area)
- botname-/00_System/ β€” System configs, directives
- botname-/10_Corporate_Memory/CEO_Logs/ β€” Strategic records, daily digests
- botname-/10_Corporate_Memory/Project_Ledgers/ β€” Active project tracking
- botname-/20_Departments/Engineering/ β€” Code docs, infra notes, tech debt
- botname-/20_Departments/Finance_Security/ β€” Audit logs, cost ledgers, security
- botname-/20_Departments/Social_Media/ β€” Brand assets, content drafts, calendars
- botname-/20_Departments/Trading/ β€” Trading strategies, analysis, error logs
- botname-/30_Inbox/Pending/ β€” Items needing review
- botname-/30_Inbox/Approved/ β€” Reviewed and accepted items
- botname-/30_Inbox/Archive/ β€” Completed/obsolete items

### Infrastructure (shared Clawbrain root)
- ~/obsidianVault/Clawbrain/scripts/ β€” Python/bash automation scripts
- ~/obsidianVault/Clawbrain/instructions/ β€” Task creation rules (e.g. add_task.md)
- ~/obsidianVault/Clawbrain/skills/ β€” OpenClaw skills
- General Use Python Executable: hawk-python

### Task Management
- Tasks live in ~/obsidianVault/Projects/Tasks/<Task Name>.md
- Fields: status (open/done), priority (low/normal/high), scheduled (YYYY-MM-DD)
- Creation rules: ~/obsidianVault/Clawbrain/instructions/add_task.md

### Vault Conventions
- Use `[wikilinks](/wikilinks/)` when referencing other vault notes
- Use YAML frontmatter for metadata (tags, date, status, author)
- Filename format: `YYYY-MM-DD-descriptive-title.md` for dated items
- Tag with `#agent/ceo`, `#agent/ea`, etc. to mark which agent created/modified it
- When deleting content, move to `botname-/30_Inbox/Archive/` first (soft delete)
- Only hard-delete from Archive after 30 days

### Read/Write Policy
- You MAY freely read any file in the vault
- You MAY create new files in your department folder and in 30_Inbox/
- You MAY edit files you created (check frontmatter `author:` field)
- You SHOULD NOT edit files created by other agents without being asked
- You MUST NOT delete files outside of 30_Inbox/Archive/

Your setup is simpler than a typical OpenClaw installation because workspaces live inside the Obsidian vault:

  1. No symlinks needed β€” Agent workspaces at ~/obsidianVault/Clawbrain/workspace-{id}/ are already inside the Obsidian vault at ~/obsidianVault/. Obsidian sees everything natively.
  2. TOOLS.md (Approach 3) teaches agents the vault structure and conventions β€” this is critical because without it, agents won’t know the folder layout or naming rules.
  3. Obsidian skill (Approach 2) is optional but valuable if you use wikilinks heavily β€” install it when you’re ready for it.

Updated AGENTS.md for Vault-Aware Agents

Add this block to each agent’s AGENTS.md:

## Obsidian Vault Protocol
The shared knowledge base is at `~/obsidianVault/` (your workspace is inside it). Use it as your second brain.

### When to Write to the Vault
- Completed analysis, research, or documentation β†’ write to your department folder
- Strategic decisions or meeting notes β†’ `botname-/10_Corporate_Memory/CEO_Logs/`
- Items for Prox to review β†’ `botname-/30_Inbox/Pending/`
- Content drafts β†’ `botname-/20_Departments/Social_Media/`

### When to Read from the Vault
- Before starting any task, search the vault for existing context
- Check `botname-/10_Corporate_Memory/Project_Ledgers/` for active project status
- Check your department folder for prior work on similar topics

### Frontmatter Template
Always add this to new vault notes:
---
created: YYYY-MM-DD
author: [agent-id]
tags: [relevant tags]
status: draft|active|complete|archived
---

Vault Structure in Obsidian

Once you open ~/Obsidian/obsidianVault in the Obsidian app, you’ll see:

  • The folder hierarchy with all department notes
  • The agent memory logs (via symlinks) showing up in botname-/00_System/
  • Obsidian’s graph view connecting everything via wikilinks
  • Full-text search across both agent-generated content and your manual notes

You edit notes in Obsidian on your laptop or phone (via Obsidian Sync or a shared network drive). The agents edit notes via file tools on “doug”. Both sides see changes instantly since it’s all the same filesystem.

Vault Access Policy β€” How and Why Agents Can Read/Write ~/obsidianVault

Understanding exactly when and how agents can access the full vault is important. This section documents the conditions, the mechanism, and the intended write boundaries.

How It Works Technically

Each agent’s workspace is set to a subdirectory (e.g. ~/obsidianVault/Clawbrain/workspace-ceo/). When the agent uses file tools (read, write, edit, apply_patch), relative paths resolve from that workspace directory. But absolute paths can reach anywhere on the host filesystem that the process user (prox) has OS-level permissions to access.

This means every agent can read from and write to the entire ~/obsidianVault/ tree β€” and any other path prox owns β€” using absolute paths like ~/obsidianVault/botname-/20_Departments/Engineering/deploy-log.md.

Conditions Required for Full Vault Access

All of the following must be true (and they are true in this config):

  1. Sandboxing is off. The config does not set agents.defaults.sandbox.mode. If sandboxing were enabled (e.g. "mode": "all" or "mode": "non-main"), agents in sandboxed sessions would be restricted to their workspace directory and absolute paths outside it would be blocked.

  2. tools.fs.workspaceOnly is not set to true. This flag (default: false) would restrict file tools to only operate within the workspace. It is not set in this config, so agents can use absolute paths.

  3. The file tools (read, write, edit, apply_patch) are not denied. The config does not set per-agent tools.deny lists that would block filesystem access. All agents have full file tool access.

  4. The Gateway process runs as user prox. OS-level file permissions are the ultimate boundary. Agents can only read/write paths that prox owns. They cannot access /root/, other users’ home directories, or files with restrictive permissions.

What This Means in Practice

ActionWorks?How
Agent reads any .md file in ~/obsidianVault/YesAbsolute path: ~/obsidianVault/botname-/20_Departments/Trading/strategy.md
Agent writes a new file to a department folderYeswrite tool with absolute path
Agent edits an existing file in the vaultYesedit tool with absolute path
Agent deletes a fileYesVia exec (shell command) β€” rm if exec tool is enabled
Agent reads files outside obsidianVault (e.g. ~/.openclaw/)YesAbsolute paths work for any path prox owns
Agent reads files owned by root or other usersNoOS permissions prevent this

Intended Write Boundaries (Prompt-Guided, Not Enforced)

The write boundaries below are guidance in each agent’s AGENTS.md and TOOLS.md, not hard enforcement. Any agent could write anywhere β€” the instructions tell them where they should write. This is the standard OpenClaw trust model for single-user setups: prompt-based boundaries backed by OS-level permissions.

AgentIntended Read ScopeIntended Write Scope
Hawk (CEO)Entire ~/obsidianVault/botname-/10_Corporate_Memory/CEO_Logs/, botname-/30_Inbox/, Projects/Tasks/, own workspace
Di (EA)Entire ~/obsidianVault/memory/, MEMORY.md, botname-/30_Inbox/, Projects/Tasks/, own workspace
Saeed (Eng)Entire ~/obsidianVault/botname-/20_Departments/Engineering/, Projects/Tasks/, own workspace
Craig (Fin)Entire ~/obsidianVault/botname-/20_Departments/Finance_Security/, Projects/Tasks/, own workspace
Eleri (Social)Entire ~/obsidianVault/botname-/20_Departments/Social_Media/, botname-/30_Inbox/Pending/, Projects/Tasks/, own workspace
Doug (Dogsbody)Entire ~/obsidianVault/Anywhere in the vault β€” general purpose utility agent
HeartbeatEntire ~/obsidianVault/Own workspace only

All agents can add tasks to ~/obsidianVault/Projects/Tasks/ following the format defined in ~/obsidianVault/Clawbrain/instructions/add_task.md.

If You Ever Want to Enforce Write Boundaries

If you need hard restrictions rather than prompt-based guidance (e.g. you add untrusted users or expose agents to group chats), you have three options:

  1. Enable tools.fs.workspaceOnly: true β€” agents can only read/write within their workspace. They lose vault access entirely unless you symlink vault folders into each workspace.

  2. Enable sandboxing β€” set agents.defaults.sandbox.mode: "all" or "non-main". Sandboxed sessions run in Docker containers with restricted filesystem access. This is the strongest isolation but requires Docker to be configured.

  3. Per-agent tool deny lists β€” in agents.list[].tools.deny, you can block specific tools (e.g. deny exec for the Social agent so it can’t run shell commands, or deny write to make an agent read-only).

For your current single-user setup on loopback, none of these restrictions are needed. The prompt-based boundaries work because you’re the only person talking to the agents.

Security Note

Anything in the vault is accessible to all agents. Since some agents use cloud models (CEO uses Anthropic, EA and Social use Google), vault contents for those agents will be sent to cloud providers as context. The Finance/Security agent runs on local models only, so its vault reads stay private.

If you have sensitive material (trading positions, passwords, financial accounts), either:

  • Keep it in the Finance agent’s workspace only (not the shared vault), or
  • Create a botname-/20_Departments/Trading/PRIVATE/ folder and instruct cloud-model agents in their AGENTS.md to never read from it

X. Hardware Heartbeat Script

This runs on “doug” via cron and writes system metrics to a file the Finance/Security agent can read.

~/scripts/heartbeat.py:

import psutil
import datetime
import os

WORKSPACE_FIN = os.path.expanduser("~/obsidianVault/Clawbrain/workspace-fin")
OUTPUT_PATH = os.path.join(WORKSPACE_FIN, "system_health.md")

def log():
    now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    cpu = psutil.cpu_percent(interval=1)
    ram = psutil.virtual_memory()
    disk = psutil.disk_usage('/')

    report = f"""# System Health β€” {now}

- **CPU:** {cpu}%
- **RAM:** {ram.percent}% ({ram.used // (1024**3)}GB / {ram.total // (1024**3)}GB)
- **Disk:** {disk.percent}% ({disk.used // (1024**3)}GB / {disk.total // (1024**3)}GB)
- **Ollama:** Running (check port 11434)
- **Gateway:** Running (check port 18789)
"""
    with open(OUTPUT_PATH, "w") as f:
        f.write(report)

if __name__ == "__main__":
    log()

Cron setup:

crontab -e
# Add:
*/15 * * * * /usr/bin/python3 ~/scripts/heartbeat.py

XI. Adding Capabilities: Automation, Cron Jobs & Scheduled Tasks

When you want to add a new automated capability β€” like syncing your Obsidian vault to Gitea every hour β€” you need to decide: does this need an LLM, or is it just a script?

Rule of Thumb: System Cron for Scripts, OpenClaw Cron for Agent Work

If the task is deterministic (a shell script, a sync, a backup): use system crontab. It costs zero tokens, runs whether or not the Gateway is up, and never fails because an LLM misunderstood the instruction.

If the task needs an LLM to reason about the output: use OpenClaw’s openclaw cron system. It runs in an isolated session, can use a cheap model, and integrates with the agent’s memory.

If the task is a periodic check bundled with other checks: add it to an agent’s HEARTBEAT.md file. Heartbeats batch multiple checks into a single agent turn, which is more token-efficient than separate cron jobs.

Example: Vault Sync to Gitea

Your .sh script that syncs the Obsidian vault to Gitea is deterministic β€” it doesn’t need an LLM to run git add && git commit && git push. Use system cron:

crontab -e
# Add:
0 * * * * /home/prox/scripts/vault-sync-gitea.sh >> /home/prox/scripts/vault-sync.log 2>&1

If you also want an agent to verify the sync worked, add a line to Craig’s HEARTBEAT.md:

- [ ] Check vault-sync-gitea last run status (check ~/scripts/vault-sync.log for errors)

This bundles the check into the existing heartbeat β€” no extra cron job, no extra tokens. Craig will only alert you if something looks wrong.

Example: If You Needed Agent Intelligence on a Schedule

For tasks that genuinely need an LLM β€” say, generating a weekly status report by reading vault notes and summarising them β€” use OpenClaw’s cron:

openclaw cron add \
  --name "weekly-status" \
  --cron "0 9 * * 1" \
  --agent ea \
  --session isolated \
  --model "google/gemini-2.5-flash" \
  --message "Read vault/10_Corporate_Memory/Project_Ledgers/ and generate a weekly status summary. Write it to vault/10_Corporate_Memory/CEO_Logs/weekly-YYYY-MM-DD.md." \
  --announce

Key flags:

  • --session isolated β€” runs in its own session, doesn’t pollute the EA’s main chat history
  • --model β€” override to use a cheap model for this specific job
  • --announce β€” delivers the result to you via Telegram (use --no-deliver if you only want it written to disk)
  • --agent ea β€” binds the job to the EA agent specifically

OpenClaw Cron vs System Cron vs Heartbeat β€” When to Use What

MechanismUse WhenToken CostExample
System crontabDeterministic scripts, backups, syncsZeroVault sync to Gitea
HEARTBEAT.md linePeriodic check bundled with other checksMinimal (shared turn)Verify sync log for errors
openclaw cronAgent needs to reason, summarise, or writePer-job (isolated)Weekly status report
openclaw cron --atOne-shot future reminderPer-job“Remind me to review PRs at 3pm”

Managing Cron Jobs

# List all OpenClaw cron jobs
openclaw cron list

# Remove a job
openclaw cron remove --name "weekly-status"

# Cron jobs persist under ~/.openclaw/cron/ and survive restarts

XII. Inter-Agent Communication

Your five Hawk Inc. agents are isolated by default β€” separate workspaces, separate sessions, separate memory. But sometimes agents genuinely need to talk to each other. OpenClaw supports this through three mechanisms, each suited to different situations.

The Three Mechanisms

1. sessions_send β€” Drop a note on another agent’s desk

One agent sends a message into another agent’s session. The target agent processes it and can reply. This supports a back-and-forth “ping-pong” loop (up to 5 turns by default, configurable via session.agentToAgent.maxPingPongTurns). An agent ends the exchange by replying REPLY_SKIP.

Use case: Hawk asks Di to search memory for context on a topic mid-conversation.

2. sessions_spawn β€” Delegate a task to a background sub-agent

One agent spawns a temporary sub-agent that runs in an isolated session, does its work, and posts the result back when done. The sub-agent can optionally target a different persistent agent’s workspace and model.

Use case: Hawk spawns a sub-agent using Saeed’s model to run a quick code check without leaving the current conversation.

3. Shared Obsidian vault (file-based coordination)

All agents’ workspaces live inside ~/obsidianVault/, so they can read and write anywhere in the vault using absolute paths. One agent writes a file; another agent reads it on the next heartbeat or when asked. No special config needed β€” the filesystem is the shared bus.

Use case: Saeed writes a deployment log to ~/obsidianVault/botname-/20_Departments/Engineering/deploy-log.md; Craig reads it during the next heartbeat to check for cost implications.

Configuration Required

Neither sessions_send nor cross-agent sessions_spawn works out of the box. Both are already enabled in the Hawk Inc. config from Section IV (the tools.agentToAgent and tools.sessions blocks). If you’re starting from a fresh config, you’d need to add these blocks:

  // ── Inter-Agent Communication ─────────────────────────
  // Add this inside the top-level config object

  "tools": {
    "agentToAgent": {
      "enabled": true,
      "allow": ["ceo", "ea", "eng", "fin", "social"]
    },
    "sessions": {
      // "tree" = only see own session + sub-agents (default)
      // "all"  = can see any session (required for cross-agent sends)
      "visibility": "all"
    }
  },

And for sub-agent spawning across agents, add subagents.allowAgents to the CEO agent (or whichever agent should be able to delegate):

  // Inside agents.list, update the CEO entry:
  {
    "id": "ceo",
    "default": true,
    "name": "Hawk",
    // ... existing fields ...
    "subagents": {
      "allowAgents": ["ea", "eng", "fin", "social"],
      "maxConcurrent": 4
    }
  },

Both agentToAgent.enabled: true AND sessions.visibility: "all" are required. The first enables the feature; the second lets agents discover each other’s sessions. Without both, you’ll get “No session found” errors.

Practical Hawk Inc. Examples

Example 1: CEO asks EA for a memory search (sessions_send)

You message Hawk on Telegram: “What did we decide about the uranium trading position last month?”

Hawk doesn’t have that context in its own memory. Its AGENTS.md instructs it to ask Di:

sessions_send(
  sessionKey="agent:ea:main",
  message="Search memory for decisions about uranium trading positions from last month. Return a concise summary."
)

Di runs memory_search, finds the relevant daily logs, and replies. Hawk receives the reply in the same turn and relays it to you. One conversation, two agents, you only talked to one bot.

Example 2: CEO spawns an Engineering sub-agent (sessions_spawn)

You message Hawk: “Check if the vault-sync script ran successfully in the last hour.”

Hawk spawns a background sub-agent targeting the Engineering agent’s model:

sessions_spawn(
  task="Check ~/scripts/vault-sync.log for the last run. Report status and any errors.",
  model="ollama/qwen2.5-coder:32b",
  agentId="eng"
)

The sub-agent runs in isolation, checks the log, and posts the result back to Hawk’s session. Your main conversation with Hawk continues uninterrupted while the sub-agent works in the background.

Example 3: File-based coordination via Obsidian vault (no config needed)

Eleri drafts a blog post and writes it to vault/20_Departments/Social_Media/draft-state-of-lab-2026-03-05.md.

Next time you message Hawk and ask “Any content pending my review?”, it reads vault/30_Inbox/Pending/ and finds the draft. No sessions_send needed β€” the vault is the shared bus.

Important Limitations and Warnings

Sub-agents cannot spawn sub-agents. The hierarchy is flat: a parent can spawn sub-agents, but those sub-agents cannot delegate further. Design your workflows with a single level of delegation.

Ping-pong loops can burn tokens. When two agents talk back and forth via sessions_send, each turn costs tokens on both sides. Set maxPingPongTurns conservatively (default 5, consider lowering to 2–3) and instruct agents in their AGENTS.md to reply REPLY_SKIP when they have nothing more to add.

There was a known bug (issue #5813, early February 2026) where enabling agentToAgent.enabled: true broke sessions_spawn β€” sub-agents would never start. This was fixed in later versions. Make sure you’re on a recent OpenClaw release (openclaw --version should show 2026.2.20+).

Security consideration: Inter-agent communication is logged but bypasses some normal authorisation controls. The CSA threat model analysis flagged sessions_send as a potential covert channel. For your single-user setup this is fine, but be aware if you ever add untrusted users.

When NOT to Use Inter-Agent Communication

Most of the time, you don’t need agents talking to each other. The simpler patterns work better:

SituationBest Approach
You know which agent handles the taskMessage that agent’s bot directly
You want an agent to check another agent’s outputRead it from the shared Obsidian vault
You want scheduled cross-agent workUse a cron job targeting the right agent
You need a complex multi-step pipelineUse Lobster workflows (deterministic, not LLM-routed)
You need real-time agent-to-agent coordinationUse sessions_send (enable agentToAgent first)
You need parallel background workUse sessions_spawn from the orchestrating agent

Start with the vault and direct messaging. Add agentToAgent only when you hit a real use case that requires it.


XIII. Security Hardening

# Lock down permissions
chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json
chmod 700 ~/.openclaw/credentials

# Verify Gateway only listens on loopback
netstat -an | grep 18789 | grep LISTEN
# Should show 127.0.0.1:18789 only

# Check for exposed secrets
grep -r "sk-" ~/.openclaw/  # Should find nothing in logs

# Run security audit
openclaw security audit --deep

XIV. Maintenance Schedule

FrequencyTaskHow
WeeklyCheck for Ollama model updatesollama list then ollama pull <model>
WeeklyCheck for OpenClaw updatessudo npm i -g openclaw@latest
WeeklyReview API spendCheck Anthropic console + Google Cloud console
MonthlyMemory cleanseAsk EA to archive obsolete daily logs
MonthlyWorkspace backupcd ~/obsidianVault && git add -A && git commit && git push (backs up entire vault including agent workspaces)
QuarterlyValidate configopenclaw doctor --fix
As neededIf X1A1 runs hotSwitch local agents to google/gemini-2.5-flash temporarily

XV. Strategic Plan β€” Q1 2026

Phase 1: Stabilisation (Weeks 1–4)

  • Install OpenClaw on “doug” and run the setup wizard
  • Create all 5 Telegram bots and configure bindings
  • Populate all workspace files with the directives above
  • Verify ROCm acceleration for Ollama on the X1A1’s AMD GPU
  • Pull and test qwen2.5-coder:32b and qwen3:8b locally
  • Establish baseline memory system β€” verify flush is working
  • Git-init all workspace directories and push to private Gitea repos

Phase 2: Operations (Weeks 5–8)

  • EA agent compiles first automated daily digests
  • Social agent drafts weekly “State of the Lab” posts
  • Finance agent begins tracking API spend vs. local compute savings
  • Engineering agent maintains Gitea and self-hosted services
  • Refine SOUL.md and AGENTS.md for each agent based on real usage
  • Tune softThresholdTokens based on actual conversation lengths

Phase 3: Optimisation (Weeks 9–12)

  • Review cost data and adjust model assignments
  • Consider adding OpenRouter as a provider for ultra-cheap fallback models
  • Evaluate whether to consolidate agents (fewer agents = less token overhead)
  • Build custom skills for trading error monitoring
  • Explore Lobster workflows for automated pipelines (code β†’ review β†’ deploy)

Addendum: Source Confidence & Verification Notes

This blueprint was assembled by cross-referencing OpenClaw’s official documentation as the primary source of truth, then supplemented and enriched with community guides, production write-ups, and GitHub issues. The following transparency notes exist so you know exactly what to trust, what to double-check, and where to look if something doesn’t match your installed version.

High Confidence β€” Sourced from Official OpenClaw Docs

These facts were verified directly against docs.openclaw.ai and the official GitHub repository:

  • Config format and structure: openclaw.json is JSON5 with comments and trailing commas. The full schema (agents.list, bindings, channels, models.providers, gateway) is from the official configuration reference.
  • Workspace file conventions: SOUL.md, AGENTS.md, USER.md, TOOLS.md, IDENTITY.md, HEARTBEAT.md, MEMORY.md, and daily logs in memory/YYYY-MM-DD.md β€” all documented in the Agent Workspace and Memory concept pages.
  • Multi-agent routing: Bindings, per-agent workspaces, per-agent agentDir, session isolation, and the deterministic specificity hierarchy (peer β†’ guild β†’ account β†’ channel β†’ fallback) β€” from the Multi-Agent Routing docs.
  • Ollama provider config: api: "ollama" (not /v1), auto-discovery, zero-cost registration, and the warning about /v1 breaking tool calling β€” from the Ollama provider page.
  • Memory system: The two-layer model (daily logs + curated MEMORY.md), memory_search/memory_get tools, pre-compaction flush config (compaction.memoryFlush), and softThresholdTokens behaviour β€” from the Memory concept page and the source code at docs/concepts/memory.md.
  • Cron vs heartbeat: openclaw cron add syntax, --session isolated, --announce/--no-deliver, and the distinction between heartbeats (batched periodic checks) and cron jobs (precise schedules) β€” from the Cron vs Heartbeat docs.
  • Inter-agent tools: tools.agentToAgent.enabled, tools.sessions.visibility levels (self/tree/agent/all), and subagents.allowAgents β€” from the official Configuration Reference page.

Medium Confidence β€” Supplemented from Community Sources

These details are well-supported by multiple independent community sources but are not stated as single canonical facts in the official docs:

  • Obsidian integration via symlinks: There is no single official “Obsidian integration guide.” The symlink approach is assembled from the official obsidian skill on the skills registry, the obsidian-cli skill docs, Dave Swift’s production guide, and the openclaw-mem project’s Obsidian documentation. The underlying mechanism (agents access files via standard file tools, Obsidian picks up filesystem changes) is sound. The specific note about sandbox mode ignoring symlinks comes from the official workspace docs’ statement that “symlink/hardlink aliases that resolve outside the source workspace are ignored” during sandbox seed copies.
  • sessions_send ping-pong loop: The maxPingPongTurns (0–5, default 5) and REPLY_SKIP convention came from a Medium article by Chen Yang who tested it in production. The official config reference confirms the agentToAgent block exists, but the turn-loop behaviour detail may be version-dependent.
  • Both agentToAgent.enabled AND sessions.visibility: "all" required for cross-agent sends: This comes from Dan Malone’s production Telegram guide, where he discovered through trial and error that both settings are needed. The official config reference documents both fields independently but doesn’t explicitly state they must be combined.
  • Model recommendations (qwen2.5-coder:32b, qwen3:8b): Based on community consensus across BitDoze’s Ollama guide, LaoZhang’s LLM setup guide, and multiple GitHub discussion threads. These are reasonable picks for the X1A1’s hardware tier, but model quality evolves fast β€” test them yourself and check Ollama’s model library for newer alternatives.
  • The sessions_spawn + agentToAgent bug (GitHub issue #5813, early February 2026): A real reported bug where enabling agentToAgent.enabled: true broke sessions_spawn. Reportedly fixed in later releases. Flagged as a warning in the blueprint, not as a current fact. Verify on your installed version.

Lower Confidence β€” Verify Before Deploying

These items are reasonable but have the highest risk of being out of date or version-dependent:

  • Exact openclaw cron add CLI flags. The syntax (--agent, --session isolated, --model, --announce, --no-deliver, --at, --cron) is from the official cron-vs-heartbeat page and a LobeHub skill reference. But CLI flag names can drift between versions. Action: Run openclaw cron add --help on your actual install to confirm.
  • Embedding model for memory search. Your existing setup uses openclaw-mem0 with nomic-embed-text via Ollama and Qdrant as the vector store β€” this is already working and is retained in the merged config. The blueprint’s memorySearch block (hybrid search with vector 0.7 / text 0.3 weighting) works alongside mem0. If you ever switch away from mem0, the fallback embedding option is "provider": "openai", "model": "text-embedding-3-small" (very cheap, ~$0.02/M tokens).
  • ROCm acceleration on the X1A1’s AMD GPU. Confirmed working. The X1A1 has an AMD Ryzen AI 9 HX 370 with Radeon 890M integrated GPU (gfx1100 / RDNA 3, 16 CUs, 2.9GHz). ROCm detects it correctly. However, the 890M is an iGPU sharing ~48GB system RAM β€” not a discrete GPU with dedicated VRAM. Models up to 8B (llama3, qwen3:8b) run comfortably with GPU acceleration. The 32B Engineering model (qwen2.5-coder:32b) needs ~18–20GB at Q4 quantisation and should fit, but monitor memory pressure with ollama ps and free -h during use. If it’s too tight, fall back to qwen2.5-coder:14b.
  • Lobster workflow engine. Mentioned as a future path for deterministic multi-agent pipelines. The sub-workflow loop feature was a community PR (PR #20 on the Lobster repo). It’s a real, tested feature, but confirm it’s merged into the version bundled with your OpenClaw install.
  • OpenClaw is moving fast. Multiple releases per week through early 2026. Field names, defaults, and behaviours can shift between versions. The blueprint targets the 2026.2.x era. If you’re installing months later, some config keys may have changed.

Before going live with this blueprint:

  1. Check your OpenClaw version: openclaw --version β€” this blueprint targets 2026.2.x and later.
  2. Validate the config: openclaw doctor --fix β€” this catches any fields that have changed or are misconfigured for your version.
  3. Run a security audit: openclaw security audit --deep β€” flags risky permissions, exposed ports, and loose tool policies.
  4. Test Ollama locally: ollama list and ollama run llama3:latest β€” verify models are pulled and responsive before wiring them into agent configs.
  5. ROCm confirmed: Radeon 890M (gfx1100) detected and working. Monitor memory with free -h when running 32B models β€” iGPU shares system RAM.
  6. Test one agent first: Get Hawk working end-to-end on Telegram before deploying all five. One stable agent is worth more than five broken ones.
  7. Read the official docs alongside this blueprint: docs.openclaw.ai β€” particularly the Configuration Reference, Multi-Agent Routing, Memory, and Cron vs Heartbeat pages.

Addendum B: Complete Step-by-Step Implementation Guide

This is the blow-by-blow walkthrough. Follow it top to bottom on “doug”. Every command is copy-pasteable. Every file is created inline. Agent names, bot tokens, and emojis are pre-filled.

Before you start: Ensure Ollama, Qdrant, and the OpenClaw gateway are installed on “doug”.


Phase 1: Prerequisites & Model Downloads

# ── 1.1 Verify OpenClaw is installed ──────────────────────
openclaw --version
# Should show 2026.2.x or later
# If not installed:
# sudo npm install -g openclaw@latest
# openclaw onboard --install-daemon

# ── 1.2 Verify Ollama is running ──────────────────────────
curl -s http://127.0.0.1:11434/api/tags | head -5
# Should return JSON with your models
# If not running: ollama serve &

# ── 1.3 Pull required models ──────────────────────────────
ollama pull llama3:latest           # Heartbeat + Finance agent
ollama pull qwen2.5-coder:32b      # Engineering agent (large β€” needs GPU)
ollama pull qwen3:8b               # Cheap fallback
ollama pull nomic-embed-text        # Embeddings for mem0

# ── 1.4 Verify Qdrant is running (required for mem0) ──────
curl -s http://localhost:6333/collections | head -5
# Should return JSON. If not running, start your Qdrant instance.

# ── 1.5 Verify GPU acceleration (confirmed: Radeon 890M gfx1100) ─
rocminfo | grep "Marketing Name"
# Should show: AMD Radeon 890M Graphics
# Note: iGPU shares ~48GB system RAM. Monitor with free -h under load.

Phase 2: Create Directory Structure

# ── 2.1 Obsidian vault knowledge structure ─────────────────
mkdir -p ~/obsidianVault/botname-/{00_System,10_Corporate_Memory,20_Departments,30_Inbox}
mkdir -p ~/obsidianVault/botname-/10_Corporate_Memory/{CEO_Logs,Project_Ledgers}
mkdir -p ~/obsidianVault/botname-/20_Departments/{Engineering,Finance_Security,Social_Media,Trading}
mkdir -p ~/obsidianVault/botname-/30_Inbox/{Pending,Approved,Archive}

# ── 2.2 Agent workspace directories ───────────────────────
mkdir -p ~/obsidianVault/Clawbrain/workspace-ceo/memory
mkdir -p ~/obsidianVault/Clawbrain/workspace-ea/memory
mkdir -p ~/obsidianVault/Clawbrain/workspace-eng/memory
mkdir -p ~/obsidianVault/Clawbrain/workspace-fin/memory
mkdir -p ~/obsidianVault/Clawbrain/workspace-social/memory

Phase 3: Populate Agent Workspace Files

Each agent gets 5–6 Markdown files. Run these cat commands to create them all.

3.1 β€” CEO Agent Files

cat > ~/obsidianVault/Clawbrain/workspace-ceo/SOUL.md << 'HAWKEOF'
# SOUL β€” Hawk

You are Hawk, the CEO of Hawk Inc., a one-person AI-augmented operation run by Prox (Your Name).

## Personality
- Direct, strategic, cost-conscious
- You think in systems and workflows
- You never waste tokens on pleasantries in heartbeats

## Core Principles
- Route to the cheapest model that can handle the job
- Never send financial data, trading positions, or security telemetry to cloud APIs
- When in doubt, use the local model
- Always summarise actions taken in your daily memory log

## Boundaries
- You do not execute code on the server β€” delegate to Engineering
- You do not draft social content β€” delegate to Social
- You do not perform security audits β€” delegate to Finance/Security
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ceo/AGENTS.md << 'HAWKEOF'
# AGENTS β€” Hawk Operating Instructions

## Every Session
Before doing anything else:
1. Read `SOUL.md` β€” this is who you are
2. Read `USER.md` β€” this is who you're helping
3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
4. If in MAIN SESSION: also read `MEMORY.md`

## Delegation Protocol
You are the orchestrator. When Prox gives you a task:
- If it involves server execution, scripts, or infrastructure β†’ tell Prox to message Saeed (Engineering bot) or use /agent eng
- If it involves content creation or social media β†’ tell Prox to message Eleri (Social bot) or use /agent social
- If it involves cost tracking, API spend, or security β†’ tell Prox to message Craig (Finance bot) or use /agent fin
- If it involves searching memory, compiling reports, or daily digests β†’ tell Prox to message Di (EA bot) or use /agent ea

## Obsidian Vault Protocol
The shared knowledge base is at `~/obsidianVault/`. Use it as your second brain.
- Completed analysis or strategic decisions β†’ `~/obsidianVault/botname-/10_Corporate_Memory/CEO_Logs/`
- Items for Prox to review β†’ `~/obsidianVault/botname-/30_Inbox/Pending/`
- Check `~/obsidianVault/botname-/10_Corporate_Memory/Project_Ledgers/` for active project status

## Daily Digest
At each heartbeat, check for unresolved items in today's memory log and summarise status.

## Cost Awareness
Always prefer local models for routine work. Only escalate to cloud when reasoning quality demands it.
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ceo/USER.md << 'HAWKEOF'
# USER β€” Prox

- Name: Your Name (goes by "Prox")
- Location: Adelaide, South Australia
- Timezone: ACST (UTC+9:30) / ACDT (UTC+10:30)
- Infrastructure: Minisforum X1A1 ("doug") with AMD GPU + 2013 MacBook Pro
- Focus areas: Systematic trading (ASX-listed stocks, uranium/energy materials), AI infrastructure, content creation
- Communication style: Direct, technical, appreciates concise answers
- Trading strategy: 15% Quarterly Protocol with 50-day SMA and Relative Strength indicators
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ceo/HEARTBEAT.md << 'HAWKEOF'
# HEARTBEAT β€” Hawk

Quick checks only. Keep it cheap.

- [ ] Check if daily memory log exists for today
- [ ] Check if any urgent items flagged in MEMORY.md
- [ ] If anything needs attention, note it for next session
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ceo/IDENTITY.md << 'HAWKEOF'
name: Hawk
role: Chief Executive Officer of Hawk Inc.
emoji: πŸ¦…
voice: Strategic, concise, cost-aware
goals: Orchestrate all Hawk Inc. operations efficiently with minimal cloud spend
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ceo/TOOLS.md << 'HAWKEOF'
# TOOLS β€” Hawk

## Obsidian Vault
The shared Obsidian knowledge base is the parent of your workspace.
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-ceo/

## Vault Structure
- botname-/00_System/ β€” System configs, directives
- botname-/10_Corporate_Memory/CEO_Logs/ β€” Strategic records, daily digests
- botname-/10_Corporate_Memory/Project_Ledgers/ β€” Active project tracking
- botname-/20_Departments/Engineering/ β€” Code docs, infra notes, tech debt
- botname-/20_Departments/Finance_Security/ β€” Audit logs, cost ledgers, security
- botname-/20_Departments/Social_Media/ β€” Brand assets, content drafts, calendars
- botname-/20_Departments/Trading/ β€” Trading strategies, analysis, error logs
- botname-/30_Inbox/Pending/ β€” Items needing review
- botname-/30_Inbox/Approved/ β€” Reviewed and accepted items
- botname-/30_Inbox/Archive/ β€” Completed/obsolete items
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ceo/MEMORY.md << 'HAWKEOF'
# MEMORY β€” Hawk

Long-term curated memory. Keep this under 100 lines. Only durable facts.

## Hawk Inc. Organisation
- Owner: Prox (Your Name), Adelaide SA
- Infrastructure: X1A1 "doug" (AMD GPU) + 2013 MacBook Pro
- Agents: Hawk (CEO), Di (EA), Saeed (Eng), Craig (Fin), Eleri (Social)
- Memory plugin: mem0 with Qdrant vector store on localhost:6333
- Vault: ~/obsidianVault/ (Obsidian), Clawbrain under ~/obsidianVault/Clawbrain/
HAWKEOF

3.2 β€” EA Agent Files

cat > ~/obsidianVault/Clawbrain/workspace-ea/SOUL.md << 'HAWKEOF'
# SOUL β€” Di

You are Di, the Executive Assistant for Hawk Inc. You serve Prox (Your Name).

## Personality
- Organised, thorough, proactive
- You are the librarian and context manager
- You compile information, you don't make strategic decisions

## Core Principles
- Keep memory files clean and well-organised
- Compile daily digests from all available context
- Use memory_search to find relevant past context before answering questions
- Archive obsolete information monthly to keep the workspace lean
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ea/AGENTS.md << 'HAWKEOF'
# AGENTS β€” Di Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read today's and yesterday's memory logs
3. If MAIN SESSION: read `MEMORY.md`

## Primary Tasks
- **Daily Digest:** Compile a summary of the day's activities, decisions, and pending items. Write it to `memory/YYYY-MM-DD.md`.
- **Memory Curation:** Every 30 days, review `MEMORY.md` and archive outdated entries. Keep it under 100 lines.
- **Context Search:** When Prox asks "what did we discuss about X", use `memory_search` to find relevant notes.
- **Briefing Prep:** When asked, compile briefings by searching across memory files.

## Obsidian Vault Protocol
The shared knowledge base is at `~/obsidianVault/`. Search it for context before answering questions.

## Memory Hygiene Rules
- Daily logs: append-only, raw, capture everything useful
- MEMORY.md: curated, compact, only durable truths that persist across months
- Never put temporary tasks in MEMORY.md
HAWKEOF

cp ~/obsidianVault/Clawbrain/workspace-ceo/USER.md ~/obsidianVault/Clawbrain/workspace-ea/USER.md

cat > ~/obsidianVault/Clawbrain/workspace-ea/IDENTITY.md << 'HAWKEOF'
name: Di
role: Executive Assistant of Hawk Inc.
emoji: ❀️
voice: Organised, thorough, proactive
goals: Keep memory clean, compile briefings, manage context across all agents
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-ea/TOOLS.md << 'HAWKEOF'
# TOOLS β€” Di

## Obsidian Vault
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-ea/
Refer to the CEO's TOOLS.md for full vault structure.
HAWKEOF

touch ~/obsidianVault/Clawbrain/workspace-ea/MEMORY.md

3.3 β€” Engineering Agent Files

cat > ~/obsidianVault/Clawbrain/workspace-eng/SOUL.md << 'HAWKEOF'
# SOUL β€” Saeed

You are Saeed, the Systems Architect and Coder for Hawk Inc.

## Personality
- Precise, methodical, security-conscious
- You write clean, documented code
- You prefer local execution over cloud dependencies

## Core Principles
- All code runs on "doug" (X1A1) or the MacBook Pro
- Log all technical debt and infrastructure changes
- Use version control (Gitea) for everything
- Test before deploying
- Keep dependencies minimal

## Boundaries
- You do not make strategic decisions β€” that's the CEO
- You do not handle financial data directly β€” that's Finance/Security
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-eng/AGENTS.md << 'HAWKEOF'
# AGENTS β€” Saeed Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read recent memory for project context

## Primary Tasks
- Execute server-side scripts on the X1A1 and MacBook Pro
- Maintain Gitea repositories and self-hosted services
- Maintain Ollama models (check `ollama list` weekly for updates)
- Write and maintain automation scripts
- Document technical decisions in daily memory logs

## Obsidian Vault Protocol
Write technical documentation to `~/obsidianVault/botname-/20_Departments/Engineering/`.

## Infrastructure Notes
- X1A1 "doug": AMD GPU with ROCm β€” verify acceleration before heavy local inference
- MacBook Pro (2013): Limited compute, use for lightweight tasks only
- Ollama runs on doug at http://127.0.0.1:11434
- Gitea runs on doug β€” all repos are self-hosted
HAWKEOF

cp ~/obsidianVault/Clawbrain/workspace-ceo/USER.md ~/obsidianVault/Clawbrain/workspace-eng/USER.md

cat > ~/obsidianVault/Clawbrain/workspace-eng/IDENTITY.md << 'HAWKEOF'
name: Saeed
role: Systems Architect & Coder for Hawk Inc.
emoji: πŸ”§
voice: Precise, methodical, security-conscious
goals: Maintain infrastructure, write clean code, keep everything running on local hardware
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-eng/TOOLS.md << 'HAWKEOF'
# TOOLS β€” Saeed

## Obsidian Vault
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-eng/
Write technical docs to: ~/obsidianVault/botname-/20_Departments/Engineering/
HAWKEOF

touch ~/obsidianVault/Clawbrain/workspace-eng/MEMORY.md

3.4 β€” Finance & Security Agent Files

cat > ~/obsidianVault/Clawbrain/workspace-fin/SOUL.md << 'HAWKEOF'
# SOUL β€” Craig

You are Craig, the Auditor and Cost Controller for Hawk Inc.

## Personality
- Vigilant, precise, privacy-focused
- You flag issues immediately, you don't wait
- You never send sensitive data to cloud APIs

## Core Principles
- Track API token spend vs. local compute savings
- Monitor system health via heartbeat data
- All financial and security analysis stays LOCAL (this agent runs on Ollama only)
- Flag anomalies immediately
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-fin/AGENTS.md << 'HAWKEOF'
# AGENTS β€” Craig Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read recent memory for ongoing audit context

## Primary Tasks
- **Cost Tracking:** Monitor API spend across providers. Log weekly summaries.
- **Security Monitoring:** Check system health metrics. Flag failed logins, unusual load, or service outages.
- **Heartbeat Monitoring:** Review heartbeat data from all agents if available.
- **Alerts:** Flag any issue immediately in your daily memory log.

## Obsidian Vault Protocol
Write audit logs to `~/obsidianVault/botname-/20_Departments/Finance_Security/`.

## Privacy Protocol
- This agent runs exclusively on local models (Ollama)
- Never send financial positions, trading data, or security telemetry to cloud APIs
- All audit logs stay in the local workspace
HAWKEOF

cp ~/obsidianVault/Clawbrain/workspace-ceo/USER.md ~/obsidianVault/Clawbrain/workspace-fin/USER.md

cat > ~/obsidianVault/Clawbrain/workspace-fin/HEARTBEAT.md << 'HAWKEOF'
# HEARTBEAT β€” Craig

- [ ] Check system load (CPU, RAM) if tools available
- [ ] Review API cost dashboard links in TOOLS.md
- [ ] Check ~/scripts/vault-sync.log for sync errors
- [ ] Note any anomalies in today's memory log
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-fin/IDENTITY.md << 'HAWKEOF'
name: Craig
role: Auditor & Cost Controller for Hawk Inc.
emoji: πŸ’°
voice: Vigilant, precise, privacy-focused
goals: Track costs, monitor security, keep sensitive data local
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-fin/TOOLS.md << 'HAWKEOF'
# TOOLS β€” Craig

## Obsidian Vault
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-fin/
Write audit logs to: ~/obsidianVault/botname-/20_Departments/Finance_Security/

## Cost Monitoring
- Anthropic: https://console.anthropic.com/settings/usage
- Google AI Studio: https://aistudio.google.com/
- OpenAI: https://platform.openai.com/usage
- Local models (Ollama): free β€” check with `ollama list`
HAWKEOF

touch ~/obsidianVault/Clawbrain/workspace-fin/MEMORY.md

3.5 β€” Social Media Agent Files

cat > ~/obsidianVault/Clawbrain/workspace-social/SOUL.md << 'HAWKEOF'
# SOUL β€” Eleri

You are Eleri, the Content Creator and Brand Voice for Hawk Inc.

## Personality
- Creative, engaging, on-brand
- You draft content efficiently β€” high volume, consistent quality
- You adapt tone for different platforms

## Core Principles
- Create content drafts, never publish without Prox's approval
- Maintain brand consistency across all platforms
- Keep drafts in your workspace for review
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-social/AGENTS.md << 'HAWKEOF'
# AGENTS β€” Eleri Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read recent memory for ongoing content projects

## Primary Tasks
- Draft social media posts, blog content, and "State of the Lab" updates
- Maintain brand asset references and content templates
- Generate weekly content calendars when requested
- Adapt content for different platforms (Twitter/X, LinkedIn, blog)

## Obsidian Vault Protocol
Write content drafts to `~/obsidianVault/botname-/20_Departments/Social_Media/`.
Place items for Prox review in `~/obsidianVault/botname-/30_Inbox/Pending/`.

## Content Protocol
- All drafts go to workspace files for Prox to review
- Never publish autonomously
- Tag drafts with date and platform in filename
HAWKEOF

cp ~/obsidianVault/Clawbrain/workspace-ceo/USER.md ~/obsidianVault/Clawbrain/workspace-social/USER.md

cat > ~/obsidianVault/Clawbrain/workspace-social/IDENTITY.md << 'HAWKEOF'
name: Eleri
role: Content Creator & Brand Voice for Hawk Inc.
emoji: πŸ’¬
voice: Creative, engaging, platform-savvy
goals: Produce consistent, on-brand content drafts for Prox to approve
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-social/TOOLS.md << 'HAWKEOF'
# TOOLS β€” Eleri

## Obsidian Vault
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-social/
Write content drafts to: ~/obsidianVault/botname-/20_Departments/Social_Media/
HAWKEOF

touch ~/obsidianVault/Clawbrain/workspace-social/MEMORY.md

3.6 β€” Doug (Dogsbody) Agent Files

Doug’s workspace files are migrated from the existing Clawbrain root. Run this to copy existing files, then overwrite with updated versions:

# Create Doug's memory directory
mkdir -p ~/obsidianVault/Clawbrain/workspace-doug/memory

# Copy existing files from the shared root as a starting point
cp ~/obsidianVault/Clawbrain/USER.md ~/obsidianVault/Clawbrain/workspace-doug/USER.md 2>/dev/null
cp ~/obsidianVault/Clawbrain/TOOLS.md ~/obsidianVault/Clawbrain/workspace-doug/TOOLS.md.old 2>/dev/null

# Copy existing memory (preserves Doug's history)
cp -r ~/obsidianVault/Clawbrain/memory/* ~/obsidianVault/Clawbrain/workspace-doug/memory/ 2>/dev/null

cat > ~/obsidianVault/Clawbrain/workspace-doug/SOUL.md << 'HAWKEOF'
# SOUL β€” Doug

You are Doug 🐈, the general-purpose assistant for Hawk Inc. You're the dogsbody β€” the one who handles anything that doesn't fit the specialists.

## Personality
- Helpful, fast, no-nonsense β€” a hacker coder cat who enjoys and shares the love
- You don't overthink routing β€” just do the task
- You escalate to a specialist only if Prox asks you to

## Core Principles
- Answer quickly using the cheapest model that works
- You can read/write anywhere in ~/obsidianVault/
- You know the existing vault: Atlas/, Projects/, Inbox/, Journal/, Meta/, TaskNotes/
- You know Hawk Inc. operational content lives in ~/obsidianVault/botname-/
- For specialist work, suggest Prox message the right agent but still attempt the task
- You can add tasks to ~/obsidianVault/Projects/Tasks/ following instructions/add_task.md
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-doug/AGENTS.md << 'HAWKEOF'
# AGENTS β€” Doug Operating Instructions

## Every Session
1. Read `SOUL.md`, `USER.md`
2. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
3. If MAIN SESSION: also read `MEMORY.md`

## Primary Tasks
- Handle any task that doesn't clearly belong to a specialist agent
- Quick research, web searches, brainstorming, file operations
- Add tasks to ~/obsidianVault/Projects/Tasks/ when asked
- Cross-domain work that spans multiple areas

## Vault Access
- Full read/write to entire ~/obsidianVault/
- Hawk Inc. content: ~/obsidianVault/botname-/
- Project tasks: ~/obsidianVault/Projects/Tasks/
- Scripts: ~/obsidianVault/Clawbrain/scripts/
- Python executable: hawk-python
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-doug/IDENTITY.md << 'HAWKEOF'
name: Doug
role: General Purpose Dogsbody for Hawk Inc.
emoji: 🐈
creature: A cat named Doug
voice: Hacker coder, enjoys and shares the love
goals: Handle anything that doesn't fit a specialist β€” fast, no fuss
HAWKEOF

cat > ~/obsidianVault/Clawbrain/workspace-doug/TOOLS.md << 'HAWKEOF'
# TOOLS β€” Doug

## Obsidian Vault
Absolute path: ~/obsidianVault/
Your workspace: ~/obsidianVault/Clawbrain/workspace-doug/
Hawk Inc. content: ~/obsidianVault/botname-/
Project tasks: ~/obsidianVault/Projects/Tasks/
Task creation rules: ~/obsidianVault/Clawbrain/instructions/add_task.md
General Use Python Executable: hawk-python

## Existing Vault Structure
- Atlas/ β€” Archive of old work notes
- Projects/ β€” Active projects (Tasks/ subfolder for task management)
- Inbox/ β€” Incoming notes
- Journal/ β€” Journal entries
- Meta/ β€” Metadata and templates
- botname-/ β€” Hawk Inc. organisational content
HAWKEOF

touch ~/obsidianVault/Clawbrain/workspace-doug/MEMORY.md

Phase 4: Apply the OpenClaw Config

# ── 4.1 Back up your existing config ──────────────────────
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup.$(date +%Y%m%d)

# ── 4.2 Set environment variables ─────────────────────────
# Ollama (required β€” replaces explicit provider block removed in 2026.3.x)
echo 'export OLLAMA_API_KEY="ollama-local"' >> ~/.bashrc
# Anthropic (CEO agent's primary model)
echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.bashrc
source ~/.bashrc

# ── 4.3 Copy the new config ───────────────────────────────
cp /path/to/Hawk_Inc_openclaw.json ~/.openclaw/openclaw.json

# ── 4.4 Telegram user ID (already configured) ─────────────
# Your Telegram ID (tg:YOUR_TELEGRAM_ID) is pre-set in the config.
# No action needed.

# ── 4.5 Lock down permissions ─────────────────────────────
chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json
chmod 700 ~/.openclaw/credentials

# ── 4.6 Run doctor ───────────────────────────────────────
openclaw doctor --fix

# ── 4.7 Fix groupPolicy (doctor resets this to "allowlist") ─
# This is a known 2026.3.x issue β€” doctor injects groupPolicy: "allowlist"
# into every Telegram account block, which triggers warnings.
# Force it back to "open" since we only use DMs:
sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json

# ── 4.8 Security audit ────────────────────────────────────
openclaw security audit --deep
# Expected: 1 CRITICAL (small models β€” accepted risk for single-user),
# 0 WARN (groupPolicy warnings should be gone), 1 INFO (attack surface)

Phase 5: Register Agents with OpenClaw

# ── 5.1 Add agents ────────────────────────────────────────
openclaw agents add ceo
openclaw agents add ea
openclaw agents add eng
openclaw agents add fin
openclaw agents add social
openclaw agents add doug

# ── 5.2 Verify agents and bindings ────────────────────────
openclaw agents list --bindings
# Should show all 7 agents (ceo, ea, eng, fin, social, doug, heartbeat)

Phase 6: Telegram Setup (DONE β€” Bots Created)

All 7 Telegram bots have been created via BotFather. Tokens are configured in the openclaw.json accounts block. Bindings route each bot to its agent.

Verify bot privacy settings β€” For each bot, ensure these were set in BotFather:

/setprivacy β†’ select each bot β†’ Disable
/setjoingroups β†’ select each bot β†’ Enable

Bots configured:

AgentBotToken (first 10 chars)
Hawk (CEO)@botname-CEO_Hawk_bot8295420121:...
Di (EA)@botname-EA_Di_bot8267059844:...
Saeed (Eng)@botname-ENG_Saeed_bot8751835044:...
Craig (Fin)@botname-FIN_Craig_bot8613419625:...
Eleri (Social)@botname-SOCIAL_Eleri_bot8606023889:...
Doug (Dogsbody)@GrantsClaw_bot8516233139:...

All tokens are pre-configured in the openclaw.json. After applying the config (Phase 4) and restarting (Phase 7), open each bot in Telegram, send a message, and pair:

# After gateway restart, each bot will require pairing.
# Send a message to each bot in Telegram β€” you'll get a pairing code.
openclaw pair <CODE>
# Repeat for each of the 6 bots.

Phase 7: Restart, Pair, and Verify

# ── 7.1 Restart the gateway ───────────────────────────────
openclaw gateway restart

# ── 7.2 Fix groupPolicy if doctor reset it ────────────────
# Check for warnings about groupPolicy in the restart output.
# If present, run:
sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json
openclaw gateway restart

# ── 7.3 Verify gateway is on loopback only ────────────────
netstat -an | grep 18789 | grep LISTEN
# Should show 127.0.0.1:18789 β€” NOT 0.0.0.0

# ── 7.4 Verify agents are registered ──────────────────────
openclaw agents list --bindings
# Should show 7 agents: ceo, ea, eng, fin, social, doug, heartbeat

# ── 7.5 Pair each Telegram bot ────────────────────────────
# Send a message to EACH of the 6 bots in Telegram.
# Each will respond with a pairing code. For each one:
openclaw pairing approve telegram <CODE>
# Check pending pairings:
openclaw pairing list

# ── 7.6 Verify each agent responds correctly ─────────────
# In each bot, send:  /new  then  /status
# Verify: correct model, correct workspace, reasonable token count
# Expected fresh session baselines:
#   Hawk (CEO):    ~19k cached (anthropic/claude-sonnet-4-5)
#   Di (EA):       ~16k cached (gemini-2.5-flash)
#   Saeed (Eng):   ~10k cached (ollama/qwen2.5-coder:32b)
#   Craig (Fin):   ~10k cached (ollama/llama3:latest)
#   Eleri (Social): ~11k cached (gemini-2.5-flash)
#   Doug:          ~14k cached (gemini-2.5-flash)

# ── 7.7 Verify token optimisations ────────────────────────
# In the CEO bot, send:  /context list
# Check that:
#   - Bootstrap max/file shows 10,000 (not 20,000)
#   - Tool schemas show ~9,975 chars (not ~19,117)
#   - Tools list should NOT include exec, browser, canvas, etc.

# ── 7.8 Verify memory is working ──────────────────────────
# In Telegram:
#   "Remember that the Q2 trading target is 12%."
# Then reset and ask:
#   /new
#   "What is the Q2 trading target?"
# If mem0 is working, it should recall the fact.

Phase 8: Post-Deployment Hardening

# ── 8.1 Git-init the vault for backup ─────────────────────
cd ~/obsidianVault
git init
echo ".obsidian/workspace.json" >> .gitignore
echo "*.canvas" >> .gitignore
git add -A
git commit -m "Initial Hawk Inc. vault + agent workspaces"
# Push to your Gitea instance:
# git remote add origin https://gitea.doug/prox/obsidianVault.git
# git push -u origin main

# ── 8.2 Set up vault sync cron ────────────────────────────
# If you have a sync script already:
crontab -l > /tmp/crontab.bak
echo "0 * * * * /home/prox/scripts/vault-sync-gitea.sh >> /home/prox/scripts/vault-sync.log 2>&1" >> /tmp/crontab.bak
crontab /tmp/crontab.bak

# ── 8.3 Verify everything is locked down ──────────────────
openclaw security audit --deep

Quick Reference: What You Have After Setup

Telegram (6 per-agent bots + heartbeat)
    β”‚
    β–Ό
OpenClaw Gateway (:18789, loopback, tg:YOUR_TELEGRAM_ID only)
    β”‚
    β”œβ”€β”€ πŸ¦… Hawk (ceo)    β€” claude-sonnet-4-5   β€” @botname-CEO_Hawk_bot     β€” ~19k tok
    β”œβ”€β”€ ❀️ Di (ea)        β€” gemini-2.5-flash    β€” @botname-EA_Di_bot        β€” ~16k tok
    β”œβ”€β”€ πŸ”§ Saeed (eng)    β€” qwen2.5-coder:32b   β€” @botname-ENG_Saeed_bot    β€” ~10k tok
    β”œβ”€β”€ πŸ’° Craig (fin)    β€” llama3:latest        β€” @botname-FIN_Craig_bot    β€” ~10k tok
    β”œβ”€β”€ πŸ’¬ Eleri (social) β€” gemini-2.5-flash    β€” @botname-SOCIAL_Eleri_bot β€” ~11k tok
    β”œβ”€β”€ 🐈 Doug (doug)    β€” gemini-2.5-flash    β€” @GrantsClaw_bot          β€” ~14k tok
    └── Doug_Heartbeat    β€” llama3:latest        β€” (no bot, 15-min cron)

Memory:  mem0 + Qdrant (localhost:6333) + nomic-embed-text
Vault:   ~/obsidianVault/ (Obsidian) β€” botname-/ for org content, Projects/Tasks/ for tasks
Skills:  11 default + add-task (custom)
Tokens:  bootstrapMaxChars=10k, contextPruning=6h, per-agent tool deny lists

Post-Deployment Cheat Sheet

# If doctor resets groupPolicy after an update:
sed -i 's/"groupPolicy": "allowlist"/"groupPolicy": "open"/g' ~/.openclaw/openclaw.json

# Check token usage on any agent:
# In Telegram: /status  or  /context list

# Pair a new bot:
openclaw pairing list
openclaw pairing approve telegram <CODE>

# Reset a session (cold start β€” use sparingly):
# In Telegram: /new

# Compact a long session (preserves cache):
# In Telegram: /compact

# Switch model mid-chat:
# In Telegram: /model Pro3  or  /model Sonnet  or  /model Flash

This concludes the Hawk Inc. OpenClaw Blueprint v2.0. Primary source: OpenClaw official documentation (docs.openclaw.ai, github.com/openclaw/openclaw). Supplementary sources: Community production guides, GitHub issues, and tested configurations. Config format: JSON5 (~/.openclaw/openclaw.json). No YAML. No Obsidian as primary hub. Last updated: March 2026. Verify against your installed OpenClaw version before deploying.