# Polyphony

Multi-agent orchestration with container-isolated workspaces, each agent session runs...

- Repository: https://github.com/alinaqi/maggy (710 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-13
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add alinaqi/maggy --skill polyphony -g -a claude-code -y`
Codex: `npx skills add alinaqi/maggy --skill polyphony -g -a codex -y`
Cursor: `npx skills add alinaqi/maggy --skill polyphony -g -a cursor -y`
Gemini CLI: `npx skills add alinaqi/maggy --skill polyphony -g -a gemini-cli -y`

## Description

Multi-agent orchestration with container-isolated workspaces, each agent session runs in its own Docker container with independent git branches

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Polyphony, Multi-Agent Orchestration

Container-isolated workspaces for parallel agent execution. Each agent gets its own Docker container with a full git clone on its own branch. No conflicts, independent tests, clean PRs.

---

## Architecture (6 Layers)

1. **Work Source**, Tasks from GitHub Issues (`gh api`) or local SQLite queue
2. **Orchestrator**, Supervisor loop: discover -> claim -> route -> provision -> run -> verify -> land
3. **Router**, Pure function: Task x Policy -> RunSpec (5-dimension complexity scoring)
4. **Identity Broker**, Resolves named credentials to volume mounts + env overlays
5. **Workspace Manager**, Per-task `git clone --reference`, branch checkout, cleanup
6. **Worker Runtime**, Docker container create/start/stop/logs lifecycle

---

## Task Lifecycle

```
DISCOVERED -> CLAIMED -> ROUTED -> PROVISIONED -> RUNNING -> VERIFYING -> LANDED
                                                     |           |
                                                     v           v
                                                   FAILED --> BLOCKED
                                                     |
                                                     v
                                                   CLAIMED (retry)
```

---

## Prerequisites

- Docker or OrbStack installed and running
- At least one agent CLI available (Claude, Codex, or Kimi)
- CLI subscriptions configured (not API keys)

Check:
```bash
command -v docker &>/dev/null || command -v orbctl &>/dev/null
```

---

## Configuration

All config lives in `~/.polyphony/`:

| File | Purpose |
|------|---------|
| `config.yaml` | Workspace root, poll interval, max concurrency |
| `identities.yaml` | Named credential bundles with volume paths |
| `agents.yaml` | Agent profiles (CLI commands, strengths) |
| `routing.yaml` | Routing rules and fallback chains |

Initialize with: `polyphony init`

---

## Routing Rules

The rest: https://github.com/alinaqi/maggy/blob/HEAD/skills/polyphony/SKILL.md
