Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

topic agents
type decision
status research-complete
last-validated 2026-05-21
original-query Agent stack proliferation - pick the smallest viable set, kill the rest (reconstructed)
related-docs 234, 415, 461, 506, 523, 524, 527, 547, 549, 569, 570, 581, 590, 599, 600
tier DEEP

601 — Agent Stack Cleanup Decision

Goal: Stop the bot proliferation. Pick the smallest viable agent stack that actually serves Zaal day-to-day, and kill the rest. Replaces the implicit "add another bot" pattern with a written decision.

Recommendation (locked 2026-05-04 — Option D: Hermes-as-ZOE-brain)

Keep ZOE the concept. Kill the openclaw brain. Reuse Hermes runtime.

ZOE openclaw was the right idea with the wrong brain (Minimax M2.7 + 60+ extension plugins + sqlite-for-embeddings = weak + brittle). Hermes already runs the right brain (Claude Code CLI subprocess via Max plan, no API billing, with proper tool access). Make ZOE's backend mirror Hermes — same bot/src/* runtime pattern, different system prompt for the concierge personality vs the coder/critic personality.

PRIMARY (4 surfaces Zaal touches daily):
  1. Claude Code CLI    — code, research, writing, planning (Mac terminal)
  2. Bonfire DM bot     — memory layer (capture, recall, source of truth)
  3. ZAOstock Team Bot  — team-only, scoped, untouched
  4. ZOE Telegram bot   — concierge (NEW: Hermes-style brain at bot/src/zoe/)
                          - Same @zaoclaw_bot Telegram identity (keeps token)
                          - Backend rewritten as bot/src/zoe/ module mirroring bot/src/hermes/
                          - Claude Code CLI subprocess, Max plan auth
                          - Reads Bonfire via DM relay (or SDK once Joshua.eth provisions)
                          - Sprint 1 cost routing applies: Sonnet for chitchat, Opus for hard recall

BACKGROUND (2 specialists, same runtime as ZOE):
  5. Hermes coder/critic — code-fix only, triggered by /SHIP FIX or PR webhook
  6. VAULT/BANKER/DEALER trading agents — autonomous within parameters

SHARED RUNTIME: bot/src/* on VPS (TS + grammy + Claude CLI subprocess + systemd user unit)
SHARED MEMORY:  Bonfire (graph) via DM relay or SDK

KILL OR DEPRECATE:
  - ZOE openclaw container (Minimax brain)  → kill, replace with bot/src/zoe/ (Claude brain)
                                              Identity stays. Brain swaps.
  - ZAO Devz bot                           → fold /SHIP FIX into Hermes webhook, drop Telegram-side
  - ZOE learning pings cron                → kill, Bonfire's task scheduling can do this
  - Bot-to-bot bridge group                → kill, autonomous coordination is fantasy until SDK lands
  - 10-bot fleet plan                      → permanent defer, never build
  - "ZAO Recall Relay Bot" idea            → don't create, fixes a problem that goes away when ZOE is killed

KEEP IN BACKGROUND (specialists, rarely user-facing):
  4. Hermes coder/critic                   — code-fix only, triggered by /SHIP FIX or PR webhook
  5. VAULT/BANKER/DEALER trading agents    — autonomous within parameters, src/lib/agents

REMOVE FROM CONSIDERATION:
  - OpenClaw ZOEY + WALLET sub-agents (never used)
  - Composio AO pilot (paused, decommission)
  - FISHBOWLZ (paused 2026-04-16, formal kill)
  - ZOE v2 redesign (skip, Bonfire eats this role)

Net: 3 daily surfaces, 2 background specialists, ~6 dead branches deprecated. From ~12 systems to 5. Zaal's daily reality stays the same; maintenance load drops massively.

The Mess (current state, brutal)

System What it does Tech debt
ZOE @zaoclaw_bot Concierge, daily tasks OpenClaw container with 60+ extension plugins, custom config schema, telegram channel disabled-by-default, sqlite for embeddings only (not messages), Minimax model dependency, can't actually call message.send tool to bridge — confirmed broken 2026-05-03
ZAOstock Team Bot Team check-ins Working. Scoped. Healthy. Don't touch.
ZAO Devz bot /SHIP FIX router Bot/devz module exists. Tiny scope. /SHIP FIX could be a webhook directly, no Telegram needed
ZOE learning pings Hourly tip in Devz Python cron + 3 env files + a wrapper script + state files. Tip generation could live anywhere.
Hermes coder/critic Auto-PR fix Healthy when triggered. Triggers rare. Doesn't need Telegram identity.
Bonfire @zabal_bonfire Personal KG + recall Works. 1100+ nodes, 15 traits, recall verified. Has its own task scheduling, memory search, group access.
Bridge group -5111907600 Bot-to-bot relay Created today. ZOE can't actually post to it autonomously (LLM tool not exposed). Solving requires new bot + 30 lines of bash. Building 2 bots to coordinate 2 bots is the smell.
OpenClaw ZOEY Action sub-agent Configured, never used.
OpenClaw WALLET On-chain ops sub-agent Configured, never used.
Composio AO Agent orchestrator pilot Installed on bcz, paused per memory. Pile of containers running for nothing.
10-bot fleet plan Brand-specific bots Project memory project_tomorrow_first_tasks.md. Never built. Aspirational. Should stay aspirational.
FISHBOWLZ Audio rooms standalone Paused 2026-04-16. Formally dead.

Pattern: every time a need comes up, a new bot/agent/extension gets added. Old ones don't die. Tech debt compounds.

What Zaal Actually Does Day-to-Day

Auditing the last 2 weeks of session logs + memory + the master schedule:

Time Activity Surface used
4:30am-9am Wake, gym, prime build None / Mac
9am-12pm Code work, research, deep build Claude Code CLI
12pm-1pm Lunch + content stream Phone (Telegram, X, Farcaster posts)
1pm-4pm Meetings, calls, captures while mobile Telegram (DM, ZAOstock standup, group chats)
4pm-7pm Prime building #2 Claude Code CLI
Evening Reflection, plan tomorrow Phone or Mac (mixed)

Reality: Claude Code + Telegram = 95% of agent-mediated work. Everything else is debug-on-Zaal's-time.

Why Bonfire Eats ZOE's Job

ZOE @zaoclaw_bot was supposed to be the daily concierge. But Bonfire bot ALREADY handles:

ZOE's intended job Does Bonfire already do it?
Capture ideas Yes — DM bot, paraphrase + commit pattern
Track tasks Yes — Bonfire has task scheduling tool enabled per Platform tab
Save decisions to memory Yes — that's literally Bonfire's job
Daily check-in Could be — proactive Bonfire prompt at end of day
Recall what happened Yes, with source citations + status attributes — verified 2026-05-03
Cross-link between projects Yes — graph relationships
Voice / personality Yes — 15 personality traits configured
Proactive nudges Yes — Bonfire's task scheduling can send reminders
File ingestion (md, pdf) Yes — Document Store tool

ZOE isn't a unique value-add anymore. It was the right idea before Bonfire shipped. Now it's redundant + worse (broken telegram channel, complex container, no useful memory).

Three Architecture Options (decision required)

Option A — STATUS QUO + glue (rejected)

Keep all current bots. Build the recall relay. Add another bot to fix the script-can't-read-replies problem. Build 10-bot fleet next year.

Outcome: more tech debt, more 3am debug sessions, never feels finished.

Verdict: ❌ this is what got us here.

Option B — BONFIRE-AS-ZOE (initial draft, superseded by Option D)

Bonfire becomes the personal concierge. ZOE openclaw container goes away. Daily flow:

  • Mobile capture: DM @zabal_bonfire INGEST FACT: <thing> or just talk to it like you talk to ZOE
  • Recall: DM @zabal_bonfire RECALL: <question>
  • Daily reflection: Bonfire schedules a 9pm DM "what did we ship today?", you reply, it commits to graph
  • Tasks: Bonfire's task scheduling tool, no separate todo system
  • Hermes still receives /SHIP FIX via webhook (no need to be on Telegram bot directly — Hermes already runs from PR triggers)
  • ZAOstock Team Bot stays as-is for team work (different audience)

Migration cost: ~4 hours

  • Configure Bonfire's task scheduling for daily reflection
  • Add 2-3 more personality traits to handle "task tracker" voice
  • Stop the openclaw container
  • Update DNS for any /chat → /openclaw routes (ZOE dashboard at zoe.zaoos.com if it exists)
  • Update CLAUDE.md to point at Bonfire DM as the daily-ZOE replacement

Maintenance gain: massive. Stop managing openclaw extensions, telegram channel toggles, Minimax dependency, scout.sqlite, AGENTS.md/SOUL.md drift.

Verdict: ⚠️ superseded by Option D — Bonfire is great as memory, but conversational concierge wants its own brain. Bonfire's Bonfires.ai-hosted runtime is fine for graph queries but not for "tell me what to focus on this morning" type answers that need context Claude has.

Option C — KILL ALL BOTS, ONLY CLAUDE CODE (too austere)

Just Claude Code CLI + Bonfire as a database (no Bonfire bot). Mobile = Notes app. No proactive nudges.

Verdict: ❌ loses mobile capture which is real (45 min/day per audit). Bonfire bot already works fine on mobile, no reason to kill it.

Option D — HERMES-AS-ZOE-BRAIN (LOCKED 2026-05-04)

ZOE survives. Brain swaps. Reuse Hermes runtime infrastructure.

Hermes already proved: Claude Code CLI subprocess + Max plan auth + grammy bot framework + systemd user unit = a fast, capable, cheap (no API billing) AI brain on the VPS. The runtime pattern is in bot/src/hermes/ — coder.ts + critic.ts + claude-cli.ts + runner.ts + etc. Sprint 1 cost routing already shipped (Sonnet for cheap/simple, Opus for hard).

Mirror that pattern at bot/src/zoe/ for the concierge personality:

  • zoe/index.ts — Telegram polling for @zaoclaw_bot
  • zoe/concierge.ts — system prompt + personality, mirrors hermes/coder.ts shape
  • zoe/claude-cli.ts — shared with hermes (already exists, supports cost routing)
  • zoe/recall.ts — bridges to Bonfire DM (or direct SDK once Joshua.eth provisions)
  • zoe/scheduler.ts — cron-style proactive nudges (replaces zoe-learning-pings cron)

Bonfire stays as memory layer. ZOE-Hermes-brain queries Bonfire on demand when it needs facts.

Migration cost: ~1 day of bot/src/zoe/ module work + cutover to swap Telegram token from openclaw to bot/src/zoe.

Maintenance gain: delete openclaw container entirely (~600MB RAM + the whole Minimax dependency + the extension hell). Daily ZOE quality goes from "Hi Zaal, what's up?" to "[paragraph that demonstrates actual contextual awareness]".

Verdict: ✅ this is the locked answer. Doc 601 updated 2026-05-04.

Concrete Migration Plan (Option D)

Phase 1 — scaffold bot/src/zoe/ module (today, ~3 hours difficulty 6)

  1. Create bot/src/zoe/ directory mirroring bot/src/hermes/ structure
  2. Implement zoe/index.ts — Telegram polling, listens to @zaoclaw_bot DMs, dispatches to concierge handler
  3. Implement zoe/concierge.ts — system prompt for concierge personality (different from hermes/coder.ts but shares claude-cli.ts runtime + Sprint 1 cost routing)
  4. Implement zoe/recall.ts — when ZOE needs graph facts, DM @zabal_bonfire with RECALL: + read reply asynchronously (or skip until SDK lands and ZOE asks Zaal directly to RECALL)
  5. Reuse existing bot/src/hermes/claude-cli.ts for Claude subprocess invocation
  6. Add systemd user unit OR add to existing zao-devz-stack.service so ZOE module starts/stops with the rest of bot/

Phase 2 — cutover Telegram token (this week, ~1 hour difficulty 3)

  1. Stop openclaw container: docker stop openclaw-openclaw-gateway-1 && docker update --restart=no openclaw-openclaw-gateway-1
  2. Move TELEGRAM_BOT_TOKEN env var from openclaw config → bot/.env or systemd service env (bot/src/zoe will pick up the same token, take over @zaoclaw_bot identity)
  3. Test: DM @zaoclaw_bot from phone — should get ZOE's new Hermes-brain response, not openclaw's
  4. Keep openclaw container around for 30 days as backup, then docker rm after grace period

Phase 3 — fold Devz bot into Hermes (this week, ~1 hour difficulty 5)

  1. /SHIP FIX in ZAO Devz channel currently: ZAO Devz bot receives → forwards to Hermes via HTTP
  2. Better: GitHub PR webhook → Hermes directly. Devz channel just gets a "Hermes is fixing PR X" notification posted by Hermes (one-way, not interactive)
  3. Stop running ZAO Devz bot module on VPS
  4. Update Hermes to post status updates to ZAO Devz channel as a one-way notifier

Phase 4 — replace learning pings cron with bot/src/zoe scheduler (this week, ~1 hour difficulty 4)

  1. Implement bot/src/zoe/scheduler.ts — node-cron or systemd timer triggers hourly
  2. Hourly tip: ZOE-Hermes-brain generates a tip + posts to ZAO Devz General topic
  3. Stop the python cron at ~/zoe-learning-pings/run.sh
  4. Same cadence (hourly), same target (Devz General), better quality output (Claude vs hand-crafted Python tip pool)

Phase 5 — mark Composio AO + 10-bot fleet permanent defer (this week, doc only)

  1. Update project_composio_ao_pilot.md memory: status decommissioned 2026-05-04
  2. Update project_tomorrow_first_tasks.md memory: status permanent defer — Bonfire eats this role
  3. Stop running Composio containers on bcz, reclaim resources

Phase 6 — formalize Hermes + ZAOstock Team Bot as the only background services (this week, doc only)

Update CLAUDE.md "Workflow Orchestration" section:

  • Primary surfaces: Claude Code CLI, Bonfire DM, ZAOstock Team Bot
  • Background: Hermes (PR-triggered), trading agents (parameter-driven)
  • No new bots without a written /zao-research justification doc explaining why Bonfire can't do it

Kill List (formally deprecated, Option D revised)

Item Action When
ZOE openclaw container (Minimax brain) Stop + disable restart, keep 30d as backup. ZOE identity (@zaoclaw_bot) survives, brain swaps to Hermes-style. Phase 2
ZAO Devz bot module Replace with Hermes one-way notifier Phase 3
ZOE learning pings python cron Replace with bot/src/zoe/scheduler.ts Phase 4
Bot-to-bot bridge group Leave group alive as passive ingest only, never wire autonomy Now
ZAO Recall Relay Bot (proposed today) Don't create Now
OpenClaw ZOEY + WALLET sub-agents Decommission with the parent container Phase 2
Composio AO pilot Stop containers, mark memory decommissioned Phase 5
10-bot fleet plan (project_tomorrow_first_tasks) Permanent defer, mark memory Phase 5
FISHBOWLZ Already paused, mark formally dead Phase 5
ZOE v2 redesign brainstorm Skip — Bonfire eats this role Phase 5
Hermes Telegram interface (proposed in doc 599 #19) Don't build Now
Quarterly bridge transcript export Skip, bridge group is passive ingestion only Now

Risks of Option B

Risk Mitigation
Bonfire trial expires 2026-05-29 without API key from Joshua.eth Quarterly OWL export protects corpus. If Bonfire dies, fallback is LightRAG self-host (doc 568).
Bonfire's task scheduling can't actually do the proactive nudges Test in Phase 1. If it can't, keep openclaw running until alternative built.
Mobile users (Cassie, Steve Peer) confused that ZOE is now Bonfire Document in CLAUDE.md + ZAOstock Team Bot help text. They mostly DM Zaal anyway.
ZAO Devz General topic stops getting hourly tips during phase 4 transition Keep cron running until Bonfire scheduled task verified working.
Trading agents (VAULT/BANKER/DEALER) somehow depend on openclaw They don't — they live in src/lib/agents/ and run from runners. Verify before Phase 2.
Hermes loses /SHIP FIX trigger during Phase 3 transition Keep both paths working until webhook proven.

What Stays vs Goes Summary

Surface Status after cleanup Daily user
Claude Code CLI KEEP — primary Zaal
Bonfire DM bot @zabal_bonfire KEEP — primary, expanded role Zaal
ZAOstock Team Bot @ZAOstockTeamBot KEEP — scoped, untouched ZAOstock team
Hermes coder/critic KEEP — background, simplified PR webhook
VAULT/BANKER/DEALER KEEP — autonomous trading (background)
ZOE @zaoclaw_bot openclaw KILL Phase 2 n/a
ZAO Devz bot module KILL Phase 3 n/a
ZOE learning pings cron KILL Phase 4 n/a
Bridge group autonomy DEFER permanently until Bonfire SDK n/a
10-bot fleet DEFER permanently n/a
Composio AO DECOMMISSION n/a
FISHBOWLZ DEAD n/a

Implementation Difficulty (1-10 scale, no time estimates per Zaal feedback memory)

Phase Difficulty Dependencies
Phase 1 (Bonfire trait config + verify) 2 Just Bonfire UI access
Phase 2 (kill openclaw) 3 Backup confirmation, no live dependencies
Phase 3 (fold Devz into Hermes webhook) 5 Hermes git webhook listener config
Phase 4 (Bonfire scheduled tips) 4 Bonfire scheduling tool tested
Phase 5 (memory updates) 1 None
Phase 6 (CLAUDE.md update) 1 None

Total cleanup: difficulty 16/60 — under-half complexity to delete vs build. Cleanup is easier than building was.

Counter-arguments + responses

"What if Bonfire goes away in 6 months?" Quarterly OWL export to git. Migration to LightRAG (doc 568) is a 1-2 day port if forced. Bonfire is replaceable — that's why we never built ZOE-tightly-coupled-to-Bonfire.

"What if I want a brand-specific bot for X later?" Write a /zao-research doc justifying why Bonfire can't do it. If you can't justify, you don't need it. Most "I want a bot for X" turns out to be "I want a graph fact about X that Bonfire already has."

"What about cross-bot autonomy — bots talking to each other?" Wait for Bonfire's MCP server. Until then, Zaal is the orchestrator. The bridge group experiment from 2026-05-03 confirmed this is too early.

"Hermes feels lonely without Telegram identity." Hermes runs from PR webhooks. It already gets all the trigger surface it needs. Adding Telegram = adding state, complexity, ANOTHER bot to maintain.

"What about the 10-bot fleet for ZAO branding?" The fleet plan was a 2026-04 brainstorm. Each "brand bot" was supposed to be a personality with its own Telegram account. Bonfire can host all those personalities as different agents within the same bonfire (per Bonfires.ai's multi-agent capability). One bonfire, many personality-traited agents, no new tokens or services.

What Daily Reality Looks Like After Cleanup

Zaal's morning:

  • Wake → check phone → DM Bonfire: "morning, what's on for today?"
  • Bonfire replies with yesterday's open tasks + reflection notes from last night
  • Zaal heads to gym → comes back → Claude Code

Zaal mid-day:

  • Lunch stream → captures via DM to Bonfire: "ingest fact: [insight from stream]"
  • Group chat with Cassie about ZAOstock → meaningful decision happens → forwarded to Bonfire DM as INGEST FACT

Zaal end-of-day:

  • Bonfire DMs at 9pm: "what shipped today, what's stuck, tomorrow's first task?"
  • 3-message reflection captures the day
  • Sleep

Claude Code workflow (parallel):

  • Daily research, code, writing
  • When graph context needed: switch to phone, DM Bonfire RECALL: <q>, copy reply back to Claude Code
  • When SDK arrives: Claude Code calls Bonfire MCP server directly, no copy-paste

No more:

  • "Why is ZOE not responding?" sessions
  • Container restart loops
  • Bot-to-bot bridge debug
  • Multiple AGENTS.md files to maintain

Open Questions (resolve before Phase 2 kill)

  1. Does Bonfire's scheduled tasks actually fire on cadence? Test in Phase 1 with a 5-min reminder.
  2. Does Bonfire bot work in groups other than DM? (For learning pings to ZAO Devz topic.)
  3. Are there any cron jobs / scripts on VPS that depend on openclaw being up?
  4. Does the zoe-dashboard at zoe.zaoos.com actually get used? (If yes, that's a separate decision; if no, kill DNS.)
  5. Joshua.eth API key timeline — if SDK access lands in 2 weeks, postpone Phase 2 to do migration cleanly with API.

Also See

  • Doc 547 — earlier multi-agent spec (now superseded by Option B)
  • Doc 549 — Bonfire as second-brain rationale
  • Doc 590 — Bonfire daily use
  • Doc 599 — bridge spec, now status: DEFER PERMANENT
  • Doc 600 — current state inventory (this doc proposes the cleanup of that state)

Next Actions

Action Owner Type When
Approve this plan @Zaal Decision Today
Phase 1 — Bonfire trait config + scheduled task test Claude via /vps + Bonfire UI Config Today
Phase 2 — Stop openclaw container, disable restart Claude via SSH Infra This week
Phase 3 — Hermes webhook absorbs /SHIP FIX Claude Code This week
Phase 4 — Bonfire scheduled tips replace cron Claude + Bonfire UI Config This week
Phase 5 — Update memory files (composio decommissioned, 10-bot deferred, fishbowlz dead, zoe-v2 skip) Claude Doc This week
Phase 6 — CLAUDE.md primary-surfaces section + "no new bots without doc" rule Claude Doc This week
Add to project memory: "Option B locked 2026-05-04, see doc 601" Claude Memory After approval

Sources

  • Doc 234 (OpenClaw guide) — internal, openclaw deep dive showed complexity vs use
  • Doc 415 (Composio AO pilot) — internal, paused for 3+ weeks
  • Doc 461 (fix-PR pipeline live) — internal, Hermes is healthy
  • Doc 506 (TRAE AI skip) — internal, telemetry concerns drive simplicity preference
  • Doc 523 (agentic systems audit) — internal, audit caught silent timeouts
  • Doc 524 (live/archived/started/planned) — internal, accountability of agentic state
  • Doc 527 (multi-bot Telegram coordination) — internal, 16-agent dispatch research = aspirational, not built
  • Doc 547 (Bonfire-ZOE-Hermes coordination) — internal, original 3-system spec
  • Doc 549 (Bonfire as second-brain) — internal, second-brain pattern that now becomes the daily ZOE
  • Doc 569 (YapZ ingest strategy) — internal, validates Bonfire can absorb large corpus
  • Doc 570 (personal KG agentic memory) — internal, "agents on small corpus = noise" principle
  • Doc 581 (Bonfire bot hygiene) — internal, 8 bug classes documented
  • Doc 590 (Bonfire power-user playbook) — internal, daily-use pattern
  • Doc 599 (bridge group spec) — internal, now status DEFER per this doc's recommendation
  • Doc 600 (agentic stack coordination v1) — internal, proposes "Zaal orchestrator + 3 surfaces" — this doc collapses to even fewer surfaces
  • Lived experience 2026-04-29 → 2026-05-04 (this session) — primary source for tech debt audit