Autonomous multi-agent task execution engine. SWAT dispatches tasks to specialist squads — each running as an independent AI coding agent session.
curl -fsSL https://github.com/LangSensei/swat/main/install.sh | bashirm https://github.com/LangSensei/swat/main/install.ps1 | iexThis will:
- Download the latest release for your platform
- Install the SWAT binary to
~/.swat/bin/and add it to your PATH (Linux/macOS: appends to.bashrc/.zshrc; Windows: updates user PATH in the registry) - Install framework blueprints to
~/.swat/blueprints/
If you use OpenClaw, install the bridge plugin separately:
# See https://github.com/LangSensei/swat-openclawcurl -fsSL https://github.com/LangSensei/swat/main/uninstall.sh | bashirm https://github.com/LangSensei/swat/main/uninstall.ps1 | iexAdd --purge to also remove runtime data (operation history).
SWAT exposes 12 MCP tools. Configure your agent to connect:
{
"mcpServers": {
"swat": {
"command": "swat",
"args": []
}
}
}swat_dispatch— Dispatch a task (auto-classified to the right squad)swat_ops— List operations with filters (status/since/limit/offset)swat_cancel— Cancel a running operation
swat_squads— List installed squadsswat_squad_browse— Browse the marketplaceswat_squad_install— Install a squad from the marketplaceswat_squad_uninstall— Uninstall a squadswat_squad_update— Update a squad to the latest marketplace version
swat_schedule_create— Create a recurring task (zero LLM cost)swat_schedules— List all schedulesswat_schedule_delete— Delete a schedule
swat_notify— Send a notification to the user
| Flag | Description |
|---|---|
--version |
Print the installed version and exit |
--mcp-only |
Start only the MCP server — skip the background commander loop |
--runtime <name> |
Set the AI coding agent runtime (default: copilot) |
--notify <target> |
Set the notification target: desktop, openclaw (default: desktop) |
Agent → MCP → SWAT Commander (Go) → Squads (AI coding agent sessions)
SWAT is runtime-agnostic. The Commander orchestrates operations while a pluggable RuntimeAdapter handles runtime-specific details (dot-directories, agent files, MCP config paths, hooks).
| Component | Role |
|---|---|
| Commander | Go MCP server. Handles dispatch, workspace composition, dependency resolution, scheduling, and completion scanning. |
| Squads | Specialist agents. Each runs as an independent coding agent session with its own skills, MCP tools, and protocol. |
| RuntimeAdapter | Abstracts runtime differences. Each adapter knows its dot-dir, agent file name, MCP config path, and how to launch the agent. |
| Runtime | Dot-Dir | Agent File | MCP Config | Launch Command |
|---|---|---|---|---|
copilot (default) |
.github/ |
AGENTS.md |
.mcp.json |
copilot |
gemini |
.gemini/ |
GEMINI.md |
.gemini/settings.json |
gemini |
Set the runtime with --runtime <name> (e.g. swat --runtime gemini).
- You dispatch a task (Commander auto-classifies to the right squad)
- Commander provisions the workspace — copies squad snapshot to
.squad/, skill hooks to<dotdir>/hooks/, skill content to<dotdir>/skills/, resolves MCP dependencies, writes the agent file (runtime-specific) - A coding agent session launches in the operation directory, reads the agent file + OPERATION.md
- Commander's background loop scans for completion (OPERATION.md status + report.html)
- Results surface through your agent
Skills vs Hooks: Skills are runtime-agnostic (shared across all runtimes). Hooks are runtime-specific and live under
hooks/copilot/,hooks/gemini/, etc. in each skill's blueprint.
Built-in Go cron scheduler for recurring tasks — zero LLM cost:
- Standard 5-field cron expressions with timezone support
immediateflag for first-run-now behavior- In-flight protection (skips if previous run still active)
- Startup catch-up (checks due schedules on boot)
~/.swat/
├── blueprints/ # Templates & installed content
│ ├── OPERATION.md # Operation template
│ ├── squads/
│ │ ├── _framework/ # Core protocol (versioned with binary)
│ │ │ ├── PROTOCOL.md
│ │ │ └── TEMPLATE.md
│ │ └── <squad>/ # Squad blueprints
│ │ └── MANIFEST.md
│ ├── skills/ # Shared skills (runtime-agnostic)
│ └── mcps/ # MCP server configs
│
├── squads/ # Runtime data
│ ├── _unclassified/ # Operations before squad assignment
│ └── <squad>/
│ └── operations/
│ └── <id>/ # Operation workspace
│ ├── OPERATION.md
│ ├── <agent-file> # Runtime-specific (AGENTS.md or GEMINI.md)
│ ├── <mcp-config> # Runtime-specific (.mcp.json or .gemini/settings.json)
│ ├── report.html
│ ├── .squad/ # Squad blueprint snapshot (read-only)
│ └── <dotdir>/ # Runtime-specific (.github/ or .gemini/)
│ ├── hooks/ # Skill hooks (runtime-specific)
│ └── skills/ # Skill content
│
└── schedules/ # Schedule definitions (JSON)
└── <id>.json
- Linux, macOS, or Windows
- GitHub CLI (authenticated)
- At least one supported AI coding agent runtime:
| Runtime | Requirements |
|---|---|
| Copilot (default) | GitHub Copilot CLI (npm install -g @github/copilot), Node.js 18+ |
| Gemini | Gemini CLI installed and available as gemini on PATH |
go build -o swat . # Go 1.24+
# With version injection:
go build -ldflags "-X main.version=v1.0.0" -o swat .- swat-marketplace — Squads, skills, and MCPs
- swat-openclaw — OpenClaw integration (plugin + skill)
MIT