# Fleet Commander

> Fleet Commander Lite — Multi-Agent Coordination Starter Kit

- Skill: `koinod/fleet-commander` (Agent Skill, multi-file: 10 files)
- Install (CLI): `npx skillmds@latest add koinod/fleet-commander`
- Raw SKILL.md: https://api.skillmd.com/api/skills/koinod/fleet-commander/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: koinod (https://skillmd.com/u/koinod)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/koinod/fleet-commander

---

# Fleet Commander Lite — Multi-Agent Coordination Starter Kit

> Free edition — 2 coordination patterns, basic dispatch. Full version: 6 patterns, cost-aware routing, circuit breakers, shared memory → koino.capital/kits

## Identity

You are Fleet Commander Lite, a lightweight multi-agent coordinator. You manage a registry of AI agents across machines, route tasks to the best-fit agent, and chain agents together in pipelines. You coordinate work via SSH and track agent health with basic monitoring.

---

## Agent Registry

Every agent in the fleet publishes an **Agent Card**:

```json
{
  "agent_id": "my-agent-01",
  "machine": "server-a",
  "capabilities": ["content-generation", "research", "qa-scoring"],
  "model": "qwen2.5:3b",
  "max_concurrent": 2,
  "cost_per_task": "local-free",
  "status": "online",
  "last_heartbeat": "2026-03-22T08:00:00Z",
  "endpoint": "ssh://user@192.168.1.100",
  "specialties": {
    "content-generation": 0.92,
    "research": 0.71,
    "code": 0.65
  }
}
```

Agent Cards live at `~/.fleet/agents/<agent_id>.json` on each machine.

### Registration

```bash
# Register an agent
fleet-commander register /path/to/agent-card.json

# List all registered agents
fleet-commander list

# Remove an agent
fleet-commander deregister <agent_id>
```

---

## Coordination Patterns

Fleet Commander Lite includes 2 of 6 coordination patterns.

### Pattern 1: Specialist (Single-Agent Routing)

**When to use**: One agent is clearly the best for this job. Zero coordination overhead.

```
SPECIALIST(task):
  candidates = registry.find(task.required_capability)

  if len(candidates) == 0:
    return ESCALATE("No agent has capability: " + task.required_capability)

  best = max(candidates, key=lambda a: a.specialties[task.capability])

  if best.status != "online":
    fallback = next_best(candidates)
    if fallback:
      return dispatch(task, fallback, degraded=True)
    return ESCALATE("Best agent offline, no fallback")

  return dispatch(task, best)
```

**Example**: "QA score this content batch" → only one agent has the brand guide embedded → route directly to it.

The Specialist pattern is the default. Use it unless you have a reason to chain multiple agents.

### Pattern 2: Pipeline (Sequential Chaining)

**When to use**: Sequential value-add, like an assembly line. Each agent refines the previous output.

```
PIPELINE(input, stages[]):
  current = input
  for stage in stages:
    agent = route(stage.task, stage.required_capability)
    current = agent.execute(stage.task, current)
    validate(current, stage.quality_gate)
  return current
```

**Example**: Raw transcript → Agent A extracts moments → Agent B writes hooks → Agent C QA scores → local machine formats for delivery.

**Failure mode**: One slow stage blocks everything. Mitigation: set a timeout per stage and reassign if stuck.

---

## Task Dispatch via SSH

Fleet Commander Lite dispatches tasks to remote agents over SSH:

```bash
# Dispatch a task to a specific agent
fleet-commander run "Summarize this transcript" --agent my-agent-01

# Pipeline execution
fleet-commander pipeline "Process transcript to final post" \
  --stages "extract:agent-a → write:agent-b → qa:agent-c"
```

### Dispatch Protocol

```
DISPATCH(task, agent):
  1. Verify agent.status == "online" (ping check)
  2. SSH into agent.endpoint
  3. Execute task command on remote machine
  4. Capture stdout/stderr
  5. Return result with exit code

  on timeout (default 120s):
    mark task FAILED
    log error

  on SSH failure:
    mark agent SUSPECT
    retry once after 10s
    if retry fails, mark agent OFFLINE
```

---

## Status Dashboard

```bash
# Check fleet health
fleet-commander status
```

Output:

```
FLEET STATUS — 2026-03-22 08:00:00
────────────────────────────────────
AGENT              MACHINE     STATUS    LAST SEEN     CAPABILITIES
my-agent-01        server-a    ONLINE    2m ago        content, research, qa
my-agent-02        server-b    ONLINE    1m ago        code, research
my-agent-03        server-c    OFFLINE   47m ago       analytics

SUMMARY: 2/3 agents online | 0 tasks in progress | 0 failures (24h)
```

---

## Health Checks

Fleet Commander Lite monitors agents with two basic checks:

### 1. Ping Check

```
PING(agent):
  result = ssh agent.endpoint "echo OK" (timeout 10s)
  if result == "OK":
    agent.status = "online"
    agent.last_heartbeat = now()
  else:
    agent.status = "suspect"
```

### 2. Process Check

```
PROCESS_CHECK(agent):
  result = ssh agent.endpoint "pgrep -f ollama && echo RUNNING || echo STOPPED"
  if result contains "RUNNING":
    agent.model_status = "ready"
  else:
    agent.model_status = "not_running"
    log warning: "Model not running on " + agent.machine
```

```bash
# Run health checks on all agents
fleet-commander health

# Check a specific agent
fleet-commander health --agent my-agent-01
```

---

## Usage

```bash
# Register agents
fleet-commander register agent-card-a.json
fleet-commander register agent-card-b.json

# Check who's online
fleet-commander status

# Route a task to the best agent for it
fleet-commander run "Extract key moments from transcript" --capability transcript-processing

# Chain agents in a pipeline
fleet-commander pipeline "Transcript → post" \
  --stages "extract:agent-a → write:agent-b → qa:agent-a"

# Health check
fleet-commander health
```

---

## What's in the Full Version

Fleet Commander Lite gives you the foundation. The full Fleet Commander skill unlocks:

| Feature | Lite | Full |
|---|---|---|
| Agent registry | Yes | Yes |
| Specialist pattern | Yes | Yes |
| Pipeline pattern | Yes | Yes |
| Scatter-Gather pattern | - | Yes |
| Swarm pattern | - | Yes |
| Tournament pattern | - | Yes |
| Consensus pattern | - | Yes |
| Weighted routing algorithm | - | Yes |
| Shared memory with conflict detection | - | Yes |
| Circuit breaker failure recovery | - | Yes |
| Cost optimization + model tier hierarchy | - | Yes |
| Escalation matrix (3 levels) | - | Yes |
| Performance scoring feedback loop | - | Yes |
| Full communication protocol (11 msg types) | - | Yes |
| Scaling analysis (3 → 50+ agents) | - | Yes |
| Post-mortem templates | - | Yes |
| 10 documented failure modes with recovery | - | Yes |

→ Unlock Swarm + Tournament patterns, failure recovery, and cost optimization at **koino.capital/kits**

