Skip to content

docs(part5): add a complete multi-agent worked example (#13)#19

Merged
OnlyTerp merged 2 commits into
masterfrom
devin/1780514899-multi-agent-example
Jun 3, 2026
Merged

docs(part5): add a complete multi-agent worked example (#13)#19
OnlyTerp merged 2 commits into
masterfrom
devin/1780514899-multi-agent-example

Conversation

@OnlyTerp

@OnlyTerp OnlyTerp commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #13. Part 5 explained the orchestration patterns (sub-agents-as-GC, Anthropic's 5 coordination patterns, CEO/COO/Worker) but never showed a single end-to-end multi-agent system wired together. This adds a Chief of Staff + two workers worked example to Part 5:

  • File layoutSOUL.md / AGENTS.md / TOOLS.md per agent (the three files that survive the 2026.5.22 worker-bootstrap narrowing).
  • openclaw.json configagents.defaults + agents.list[] with a frontier orchestrator and cheaper/local workers (one in lean mode).
  • Tool + approval scoping — Task Brain semantic approvals per agent + a pointer to tools.toolsBySender, so workers are enforced into their lane rather than prompt-trusted.
  • Orchestrator AGENTS.md — the actual delegation rulebook (when to spawn, self-contained work orders, Generator-Verifier verification).
  • Runtime flow — a concrete spawn trace showing both workers running as Task Brain tasks, visible in openclaw tasks list.
  • Optimization table — the token/latency levers (lean orchestrator context, cache-ttl pruning, cheap workers, lean mode, cheap compaction model).

Everything is built from the config shapes already in templates/openclaw.example.json — no new tools or claims invented.

Type of change

  • Correction to an existing part
  • New part

Review checklist

  • Added or updated cross-links from the README TOC and any related parts
  • Sources / release notes linked in the PR description (not inline as footnotes)
  • Ran markdownlint-cli2 and lychee --offline locally (CI will also run these)
  • No speculation presented as fact — uncertainty is called out below

Notes / flagged items

  • Per-agent approval/tool nesting: the example shows the taskBrain.approvals.defaults block verbatim from the template, then describes the per-agent intent in prose and explicitly tells the reader to confirm the exact per-agent nesting against their version (consistent with the Part 24: 'openclaw flows' CLI and semantic approval categories don't exist in 2026.4.15 / 2026.4.19-beta.2 #8 version-accuracy caveat, which this section links to). I deliberately avoided inventing a precise agents.list[].taskBrain.approvals key shape.
  • Placed inside Part 5 rather than as a brand-new numbered part to avoid TOC/renumbering churn; happy to split it into its own part if you'd prefer.

Link to Devin session: https://app.devin.ai/sessions/21e86e63e6ed4a7cb88868ac2243d9ef
Requested by: @OnlyTerp


Open in Devin Review

Add a Chief of Staff + workers example to Part 5: file layout
(SOUL/AGENTS/TOOLS per agent), an agents.list openclaw.json config, Task
Brain semantic-approval scoping per agent, the orchestrator AGENTS.md
delegation rulebook, the runtime spawn flow, and a token/latency
optimization table. Grounded in templates/openclaw.example.json shapes,
with a 'verify keys against your version' caveat consistent with #8.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread README.md Outdated
{
"taskBrain": {
"approvals": {
"defaults": { "read-only.*": "allow", "execution.*": "ask", "write.network": "ask", "control-plane.*": "deny" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 taskBrain approval defaults missing critical categories present in the referenced template

The approval defaults shown in this config excerpt omit three categories that are present in templates/openclaw.example.json:191-198: "execution.sandbox.*": "allow", "write.fs.workspace": "allow", and "write.fs.outside-workspace": "deny". This matters because the prose at line 910 then tells users the coding-worker needs write.fs.workspace = allow, but that category doesn't appear anywhere in the shown config — neither in the defaults block nor as a per-agent override. A user copying this as their starting config would get a policy where sandboxed execution prompts for approval (falling through to execution.*: ask) and workspace writes have no explicit rule at all. The text at line 847 claims these configs use "the config shapes from templates/openclaw.example.json", making the omission a concrete inconsistency rather than an intentional simplification.

Suggested change
"defaults": { "read-only.*": "allow", "execution.*": "ask", "write.network": "ask", "control-plane.*": "deny" }
"defaults": { "read-only.*": "allow", "execution.sandbox.*": "allow", "execution.*": "ask", "write.fs.workspace": "allow", "write.fs.outside-workspace": "deny", "write.network": "ask", "control-plane.*": "deny" }
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 209e4b6 — restored the full defaults block (execution.sandbox.*, write.fs.workspace, write.fs.outside-workspace) to match templates/openclaw.example.json:191-198, so the config is copy-paste-safe and the prose that references write.fs.workspace now lines up with what's shown. Thanks.

The abbreviated taskBrain.approvals.defaults omitted execution.sandbox.*,
write.fs.workspace, and write.fs.outside-workspace that the surrounding
prose references and that templates/openclaw.example.json ships (per Devin
Review on #19).
@OnlyTerp OnlyTerp merged commit a9ca670 into master Jun 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Gap] Multi-agents example

2 participants