Cheat sheets

Multi-Agent Case Studies and Eval Farms

Three 2026 reference systems, the software team capstone, and a fenced, resumable eval farm in Go.

  • Concepts and terms
  • Tasks and commands
  • Annotated code
  • Diagrams
  • Comparisons
  • Defaults and numbers
  • Troubleshooting
  • Questions and tips

Source

Three reference cases#

FactorAnthropic ResearchMetaGPT / ChatDevOpenClaw / Moltbook
TopologySupervisor-workerSOP role decompositionPopulation-scale substrate
Key result+90.2% over single-agent Opus 4MacNet: >1000 agents via DAGs~2.3M agent accounts in days
Cost signal15x tokens per queryPer-role budgetPer-interaction pricing
Pattern to copyFresh-context subagentsStructured artifact handoffsPrompt-injection threat model
VerificationExplicit verifier roleQA EngineerIn-network validators
FrameworkClaude Agent SDK or LangGraphCrewAI or MetaGPTCustom substrate + MCP + A2A
Pick forResearch and knowledge tasksEngineering tool chainsNetwork-effect social products

From Lesson 16.25, 16.25 code/main.py

Lease and receipt rules#

Acquire: a done or live lease is a conflict
if l.Done || (l.Worker != "" && now < l.Until) {
l.Until = now + ttl
l.Version++
Submit: check owner and version first
if l.Worker != worker || l.Version != version {
a done lease accepts only the same result again
if l.Result == result {
a first completion must come before expiry
if now >= l.Until {

From solution/stage2.go, solution/stage3.go

Defaults and limits#

SettingDefaultNote
--shards4Fixed partition count, range 1..1024
--workers2Concurrent processes, range 1..64
--lease-ms30000Claim duration
--now-ms-1Uses the wall clock
--delay-ms0Range 0..60000
--storefarm-dataSame-host directory
Snapshot size4 MiBWhole-run snapshot
Result size1 MiBLargest accepted result

From solution/main.go, distributed-eval-farm/API.md, distributed-eval-farm/README.md, docs/en.md

Failure modes#

SymptomCauseFix
Worker exits 86Intentional crash after claimRun again at the expiry boundary
Run exits 1 with complete:falseRemaining leases still ownedInvoke run again after expiry
Old worker gets a fencing errorReplacement committed firstExpected. Snapshot stays unchanged
Run exits 1 on a changed datasetDataset hash differsUse a different store
Subtasks cannot be implementedPlan too vaguePlan template with explicit interfaces
Reviewer approves a bugReviewer false-approveInjected-bug probe, tune the prompt
Viral prompt spreads to agentsPrompt injection at scaleTreat cross-agent messages as untrusted
Research agents hallucinateNo explicit verifier roleAdd a verifier, about 20-30% of tokens

From distributed-eval-farm/README.md, distributed-eval-farm/API.md, docs/en.md, Lesson 19.10, Lesson 16.25

Common patterns#

Orchestrator + workers
every case has a supervisor or network effect.
Handoff contracts
artifacts between roles follow a schema.
Verification
a first-class role in every case.
Scaling
topology + substrate, not just more agents.
Effort scaling
simple is 1 agent with 3-10 tool calls. Complex is 10+ subagents.
Rainbow deploy
keep old runtime versions alive for in-flight agents.
Prompt injection
treat agent profiles and cross-agent messages as untrusted input.

From Lesson 16.25

Map a design to a case#

def map_to_case(d: Design) -> str:
if d.task_type == "population" or d.user_facing_network:
return "openclaw_moltbook"
if d.task_type == "engineering" or d.roles_distinct:
return "metagpt_chatdev"
return "anthropic_research"research and the default
print_case(case_key)patterns, framework, citation
print_landscape()FRAMEWORK_LANDSCAPE rows

From 16.25 code/main.py

Software team build steps#

1Task boardfile-backed JSONL of typed messages. Agentssubscribe to tags.2Architectemits one plan_request with a DAG of subtasksand interfaces.3Coderseach claims one subtask in a fresh git worktreeadd branch.4Merge coordinatorthree-way merges the N branches into a stagingbranch.5Reviewercannot approve diffs it authored. Routesreview_feedback to the coder.6Testerruns the suite in a clean sandbox. Failures loopback to the owner.7Accountingone span per role-boundary message with payloadsize and model.8Post-mortema handoff-failure histogram for each failedissue.

From Lesson 19.10

Eval farm architecture#

InitFarmworker processcasesresultclientcases.jsonid, prompt,expected, responsePartitionFNV-1a into shardsstorefarm.jsonunder ledger.lockprocessrunParallel pool,bounded wavesprocessClaimShardlock, load,acquire, persistprocessWorkShardexact match outsidethe lockprocessCompleteShardreload, Submitwhile lockedclientReportcoverage andreceiptsInitFarmworker processcasesresultclientcases.jsonid, prompt,expected, responsePartitionFNV-1a into shardsstorefarm.jsonunder ledger.lockprocessrunParallel pool,bounded wavesprocessClaimShardlock, load,acquire, persistprocessWorkShardexact matchoutside the lockprocessCompleteShardreload, Submitwhile lockedclientReportcoverage andreceipts

From distributed-eval-farm/README.md, distributed-eval-farm/API.md, docs/en.md

Eval farm commands#

CommandWhat it does
go build -o /tmp/eval-farm .Build the reference binary in solution
init --store DIR --input FILE --shards NBind dataset hash and shard count
run ... --shards N --workers WLaunch bounded process waves
worker --store DIR --worker-id NAMEClaim, evaluate and submit one shard
status --store DIRValidate and report the snapshot
demo --input FILEPrint crash and recovery snapshots
--crash-after-claimExit 86 after the durable claim
--all --solution --strictGrade the reference with project_test.py

From distributed-eval-farm/README.md, distributed-eval-farm/API.md, docs/en.md

Eval farm contracts#

TaskCode
Stage 1, stable shard per IDPartition(ids []string, shards int)
Hash an IDh := fnv.New32a()
Stage 2, fence a leaseAcquire(l, worker, now, ttl)
Stage 3, accept one resultSubmit(l, worker, version, now, result)
Stage 4, bounded poolParallel(ctx, ids, workers, run)
Lease fieldsShard, Worker, Version, Until, Result, Done
ErrorsErrInvalid, ErrConflict, ErrLimit

From solution/stage1.go, solution/stage2.go, solution/stage3.go, solution/stage4.go, solution/types.go

Numbers to remember#

Token usage
explains 80% of BrowseComp variance.
MAST
failure rates of 41-86.7% on real multi-agent systems.
OpenClaw
247k GitHub stars in ~4 months.
Capstone eval
50 SWE-bench Pro issues against one Sonnet 4.7 baseline.
Rubric
25 pass@1, 20 speedup, 20 review quality, 20 tokens, 15 coordination.
Farm sample
four records score 3/4. Two waves launch four processes.

From Lesson 16.25, Lesson 19.10, distributed-eval-farm/README.md

Questions#

Why does multi-agent research win?
Each subagent gets a fresh context window.
Which benchmark?
SWE-bench Pro. Verified is contaminated.
What does the capstone measure?
Whether multi-agent wins per dollar, not only whether it works.
Can a late correct worker overwrite?
No. old/v1 fails when new/v2 completed the shard.
Does recovery at 109 steal the lease?
No. It reports a pending run and exits 1.

From Lesson 16.25, Lesson 19.10, distributed-eval-farm/README.md, docs/en.md