multi-agents
Hand a coding task to a team of coding agents (Claude Code, Codex) that work in isolated git worktrees and return a patch plus a…
Build multi-agent teams for real work in this repo. Use when adding a team topology, a harness, or a workspace under agent/teams, or when extending the shared patterns in agent/workflows.
Claude Code
$ npx -y skills add BichengWang/multi-agents --skill multi-agent-skill --agent claude-code
Codex
$ npx skills add BichengWang/multi-agents --skill multi-agent-skill -a codex -y
Cursor
$ npx skills add BichengWang/multi-agents --skill multi-agent-skill -a cursor -y
Gemini CLI
$ npx skills add BichengWang/multi-agents --skill multi-agent-skill -a gemini-cli -y
GitHub Copilot
$ npx skills add BichengWang/multi-agents --skill multi-agent-skill -a github-copilot -y
OpenCode
$ npx skills add BichengWang/multi-agents --skill multi-agent-skill -a opencode -y
Windsurf
$ npx skills add BichengWang/multi-agents --skill multi-agent-skill -a windsurf -y
name: multi-agent-skill description: Build multi-agent teams for real work in this repo. Use when adding a team topology, a harness, or a workspace under agent/teams, or when extending the shared patterns in agent/workflows.
This repo runs teams of coding agents and measures whether a team beats a solo agent.
CodingTask ──► Team (topology) ──► TeamResult(patch, runs, usage, duration_s, meta)
│
├─ drives Harness : one coding agent run to completion (external CLI or SDK agent)
└─ in a Workspace : isolated checkout at the base commit (local worktree or sandbox)
Topologies reuse agent/workflows:
SequentialWorkflow : A → B → C
RefineLoop : generate ⇄ evaluate (feedback) until accepted; returns the best draft
BestOfN : N × (generate → evaluate) concurrently, keep the best
Router : classify → hand off to one specialist workflowContracts: `agent/teams/types.py` (see `reference/protocol.md`). Harnesses and teams touch the repository only through `Workspace.exec`, so one team runs locally and in benchmark sandboxes.
1. Never change the contracts in `agent/teams/types.py` without updating every implementation. 2. Patterns in `agent/workflows` never call the SDK directly; they call an injected `runner(agent, input_text) -> final_output`. Tests inject a fake runner. 3. Evaluators used by `RefineLoop` / `BestOfN` return an `agent.workflows.Verdict` subclass (`score`, `passed`, `feedback`, plus domain fields). 4. Cost honesty: a harness that cannot report or price a call returns `Usage.cost_usd=None`; never guess prices. Every harness call made by a team appears in `TeamResult.runs`. 5. Reviewers and judges must not mutate a worker's workspace; give them a fork. 6. The run budget (`--max-cost`, `agent/teams/budget.py`) is enforced by `build_team`, which wraps every harness except the `check` pseudo-harness in `BudgetedHarness`. Topologies never call the budget: a refused run raises `BudgetExceeded`, which they record like any failed run (`meta["failures"]`, not in `TeamResult.runs`). Runs already admitted finish, so spend can overshoot; unpriced runs block further runs unless `allow_unpriced`. 7. `plan` runs may carry the roles `coder`/`reviewer` inside subtasks (`reviewer=H`, a `ReviewTeam` per subtask in its own fork) and extra `planner` runs (`replans=N`); subtasks are numbered across rounds and replaced ones get status `replanned`.
1. `agent/teams/harnesses/<name>.py`: implement `Harness.run` with `workspace.exec` only; parse the CLI's machine-readable output into `HarnessRun` (final message, session id, usage, cost). If the CLI reports cumulative usage on resume, subtract the session's previous total. 2. Register it in `agent/teams/spec.py` (`HARNESSES`, `build_harness`, `is_priced`). 3. Map `--permissions safe|bypass` to the CLI's own sandbox / bypass flags. 4. Capture real CLI output as sanitized fixtures in `tests/teams/fixtures/` and test parsing.
1. Implement it in `agent/teams/topologies.py` (or its own module, like `plan.py`) on top of an `agent/workflows` pattern. 2. Add its spec kind and keys to `agent/teams/spec.py`; `Team.name` must be the canonical spec. 3. Test with fake harnesses on a temp git repo (`tests/teams/`): selection, failures, cleanup.
Offline and deterministic: `tests/workflows/fakes.py` (`FakeAgent`, `fake_runner`, `scripted_evaluator`) for patterns; fake harnesses and temp git repos for teams. Run `make test`, then `make check` before a PR.
Multi-agent teams for real work: measured, not assumed. Docs · Quickstart · Teams · Benchmark · Featured in Tech Forum: Does a Team of AI Coding Agents Beat One?
Hand a coding task to a team of coding agents (Claude Code, Codex) that work in isolated git worktrees and return a patch plus a…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration