The problem
Most multi-agent setups are flat: every agent is equal, nobody is accountable, and there is no rule for when a decision is too important for the agent that made it. Real organisations solved this long ago with a chain of command.
What if agents escalated like employees do: only when the stakes exceed their authority?
The system
- Teams as YAML. Roles, who reports to whom, an authority level from 1 to 10 and an escalation threshold, validated with Zod.
- Recursive escalation. A low-confidence decision climbs the hierarchy and stops at the first manager confident enough to own it.
- Three model providers. Anthropic, OpenRouter, and fully local models through Ollama.
- Tools. A multi-turn tool loop with 7 built-in tools (web search, scraping, files, shell, HTTP, a shared data store) plus custom HTTP tools declared in YAML.
- Live dashboard. Hierarchy view, timeline and run history, streamed in real time.
- Full audit trail. Every decision and its cost is stored in SQLite, with a per-model cost table.
Decisions worth telling
- One number decides escalation. Each agent has a single confidence threshold, so behaviour is predictable and easy to audit.
- One client, many models. A single OpenAI-compatible client covers OpenRouter and Ollama. Switching to a local model cut a run from 20+ minutes on rate-limited free models to about one minute.
- Guard rails against runaway agents. Tool outputs are truncated and every loop is capped at 10 iterations, which bounds both behaviour and cost.
- Tests never call a real model. A mock agent plugs into the same interface.
Quality
Tests cover multi-level escalation (14), custom tools (21) and cost metrics (20).
Honest status
HAO is a local prototype, paused since late August 2026 while I focus on revenue. It hasn't run in production, and its file and shell tools aren't sandboxed yet. Open-sourcing a hardened version is on the list.