` | auto | Demo: measured machine capacity. LLM runs: min(swarm, 12) โ rate limits bind first |
| `--provider ` | `anthropic` | or `openai` for any OpenAI-compatible endpoint |
| `--model ` | `claude-opus-5` | see Model tiers below |
| `--base-url ` | OpenRouter | OpenAI-compatible endpoint (Ollama, DashScope, Zhipu, vLLMโฆ) |
| `--effort ` | `medium` | Anthropic only. `low` โ cheaper, `high` โ more thorough |
| `--no-verify` | verify on | Skip the Claude review of findings |
| `--personas ` | all, cycled | e.g. `--personas speedrun-sam,newbie-nora` |
| `--strategy ` | complete-task | The second axis โ `rage-quit`, `dark-patterns`, โฆ |
| `--race` | off | Barrier-synced concurrency run |
| `--scene ` | off | Multi-user scene: `marketplace`, `flash-sale` (scales with `--swarm`), `collab-doc`, `chat`. See `shoal scenes` |
| `--allow-domain ` | โ | Permit a non-local target (else confirm interactively) |
| `--max-steps ` | 30 | Hard cap per agent (personas also have patience budgets) |
| `--headed` | off | Show the actual browser windows |
| `--port ` | 4321 | Dashboard port |
Reports land in `./shoal-report.md` + `./shoal-report.json`, findings clustered by
similarity and ranked by how many agents hit them.
## Model tiers โ premium, subscription, cheap, free
Agents see pixels, so any **vision + tool-calling** model can drive one. Three providers:
**`--provider anthropic`** (default) uses Claude's native
[computer use](https://platform.claude.com/docs/en/agents-and-tools/computer-use) โ
the strongest driving, grounding, and in-character narration, metered per token.
`claude-opus-5` for quality, `claude-haiku-4-5` for cheap swarms.
**`--provider subscription`** runs the swarm on your **Claude Code Pro/Max login** โ no
API key, no metering, just the flat fee you already pay. If you're logged into Claude
Code, this works with zero setup:
```bash
npm run shoal -- run https://your-app.test --provider subscription --swarm 3
```
It reads your Claude Code token live (the token rotates hourly โ Claude Code keeps it
fresh) and drives small, gently-paced swarms. The **binding constraint is the rate pool
you share with your own Claude Code usage** โ in testing, a single 2-agent run was enough
to rate-limit the whole subscription for a while. So the default model is `claude-haiku-4-5`
not because it's cheap (the sub is flat-fee โ model choice costs nothing) but because it's
the **lightest load on that shared pool**, giving you the most agent-steps before you
throttle your own coding. For better grounding and better-worded findings, use
`--model claude-sonnet-4-6` โ and expect to hit the limit faster. The cost meter reads
`$0 ยท sub` and still shows what the run *would* have cost on the metered API.
> This uses a subscription credential outside the first-party Claude Code app. It works,
> it's great for personal/local use, and it's the honest cheapest path for a solo dev โ
> but keep swarms modest, and don't build production automation on it (the token rotates
> and the shared rate pool is real). For big or unattended swarms, use `--provider openai`
> with a local/cheap model, or `--provider anthropic` with an API key.
>
> **macOS note:** Claude Code on macOS stores its token in the Keychain rather than
> `~/.claude/.credentials.json`, so subscription mode currently finds no credentials
> there โ use `--provider anthropic` or `--provider openai` on a Mac. Everything else
> (demo, scenes, LLM swarms) is fully cross-platform.
**`--provider openai`** speaks to any OpenAI-compatible endpoint through a generic
computer tool. This is the scale tier:
```bash
# Qwen-VL via OpenRouter (cheap, good GUI grounding)
OPENAI_API_KEY=sk-or-... npm run shoal -- run --provider openai \
--model qwen/qwen3-vl-plus --swarm 50 --concurrency 10
# GLM-V via Zhipu's endpoint
OPENAI_API_KEY=... npm run shoal -- run --provider openai \
--base-url https://open.bigmodel.cn/api/paas/v4 --model glm-4.6v
# Local model via Ollama โ zero marginal cost per agent
OPENAI_API_KEY=ollama npm run shoal -- run --provider openai \
--base-url http://localhost:11434/v1 --model qwen3-vl
```
**The verify pass keeps cheap swarms honest.** Weak models produce artifact findings โ
"the button doesn't work" when the agent simply missed the button. After the swarm
finishes, one strong Claude call reviews every finding against the agent's action trail
and screenshot, and marks it **โ confirmed** or **โ suspect** (kept in the report,
flagged for human review โ never silently dropped). This is the tiered pattern: *many
cheap explorers, one smart editor.* Skip with `--no-verify`; it runs whenever Anthropic
credentials are present, whatever provider drove the swarm.
## Scale: up to 1,000 agents
Agents share a small **pool of Chromium processes** (isolated context each) and are
**freeze-tier scheduled**: an agent's page is frozen โ zero CPU โ whenever it's waiting
on the model, a scene signal, or a scripted pause, and thaws only for the instant it
acts and screenshots. So hundreds of agents can be *resident* (memory-bound, measured
~57MB each) while only a CPU-bound active set renders at any moment. Past 24 agents the
camera wall shows the agents that are streaming video โ a rotating set, since not every
agent in a big swarm can push frames โ while the tank view is what represents the whole
swarm at once.
```bash
npm run demo -- --swarm 100 --concurrency 16 # 100 scripted agents, zero API cost
```
Mock mode scales as far as your RAM; LLM mode scales as far as your budget and your
provider's rate limits โ which usually means waves of 10โ50 on Claude, and much larger
swarms on the cheap tier.
How far one machine actually goes, with the measurements:
**[Running 1,000 browser sessions on one machine](docs/SCALING.md)**.
### Cost โ measured, not claimed
Shoal meters every token. The dashboard shows a **live dollar counter** while the swarm
runs, the CLI prints the total, and the report includes cost per agent-session plus a
what-if table pricing the same token volume at each tier:
| Tier | Same swarm costs |
|---|---|
| `claude-opus-5` | $$$ (premium: best driving + narration) |
| `claude-haiku-4-5` | ~5ร cheaper |
| Qwen/GLM-tier APIs | ~25โ50ร cheaper |
| local model (Ollama) | $0.00 |
A browser agent step is one vision API call; a session is ~15โ25 steps. For models
shoal doesn't know prices for, pass `--price-in`/`--price-out` ($ per million tokens)
to enable the meter. Start small with `--effort low`, scale what works.
## Personas are the whole trick
The failure mode of simulated users is that all your "different" users are secretly the
same user. Shoal's personas force behavioral diversity: distinct goals, knowledge limits,
patience budgets, and quirks.
The built-in library ([`personas.yaml`](packages/core/personas/personas.yaml)) is a
starting point โ โก Speedrun Sam ยท ๐ง Careful Carl ยท ๐ฑ Newbie Nora ยท ๐ Chaos Cathy ยท
๐ต๏ธ Skeptic Saul ยท โจ๏ธ Keyboard Kai ยท ๐ฑ Distracted Dee ยท ๐ Literal Lena โ and adding one
is ~10 lines of YAML.
But the real power is **generating personas dynamically** so the swarm mirrors *your*
audience, from either the **product outlook** or **real analytics**:
```bash
# From what the product is (or inferred from the URL by vision)
npm run shoal -- run https://your-app.test --generate 15 \
--audience "impulse-buy streetwear store, Gen-Z, almost entirely mobile"
# Grounded in real PostHog/Sentry/Clarity data โ weighted by your actual traffic,
# primed to hit your actual drop-offs and errors
npm run shoal -- run https://your-app.test --generate 15 --from-logs ./analytics.json
```
Product-outlook generation is the zero-setup on-ramp; the **log-data path is where it gets
interesting** โ personas shaped by your real traffic, primed to hit your real drop-offs.
Full guide, including the analytics JSON shape: **[docs/GENERATION.md](docs/GENERATION.md)**.
## How it works
```
โโ CLI โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ orchestrator โ
โ โโ agent #1 โโ Playwright browser โ Claude computer use โ
โ โโ agent #2 โโ Playwright browser โ Claude computer use โ
โ โโ โฆ โ
โ โโ events โโโบ one server, one port: โ
โ / dashboard (camera wall, React) โ
โ /ws live event stream (screenshots, thoughts, โ
โ /shop the bait shop findings) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
- **Vision, not DOM.** Agents see rendered pixels, so they catch what selector-based
tests can't: buttons that *look* disabled, invisible focus states, error messages
that never appear.
- **Findings are the point.** Every agent narrates in first person and files findings
in the moment. The report clusters near-duplicates across agents โ a trap hit by 5
personas ranks above one hit by 1.
- **Mock mode is a feature, not a stub.** `shoal demo` drives real browsers through
scripted sessions โ reproducible demos, CI smoke tests, and dashboard development,
all at zero token cost.
## What shoal is not
It's a **filter, not an oracle**. Agent behavior correlates with human behavior
imperfectly; treat findings as cheap leads for real user testing, not a replacement.
The five humans you do test with should never waste their session on a bug an agent
would have caught for pennies.
## Development
```bash
npm install
npm run build # dashboard + core
npm run dev:dashboard # Vite dev server (proxies /ws to :4321)
npm run shoal -- demo # scripted swarm
```
Built in the open. Fork it, break it, send a PR โ or just point it at your own site and
watch the shoal go. A hosted version may happen โ โญ star and watch the repo if you'd
use one. MIT. ๐