# Agent Topology Selector

> Use when deciding how to split a task across the crew roster — whether it needs one agent, several running in parallel, a sequential handoff, or a crew-lead-planned hierarchy — before dispatching, especially when a task looks like it could go to more than one crew-* agent.

- Skill: `presidenteog/agent-topology-selector` (Agent Skill)
- Install (CLI): `npx skillmds@latest add presidenteog/agent-topology-selector`
- Raw SKILL.md: https://api.skillmd.com/api/skills/presidenteog/agent-topology-selector/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: PresidenteOG (https://skillmd.com/u/presidenteog)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/presidenteog/agent-topology-selector

---


# Agent Topology Selector

Adapted from https://raw.githubusercontent.com/ai-boost/awesome-prompts/main/prompts/multi_agent_topology_selector.txt (ai-boost/awesome-prompts, GPL-3.0) — rewritten, not copied.

## Overview
More agents is not automatically better — every extra agent is state that has to move between contexts, and a chance for two agents to duplicate or contradict each other's work. Pick the coordination shape the task's structure actually demands, then name who owns what.

## When to use
- A task looks like it could span more than one `crew-*` agent and it isn't obvious whether they should run in parallel, in sequence, or under `crew-lead`.
- Someone proposes spinning up several agents for something a single one could finish.
- Reviewing a dispatch table before executing it.

## Evaluate first
| Dimension | Ask |
|---|---|
| Task structure | Are the subtasks genuinely independent, or does step 2 need step 1's output? Does anything need a single arbiter deciding between conflicting outputs? |
| Coordination cost | How much state has to move between agents, and how often? Since subagents here can't message each other directly, all handoff state passes back through the main thread — does that overhead outweigh the parallelism gain? |
| Failure surface | Could two agents duplicate the same edit? Could one act on a stale view of a file the other just changed? Is ownership of each file or decision unambiguous? |
| Constraints | What's the actual token/time budget, and does this need a human checkpoint before it lands? |

## Topologies
| Shape | Use when | Owner in this workspace |
|---|---|---|
| Single agent | One specialist can finish the whole thing | Dispatch directly, e.g. `crew-coder` |
| Parallel | Subtasks are truly independent, no shared file or state | Main thread spawns each `crew-*`/`cavecrew-*` agent itself — subagents can't spawn each other |
| Sequential pipeline | Each stage needs the previous stage's output (investigate → build → review) | Main thread runs them in order, passing the prior receipt forward |
| Hierarchy | The task needs upfront decomposition and ownership assignment across several specialists | `crew-lead` (inherits main's model) plans and returns a dispatch table; main thread executes it |
| Hybrid | A hierarchy where some branches then run in parallel | Only justify this when at least one branch is genuinely independent of the others — don't default to it |

## Process
1. State the task in one sentence and list its subtasks.
2. Mark each subtask pair: independent, or dependent-on-previous.
3. Pick a topology from the table — default to the simplest one that fits; a single agent is often enough.
4. If parallel or hybrid, name which agents run concurrently and confirm they don't touch the same files.
5. If hierarchical, confirm `crew-lead` is producing a dispatch table, not itself trying to invoke agents — it can't.
6. State the failure control: if one branch fails, does the rest still land, or does everything block?
7. Name the human checkpoint, if any, before the result is treated as final.

## Quality bar
- Recommend exactly one topology; only call out a hybrid if a branch is clearly independent.
- If one agent finishes the job, say that and stop — don't manufacture parallelism.
- Be concrete about what state crosses agent boundaries and who reconciles it, since it always has to pass back through the main thread here.

