Hacker News new | ask | show | jobs
by AlexCalderAI 105 days ago
I solve this exact problem running OpenClaw (24/7 agent orchestrator). Here's what actually works after months of iteration:

The core insight: Multiple agents with zero shared state = chaos. Solution: State files are your control plane.

Architecture: 1. HEARTBEAT.md — Every agent reads this before acting. Routes to current priorities, cascades work through a defined sequence (not random agent picking a task) 2. TODO.md — Single source of truth with sections: "DO NOW" (unblocked), "BLOCKED" (waiting), "DONE" (completed). Agents read this, not chat history or logs 3. active-tasks.md — Breadcrumbs from interrupted runs. If an agent crashes, the next session reads what was interrupted and resumes 4. Sub-agent output files (qa-status.md, conversion-tracker.md, etc) — Each specialized agent writes structured results. Prevents re-running the same analysis.

The key: State files are deterministic. No "what was I thinking?" after a crash. The next agent reads the same input, same structure, same decision rules.

Terminal log management: - Each agent logs its own session ID (e.g., [agent-001-mar05-0430]) - Output files are prefixed by agent type (qa-, scout-, coo-) - Logs are sent to daily files (memory/2026-03-05.md) for searchability

Deployment: I run ~8 agents on cron (QA watchdog, scout, content factory, conversion tracker, etc). They wake up, read their input files, write results, die. No persistent terminal. No state collision.

The problem you're hitting is probably: agents don't know what other agents already did. Solution is just: everything runs through a shared TODO.md and writes results to named files.

Happy to share templates if useful. Full patterns at: https://osolobo.com/first-ai-agent-guide/