# car-multi
Multi-agent coordination patterns for the [Common Agent Runtime](https://github.com/Parslee-ai/car).
## What it does
Provides coordination patterns for running multiple agents together:
**Swarm** (parallel/sequential/debate), **Pipeline** (linear chain), **Supervisor** (review loop),
**Delegator** (spawn specialists mid-run), **SpawnSubtask** (ephemeral tool-subset sub-agents),
**MapReduce** (fan-out + reduce), **Vote** (majority wins), **Fleet** (independent missions),
**AdversarialReview** (fresh-context verification), **Tournament** (pairwise ranking),
and **Advisor** (bounded stronger-model guidance while the executor stays in control).
Agents communicate via shared state, task enrichment, and async mailboxes.
All coordinations share a runtime-enforced **`CoordinationBudget`** (token/cost/agent
caps; see `budget.rs`) and can run agents under per-agent **state isolation**
(`task_context`) and **filesystem workspace isolation** (`Swarm::with_workspaces`,
`workspace.rs` — an isolated directory or `git worktree` per parallel agent).
## Usage
```rust
use car_multi::{Swarm, SwarmMode, AgentSpec, AgentRunner, SharedInfra};
let agents = vec![
AgentSpec::new("researcher", "You find information."),
AgentSpec::new("writer", "You write summaries."),
];
let swarm = Swarm::new(agents, SwarmMode::Sequential);
let result = swarm.run("Summarize recent news", &runner, &infra).await?;
```
Part of [CAR](https://github.com/Parslee-ai/car) -- see the main repo for full documentation.