overstory README

The project's README from github.com/jayminwest/overstory. As one markdown file: README.md.

Overstory

Multi-agent orchestration for AI coding agents.

npm CI License: MIT

No longer maintained. Overstory is no longer actively maintained and this repository is archived (read-only) — I am not reviewing issues or merging pull requests here anymore. Thank you to everyone who contributed. The code stays MIT-licensed, so feel free to fork and carry it forward. Active development has moved to Warren, a self-hostable control plane for sandboxed cloud agents and overstory's spiritual successor — start there for anything new.

Overstory turns a single coding session into a multi-agent team by spawning worker agents in isolated git worktrees, coordinating them through a custom SQLite mail system, and merging their work back with tiered conflict resolution. New projects spawn Claude agents headless and surface them through a web UI (ov serve); tmux attach is the opt-in escape hatch for live steering. A pluggable AgentRuntime interface lets you swap between 11 runtimes — Claude Code, Pi, Gemini CLI, Aider, Goose, Amp, or your own adapter.

Warning: Agent swarms are not a universal solution. Do not deploy Overstory without understanding the risks of multi-agent orchestration — compounding error rates, cost amplification, debugging complexity, and merge conflicts are the normal case, not edge cases. Read STEELMAN.md for a full risk analysis and the Agentic Engineering Book (web version) before using this tool in production.

Install

Requires Bun v1.0+ and git. tmux is optional — only needed if you want to spawn workers with --no-headless or attach to a coordinator/worker pane directly. At least one supported agent runtime must be installed:

bun install -g @os-eco/overstory-cli

Or try without installing:

npx @os-eco/overstory-cli --help

Development

git clone https://github.com/jayminwest/overstory.git
cd overstory
bun install
bun link              # Makes 'ov' available globally

bun test              # Run all tests
bun run lint          # Biome check
bun run typecheck     # tsc --noEmit

Quick Start

# Initialize overstory in your project
cd your-project
ov init

# Install hooks into .claude/settings.local.json
ov hooks install

# Start a coordinator (persistent orchestrator)
ov coordinator start

# Open the web UI — primary operator surface for the swarm
ov serve   # then open http://localhost:7321

ov serve is where you watch the fleet, read the mail bus, and inspect per-agent timelines. New projects spawn Claude workers headless by default, so the UI sees them with full structured-event fidelity.

Other common commands:

# Spawn an individual worker agent (coordinator usually does this for you)
ov sling <task-id> --capability builder --name my-builder

# Force a worker into tmux when you want to attach mid-session
ov sling <task-id> --capability builder --name my-builder --no-headless
tmux attach -t ov-my-builder

# Inspect state from the CLI (also visible in the UI)
ov status
ov dashboard          # live TUI alternative to the web UI
ov mail check --inject
ov nudge <agent-name> # send a follow-up to a stalled agent

Commands

Every command supports --json where noted. Global flags: -q/--quiet, --timing, --project <path>. ANSI colors respect NO_COLOR.

Core Workflow

Command Description
ov init Initialize .overstory/ and bootstrap os-eco tools (--yes, --name, --tools, --skip-mulch, --skip-seeds, --skip-canopy, --skip-onboard, --json)
ov sling <task-id> Spawn a worker agent (--capability, --name, --spec, --files, --parent, --depth, --skip-scout, --skip-review, --max-agents, --dispatch-max-agents, --skip-task-check, --no-scout-check, --runtime, --base-branch, --profile, --headless, --no-headless, --recover, --json)
ov stop <agent-name> Terminate a running agent (--clean-worktree, --json)
ov prime Load context for orchestrator/agent (--agent, --compact)
ov spec write <task-id> Write a task specification (--body)
ov discover Discover a brownfield codebase via coordinator-driven scout swarm (--skip, --name, --attach, --watchdog, --json)
ov update Refresh .overstory/ managed files from installed package (--agents, --manifest, --hooks, --dry-run, --json)

Coordination

Command Description
ov coordinator start Start persistent coordinator agent (--attach/--no-attach, --watchdog, --monitor, --profile)
ov coordinator stop Stop coordinator
ov coordinator status Show coordinator state
ov coordinator send Fire-and-forget message to coordinator (--subject)
ov coordinator ask Synchronous request/response to coordinator (--subject, --timeout)
ov coordinator output Show recent coordinator output (--lines)
ov coordinator check-complete Evaluate exit triggers, return completion status
ov orchestrator start Start multi-repo orchestrator agent (--attach/--no-attach, --watchdog, --profile)
ov orchestrator stop Stop orchestrator
ov orchestrator status Show orchestrator state
ov orchestrator send Fire-and-forget message to orchestrator (--subject)
ov orchestrator ask Synchronous request/response to orchestrator (--subject, --timeout)
ov orchestrator output Show recent orchestrator output (--lines)
ov supervisor start [DEPRECATED] Start per-project supervisor agent
ov supervisor stop [DEPRECATED] Stop supervisor
ov supervisor status [DEPRECATED] Show supervisor state

Messaging

Command Description
ov mail send Send a message (--to, --subject, --body, --type, --priority)
ov mail check Check inbox — unread messages (--agent, --inject, --debounce, --json)
ov mail list List messages with filters (--from, --to, --unread)
ov mail read <id> Mark message as read
ov mail reply <id> Reply in same thread (--body)
ov nudge <agent> [message] Send a text nudge to an agent (--from, --force, --json)

Task Groups

Command Description
ov group create <name> Create a task group for batch tracking
ov group status <name> Show group progress
ov group add <name> <issue-id> Add issue to group
ov group list List all groups

Merge

Command Description
ov merge Merge agent branches into canonical (--branch, --all, --into, --dry-run, --json)

Observability

Command Description
ov status Show all active agents, worktrees, tracker state (--json, --verbose, --all)
ov dashboard Live TUI dashboard for agent monitoring (--interval, --all)
ov inspect <agent> Deep per-agent inspection (--follow, --interval, --no-tmux, --limit, --json)
ov trace View agent/task timeline (--agent, --run, --since, --until, --limit, --json)
ov errors Aggregated error view across agents (--agent, --run, --since, --until, --limit, --json)
ov replay Interleaved chronological replay (--run, --agent, --since, --until, --limit, --json)
ov feed Unified real-time event stream (--follow, --interval, --agent, --run, --json)
ov logs Query NDJSON logs across agents (--agent, --level, --since, --until, --follow, --json)
ov costs Token/cost analysis and breakdown (--live, --self, --agent, --run, --bead, --by-capability, --last, --json)
ov metrics Show session metrics (--last, --json)
ov run list List orchestration runs (--last, --json)
ov run show <id> Show run details
ov run complete Mark current run as completed

Infrastructure

Command Description
ov hooks install Install orchestrator hooks to .claude/settings.local.json (--force)
ov hooks uninstall Remove orchestrator hooks
ov hooks status Check if hooks are installed
ov worktree list List worktrees with status
ov worktree clean Remove completed worktrees (--completed, --all, --force)
ov watch Start watchdog daemon — Tier 0 (--interval, --background)
ov monitor start Start Tier 2 monitor agent
ov monitor stop Stop monitor agent
ov monitor status Show monitor state
ov log <event> Log a hook event (--agent)
ov clean Clean up worktrees, sessions, artifacts (--completed, --all, --run)
ov doctor Run health checks on overstory setup — 13 categories (--category, --fix, --json)
ov serve HTTP + WebSocket surface for the web UI (--port, --host, --json)
ov ecosystem Show os-eco tool versions and health (--json)
ov upgrade Upgrade overstory to latest npm version (--check, --all, --json)
ov agents discover Discover agents by capability/state/parent (--capability, --state, --parent, --json)
ov completions <shell> Generate shell completions (bash, zsh, fish)

Architecture

Overstory uses instruction overlays and tool-call guards to turn agent sessions into orchestrated workers. Each agent runs in an isolated git worktree; new projects spawn Claude workers as headless subprocesses (stream-json over stdout) and surface them through ov serve's web UI, with tmux available as an opt-in for live attach. Inter-agent messaging is handled by a custom SQLite mail system (WAL mode, ~1-5ms per query) with typed protocol messages and broadcast support. A FIFO merge queue with 4-tier conflict resolution merges agent branches back to canonical. A tiered watchdog system (Tier 0 mechanical daemon, Tier 1 AI-assisted triage, Tier 2 monitor agent) ensures fleet health. See CLAUDE.md for full technical details.

Runtime Adapters

Overstory is runtime-agnostic. The AgentRuntime interface (src/runtimes/types.ts) defines the contract — each adapter handles spawning, config deployment, guard enforcement, readiness detection, and transcript parsing for its runtime. Set the default in config.yaml or override per-agent with ov sling --runtime <name>.

Claude Code agents can run in headless mode (the default for new projects — -p --output-format stream-json subprocess, NDJSON events parsed by ClaudeRuntime.parseEvents, surfaced through ov serve's web UI) or tmux mode (escape hatch for live attach — operator can tmux attach to watch and steer mid-session). ov init writes runtime.claudeHeadlessByDefault: true for new projects; legacy projects upgrading from earlier overstory versions keep tmux until they edit config. Override per-spawn with ov sling --no-headless (force tmux) or --headless (force headless). Sapling is statically headless; Pi, Codex, and Cursor have no buildDirectSpawn and reject --headless.

Runtime CLI Guard Mechanism Stability
Claude Code claude settings.local.json hooks Stable
Sapling sp .sapling/guards.json Stable
Pi pi .pi/extensions/ guard extension Experimental
Copilot copilot (none — --allow-all-tools) Experimental
Cursor agent (none — --yolo) Experimental
Codex codex OS-level sandbox (Seatbelt/Landlock) Experimental
Gemini gemini --sandbox flag Experimental
Aider aider (none — --yes-always) Experimental
Goose goose Profile-based permissions Experimental
Amp amp Built-in approval system Experimental
OpenCode opencode (none) Experimental

How It Works

Instruction overlays + tool-call guards + the ov CLI turn your coding session into a multi-agent orchestrator. A persistent coordinator agent manages task decomposition and dispatch, while a mechanical watchdog daemon monitors agent health in the background.

Orchestrator (multi-repo coordinator of coordinators)
  --> Coordinator (persistent orchestrator at project root)
        --> Supervisor / Lead (team lead, depth 1)
              --> Workers: Scout, Builder, Reviewer, Merger (depth 2)

Agent Types

Agent Role Access
Orchestrator Multi-repo coordinator of coordinators — dispatches coordinators per sub-repo Read-only
Coordinator Persistent orchestrator — decomposes objectives, dispatches agents, tracks task groups Read-only
Supervisor Per-project team lead — manages worker lifecycle, handles nudge/escalation Read-only
Scout Read-only exploration and research Read-only
Builder Implementation and code changes Read-write
Reviewer Validation and code review Read-only
Lead Team coordination, can spawn sub-workers Read-write
Merger Branch merge specialist Read-write
Monitor Tier 2 continuous fleet patrol — ongoing health monitoring Read-only

Key Architecture

Project Structure

overstory/
  src/
    index.ts                      CLI entry point (Commander.js program)
    types.ts                      Shared types and interfaces
    config.ts                     Config loader + validation
    errors.ts                     Custom error types
    json.ts                       Standardized JSON envelope helpers
    commands/                     One file per CLI subcommand (38 commands)
      agents.ts                   Agent discovery and querying
      coordinator.ts              Persistent orchestrator lifecycle
      supervisor.ts               Team lead management [DEPRECATED]
      dashboard.ts                Live TUI dashboard (ANSI via Chalk)
      hooks.ts                    Orchestrator hooks management
      sling.ts                    Agent spawning
      group.ts                    Task group batch tracking
      nudge.ts                    Agent nudging
      mail.ts                     Inter-agent messaging
      monitor.ts                  Tier 2 monitor management
      merge.ts                    Branch merging
      status.ts                   Fleet status overview
      prime.ts                    Context priming
      init.ts                     Project initialization
      worktree.ts                 Worktree management
      watch.ts                    Watchdog daemon
      log.ts                      Hook event logging
      logs.ts                     NDJSON log query
      feed.ts                     Unified real-time event stream
      run.ts                      Orchestration run lifecycle
      trace.ts                    Agent/task timeline viewing
      clean.ts                    Worktree/session cleanup
      doctor.ts                   Health check runner (13 check modules)
      inspect.ts                  Deep per-agent inspection
      spec.ts                     Task spec management
      errors.ts                   Aggregated error view
      replay.ts                   Interleaved event replay
      stop.ts                     Agent termination
      costs.ts                    Token/cost analysis
      metrics.ts                  Session metrics
      ecosystem.ts                os-eco tool dashboard
      update.ts                   Refresh managed files
      upgrade.ts                  npm version upgrades
      discover.ts                 Brownfield codebase discovery via coordinator-driven scout swarm
      orchestrator.ts             Multi-repo coordination (PersistentAgentSpec)
      completions.ts              Shell completion generation (bash/zsh/fish)
      serve.ts                    HTTP + WebSocket surface for the web UI
      serve/                      REST handlers, WebSocket broadcaster, static SPA fallback
    canopy/
      client.ts                   Canopy client (prompt rendering, listing, emission)
    agents/                       Agent lifecycle management
      manifest.ts                 Agent registry (load + query)
      overlay.ts                  Dynamic CLAUDE.md overlay generator
      identity.ts                 Persistent agent identity (CVs)
      checkpoint.ts               Session checkpoint save/restore
      lifecycle.ts                Handoff orchestration
      hooks-deployer.ts           Deploy hooks + tool enforcement
      copilot-hooks-deployer.ts   Deploy hooks config to Copilot worktrees
      guard-rules.ts              Shared guard constants (tool lists, bash patterns)
      mail-poll-detect.ts         Bash mail-poll pattern detector (runtime backstop)
      scope-detect.ts             Soft FILE_SCOPE violation detection (builder/merger)
    worktree/                     Git worktree + tmux management
    mail/                         SQLite mail system (typed protocol, broadcast)
    merge/                        FIFO queue + conflict resolution + sentinel-file lock + dry-run prediction
    watchdog/                     Tiered health monitoring (daemon, triage, health)
    logg

overstory (jayminwest/overstory)

Searching Database…

1.3K ·GitHub
archived
这是什么?Overstory 把单个编程会话变成一个多智能体团队:它在隔离的 git worktree 中生成 worker 智能体,通过一个自定义的 SQLite 邮件系统协调它们,并以分层冲突解决机制把它们的成果合并回来。
这是命令行工具,还是作为后台服务运行?它是一个直接在你的机器上生成并管理智能体进程的 CLI('ov' 命令);无头 Claude Code 智能体作为子进程运行,通过内置 web UI('ov serve')呈现,还可以选择用 tmux attach 实时观察和引导 worker。
怎么让它在项目上跑起来?安装 CLI(需要 Bun v1.0+ 和 git),运行 'ov init' 初始化 .overstory/ 目录和 os-eco 工具,然后用 'ov sling' 生成一个 worker 智能体;'ov serve' 会打开 web 仪表板来观察整个集群。
它实际上支持哪些编程智能体?11 种受支持的运行时中至少要已安装一种:Claude Code、Pi、GitHub Copilot、Codex、Gemini CLI、Cursor、Sapling、OpenCode、Aider、Goose 或 Amp,通过可插拔的 AgentRuntime 适配器接口进行选择。
它还在积极维护吗,在生产环境运行安全吗?两者都不是——仓库已归档、不再维护,issue 和 PR 无人审阅;作者还明确警告,多智能体编排带来的错误率叠加、成本放大、调试复杂度和合并冲突是常态而非边缘情况。
有没有我应该改用的替代项目?有——活跃开发已转移到 Warren,它被描述为面向沙盒云智能体的可自托管控制平面,是 Overstory 的精神续作;本仓库的代码仍采用 MIT 许可,因此依然可以 fork。
智能体之间实际上是怎么通信的?通过一个以 WAL 模式运行的自定义 SQLite 邮件系统(每次查询约 1-5 毫秒),使用 'workerdone'、'mergeready'、'escalation' 等带类型的协议消息,还有 @all 或 @builders 之类的广播地址。
它如何避免智能体互相踩到对方的代码?每个智能体都有自己隔离的 git worktree,因此 worker 之间不会产生文件冲突;一个基于 SQLite 的 FIFO 合并队列带 4 层冲突解决('ov merge'),把分支合并回规范分支。
不同的智能体扮演什么角色?共有九种角色类型——Orchestrator、Coordinator、Supervisor、Scout、Builder、Reviewer、Lead、Merger 和 Monitor——每种角色根据任务被限定为只读或读写权限。
使用之前我在哪里可以了解相关风险?README 指向 STEELMAN.md 和《Agentic Engineering Book》,其中完整分析了为什么智能体集群不是万能方案,建议在生产环境部署之前阅读。
Creator
jayminwest
Size
5.5 MB
Stars
1.3K
Age
8mo
Commits · 90 Days