API Reference
Complete reference for Fleet's MCP protocol, fabric event types, agent environment variables, and filesystem data paths.
MCP Protocol
The MCP server implements JSON-RPC 2.0 over stdio. It supports three standard MCP methods:
initialize
Handshake method. Returns server capabilities and protocol version.
⮚ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05"}}
⮘ {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}}}}tools/list
Returns all 26 tool definitions with parameter schemas.
⮚ {"jsonrpc":"2.0","id":2,"method":"tools/list"}
⮘ {"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"fleet_status","description":"...","inputSchema":{...}}, ...]}}tools/call
Execute a tool with arguments. Returns text content.
⮚ {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"fleet_agent_start","arguments":{"name":"frontend-dev"}}}
⮘ {"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"Agent frontend-dev started"}]}}Fabric Events
Structured events published to the fabric event bus. Agents subscribe to these to trigger autonomous actions.
| Event Type | Source | Description |
|---|---|---|
| ticket_created | PM / PO agent | A new ticket was created on GitHub |
| ticket_ready | Label watcher | Ticket has the 'ready' label (15-min dedup) |
| ticket_shipped | Label watcher | Ticket has the 'shipped' label |
| pr_created | Developer agent | A pull request was created |
| pr_needs_review | Label watcher | PR has the 'needs-review' label (15-min dedup) |
| pr_approved | Reviewer agent | A PR was approved by a reviewer |
| pr_changes_requested | Reviewer agent | A reviewer requested changes on a PR |
| pr_merged | Release manager | A PR was merged to the main branch |
| pipeline_started | Pipeline engine | A pipeline run was started |
| pipeline_stage_complete | Pipeline engine | A pipeline stage completed |
| pipeline_complete | Pipeline engine | An entire pipeline run completed |
| pipeline_failed | Pipeline engine | A pipeline run failed |
| agent_started | Actions layer | An agent's tmux session was created |
| agent_stopped | Actions layer | An agent's tmux session was terminated |
| eval_complete | Brain daemon | Agent evaluation scoring finished |
| risk_alert | Brain daemon | Agent risk score exceeded threshold |
| agent_quarantined | Brain daemon | Agent was automatically disabled |
Work-in-progress dedup
Labels classified as work-in-progress (ready, needs-review, changes-requested) use 15-minute expiring dedup to prevent duplicate events. On watcher startup, WIP dedup entries are flushed for instant crash recovery.
Agent Environment Variables
These environment variables are set on the tmux session when an agent is launched:
| Variable | Description |
|---|---|
| FLEET_AGENT_NAME | Agent name |
| FLEET_AGENT_ROLE | Agent role (from config) |
| FLEET_AGENT_DEPARTMENT | Agent department |
| FLEET_AGENT_REPORTS_TO | Agent's manager |
| FLEET_PROJECT | Primary repo (e.g., Org/repo) |
| FLEET_REPOS | Comma-separated repos (org agents only) |
| FLEET_OWNER | Github username of the human owner |
| FLEET_SESSION | tmux session name |
| FLEET_WORKDIR | Working directory (repo agents only) |
| FLEET_PRODUCT_NAME | Product name from config |
| FLEET_PRODUCT_DESCRIPTION | Product description from config |
| FLEET_PUBLISH_CMD | Command to publish fabric events |
| FLEET_TRIGGER_EVENT | Event that triggered this agent (subscription-started) |
| FLEET_TRIGGER_PAYLOAD | JSON payload of the triggering event |
| FLEET_TASK_TITLE | Task description (from fleet task assign or pipeline) |
| FLEET_RUN_ID | Pipeline run ID (only during pipeline tasks) |
| FLEET_TASK_ID | Pipeline task ID (only during pipeline tasks) |
| FLEET_PIPELINE_STAGE | Current stage name (only during pipeline tasks) |
| FLEET_SIGNAL_CMD | Command to signal completion (only during pipeline tasks) |
Data Paths
Fleet stores configuration, state, and runtime data in these locations:
| Path | Purpose |
|---|---|
| ~/.team-dashboard/fleet.db | SQLite database (override: TEAM_DASHBOARD_DB_PATH) |
| ~/.team-dashboard/org.yaml | Org-level agent config |
| ~/.team-dashboard/prompts/ | Org agent prompt files |
| ~/.team-dashboard/watcher.pid | Repo watcher daemon PID |
| ~/.team-dashboard/org-watcher.pid | Org watcher daemon PID |
| ~/.team-dashboard/fleet.sock | Fabric unix socket |
| ~/.team-dashboard/brain.sock | Brain daemon unix socket |
| ~/.team-dashboard/brain.pid | Brain daemon PID file |
| .fleet/config.yaml | Repo-local fleet config |
| .fleet/prompts/ | Repo-scoped prompt overlays |
| ~/.claude/skills/fleet/ | Fleet skill library |
Fleet Skills
Reusable workflow skills installed at ~/.claude/skills/fleet/. Skills publish structured decision events to fabric.
| Skill | Used by | Description |
|---|---|---|
| /fleet-dev-task | All developers | Branch, implement, test, PR, handle review feedback |
| /fleet-review-pr | tech-lead, qa-lead | Find PRs, checkout, review, approve/request changes |
| /fleet-ship-pr | release-manager | Merge APPROVED PRs only, close issues, ship labels |
| /fleet-create-ticket | PMs, POs, CMO | Dedup check, rejection check, fleet-ticket helper |
| /fleet-hire | CPO, CTO, CMO | Org review, rejection check, hiring ticket template |