Case study 03 · Agent systems

HAO

Hierarchical Agent Orchestration: LLM agents organised like a company. They decide, use tools, and pass a decision up to their manager when they aren't confident enough.

Role
Design & build
For
B2B automation: lead sourcing, market watch
Stack
TypeScript · Claude · OpenRouter · Ollama · SQLite
Status
Working prototype, paused

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

Decisions worth telling

Quality

55unit tests
3LLM providers
~4.9klines of TypeScript

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.

← The AI OSNext: Nous Deux →