A next-generation multi-agent orchestration engine for AI coding agents with CLI, HTTP API, and MCP server.
📐 ARCHITECTURE.md — Deep dive into the system design, data flow, and module responsibilities.
User → Lead → Director → Orchestrator → Workers → Reviewers
- Lead 👑 — High-level decisions, user communication, plan approval
- Director 📋 — Execution manager: creates ALL tasks, spawns ALL agents, resolves conflicts
- Orchestrator — Event-driven assignment of tasks to idle agents (no auto-spawn)
- Workers 💻 — Implement code changes
- Reviewers 🔍 — Code review (pool reuse, fresh reviewer on retry)
- Scout 🔭 — Proactive observer (heartbeat-driven, read-only analysis), QA Tester 🧪, Tech Writer 📝, Product Thinker 💡
npm installnpm test| Module | Purpose |
|---|---|
core/ |
Domain types, branded IDs, data-driven state machine |
dag/ |
Task DAG with dependency resolution, file conflict detection, compaction |
specs/ |
Spec & plan layer with change proposals and traceability |
comms/ |
Persistent messaging with priority, threading, coalescing |
agents/ |
Agent lifecycle, role registry, crash detection, cost tracking |
orchestrator/ |
Event-driven orchestrator with auto-assign, auto-spawn, debounce |
isolation/ |
File lock and git worktree isolation modes |
verification/ |
Cross-model review, blocking quality gates, independent validation |
events/ |
Priority-aware event pipeline with back-pressure |
persistence/ |
SQLite schema via drizzle-orm (per-project, WAL mode) |
facade |
High-level API with SQLite persistence (used by CLI & MCP) |
cli/ |
Command-line interface |
mcp/ |
MCP server — thin HTTP client to gateway daemon |
Initialize a project:
npx tsx src/cli/index.ts initStart the daemon:
flightdeck startManage tasks:
flightdeck task add "Build auth" --role backend
flightdeck task list
flightdeck task start tk-abc123 --agent coder-1
flightdeck task complete tk-abc123
flightdeck task fail tk-abc123 --reason "tests failed"
flightdeck task gate tk-abc123 --await-type ci_check --await-id run-456
flightdeck task status # DAG summary
flightdeck task topo # topological orderManage specs:
flightdeck spec create "Auth System"
flightdeck spec list
flightdeck spec show sp-abc123
flightdeck spec change propose sp-abc123
flightdeck spec change approve ch-abc123Manage agents:
flightdeck agent register coder-1 --role backend
flightdeck agent list
flightdeck agent heartbeat coder-1Messaging:
flightdeck msg send agent-1 "Deploy ready" --priority critical
flightdeck msg inbox agent-1
flightdeck msg list --thread mg-abc123Verification:
flightdeck verify request tk-abc123 --reviewer agent-2
flightdeck verify decide rev-abc123 --verdict approveSystem status:
flightdeck status
flightdeck providers # list available runtimes
flightdeck providers --jsonAll commands support --json for machine-readable output.
| Provider | Binary | Adapter | Notes |
|---|---|---|---|
| OpenAI Codex CLI 🤖 | codex-acp |
acp | ACP bridge via @zed-industries/codex-acp |
| Zed Codex ACP | codex-acp |
acp | Rust binary, model override via -c |
| Claude Agent (ACP) 🟠 | claude-agent-acp |
acp | ACP wrapper for Claude Code |
| Gemini CLI 💎 | gemini |
acp | Google's reference ACP implementation |
| OpenCode 🔓 | opencode acp |
acp | Multi-model, open-source |
| Cursor | agent acp |
acp | Cursor CLI with session/load support |
| Kiro CLI | kiro-cli acp |
acp | Amazon/AWS coding agent |
| Kilo Code CLI | kilocode-cli acp |
acp | 500+ models via OpenRouter |
| Hermes Agent | hermes acp |
acp | Nous Research general-purpose agent |
| Provider | Adapter | Notes |
|---|---|---|
| GitHub Copilot 🐙 | copilot-sdk | Native @github/copilot-sdk with direct tool injection |
| Claude Code 🟣 | pty | --print + --resume mode with session persistence |
List installed providers:
flightdeck providers
flightdeck providers --jsonThe MCP server is a thin HTTP client to the gateway daemon (no direct DB access).
Agent → MCP server (stdio) → HTTP → Gateway daemon (port 18800) → Flightdeck → SQLite
Add to your MCP client config:
{
"mcpServers": {
"flightdeck": {
"command": "npx",
"args": ["tsx", "/path/to/flightdeck-2/packages/server/src/mcp/server.ts"],
"env": {
"FLIGHTDECK_AGENT_ID": "worker-1"
}
}
}
}import { Flightdeck } from '@flightdeck/core';
const fd = new Flightdeck('my-project');
// Data stored per-project in SQLite (WAL mode)
const task = fd.addTask({ title: 'Build auth', role: 'backend' });
fd.registerAgent('coder-1', 'backend');
fd.startTask(task.id, 'coder-1');
fd.completeTask(task.id);
console.log(fd.status());
fd.close();| Mode | Description |
|---|---|
file_lock (default) |
File-level locking prevents concurrent edits |
git_worktree |
Per-worker git worktrees for full isolation |
- Data-driven state machine — transition table as data, not scattered if-else
- Hash-based IDs — conflict-free multi-agent task creation
- Spec → Plan → Task traceability — every task traces to a requirement
- Trust nothing — cross-model review, fresh reviewer on retry, orchestrator validates
- Compaction — completed tasks decay to summaries, saving context window
- File conflict detection — tasks sharing files must have explicit dependencies
- Event-driven orchestrator — reactive task assignment with debounce
- Per-project SQLite — no global state files, self-contained projects