#!/usr/bin/env python3 """agent-orchestrator — one driver, one config (agents.toml) for a fleet of agents. A generic, reusable harness for running and supervising AI-agent sessions in tmux. Every agent — a Builder/Adversary loop pair, a persistent supervisor, a one-shot task — is declared in a single TOML config; the watchdog reads the SAME file, so there is no env-vs-file drift. Nothing about any particular project lives in this code: paths, the loop kickoff preamble, the handoff conventions, and the on-complete hook are all supplied by the project's config. Usage: agents.py up [name...] start enabled agents (or just the named ones); use-or-create agents.py down [name...] stop agents (or all) agents.py status one table: every agent — kind, backend, model, session, phase agents.py watchdog the supervisor loop (reads the config every tick) agents.py logs tail an agent's session log agents.py phase [set N|next|show] inspect / move the loop phase agents.py tokens per-phase token + time report (needs [watchdog].log_tokens = true) agents.py selftest backend activity-detector regression checks (no config needed) agents.py init [dir] scaffold a starter agents.toml + prompts/ in a project dir Options: --config PATH config file (default: ./agents.toml, else