agentic-ai-engineering/site/.vitepress/dist/modules/m4-orchestration.html

120 lines
79 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Module 4: Multi-Agent Orchestration | Agentic Engineering the Hard Way</title>
<meta name="description" content="Build every component from scratch. 65 lessons, 13 labs, 20 skill kits. No black boxes.">
<meta name="generator" content="VitePress v1.6.4">
<link rel="preload stylesheet" href="/assets/style.B5wEIFXZ.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.DMBJRc0F.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.DPegqbWe.js">
<link rel="modulepreload" href="/assets/chunks/framework.BPKcPtvA.js">
<link rel="modulepreload" href="/assets/modules_m4-orchestration.md.DFLcAKBv.lean.js">
<link rel="icon" href="/favicon.svg">
<meta name="theme-color" content="#0f0f0f">
<meta property="og:title" content="Agentic Engineering the Hard Way">
<meta property="og:description" content="65 lessons, 13 labs, 20 skill kits. Build production-grade AI agent systems from scratch. No black boxes.">
<meta property="og:image" content="/og-image.svg">
<meta name="twitter:card" content="summary_large_image">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,800&amp;family=DM+Mono:wght@400;500&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0,0" rel="stylesheet">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="fdsa-app"><div class="Layout" data-v-d8b57b2d><!--[--><!--]--><!--[--><span tabindex="-1" data-v-fcbfc0e0></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-fcbfc0e0>Skip to content</a><!--]--><!----><header class="VPNav" data-v-d8b57b2d data-v-7ad780c2><div class="VPNavBar" data-v-7ad780c2 data-v-9fd4d1dd><div class="wrapper" data-v-9fd4d1dd><div class="container" data-v-9fd4d1dd><div class="title" data-v-9fd4d1dd><div class="VPNavBarTitle has-sidebar" data-v-9fd4d1dd data-v-9f43907a><a class="title" href="/" data-v-9f43907a><!--[--><!--]--><!----><span data-v-9f43907a>FDSA</span><!--[--><!--]--></a></div></div><div class="content" data-v-9fd4d1dd><div class="content-body" data-v-9fd4d1dd><!--[--><!--]--><div class="VPNavBarSearch search" data-v-9fd4d1dd><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-9fd4d1dd data-v-afb2845e><span id="main-nav-aria-label" class="visually-hidden" data-v-afb2845e> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/modules/m1-foundations" tabindex="0" data-v-afb2845e data-v-815115f5><!--[--><span data-v-815115f5>Course</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/labs/l1-first-agent" tabindex="0" data-v-afb2845e data-v-815115f5><!--[--><span data-v-815115f5>Labs</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/skills" tabindex="0" data-v-afb2845e data-v-815115f5><!--[--><span data-v-815115f5>Skills</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/blog" tabindex="0" data-v-afb2845e data-v-815115f5><!--[--><span data-v-815115f5>Blog</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-afb2845e data-v-bfe7971f><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-bfe7971f><span class="text" data-v-bfe7971f><!----><span data-v-bfe7971f>More</span><span class="vpi-chevron-down text-icon" data-v-bfe7971f></span></span></button><div class="menu" data-v-bfe7971f><div class="VPMenu" data-v-bfe7971f data-v-20ed86d6><div class="items" data-v-20ed86d6><!--[--><!--[--><div class="VPMenuLink" data-v-20ed86d6 data-v-7eeeb2dc><a class="VPLink link" href="/modules/curriculum" data-v-7eeeb2dc><!--[--><span data-v-7eeeb2dc>Curriculum</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-20ed86d6 data-v-7eeeb2dc><a class="VPLink link" href="/modules/debate" data-v-7eeeb2dc><!--[--><span data-v-7eeeb2dc>Debate</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-20ed86d6 data-v-7eeeb2dc><a class="VPLink link" href="/troubleshooting" data-v-7eeeb2dc><!--[--><span data-v-7eeeb2dc>FAQ</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-20ed86d6 data-v-7eeeb2dc><a class="VPLink link" href="/certificate" data-v-7eeeb2dc><!--[--><span data-v-7eeeb2dc>Certificate</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-20ed86d6 data-v-7eeeb2dc><a class="VPLink link" href="/buy" data-v-7eeeb2dc><!--[--><span data-v-7eeeb2dc>Buy</span><!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-9fd4d1dd data-v-3f90c1a5><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-3f90c1a5 data-v-be9742d9 data-v-b4ccac88><span class="check" data-v-b4ccac88><span class="icon" data-v-b4ccac88><!--[--><span class="vpi-sun sun" data-v-be9742d9></span><span class="vpi-moon moon" data-v-be9742d9></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-9fd4d1dd data-v-ef6192dc data-v-e71e869c><!--[--><a class="VPSocialLink no-icon" href="http://185.239.209.216:3001/artale/agentic-engineering-course" aria-label="github" target="_blank" rel="noopener" data-v-e71e869c data-v-60a9a2d3><span class="vpi-social-github"></span></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-9fd4d1dd data-v-f953d92f data-v-bfe7971f><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-bfe7971f><span class="vpi-more-horizontal icon" data-v-bfe7971f></span></button><div class="menu" data-v-bfe7971f><div class="VPMenu" data-v-bfe7971f data-v-20ed86d6><!----><!--[--><!--[--><!----><div class="group" data-v-f953d92f><div class="item appearance" data-v-f953d92f><p class="label" data-v-f953d92f>Appearance</p><div class="appearance-action" data-v-f953d92f><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-f953d92f data-v-be9742d9 data-v-b4ccac88><span class="check" data-v-b4ccac88><span class="icon" data-v-b4ccac88><!--[--><span class="vpi-sun sun" data-v-be9742d9></span><span class="vpi-moon moon" data-v-be9742d9></span><!--]--></span></span></button></div></div></div><div class="group" data-v-f953d92f><div class="item social-links" data-v-f953d92f><div class="VPSocialLinks social-links-list" data-v-f953d92f data-v-e71e869c><!--[--><a class="VPSocialLink no-icon" href="http://185.239.209.216:3001/artale/agentic-engineering-course" aria-label="github" target="_blank" rel="noopener" data-v-e71e869c data-v-60a9a2d3><span class="vpi-social-github"></span></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-9fd4d1dd data-v-6bee1efd><span class="container" data-v-6bee1efd><span class="top" data-v-6bee1efd></span><span class="middle" data-v-6bee1efd></span><span class="bottom" data-v-6bee1efd></span></span></button></div></div></div></div><div class="divider" data-v-9fd4d1dd><div class="divider-line" data-v-9fd4d1dd></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-d8b57b2d data-v-2488c25a><div class="container" data-v-2488c25a><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-2488c25a><span class="vpi-align-left menu-icon" data-v-2488c25a></span><span class="menu-text" data-v-2488c25a>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-2488c25a data-v-6b867909><button data-v-6b867909>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-d8b57b2d data-v-42c4c606><div class="curtain" data-v-42c4c606></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-42c4c606><span class="visually-hidden" id="sidebar-aria-label" data-v-42c4c606> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 1: Foundations</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-11-what-makes-an-agent" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.1 What Makes an Agent?</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-12-the-harness-vs-the-model" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.2 Harness vs The Model</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-13-decision-framework" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.3 Decision Framework</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-13a-the-repository-is-the-spec" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.4 Repository IS the Spec</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-14-the-agent-loop" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.5 The Agent Loop</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-15-tool-calling-deep-dive" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.6 Tool Calling</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-16-vibe-coding-vs-agentic-engineering" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.7 Vibe Coding vs Engineering</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m1-foundations#lesson-17-do-you-trust-your-agents" data-v-0009425e><!--[--><p class="text" data-v-0009425e>1.8 Do You Trust Your Agents?</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l1-first-agent" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Lab 1.9: First Agent</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m2-architecture" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 2: Architecture</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m2-architecture#lesson-21-the-four-pillars" data-v-0009425e><!--[--><p class="text" data-v-0009425e>2.1-2.3 Core Architecture</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m2-architecture#lesson-23b-skills-system-deep-dive" data-v-0009425e><!--[--><p class="text" data-v-0009425e>2.4-2.6 Skills & Workspace</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m2-architecture#lesson-24-context-window-management" data-v-0009425e><!--[--><p class="text" data-v-0009425e>2.7-2.9 Advanced Patterns</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l2-multi-tool" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Labs 2.10-2.11</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m3-safety" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 3: Safety & Security</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m3-safety#lesson-31-why-bash-is-the-single-point-of-failure" data-v-0009425e><!--[--><p class="text" data-v-0009425e>3.1-3.2 Bash & Ladder</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m3-safety#lesson-33-the-l3-marque-break" data-v-0009425e><!--[--><p class="text" data-v-0009425e>3.3-3.5 Hooks & Control</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m3-safety#lesson-36-the-verifier-pattern" data-v-0009425e><!--[--><p class="text" data-v-0009425e>3.6-3.7 Verifier & Stacking</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l3-whitelist-hook" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Labs 3.8-3.9</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m4-orchestration" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 4: Orchestration</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m4-orchestration#lesson-41-why-one-agent-is-not-enough" data-v-0009425e><!--[--><p class="text" data-v-0009425e>4.1-4.4 Patterns</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m4-orchestration#lesson-43-depth-2-delegation" data-v-0009425e><!--[--><p class="text" data-v-0009425e>4.5-4.9 Teams & Comms</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m4-orchestration#lesson-410-the-ceo-board-system" data-v-0009425e><!--[--><p class="text" data-v-0009425e>4.10-4.11 Case Studies</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l4-agent-chain" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Labs 4.12-4.13</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m5-production" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 5: Production</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m5-production#lesson-51-what-production-means-for-agents" data-v-0009425e><!--[--><p class="text" data-v-0009425e>5.1-5.4 CI/CD & Stack</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m5-production#lesson-53-shadow-deployments" data-v-0009425e><!--[--><p class="text" data-v-0009425e>5.5-5.8 Deploy & Monitor</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l5-observability" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Labs 5.9-5.10</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m6-economics" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 6: Economics</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m6-economics#lesson-60-the-compute-advantage-equation" data-v-0009425e><!--[--><p class="text" data-v-0009425e>6.0-6.2 Pricing</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m6-economics#lesson-63-cost-per-session-math" data-v-0009425e><!--[--><p class="text" data-v-0009425e>6.3-6.5 Eval Metrics</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m6-economics#lesson-66-ab-testing-agents" data-v-0009425e><!--[--><p class="text" data-v-0009425e>6.6-6.7 Testing</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l6-eval-harness" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Labs 6.8-6.9</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m7-advanced" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 7: Advanced</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m7-advanced#lesson-71-autoresearch" data-v-0009425e><!--[--><p class="text" data-v-0009425e>7.1-7.3 Autoresearch</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m7-advanced#lesson-73-meta-agents" data-v-0009425e><!--[--><p class="text" data-v-0009425e>7.4-7.6 Meta & Beyond</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/labs/l7-autoresearch" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Labs 7.7-7.8</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-51288d80><section class="VPSidebarItem level-0 collapsible collapsed is-link" data-v-51288d80 data-v-0009425e><div class="item" tabindex="0" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m8-capstone" data-v-0009425e><!--[--><h2 class="text" data-v-0009425e>Module 8: Capstone</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-0009425e><span class="vpi-chevron-right caret-icon" data-v-0009425e></span></div></div><div class="items" data-v-0009425e><!--[--><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m8-capstone#project-options" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Project Options</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m8-capstone#capstone-phases" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Phases</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-0009425e data-v-0009425e><div class="item" data-v-0009425e><div class="indicator" data-v-0009425e></div><a class="VPLink link link" href="/modules/m8-capstone#grading-rubric" data-v-0009425e><!--[--><p class="text" data-v-0009425e>Rubric</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-d8b57b2d data-v-9a6c75ad><div class="VPDoc has-sidebar has-aside" data-v-9a6c75ad data-v-e6f2a212><!--[--><!--]--><div class="container" data-v-e6f2a212><div class="aside" data-v-e6f2a212><div class="aside-curtain" data-v-e6f2a212></div><div class="aside-container" data-v-e6f2a212><div class="aside-content" data-v-e6f2a212><div class="VPDocAside" data-v-e6f2a212 data-v-cb998dce><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-cb998dce data-v-f610f197><div class="content" data-v-f610f197><div class="outline-marker" data-v-f610f197></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-f610f197>On this page</div><ul class="VPDocOutlineItem root" data-v-f610f197 data-v-53c99d69><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-cb998dce></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-e6f2a212><div class="content-container" data-v-e6f2a212><!--[--><!--]--><main class="main" data-v-e6f2a212><div style="position:relative;" class="vp-doc _modules_m4-orchestration" data-v-e6f2a212><div><h1 id="module-4-multi-agent-orchestration" tabindex="-1">Module 4: Multi-Agent Orchestration <a class="header-anchor" href="#module-4-multi-agent-orchestration" aria-label="Permalink to &quot;Module 4: Multi-Agent Orchestration&quot;"></a></h1><h2 id="lesson-4-1-why-one-agent-is-not-enough" tabindex="-1">Lesson 4.1: Why One Agent Is Not Enough <a class="header-anchor" href="#lesson-4-1-why-one-agent-is-not-enough" aria-label="Permalink to &quot;Lesson 4.1: Why One Agent Is Not Enough&quot;"></a></h2><p>A single agent, no matter how smart, hits three ceilings:</p><ol><li><p><strong>Context ceiling</strong> — One agent doing everything means one context window holding everything. File contents, database schemas, business logic, deployment configs — it all competes for space.</p></li><li><p><strong>Capability ceiling</strong> — A generalist agent is mediocre at everything. A specialized agent (backend dev, security reviewer, UI designer) outperforms the generalist at its domain.</p></li><li><p><strong>Reliability ceiling</strong> — One agent failing = everything fails. Multi-agent systems degrade gracefully — one team&#39;s failure doesn&#39;t take down the whole system.</p></li></ol><h3 id="the-stacking-insight" tabindex="-1">The Stacking Insight <a class="header-anchor" href="#the-stacking-insight" aria-label="Permalink to &quot;The Stacking Insight&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Single smart model &lt; Two specialized agents &lt; Orchestrator + 3 teams</span></span></code></pre></div><p>Benchmarks measure single models. Production wins with multi-agent orchestration.</p><hr><h2 id="lesson-4-2-orchestration-patterns" tabindex="-1">Lesson 4.2: Orchestration Patterns <a class="header-anchor" href="#lesson-4-2-orchestration-patterns" aria-label="Permalink to &quot;Lesson 4.2: Orchestration Patterns&quot;"></a></h2><h3 id="pattern-1-dispatcher-hub-and-spoke" tabindex="-1">Pattern 1: Dispatcher (Hub-and-Spoke) <a class="header-anchor" href="#pattern-1-dispatcher-hub-and-spoke" aria-label="Permalink to &quot;Pattern 1: Dispatcher (Hub-and-Spoke)&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>User → Orchestrator → dispatches to:</span></span>
<span class="line"><span> ├── Specialist A (parallel)</span></span>
<span class="line"><span> ├── Specialist B (parallel)</span></span>
<span class="line"><span> └── Specialist C (parallel)</span></span>
<span class="line"><span> ← synthesizes results</span></span></code></pre></div><p><strong>Best for</strong>: Tasks that need multiple perspectives or parallel work. The orchestrator doesn&#39;t work — it delegates, then synthesizes.</p><p><strong>Implementation</strong>: <code>agent-team</code> extension. Teams defined in <code>teams.yaml</code>. Orchestrator uses <code>dispatch_agent</code> tool.</p><h3 id="pattern-2-pipeline-sequential" tabindex="-1">Pattern 2: Pipeline (Sequential) <a class="header-anchor" href="#pattern-2-pipeline-sequential" aria-label="Permalink to &quot;Pattern 2: Pipeline (Sequential)&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Step 1: Planner → Step 2: Builder (gets $INPUT=plan) → Step 3: Reviewer (gets $INPUT=code)</span></span></code></pre></div><p><strong>Best for</strong>: Workflows with clear stages where each depends on the previous.</p><p><strong>Implementation</strong>: <code>agent-chain</code> extension. Pipelines in <code>agent-chain.yaml</code>. <code>$INPUT</code> carries forward, <code>$ORIGINAL</code> preserves user prompt.</p><h3 id="pattern-3-peer-to-peer-flat" tabindex="-1">Pattern 3: Peer-to-Peer (Flat) <a class="header-anchor" href="#pattern-3-peer-to-peer-flat" aria-label="Permalink to &quot;Pattern 3: Peer-to-Peer (Flat)&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Agent A ←→ Agent B ←→ Agent C</span></span>
<span class="line"><span> (no orchestrator, all peers)</span></span></code></pre></div><p><strong>Best for</strong>: Cross-device work, heterogeneous model teams, flat information flow.</p><p><strong>Implementation</strong>: <code>coms</code> / <code>coms-net</code> extensions. 4 tools: list, send, get, await.</p><hr><h2 id="lesson-4-2b-p-threads-—-parallel-agent-execution" tabindex="-1">Lesson 4.2b: P-Threads — Parallel Agent Execution <a class="header-anchor" href="#lesson-4-2b-p-threads-—-parallel-agent-execution" aria-label="Permalink to &quot;Lesson 4.2b: P-Threads — Parallel Agent Execution&quot;"></a></h2><p><strong>Concept</strong>: Run N agents simultaneously on the same task. Each agent works independently. Pick the best result.</p><h3 id="pattern" tabindex="-1">Pattern <a class="header-anchor" href="#pattern" aria-label="Permalink to &quot;Pattern&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>User prompt</span></span>
<span class="line"><span></span></span>
<span class="line"><span> ├── Agent 1 (Claude Opus) ──► output_1</span></span>
<span class="line"><span> ├── Agent 2 (Gemini Pro) ──► output_2</span></span>
<span class="line"><span> ├── Agent 3 (DeepSeek V3) ──► output_3</span></span>
<span class="line"><span> └── Agent 4 (Qwen) ──► output_4</span></span>
<span class="line"><span></span></span>
<span class="line"><span></span></span>
<span class="line"><span> Judge (or human) picks best</span></span></code></pre></div><h3 id="when-to-use-p-threads" tabindex="-1">When to Use P-Threads <a class="header-anchor" href="#when-to-use-p-threads" aria-label="Permalink to &quot;When to Use P-Threads&quot;"></a></h3><ul><li>Creative work (UI generation, content writing, architecture design)</li><li>Benchmarking (compare models side-by-side on same task)</li><li>High-stakes decisions (multiple perspectives reduce blind spots)</li><li>Exploration (try N approaches, pick the winner)</li></ul><h3 id="implementation-with-mprocs" tabindex="-1">Implementation with mprocs <a class="header-anchor" href="#implementation-with-mprocs" aria-label="Permalink to &quot;Implementation with mprocs&quot;"></a></h3><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># mprocs-teams.yaml</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">procs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> claude-lead</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> cmd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;claude&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-p&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{{PROMPT}}&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> gemini</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> cmd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;gemini&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-p&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{{PROMPT}}&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> opencode</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> cmd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;opencode&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--model&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;opencode-go/deepseek-v4-flash&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-p&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{{PROMPT}}&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span></code></pre></div><p>Run all three simultaneously, collect outputs, pick best.</p><h3 id="implementation-with-agent-mux" tabindex="-1">Implementation with agent-mux <a class="header-anchor" href="#implementation-with-agent-mux" aria-label="Permalink to &quot;Implementation with agent-mux&quot;"></a></h3><p>Your Tauri UI (<code>agent-mux</code>) is a P-thread controller: it spawns agents into panes, monitors progress, and presents results for comparison.</p><h3 id="key-design-rules" tabindex="-1">Key Design Rules <a class="header-anchor" href="#key-design-rules" aria-label="Permalink to &quot;Key Design Rules&quot;"></a></h3><ul><li>Each agent gets the <strong>same prompt</strong> (fair comparison)</li><li>Agents are <strong>isolated</strong> (no cross-contamination)</li><li>Results are <strong>collected and compared</strong> by a judge or human</li><li>Cost = N × single-agent cost (budget accordingly)</li></ul><hr><h2 id="lesson-4-2c-f-threads-—-fusion-n-agents-one-winner" tabindex="-1">Lesson 4.2c: F-Threads — Fusion (N Agents, One Winner) <a class="header-anchor" href="#lesson-4-2c-f-threads-—-fusion-n-agents-one-winner" aria-label="Permalink to &quot;Lesson 4.2c: F-Threads — Fusion (N Agents, One Winner)&quot;"></a></h2><p><strong>Concept</strong>: N agents produce outputs. A synthetic judge (or rubric) selects the winner. More sophisticated than P-threads — includes evaluation.</p><h3 id="pattern-1" tabindex="-1">Pattern <a class="header-anchor" href="#pattern-1" aria-label="Permalink to &quot;Pattern&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Agent 1 ──► Output 1 ──┐</span></span>
<span class="line"><span>Agent 2 ──► Output 2 ──┤</span></span>
<span class="line"><span>Agent 3 ──► Output 3 ──┤──► Judge → Winner</span></span>
<span class="line"><span>Agent 4 ──► Output 4 ──┤</span></span>
<span class="line"><span>Agent 5 ──► Output 5 ──┘</span></span></code></pre></div><h3 id="when-to-use-f-threads" tabindex="-1">When to Use F-Threads <a class="header-anchor" href="#when-to-use-f-threads" aria-label="Permalink to &quot;When to Use F-Threads&quot;"></a></h3><ul><li>Code generation (generate N variants, pick best compiled/tested)</li><li>UI generation (your UI Agents system uses this — 3 Vue generators, 1 winner)</li><li>Architecture decisions (N proposals, judge evaluates against criteria)</li><li>Bug fixes (N approaches, pick the one that passes tests)</li></ul><h3 id="your-ui-agents-system-as-f-thread-example" tabindex="-1">Your UI Agents System as F-Thread Example <a class="header-anchor" href="#your-ui-agents-system-as-f-thread-example" aria-label="Permalink to &quot;Your UI Agents System as F-Thread Example&quot;"></a></h3><p>Your <code>ui-agents</code> project uses F-threads natively:</p><ul><li>3 UI Generation agents (Sonnet + open source variants)</li><li>Validation team screenshots + checks each</li><li>Lead picks the best result</li><li>Loser outputs are discarded (or logged for learning)</li></ul><h3 id="judge-criteria-template" tabindex="-1">Judge Criteria Template <a class="header-anchor" href="#judge-criteria-template" aria-label="Permalink to &quot;Judge Criteria Template&quot;"></a></h3><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;criteria&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;correctness&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;weight&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.4</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">},</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;efficiency&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;weight&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">},</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;maintainability&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;weight&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">},</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;completeness&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;weight&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><hr><h2 id="lesson-4-3-depth-2-delegation" tabindex="-1">Lesson 4.3: Depth-2 Delegation <a class="header-anchor" href="#lesson-4-3-depth-2-delegation" aria-label="Permalink to &quot;Lesson 4.3: Depth-2 Delegation&quot;"></a></h2><p>The production-proven hierarchy from lead-agents and ui-agents:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>User</span></span>
<span class="line"><span></span></span>
<span class="line"><span> v</span></span>
<span class="line"><span>Orchestrator (Opus-level, thinking only)</span></span>
<span class="line"><span></span></span>
<span class="line"><span> ├── Planning Team Lead (synthesizes, delegates)</span></span>
<span class="line"><span> │ ├── Product Manager (domain worker)</span></span>
<span class="line"><span> │ └── UX Researcher (domain worker)</span></span>
<span class="line"><span></span></span>
<span class="line"><span> ├── Engineering Team Lead (synthesizes, delegates)</span></span>
<span class="line"><span> │ ├── Frontend Dev (domain worker)</span></span>
<span class="line"><span> │ └── Backend Dev (domain worker)</span></span>
<span class="line"><span></span></span>
<span class="line"><span> └── Validation Team Lead (synthesizes, delegates)</span></span>
<span class="line"><span> ├── QA Engineer (domain worker)</span></span>
<span class="line"><span> └── Security Reviewer (domain worker)</span></span></code></pre></div><h3 id="the-rule" tabindex="-1">The Rule <a class="header-anchor" href="#the-rule" aria-label="Permalink to &quot;The Rule&quot;"></a></h3><p><strong>Leads and orchestrators are thinkers, planners, and managers. They are not doers.</strong> They delegate to workers who write files and make changes. Workers don&#39;t make strategic decisions.</p><hr><h2 id="lesson-4-4-agent-experts-that-remember" tabindex="-1">Lesson 4.4: Agent Experts That Remember <a class="header-anchor" href="#lesson-4-4-agent-experts-that-remember" aria-label="Permalink to &quot;Lesson 4.4: Agent Experts That Remember&quot;"></a></h2><h3 id="mental-models" tabindex="-1">Mental Models <a class="header-anchor" href="#mental-models" aria-label="Permalink to &quot;Mental Models&quot;"></a></h3><p>Every agent maintains its own expertise file:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># engineering-lead-mental-model.yaml</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">observations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">architectural_pattern</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> observation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;We use vertical slice architecture for new features&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> evidence</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PR #142, PR #156&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">common_failure</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> observation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;WebSocket reconnection logic needs retry with backoff&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> evidence</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Incident log 2026-03-15&quot;</span></span></code></pre></div><h3 id="self-improve-commands" tabindex="-1">Self-Improve Commands <a class="header-anchor" href="#self-improve-commands" aria-label="Permalink to &quot;Self-Improve Commands&quot;"></a></h3><p>Agents periodically run self-improve commands that:</p><ol><li>Read the mental model</li><li>Compare against actual codebase (grep, read files)</li><li>Update stale entries</li><li>Add new findings</li></ol><h3 id="compounding-knowledge" tabindex="-1">Compounding Knowledge <a class="header-anchor" href="#compounding-knowledge" aria-label="Permalink to &quot;Compounding Knowledge&quot;"></a></h3><p>Session 1: Agent learns project structure Session 2: Agent learns common patterns Session 3: Agent learns failure modes Session N: Agent operates at senior engineer level for this codebase</p><hr><h2 id="lesson-4-5-domain-locking" tabindex="-1">Lesson 4.5: Domain Locking <a class="header-anchor" href="#lesson-4-5-domain-locking" aria-label="Permalink to &quot;Lesson 4.5: Domain Locking&quot;"></a></h2><p>Every agent has explicit domain permissions:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Engineering Lead domain</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">domain</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">path</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.pi/multi-team/</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> read</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> upsert</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> delete</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">path</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">src/</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> read</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> upsert</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> delete</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">path</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">.</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> read</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> upsert</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> delete</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Can&#39;t delete anything at root</span></span></code></pre></div><p>Three levels:</p><ul><li><code>read: false</code> — can&#39;t even see the files</li><li><code>upsert: false</code> — can read, can&#39;t write</li><li><code>delete: false</code> — can read+write, can&#39;t delete</li></ul><hr><h2 id="lesson-4-6-tilldone-task-discipline" tabindex="-1">Lesson 4.6: TillDone Task Discipline <a class="header-anchor" href="#lesson-4-6-tilldone-task-discipline" aria-label="Permalink to &quot;Lesson 4.6: TillDone Task Discipline&quot;"></a></h2><h3 id="the-pattern" tabindex="-1">The Pattern <a class="header-anchor" href="#the-pattern" aria-label="Permalink to &quot;The Pattern&quot;"></a></h3><ol><li>Orchestrator creates task list before delegating</li><li>Tasks are assigned to specific agents</li><li>Agents mark tasks in progress → done</li><li>Footer shows live progress</li><li>If turn ends with incomplete tasks, agent is nudged to continue</li></ol><h3 id="why-it-matters" tabindex="-1">Why It Matters <a class="header-anchor" href="#why-it-matters" aria-label="Permalink to &quot;Why It Matters&quot;"></a></h3><p>Prevents the #1 multi-agent failure mode: an orchestrator that delegates, gets results, and then wanders off without completing the plan. The task list is the forcing function.</p><hr><h2 id="lesson-4-7-agent-chains" tabindex="-1">Lesson 4.7: Agent Chains <a class="header-anchor" href="#lesson-4-7-agent-chains" aria-label="Permalink to &quot;Lesson 4.7: Agent Chains&quot;"></a></h2><h3 id="yaml-defined-pipelines" tabindex="-1">YAML-Defined Pipelines <a class="header-anchor" href="#yaml-defined-pipelines" aria-label="Permalink to &quot;YAML-Defined Pipelines&quot;"></a></h3><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># agent-chain.yaml</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">steps</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">agent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">planner</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prompt</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Create a detailed plan for: $INPUT&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">agent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">builder</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prompt</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Implement the following plan: $INPUT&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">agent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">reviewer</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prompt</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review this code: $INPUT&quot;</span></span></code></pre></div><h3 id="variables" tabindex="-1">Variables <a class="header-anchor" href="#variables" aria-label="Permalink to &quot;Variables&quot;"></a></h3><ul><li><code>$INPUT</code> — Output of the previous step</li><li><code>$ORIGINAL</code> — The user&#39;s original prompt (always accessible)</li></ul><hr><h2 id="lesson-4-8-pi-to-pi-communication" tabindex="-1">Lesson 4.8: Pi-to-Pi Communication <a class="header-anchor" href="#lesson-4-8-pi-to-pi-communication" aria-label="Permalink to &quot;Lesson 4.8: Pi-to-Pi Communication&quot;"></a></h2><h3 id="the-shift-hierarchy-→-flat" tabindex="-1">The Shift: Hierarchy → Flat <a class="header-anchor" href="#the-shift-hierarchy-→-flat" aria-label="Permalink to &quot;The Shift: Hierarchy → Flat&quot;"></a></h3><p>Traditional agent communication is top-down:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Orchestrator → Team Lead → Worker → (result goes back up)</span></span></code></pre></div><p>Peer-to-peer flips this. Agents are equals:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Agent A ←→ Agent B</span></span>
<span class="line"><span> ↕ ↕</span></span>
<span class="line"><span>Agent C ←→ Agent D</span></span></code></pre></div><h3 id="reference-implementation-mcp-agent-mail-jeff-emanuel-1-955★" tabindex="-1">Reference Implementation: MCP Agent Mail (Jeff Emanuel, 1,955★) <a class="header-anchor" href="#reference-implementation-mcp-agent-mail-jeff-emanuel-1-955★" aria-label="Permalink to &quot;Reference Implementation: MCP Agent Mail (Jeff Emanuel, 1,955★)&quot;"></a></h3><p>Jeff&#39;s MCP Agent Mail provides a more formal coordination layer:</p><ul><li><strong>Agent identities</strong>: Each agent has a registered identity</li><li><strong>Inboxes</strong>: Messages are delivered to agent inboxes</li><li><strong>Searchable threads</strong>: Full thread history with search</li><li><strong>Advisory file leases</strong>: Agents can reserve files to prevent conflicts</li></ul><p>This complements our simpler P2P approach. Use direct coms for speed, MCP Agent Mail for audit trails.</p><h3 id="four-tools" tabindex="-1">Four Tools <a class="header-anchor" href="#four-tools" aria-label="Permalink to &quot;Four Tools&quot;"></a></h3><table tabindex="0"><thead><tr><th>Tool</th><th>What It Does</th></tr></thead><tbody><tr><td><code>*_list</code></td><td>List peer agents (name, model, context usage)</td></tr><tr><td><code>*_send</code></td><td>Send a prompt; returns msg_id</td></tr><tr><td><code>*_get</code></td><td>Non-blocking poll on msg_id</td></tr><tr><td><code>*_await</code></td><td>Block until reply or timeout</td></tr></tbody></table><h3 id="safety" tabindex="-1">Safety <a class="header-anchor" href="#safety" aria-label="Permalink to &quot;Safety&quot;"></a></h3><ul><li>Max 5 hops (prevents A→B→A→B loops)</li><li>Audit log (msg_id, sender, hops — never prompt bodies)</li><li>Self-healing (stale sockets pruned, heartbeats every 10s)</li></ul><hr><h2 id="lesson-4-9-conversation-awareness" tabindex="-1">Lesson 4.9: Conversation Awareness <a class="header-anchor" href="#lesson-4-9-conversation-awareness" aria-label="Permalink to &quot;Lesson 4.9: Conversation Awareness&quot;"></a></h2><p>Every agent reads a shared JSONL conversation log before responding:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>.pi/multi-team/sessions/&lt;session-id&gt;/conversation.jsonl</span></span></code></pre></div><p>This means:</p><ul><li>Agents know what&#39;s already been discussed</li><li>Agents don&#39;t repeat work</li><li>Full audit trail of every interaction</li></ul><h2 id="lesson-4-9b-service-connectors" tabindex="-1">Lesson 4.9b: Service Connectors <a class="header-anchor" href="#lesson-4-9b-service-connectors" aria-label="Permalink to &quot;Lesson 4.9b: Service Connectors&quot;"></a></h2><p>Agents need to interact with external services: Twitter, GitHub, Linear, Slack, email.</p><h3 id="the-pattern-1" tabindex="-1">The Pattern <a class="header-anchor" href="#the-pattern-1" aria-label="Permalink to &quot;The Pattern&quot;"></a></h3><p>Each service gets an MCP connector:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Agent → MCP Client → Service Connector → External API</span></span>
<span class="line"><span> ├── twitter-connector: post, search, DM, timeline</span></span>
<span class="line"><span> ├── github-connector: PRs, issues, actions, code search</span></span>
<span class="line"><span> ├── linear-connector: issues, comments, projects, cycles</span></span>
<span class="line"><span> ├── slack-connector: messages, channels, threads, search</span></span>
<span class="line"><span> ├── email-connector: send, read, search, folders</span></span>
<span class="line"><span> └── custom: build your own via connector SDK</span></span></code></pre></div><h3 id="design-rules" tabindex="-1">Design Rules <a class="header-anchor" href="#design-rules" aria-label="Permalink to &quot;Design Rules&quot;"></a></h3><ol><li><strong>One connector per service</strong> — composable, not monolithic</li><li><strong>MCP protocol</strong> — standard interface for all connectors</li><li><strong>Scoped credentials</strong> — each connector has its own auth (no shared tokens)</li><li><strong>Rate-limited</strong> — connectors enforce service rate limits</li><li><strong>Audit-logged</strong> — every external action is logged</li></ol><h3 id="reference-implementation" tabindex="-1">Reference Implementation <a class="header-anchor" href="#reference-implementation" aria-label="Permalink to &quot;Reference Implementation&quot;"></a></h3><p>Jeff Emanuel&#39;s <code>flywheel_connectors</code> (79★) provides a mesh-native protocol for this. His approach:</p><ul><li>Each connector is a standalone Rust binary</li><li>Connectors communicate via a shared mesh protocol</li><li>Agents discover connectors dynamically</li><li>Built-in connectors for Twitter, Linear, GitHub</li></ul><h3 id="integration-with-agent-teams" tabindex="-1">Integration with Agent Teams <a class="header-anchor" href="#integration-with-agent-teams" aria-label="Permalink to &quot;Integration with Agent Teams&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Orchestrator → delegates to agent</span></span>
<span class="line"><span> Agent → calls service connector via MCP</span></span>
<span class="line"><span> Connector → authenticates → calls API → returns result</span></span>
<span class="line"><span> Agent → processes result → continues work</span></span>
<span class="line"><span>Orchestrator → synthesizes final output</span></span></code></pre></div><hr><h2 id="lesson-4-10-the-ceo-board-system" tabindex="-1">Lesson 4.10: The CEO Board System <a class="header-anchor" href="#lesson-4-10-the-ceo-board-system" aria-label="Permalink to &quot;Lesson 4.10: The CEO Board System&quot;"></a></h2><p>8 specialist agents for strategic decision-making:</p><table tabindex="0"><thead><tr><th>Board Member</th><th>Focus</th><th>Time Horizon</th></tr></thead><tbody><tr><td>Revenue</td><td>Cash flow, short-term wins</td><td>30-90 days</td></tr><tr><td>Compounder</td><td>Trust, long-term value</td><td>6-24 months</td></tr><tr><td>Contrarian</td><td>Assumptions, blind spots</td><td>3x weight on dissent</td></tr><tr><td>Technical Architect</td><td>System durability</td><td>Ongoing</td></tr><tr><td>Product Strategist</td><td>Problem selection</td><td>Quarterly</td></tr><tr><td>Customer Oracle</td><td>User behavior</td><td>Ongoing</td></tr><tr><td>Market Strategist</td><td>Positioning</td><td>Quarterly</td></tr><tr><td>Moonshot</td><td>Asymmetric upside</td><td>1-5 years</td></tr></tbody></table><h3 id="flow" tabindex="-1">Flow <a class="header-anchor" href="#flow" aria-label="Permalink to &quot;Flow&quot;"></a></h3><ol><li>CEO frames the decision</li><li>Board debates (sources required, no &quot;I think&quot;)</li><li>Verifier checks facts (2+ sources per claim)</li><li>Executor creates execution plan</li><li>Tracker logs for quarterly review</li></ol><hr><h2 id="lesson-4-11-ui-agents-system" tabindex="-1">Lesson 4.11: UI Agents System <a class="header-anchor" href="#lesson-4-11-ui-agents-system" aria-label="Permalink to &quot;Lesson 4.11: UI Agents System&quot;"></a></h2><p>12 agents across 4 teams for brand-consistent UI generation:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Brand → Product → Tree → Branch → Leaf</span></span></code></pre></div><p>Each level has its own <code>brand.yaml</code> with CSS custom properties. Zero hardcoded values. Agents generate Vue components that use only CSS custom properties from the brand config.</p><h2 id="lab-4-12-build-an-agent-chain" tabindex="-1">Lab 4.12: Build an Agent Chain <a class="header-anchor" href="#lab-4-12-build-an-agent-chain" aria-label="Permalink to &quot;Lab 4.12: Build an Agent Chain&quot;"></a></h2><p><strong>Objective</strong>: Create a plan→build→review pipeline in YAML.</p><p><strong>Starter</strong>: <code>course/labs/L4-agent-chain/starter.yaml</code><strong>Solution</strong>: <code>course/labs/L4-agent-chain/solution.yaml</code></p><p><strong>Checkpoints</strong>:</p><ol><li>Planner produces structured plan with tasks and file paths</li><li>Builder creates code matching the plan</li><li>Reviewer identifies issues with severity (critical/major/minor)</li><li>Verifier confirms each claim with file:line evidence</li></ol><h2 id="lab-4-13-deploy-a-multi-team-system" tabindex="-1">Lab 4.13: Deploy a Multi-Team System <a class="header-anchor" href="#lab-4-13-deploy-a-multi-team-system" aria-label="Permalink to &quot;Lab 4.13: Deploy a Multi-Team System&quot;"></a></h2><p><strong>Objective</strong>: Set up orchestrator + 2 teams with domain locking.</p><p><strong>Starter</strong>: <code>course/labs/L4-multi-team/starter-config.yaml</code><strong>Solution</strong>: <code>course/labs/L4-multi-team/solution-config.yaml</code></p><p><strong>Checkpoints</strong>:</p><ol><li>Orchestrator delegates, never executes</li><li>Each team has lead + members with distinct roles</li><li>Domain permissions restrict each agent to its scope</li><li>Mental model files exist for each agent</li></ol></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><div class="edit-info" data-v-1bcd8184><!----><div class="last-updated" data-v-1bcd8184><p class="VPLastUpdated" data-v-1bcd8184 data-v-1bb0c8a8>Last updated: <time datetime="2026-06-03T12:04:06.000Z" data-v-1bb0c8a8></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/labs/l3-whitelist-hook" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Labs 3.8-3.9</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/labs/l4-agent-chain" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Labs 4.12-4.13</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-d8b57b2d data-v-566314d4><div class="container" data-v-566314d4><p class="message" data-v-566314d4>FDSA Agency — Agentic Engineering Course. Part of the fdsa.ai orchestration platform.</p><p class="copyright" data-v-566314d4>Copyright 2026</p></div></footer><!--[--><!--]--></div></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"404.md\":\"BiCvjdaY\",\"api-keys.md\":\"D2Kyj8T3\",\"blog_index.md\":\"ej0SMQFJ\",\"blog_posts_agent-loops-complete-guide.md\":\"DcCNOI9M\",\"blog_posts_cascade-routing.md\":\"DvBM3TSf\",\"blog_posts_choosing-security-level.md\":\"BYXRZEDN\",\"blog_posts_context-window-management.md\":\"Dr1RUj8G\",\"blog_posts_mental-models.md\":\"BRY80gtq\",\"blog_posts_repo-is-spec.md\":\"BxY1cXc_\",\"blog_posts_security-ladder.md\":\"DQaqn6Yt\",\"blog_posts_three-x-rule.md\":\"BHO6bhvz\",\"blog_posts_verifier-pattern.md\":\"Gha_L_u5\",\"blog_posts_vibe-vs-agentic.md\":\"7mduPfz1\",\"blog_posts_what-is-an-agent.md\":\"BU2wUq_Y\",\"blog_posts_why-multi-agent.md\":\"BVRIN2vH\",\"buy.md\":\"qEifz7WE\",\"certificate.md\":\"DZ26T6CI\",\"checkout.md\":\"Ccj6L__h\",\"checkout_cancel.md\":\"DwL5mulX\",\"checkout_success.md\":\"CYTg6xhL\",\"downloads.md\":\"CEHJXSp0\",\"free-preview.md\":\"C5BtRucn\",\"getting-started.md\":\"Boo_V9xC\",\"index.md\":\"BNS2TR1g\",\"labs_index.md\":\"sAzXzfkI\",\"labs_l1-first-agent.md\":\"BwU9yf-G\",\"labs_l2-context.md\":\"BexGm8_s\",\"labs_l2-multi-tool.md\":\"Bj3Mb-oj\",\"labs_l3-verifier.md\":\"xilrGGap\",\"labs_l3-whitelist-hook.md\":\"DJtbL66Y\",\"labs_l4-agent-chain.md\":\"D89P8dwJ\",\"labs_l4-multi-team.md\":\"DmSK8e2P\",\"labs_l5-cicd.md\":\"Dz1Jl78z\",\"labs_l5-observability.md\":\"BDpqVYjT\",\"labs_l6-cost-optimization.md\":\"CabFK4GB\",\"labs_l6-eval-harness.md\":\"CBwH6xOR\",\"labs_l7-autoresearch.md\":\"BYlzPLYo\",\"labs_l7-meta-agent.md\":\"iTswbOPg\",\"modules_competitive-analysis.md\":\"BHMHacei\",\"modules_curriculum.md\":\"D7UeKRfo\",\"modules_debate.md\":\"DWctKMlA\",\"modules_feynman.md\":\"DBw5sPBP\",\"modules_field-manual.md\":\"hmt_NLf1\",\"modules_m1-foundations.md\":\"DHFyTzWj\",\"modules_m2-architecture.md\":\"DVowtmf9\",\"modules_m3-safety.md\":\"RiQQ_HWX\",\"modules_m4-orchestration.md\":\"DFLcAKBv\",\"modules_m5-production.md\":\"DTkLIrwQ\",\"modules_m6-economics.md\":\"HihVEOPb\",\"modules_m7-advanced.md\":\"B_jVHqsw\",\"modules_m8-capstone.md\":\"CqV39Gzl\",\"modules_non-technical.md\":\"BnvuUCRo\",\"modules_reference-stack.md\":\"D9FXitvn\",\"modules_software-factory.md\":\"C5Yf8Zwe\",\"modules_tool-reference.md\":\"B40mlgZJ\",\"public_certificate_template.md\":\"Cg1kPB1b\",\"resources.md\":\"DcUu1NrK\",\"skills.md\":\"BX3RBeCK\",\"troubleshooting.md\":\"B6difx2I\",\"verify.md\":\"Cl5ZMWNd\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Agentic Engineering the Hard Way\",\"description\":\"Build every component from scratch. 65 lessons, 13 labs, 20 skill kits. No black boxes.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":false,\"siteTitle\":\"FDSA\",\"nav\":[{\"text\":\"Course\",\"link\":\"/modules/m1-foundations\",\"activeMatch\":\"/modules/\"},{\"text\":\"Labs\",\"link\":\"/labs/l1-first-agent\",\"activeMatch\":\"/labs/\"},{\"text\":\"Skills\",\"link\":\"/skills\"},{\"text\":\"Blog\",\"link\":\"/blog\",\"activeMatch\":\"/blog/\"},{\"text\":\"More\",\"items\":[{\"text\":\"Curriculum\",\"link\":\"/modules/curriculum\"},{\"text\":\"Debate\",\"link\":\"/modules/debate\"},{\"text\":\"FAQ\",\"link\":\"/troubleshooting\"},{\"text\":\"Certificate\",\"link\":\"/certificate\"},{\"text\":\"Buy\",\"link\":\"/buy\"}]}],\"sidebar\":{\"/modules/\":[{\"text\":\"Module 1: Foundations\",\"link\":\"/modules/m1-foundations\",\"collapsed\":true,\"items\":[{\"text\":\"1.1 What Makes an Agent?\",\"link\":\"/modules/m1-foundations#lesson-11-what-makes-an-agent\"},{\"text\":\"1.2 Harness vs The Model\",\"link\":\"/modules/m1-foundations#lesson-12-the-harness-vs-the-model\"},{\"text\":\"1.3 Decision Framework\",\"link\":\"/modules/m1-foundations#lesson-13-decision-framework\"},{\"text\":\"1.4 Repository IS the Spec\",\"link\":\"/modules/m1-foundations#lesson-13a-the-repository-is-the-spec\"},{\"text\":\"1.5 The Agent Loop\",\"link\":\"/modules/m1-foundations#lesson-14-the-agent-loop\"},{\"text\":\"1.6 Tool Calling\",\"link\":\"/modules/m1-foundations#lesson-15-tool-calling-deep-dive\"},{\"text\":\"1.7 Vibe Coding vs Engineering\",\"link\":\"/modules/m1-foundations#lesson-16-vibe-coding-vs-agentic-engineering\"},{\"text\":\"1.8 Do You Trust Your Agents?\",\"link\":\"/modules/m1-foundations#lesson-17-do-you-trust-your-agents\"},{\"text\":\"Lab 1.9: First Agent\",\"link\":\"/labs/l1-first-agent\"}]},{\"text\":\"Module 2: Architecture\",\"link\":\"/modules/m2-architecture\",\"collapsed\":true,\"items\":[{\"text\":\"2.1-2.3 Core Architecture\",\"link\":\"/modules/m2-architecture#lesson-21-the-four-pillars\"},{\"text\":\"2.4-2.6 Skills & Workspace\",\"link\":\"/modules/m2-architecture#lesson-23b-skills-system-deep-dive\"},{\"text\":\"2.7-2.9 Advanced Patterns\",\"link\":\"/modules/m2-architecture#lesson-24-context-window-management\"},{\"text\":\"Labs 2.10-2.11\",\"link\":\"/labs/l2-multi-tool\"}]},{\"text\":\"Module 3: Safety & Security\",\"link\":\"/modules/m3-safety\",\"collapsed\":true,\"items\":[{\"text\":\"3.1-3.2 Bash & Ladder\",\"link\":\"/modules/m3-safety#lesson-31-why-bash-is-the-single-point-of-failure\"},{\"text\":\"3.3-3.5 Hooks & Control\",\"link\":\"/modules/m3-safety#lesson-33-the-l3-marque-break\"},{\"text\":\"3.6-3.7 Verifier & Stacking\",\"link\":\"/modules/m3-safety#lesson-36-the-verifier-pattern\"},{\"text\":\"Labs 3.8-3.9\",\"link\":\"/labs/l3-whitelist-hook\"}]},{\"text\":\"Module 4: Orchestration\",\"link\":\"/modules/m4-orchestration\",\"collapsed\":true,\"items\":[{\"text\":\"4.1-4.4 Patterns\",\"link\":\"/modules/m4-orchestration#lesson-41-why-one-agent-is-not-enough\"},{\"text\":\"4.5-4.9 Teams & Comms\",\"link\":\"/modules/m4-orchestration#lesson-43-depth-2-delegation\"},{\"text\":\"4.10-4.11 Case Studies\",\"link\":\"/modules/m4-orchestration#lesson-410-the-ceo-board-system\"},{\"text\":\"Labs 4.12-4.13\",\"link\":\"/labs/l4-agent-chain\"}]},{\"text\":\"Module 5: Production\",\"link\":\"/modules/m5-production\",\"collapsed\":true,\"items\":[{\"text\":\"5.1-5.4 CI/CD & Stack\",\"link\":\"/modules/m5-production#lesson-51-what-production-means-for-agents\"},{\"text\":\"5.5-5.8 Deploy & Monitor\",\"link\":\"/modules/m5-production#lesson-53-shadow-deployments\"},{\"text\":\"Labs 5.9-5.10\",\"link\":\"/labs/l5-observability\"}]},{\"text\":\"Module 6: Economics\",\"link\":\"/modules/m6-economics\",\"collapsed\":true,\"items\":[{\"text\":\"6.0-6.2 Pricing\",\"link\":\"/modules/m6-economics#lesson-60-the-compute-advantage-equation\"},{\"text\":\"6.3-6.5 Eval Metrics\",\"link\":\"/modules/m6-economics#lesson-63-cost-per-session-math\"},{\"text\":\"6.6-6.7 Testing\",\"link\":\"/modules/m6-economics#lesson-66-ab-testing-agents\"},{\"text\":\"Labs 6.8-6.9\",\"link\":\"/labs/l6-eval-harness\"}]},{\"text\":\"Module 7: Advanced\",\"link\":\"/modules/m7-advanced\",\"collapsed\":true,\"items\":[{\"text\":\"7.1-7.3 Autoresearch\",\"link\":\"/modules/m7-advanced#lesson-71-autoresearch\"},{\"text\":\"7.4-7.6 Meta & Beyond\",\"link\":\"/modules/m7-advanced#lesson-73-meta-agents\"},{\"text\":\"Labs 7.7-7.8\",\"link\":\"/labs/l7-autoresearch\"}]},{\"text\":\"Module 8: Capstone\",\"link\":\"/modules/m8-capstone\",\"collapsed\":true,\"items\":[{\"text\":\"Project Options\",\"link\":\"/modules/m8-capstone#project-options\"},{\"text\":\"Phases\",\"link\":\"/modules/m8-capstone#capstone-phases\"},{\"text\":\"Rubric\",\"link\":\"/modules/m8-capstone#grading-rubric\"}]}],\"/labs/\":[{\"text\":\"All Labs\",\"link\":\"/labs/l1-first-agent\"},{\"text\":\"L1: First Agent\",\"link\":\"/labs/l1-first-agent\"},{\"text\":\"L2a: Multi-Tool Agent\",\"link\":\"/labs/l2-multi-tool\"},{\"text\":\"L2b: Context-Aware Agent\",\"link\":\"/labs/l2-context\"},{\"text\":\"L3a: Whitelist Hook\",\"link\":\"/labs/l3-whitelist-hook\"},{\"text\":\"L3b: Verifier Agent\",\"link\":\"/labs/l3-verifier\"},{\"text\":\"L4a: Agent Chain\",\"link\":\"/labs/l4-agent-chain\"},{\"text\":\"L4b: Multi-Team Config\",\"link\":\"/labs/l4-multi-team\"},{\"text\":\"L5a: Observability\",\"link\":\"/labs/l5-observability\"},{\"text\":\"L5b: CI/CD Pipeline\",\"link\":\"/labs/l5-cicd\"},{\"text\":\"L6a: Eval Harness\",\"link\":\"/labs/l6-eval-harness\"},{\"text\":\"L6b: Cost Optimization\",\"link\":\"/labs/l6-cost-optimization\"},{\"text\":\"L7a: Autoresearch\",\"link\":\"/labs/l7-autoresearch\"},{\"text\":\"L7b: Meta-Agent\",\"link\":\"/labs/l7-meta-agent\"}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"http://185.239.209.216:3001/artale/agentic-engineering-course\"}],\"footer\":{\"message\":\"FDSA Agency — Agentic Engineering Course. Part of the fdsa.ai orchestration platform.\",\"copyright\":\"Copyright 2026\"},\"search\":{\"provider\":\"local\"},\"locales\":{\"root\":{\"label\":\"English\",\"lang\":\"en-US\",\"title\":\"Agentic Engineering the Hard Way\",\"description\":\"Build every component from scratch. 65 lessons, 13 labs, 20 skill kits. No black boxes, no magic SDKs.\"},\"es\":{\"label\":\"Español\",\"lang\":\"es-ES\",\"title\":\"Agentic Engineering the Hard Way\",\"description\":\"Construye cada componente desde cero. 65 lecciones, 13 laboratorios, 20 kits de habilidades.\",\"link\":\"/es/\"},\"pt\":{\"label\":\"Português\",\"lang\":\"pt-BR\",\"title\":\"Agentic Engineering the Hard Way\",\"description\":\"Construa cada componente do zero. 65 lições, 13 laboratórios, 20 kits de habilidades.\",\"link\":\"/pt/\"},\"it\":{\"label\":\"Italiano\",\"lang\":\"it-IT\",\"title\":\"Agentic Engineering the Hard Way\",\"description\":\"Costruisci ogni componente da zero. 65 lezioni, 13 laboratori, 20 kit di abilità.\",\"link\":\"/it/\"},\"ar\":{\"label\":\"العربية\",\"lang\":\"ar-SA\",\"title\":\"هندسة الوكلاء بالطريقة الصعبة\",\"description\":\"بناء كل مكون من الصفر. 65 درسًا، 13 مختبرًا، 20 مجموعة مهارات.\",\"link\":\"/ar/\",\"dir\":\"rtl\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
</body>
</html>