[{"data":1,"prerenderedAt":1200},["ShallowReactive",2],{"i-mdi:open-in-new":3,"i-mdi:github":8,"i-mdi:menu":10,"i-local:logo":12,"blog-search-tree-orchestration":15},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3m-2 16H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"currentColor\" d=\"M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"currentColor\" d=\"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z\"\u002F>",{"left":4,"top":4,"width":13,"height":13,"rotate":4,"vFlip":6,"hFlip":6,"body":14},1200,"\u003Cdefs\n     id=\"defs1\" \u002F>\n  \u003Cpath\n     style=\"fill:#326ce5;fill-opacity:1;stroke:#326ce5;stroke-width:54.2178;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:65.7793;stroke-opacity:1;paint-order:stroke fill markers\"\n     id=\"path10\"\n     d=\"M 778.34299,825.61572 273.93527,960.77136 -95.316804,591.51929 39.838835,87.111573 544.24655,-48.044069 913.49863,321.20801 Z\"\n     transform=\"matrix(0.89078213,-0.23868436,0.23868436,0.89078213,126.66226,291.12302)\" \u002F>\n  \u003Cpath\n     style=\"fill:#ffa400;fill-opacity:1;stroke:#ffffff;stroke-width:171.118;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:65.7793;stroke-opacity:1;paint-order:stroke fill markers\"\n     id=\"path10-0-4\"\n     d=\"M 778.34299,825.61572 273.93527,960.77136 -95.316804,591.51929 39.838835,87.111573 544.24655,-48.044069 913.49863,321.20801 Z\"\n     transform=\"matrix(0.56447964,-0.15125188,0.15125188,0.56447964,300.05065,404.26778)\" \u002F>\n  \u003Cg\n     id=\"g24\"\n     transform=\"translate(-0.00289,-1.818185)\">\n    \u003Cpath\n       style=\"fill:#ffa400;fill-opacity:1;stroke:#ffffff;stroke-width:25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:65.7793;stroke-opacity:1;paint-order:stroke fill markers\"\n       d=\"M 236.36364,809.09091 960.89972,390.77981\"\n       id=\"path22\" \u002F>\n    \u003Cpath\n       style=\"fill:#ffa400;fill-opacity:1;stroke:#ffffff;stroke-width:25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:65.7793;stroke-opacity:1;paint-order:stroke fill markers\"\n       d=\"m 236.36364,389.09091 727.2785,419.89444\"\n       id=\"path23\" \u002F>\n    \u003Cpath\n       style=\"fill:#ffa400;fill-opacity:1;stroke:#ffffff;stroke-width:25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:65.7793;stroke-opacity:1;paint-order:stroke fill markers\"\n       d=\"M 600.18182,1010.9091 V 192.72727\"\n       id=\"path24\" \u002F>\n  \u003C\u002Fg>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1\"\n     cx=\"261.54996\"\n     cy=\"402.17349\"\n     r=\"19.439373\" \u002F>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1-3\"\n     cx=\"257.91364\"\n     cy=\"793.18634\"\n     r=\"19.439373\" \u002F>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1-5\"\n     cx=\"599.82275\"\n     cy=\"993.0954\"\n     r=\"19.439373\" \u002F>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1-2\"\n     cx=\"939.64093\"\n     cy=\"794.36816\"\n     r=\"19.439373\" \u002F>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1-8\"\n     cx=\"599.55005\"\n     cy=\"207.73181\"\n     r=\"19.439373\" \u002F>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1-1\"\n     cx=\"939.91364\"\n     cy=\"403.18637\"\n     r=\"19.439373\" \u002F>\n  \u003Ccircle\n     style=\"fill:none;stroke:#ffffff;stroke-width:42.7667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-dashoffset:65.7793;paint-order:stroke fill markers\"\n     id=\"path1-1-7\"\n     cx=\"600\"\n     cy=\"600\"\n     r=\"19.439373\" \u002F>",{"id":16,"title":17,"author":18,"authorUrl":19,"body":20,"category":1186,"date":1187,"description":1188,"extension":1189,"image":208,"meta":1190,"navigation":347,"path":1191,"seo":1192,"series":1193,"stem":1194,"tags":1195,"__hash__":1199},"blog\u002Fblog\u002Fsearch-tree-orchestration.md","Pipelines are straight lines. Your agents need to think in trees.","rdmnl","https:\u002F\u002Fgithub.com\u002Frdmnl",{"type":21,"value":22,"toc":1176},"minimark",[23,43,46,49,52,55,58,63,66,152,155,159,162,184,199,202,433,436,440,443,446,626,629,635,639,642,714,728,739,743,746,809,815,826,830,835,877,1079,1082,1097,1101,1107,1113,1119,1122,1126,1137,1169,1172],[24,25,26],"blockquote",{},[27,28,29,33,34,38,39,42],"p",{},[30,31,32],"strong",{},"TL;DR"," - SwarmTeam gains a fourth orchestration mode: ",[35,36,37],"code",{},"search",". A planner agent\nexplores multiple approaches in parallel, an evaluator scores each one, and weak\nbranches get pruned. The search converges when a solution scores high enough or\nthe tree hits its budget. BFS and BeamSearch strategies, fully observable via\n",[35,40,41],{},"kubectl describe",", OTel metrics, and audit trail.",[44,45],"hr",{},[27,47,48],{},"\"Find the root cause of this production outage.\"",[27,50,51],{},"Hand that to a pipeline and here's what happens: step 1 checks logs, step 2 reads metrics, step 3 writes a report. One linear path. If the first hypothesis is wrong, the pipeline doesn't backtrack. It writes a confident report about the wrong thing.",[27,53,54],{},"Hand it to a human SRE and they do something completely different. They generate three hypotheses. Test the most likely one first. When it doesn't match the evidence, they drop it and go deeper on the second. They prune dead ends. They converge on the answer.",[27,56,57],{},"That's a tree search. And until now, you couldn't express it in Kubernetes.",[59,60,62],"h2",{"id":61},"the-problem-with-just-use-a-pipeline","The problem with \"just use a pipeline\"",[27,64,65],{},"kubeswarm already has three orchestration modes for SwarmTeam: pipeline (DAG), routed (LLM dispatch), and dynamic (agents self-organize). They cover most patterns. But they share a limitation.",[67,68,69,88],"table",{},[70,71,72],"thead",{},[73,74,75,79,82,85],"tr",{},[76,77,78],"th",{},"Mode",[76,80,81],{},"Execution path",[76,83,84],{},"Backtracking",[76,86,87],{},"Scoring",[89,90,91,105,117,130],"tbody",{},[73,92,93,97,100,103],{},[94,95,96],"td",{},"Pipeline",[94,98,99],{},"Fixed at YAML time",[94,101,102],{},"No",[94,104,102],{},[73,106,107,110,113,115],{},[94,108,109],{},"Routed",[94,111,112],{},"Single dispatch decision",[94,114,102],{},[94,116,102],{},[73,118,119,122,125,128],{},[94,120,121],{},"Dynamic",[94,123,124],{},"Unstructured delegation",[94,126,127],{},"Ad-hoc",[94,129,102],{},[73,131,132,137,142,147],{},[94,133,134],{},[30,135,136],{},"Search",[94,138,139],{},[30,140,141],{},"Expands at runtime",[94,143,144],{},[30,145,146],{},"Yes (pruning)",[94,148,149],{},[30,150,151],{},"Yes (evaluator)",[27,153,154],{},"Pipelines are predetermined. Routed mode makes one decision. Dynamic mode has no structure to guide exploration. None of them lets you say \"explore three approaches, score each one, drop the worst, go deeper on the best.\"",[59,156,158],{"id":157},"search-mode-structured-exploration","Search mode: structured exploration",[27,160,161],{},"Search adds a fourth mode to SwarmTeam. You define three roles:",[163,164,165,172,178],"ul",{},[166,167,168,171],"li",{},[30,169,170],{},"Planner"," - decides what to explore next, what to prune, when to stop",[166,173,174,177],{},[30,175,176],{},"Executor"," - does the actual work on each branch",[166,179,180,183],{},[30,181,182],{},"Evaluator"," (optional) - scores executor output on a 0-1000 scale",[27,185,186,187,190,191,194,195,198],{},"The planner sees the current tree state and outputs structured actions: ",[35,188,189],{},"expand"," (create branches), ",[35,192,193],{},"prune"," (kill dead ends), ",[35,196,197],{},"converge"," (declare a winner). The operator applies these atomically, dispatches executors in parallel, collects scores, and loops back to the planner.",[27,200,201],{},"Here's the simplest version - a brainstorming search where the planner self-scores:",[203,204,209],"pre",{"className":205,"code":206,"language":207,"meta":208,"style":208},"language-yaml shiki shiki-themes github-dark","# brainstorm-team.yaml\nspec:\n  roles:\n    - name: planner\n      model: claude-sonnet-4-20250514\n      prompt:\n        inline: |\n          You receive the current search tree as JSON. Decide what to explore next.\n          Respond with a JSON array of actions:\n          [{\"action\": \"expand\", \"parentNode\": 0, \"task\": \"...\", \"scoreMillis\": 700}]\n    - name: worker\n      model: claude-sonnet-4-20250514\n      prompt:\n        inline: \"Execute the given task thoroughly.\"\n\n  search:\n    strategy: BFS\n    plannerRole: planner\n    executorRole: worker\n    initialPrompt: \"{{ .input.problem }}\"\n    maxDepth: 3\n    maxNodes: 15\n    minScorePercent: 85\n","yaml","",[35,210,211,220,231,239,255,266,274,286,292,298,304,316,325,332,342,349,357,368,378,388,399,411,422],{"__ignoreMap":208},[212,213,216],"span",{"class":214,"line":215},"line",1,[212,217,219],{"class":218},"sAwPA","# brainstorm-team.yaml\n",[212,221,223,227],{"class":214,"line":222},2,[212,224,226],{"class":225},"s4JwU","spec",[212,228,230],{"class":229},"s95oV",":\n",[212,232,234,237],{"class":214,"line":233},3,[212,235,236],{"class":225},"  roles",[212,238,230],{"class":229},[212,240,242,245,248,251],{"class":214,"line":241},4,[212,243,244],{"class":229},"    - ",[212,246,247],{"class":225},"name",[212,249,250],{"class":229},": ",[212,252,254],{"class":253},"sU2Wk","planner\n",[212,256,258,261,263],{"class":214,"line":257},5,[212,259,260],{"class":225},"      model",[212,262,250],{"class":229},[212,264,265],{"class":253},"claude-sonnet-4-20250514\n",[212,267,269,272],{"class":214,"line":268},6,[212,270,271],{"class":225},"      prompt",[212,273,230],{"class":229},[212,275,277,280,282],{"class":214,"line":276},7,[212,278,279],{"class":225},"        inline",[212,281,250],{"class":229},[212,283,285],{"class":284},"snl16","|\n",[212,287,289],{"class":214,"line":288},8,[212,290,291],{"class":253},"          You receive the current search tree as JSON. Decide what to explore next.\n",[212,293,295],{"class":214,"line":294},9,[212,296,297],{"class":253},"          Respond with a JSON array of actions:\n",[212,299,301],{"class":214,"line":300},10,[212,302,303],{"class":253},"          [{\"action\": \"expand\", \"parentNode\": 0, \"task\": \"...\", \"scoreMillis\": 700}]\n",[212,305,307,309,311,313],{"class":214,"line":306},11,[212,308,244],{"class":229},[212,310,247],{"class":225},[212,312,250],{"class":229},[212,314,315],{"class":253},"worker\n",[212,317,319,321,323],{"class":214,"line":318},12,[212,320,260],{"class":225},[212,322,250],{"class":229},[212,324,265],{"class":253},[212,326,328,330],{"class":214,"line":327},13,[212,329,271],{"class":225},[212,331,230],{"class":229},[212,333,335,337,339],{"class":214,"line":334},14,[212,336,279],{"class":225},[212,338,250],{"class":229},[212,340,341],{"class":253},"\"Execute the given task thoroughly.\"\n",[212,343,345],{"class":214,"line":344},15,[212,346,348],{"emptyLinePlaceholder":347},true,"\n",[212,350,352,355],{"class":214,"line":351},16,[212,353,354],{"class":225},"  search",[212,356,230],{"class":229},[212,358,360,363,365],{"class":214,"line":359},17,[212,361,362],{"class":225},"    strategy",[212,364,250],{"class":229},[212,366,367],{"class":253},"BFS\n",[212,369,371,374,376],{"class":214,"line":370},18,[212,372,373],{"class":225},"    plannerRole",[212,375,250],{"class":229},[212,377,254],{"class":253},[212,379,381,384,386],{"class":214,"line":380},19,[212,382,383],{"class":225},"    executorRole",[212,385,250],{"class":229},[212,387,315],{"class":253},[212,389,391,394,396],{"class":214,"line":390},20,[212,392,393],{"class":225},"    initialPrompt",[212,395,250],{"class":229},[212,397,398],{"class":253},"\"{{ .input.problem }}\"\n",[212,400,402,405,407],{"class":214,"line":401},21,[212,403,404],{"class":225},"    maxDepth",[212,406,250],{"class":229},[212,408,410],{"class":409},"sDLfK","3\n",[212,412,414,417,419],{"class":214,"line":413},22,[212,415,416],{"class":225},"    maxNodes",[212,418,250],{"class":229},[212,420,421],{"class":409},"15\n",[212,423,425,428,430],{"class":214,"line":424},23,[212,426,427],{"class":225},"    minScorePercent",[212,429,250],{"class":229},[212,431,432],{"class":409},"85\n",[27,434,435],{},"Two roles, twelve lines of search config. The planner explores breadth-first, scoring its own branches. When something scores above 85%, the search stops.",[59,437,439],{"id":438},"beamsearch-keep-the-best-prune-the-rest","BeamSearch: keep the best, prune the rest",[27,441,442],{},"BFS explores everything at each level. For bigger problems, that's expensive. BeamSearch keeps only the top K branches per depth level and prunes the rest.",[27,444,445],{},"This is where the evaluator role earns its keep. A separate model scores each branch objectively, so beam pruning decisions are based on independent assessment rather than the planner grading its own work.",[203,447,449],{"className":205,"code":448,"language":207,"meta":208,"style":208},"# root-cause-analyzer.yaml\nspec:\n  roles:\n    - name: investigator\n      model: claude-sonnet-4-20250514\n    - name: tester\n      model: claude-sonnet-4-20250514\n    - name: judge\n      model: claude-haiku-4-5-20251001   # cheap model for scoring\n\n  search:\n    strategy: BeamSearch\n    plannerRole: investigator\n    executorRole: tester\n    evaluatorRole: judge\n    initialPrompt: \"{{ .input.incident }}\"\n    beamWidth: 3\n    minScorePercent: 85\n    maxDepth: 5\n    maxNodes: 30\n    maxParallel: 3\n",[35,450,451,456,462,468,479,487,498,506,517,529,533,539,548,556,564,573,582,591,599,608,617],{"__ignoreMap":208},[212,452,453],{"class":214,"line":215},[212,454,455],{"class":218},"# root-cause-analyzer.yaml\n",[212,457,458,460],{"class":214,"line":222},[212,459,226],{"class":225},[212,461,230],{"class":229},[212,463,464,466],{"class":214,"line":233},[212,465,236],{"class":225},[212,467,230],{"class":229},[212,469,470,472,474,476],{"class":214,"line":241},[212,471,244],{"class":229},[212,473,247],{"class":225},[212,475,250],{"class":229},[212,477,478],{"class":253},"investigator\n",[212,480,481,483,485],{"class":214,"line":257},[212,482,260],{"class":225},[212,484,250],{"class":229},[212,486,265],{"class":253},[212,488,489,491,493,495],{"class":214,"line":268},[212,490,244],{"class":229},[212,492,247],{"class":225},[212,494,250],{"class":229},[212,496,497],{"class":253},"tester\n",[212,499,500,502,504],{"class":214,"line":276},[212,501,260],{"class":225},[212,503,250],{"class":229},[212,505,265],{"class":253},[212,507,508,510,512,514],{"class":214,"line":288},[212,509,244],{"class":229},[212,511,247],{"class":225},[212,513,250],{"class":229},[212,515,516],{"class":253},"judge\n",[212,518,519,521,523,526],{"class":214,"line":294},[212,520,260],{"class":225},[212,522,250],{"class":229},[212,524,525],{"class":253},"claude-haiku-4-5-20251001",[212,527,528],{"class":218},"   # cheap model for scoring\n",[212,530,531],{"class":214,"line":300},[212,532,348],{"emptyLinePlaceholder":347},[212,534,535,537],{"class":214,"line":306},[212,536,354],{"class":225},[212,538,230],{"class":229},[212,540,541,543,545],{"class":214,"line":318},[212,542,362],{"class":225},[212,544,250],{"class":229},[212,546,547],{"class":253},"BeamSearch\n",[212,549,550,552,554],{"class":214,"line":327},[212,551,373],{"class":225},[212,553,250],{"class":229},[212,555,478],{"class":253},[212,557,558,560,562],{"class":214,"line":334},[212,559,383],{"class":225},[212,561,250],{"class":229},[212,563,497],{"class":253},[212,565,566,569,571],{"class":214,"line":344},[212,567,568],{"class":225},"    evaluatorRole",[212,570,250],{"class":229},[212,572,516],{"class":253},[212,574,575,577,579],{"class":214,"line":351},[212,576,393],{"class":225},[212,578,250],{"class":229},[212,580,581],{"class":253},"\"{{ .input.incident }}\"\n",[212,583,584,587,589],{"class":214,"line":359},[212,585,586],{"class":225},"    beamWidth",[212,588,250],{"class":229},[212,590,410],{"class":409},[212,592,593,595,597],{"class":214,"line":370},[212,594,427],{"class":225},[212,596,250],{"class":229},[212,598,432],{"class":409},[212,600,601,603,605],{"class":214,"line":380},[212,602,404],{"class":225},[212,604,250],{"class":229},[212,606,607],{"class":409},"5\n",[212,609,610,612,614],{"class":214,"line":390},[212,611,416],{"class":225},[212,613,250],{"class":229},[212,615,616],{"class":409},"30\n",[212,618,619,622,624],{"class":214,"line":401},[212,620,621],{"class":225},"    maxParallel",[212,623,250],{"class":229},[212,625,410],{"class":409},[27,627,628],{},"The investigator generates hypotheses. The tester checks each one against evidence. The judge scores how well the evidence supports the hypothesis. After each depth level, only the top 3 hypotheses survive. The rest get pruned.",[27,630,631,634],{},[30,632,633],{},"Cost optimization is built in."," The investigator (expensive reasoning model) runs once per iteration. The judge (cheap fast model) runs once per node. Most of the compute goes to testers running in parallel. You can easily spend 10x less on scoring than on execution.",[59,636,638],{"id":637},"the-evaluators-json-contract","The evaluator's JSON contract",[27,640,641],{},"The evaluator returns structured scores. No prompt engineering gymnastics - just a JSON object:",[203,643,647],{"className":644,"code":645,"language":646,"meta":208,"style":208},"language-json shiki shiki-themes github-dark","{\n  \"scoreMillis\": 720,\n  \"reasoning\": \"Correct approach but missing edge case handling\",\n  \"shouldPrune\": false,\n  \"metadata\": {\"evidence_strength\": \"moderate\"}\n}\n","json",[35,648,649,654,667,679,691,710],{"__ignoreMap":208},[212,650,651],{"class":214,"line":215},[212,652,653],{"class":229},"{\n",[212,655,656,659,661,664],{"class":214,"line":222},[212,657,658],{"class":409},"  \"scoreMillis\"",[212,660,250],{"class":229},[212,662,663],{"class":409},"720",[212,665,666],{"class":229},",\n",[212,668,669,672,674,677],{"class":214,"line":233},[212,670,671],{"class":409},"  \"reasoning\"",[212,673,250],{"class":229},[212,675,676],{"class":253},"\"Correct approach but missing edge case handling\"",[212,678,666],{"class":229},[212,680,681,684,686,689],{"class":214,"line":241},[212,682,683],{"class":409},"  \"shouldPrune\"",[212,685,250],{"class":229},[212,687,688],{"class":409},"false",[212,690,666],{"class":229},[212,692,693,696,699,702,704,707],{"class":214,"line":257},[212,694,695],{"class":409},"  \"metadata\"",[212,697,698],{"class":229},": {",[212,700,701],{"class":409},"\"evidence_strength\"",[212,703,250],{"class":229},[212,705,706],{"class":253},"\"moderate\"",[212,708,709],{"class":229},"}\n",[212,711,712],{"class":214,"line":268},[212,713,709],{"class":229},[27,715,716,719,720,723,724,727],{},[35,717,718],{},"scoreMillis"," is 0-1000 (milli-units, not milliseconds). ",[35,721,722],{},"shouldPrune"," lets the evaluator flag dead ends without waiting for the planner's next iteration. ",[35,725,726],{},"metadata"," carries domain-specific signals the planner can reason about.",[27,729,730,731,734,735,738],{},"If the evaluator returns garbage JSON, the operator retries up to ",[35,732,733],{},"maxEvaluatorRetries"," times, then marks the node ",[35,736,737],{},"EvalFailed",". The planner sees the failure and decides whether to retry or move on. No silent data loss.",[59,740,742],{"id":741},"five-ways-a-search-terminates","Five ways a search terminates",[27,744,745],{},"Every search is bounded. There's no way to create a runaway search.",[203,747,749],{"className":205,"code":748,"language":207,"meta":208,"style":208},"search:\n  minScorePercent: 85     # a node scores above 85% -> converge\n  maxDepth: 5             # tree gets 5 levels deep -> stop\n  maxNodes: 30            # 30 nodes created -> stop\n  maxIterations: 10       # planner invoked 10 times -> stop\n",[35,750,751,757,770,783,796],{"__ignoreMap":208},[212,752,753,755],{"class":214,"line":215},[212,754,37],{"class":225},[212,756,230],{"class":229},[212,758,759,762,764,767],{"class":214,"line":222},[212,760,761],{"class":225},"  minScorePercent",[212,763,250],{"class":229},[212,765,766],{"class":409},"85",[212,768,769],{"class":218},"     # a node scores above 85% -> converge\n",[212,771,772,775,777,780],{"class":214,"line":233},[212,773,774],{"class":225},"  maxDepth",[212,776,250],{"class":229},[212,778,779],{"class":409},"5",[212,781,782],{"class":218},"             # tree gets 5 levels deep -> stop\n",[212,784,785,788,790,793],{"class":214,"line":241},[212,786,787],{"class":225},"  maxNodes",[212,789,250],{"class":229},[212,791,792],{"class":409},"30",[212,794,795],{"class":218},"            # 30 nodes created -> stop\n",[212,797,798,801,803,806],{"class":214,"line":257},[212,799,800],{"class":225},"  maxIterations",[212,802,250],{"class":229},[212,804,805],{"class":409},"10",[212,807,808],{"class":218},"       # planner invoked 10 times -> stop\n",[27,810,811,812,814],{},"Plus: the planner can explicitly ",[35,813,197],{}," at any time, and SwarmBudget hard-stops when the token budget runs out. First condition hit wins.",[27,816,817,818,821,822,825],{},"When the search terminates, the highest-scoring node's output becomes the SwarmRun output. If nothing scored above ",[35,819,820],{},"minScorePercent",", the run fails with ",[35,823,824],{},"SearchExhausted",". No ambiguity about what happened or why.",[59,827,829],{"id":828},"the-tree-is-in-your-status","The tree is in your status",[27,831,832,834],{},[35,833,41],{}," shows the full tree. Every node, every score, every pruning decision.",[203,836,840],{"className":837,"code":838,"language":839,"meta":208,"style":208},"language-bash shiki shiki-themes github-dark","kubectl get swrun rca-demo -o jsonpath='{.status.searchTree.nodes}' | \\\n  jq '.[] | {id, depth, phase, scoreMillis, task}'\n","bash",[35,841,842,869],{"__ignoreMap":208},[212,843,844,848,851,854,857,860,863,866],{"class":214,"line":215},[212,845,847],{"class":846},"svObZ","kubectl",[212,849,850],{"class":253}," get",[212,852,853],{"class":253}," swrun",[212,855,856],{"class":253}," rca-demo",[212,858,859],{"class":409}," -o",[212,861,862],{"class":253}," jsonpath='{.status.searchTree.nodes}'",[212,864,865],{"class":284}," |",[212,867,868],{"class":409}," \\\n",[212,870,871,874],{"class":214,"line":222},[212,872,873],{"class":846},"  jq",[212,875,876],{"class":253}," '.[] | {id, depth, phase, scoreMillis, task}'\n",[203,878,880],{"className":644,"code":879,"language":646,"meta":208,"style":208},"{\"id\": 0, \"depth\": 0, \"phase\": \"Scored\", \"scoreMillis\": null, \"task\": \"Investigate latency spike\"}\n{\"id\": 1, \"depth\": 1, \"phase\": \"Scored\", \"scoreMillis\": 720, \"task\": \"Check database connections\"}\n{\"id\": 2, \"depth\": 1, \"phase\": \"Pruned\", \"scoreMillis\": 310, \"task\": \"Check network partitions\"}\n{\"id\": 3, \"depth\": 2, \"phase\": \"Solution\", \"scoreMillis\": 920, \"task\": \"Profile connection pool leaks\"}\n",[35,881,882,937,983,1031],{"__ignoreMap":208},[212,883,884,887,890,892,895,898,901,903,905,907,910,912,915,917,920,922,925,927,930,932,935],{"class":214,"line":215},[212,885,886],{"class":229},"{",[212,888,889],{"class":409},"\"id\"",[212,891,250],{"class":229},[212,893,894],{"class":409},"0",[212,896,897],{"class":229},", ",[212,899,900],{"class":409},"\"depth\"",[212,902,250],{"class":229},[212,904,894],{"class":409},[212,906,897],{"class":229},[212,908,909],{"class":409},"\"phase\"",[212,911,250],{"class":229},[212,913,914],{"class":253},"\"Scored\"",[212,916,897],{"class":229},[212,918,919],{"class":409},"\"scoreMillis\"",[212,921,250],{"class":229},[212,923,924],{"class":409},"null",[212,926,897],{"class":229},[212,928,929],{"class":409},"\"task\"",[212,931,250],{"class":229},[212,933,934],{"class":253},"\"Investigate latency spike\"",[212,936,709],{"class":229},[212,938,939,941,943,945,948,950,952,954,956,958,960,962,964,966,968,970,972,974,976,978,981],{"class":214,"line":222},[212,940,886],{"class":229},[212,942,889],{"class":409},[212,944,250],{"class":229},[212,946,947],{"class":409},"1",[212,949,897],{"class":229},[212,951,900],{"class":409},[212,953,250],{"class":229},[212,955,947],{"class":409},[212,957,897],{"class":229},[212,959,909],{"class":409},[212,961,250],{"class":229},[212,963,914],{"class":253},[212,965,897],{"class":229},[212,967,919],{"class":409},[212,969,250],{"class":229},[212,971,663],{"class":409},[212,973,897],{"class":229},[212,975,929],{"class":409},[212,977,250],{"class":229},[212,979,980],{"class":253},"\"Check database connections\"",[212,982,709],{"class":229},[212,984,985,987,989,991,994,996,998,1000,1002,1004,1006,1008,1011,1013,1015,1017,1020,1022,1024,1026,1029],{"class":214,"line":233},[212,986,886],{"class":229},[212,988,889],{"class":409},[212,990,250],{"class":229},[212,992,993],{"class":409},"2",[212,995,897],{"class":229},[212,997,900],{"class":409},[212,999,250],{"class":229},[212,1001,947],{"class":409},[212,1003,897],{"class":229},[212,1005,909],{"class":409},[212,1007,250],{"class":229},[212,1009,1010],{"class":253},"\"Pruned\"",[212,1012,897],{"class":229},[212,1014,919],{"class":409},[212,1016,250],{"class":229},[212,1018,1019],{"class":409},"310",[212,1021,897],{"class":229},[212,1023,929],{"class":409},[212,1025,250],{"class":229},[212,1027,1028],{"class":253},"\"Check network partitions\"",[212,1030,709],{"class":229},[212,1032,1033,1035,1037,1039,1042,1044,1046,1048,1050,1052,1054,1056,1059,1061,1063,1065,1068,1070,1072,1074,1077],{"class":214,"line":241},[212,1034,886],{"class":229},[212,1036,889],{"class":409},[212,1038,250],{"class":229},[212,1040,1041],{"class":409},"3",[212,1043,897],{"class":229},[212,1045,900],{"class":409},[212,1047,250],{"class":229},[212,1049,993],{"class":409},[212,1051,897],{"class":229},[212,1053,909],{"class":409},[212,1055,250],{"class":229},[212,1057,1058],{"class":253},"\"Solution\"",[212,1060,897],{"class":229},[212,1062,919],{"class":409},[212,1064,250],{"class":229},[212,1066,1067],{"class":409},"920",[212,1069,897],{"class":229},[212,1071,929],{"class":409},[212,1073,250],{"class":229},[212,1075,1076],{"class":253},"\"Profile connection pool leaks\"",[212,1078,709],{"class":229},[27,1080,1081],{},"Node 2 was pruned (network theory disproved). Node 3 scored 920 and was selected as the solution. The planner explored, the evaluator scored, the operator pruned. All of it auditable.",[27,1083,1084,1085,1088,1089,1092,1093,1096],{},"OTel metrics track the search in real time: ",[35,1086,1087],{},"kubeswarm.search.best_score"," shows convergence progress, ",[35,1090,1091],{},"kubeswarm.search.nodes.pruned"," counts dead ends, and ",[35,1094,1095],{},"kubeswarm.search.stagnation_iterations"," warns you when the search is stuck.",[59,1098,1100],{"id":1099},"when-to-use-search-vs-pipeline","When to use search vs pipeline",[27,1102,1103,1106],{},[30,1104,1105],{},"Use search when"," the problem has multiple valid approaches and you need to systematically find the best one. Root cause analysis, code generation with test validation, adversarial testing, prompt optimization.",[27,1108,1109,1112],{},[30,1110,1111],{},"Use pipeline when"," the steps are predetermined. Research -> fact-check -> write. ETL. Anything where the path is known upfront.",[27,1114,1115,1118],{},[30,1116,1117],{},"Use dynamic when"," agents should self-organize without scoring. Collaborative brainstorming where there's no \"best answer\" - just emergent output.",[27,1120,1121],{},"Search mode is not a replacement for pipelines. It's for the class of problems where the first answer is probably wrong and the value is in the exploration.",[59,1123,1125],{"id":1124},"try-it","Try it",[27,1127,1128,1129,1136],{},"The ",[1130,1131,1135],"a",{"href":1132,"rel":1133},"https:\u002F\u002Fgithub.com\u002Fkubeswarm\u002Fkubeswarm-cookbook",[1134],"nofollow","cookbook has two examples",": a minimal BFS brainstorm (recipe 18) and a full BeamSearch root cause analyzer (recipe 19). Both work with Ollama or any OpenAI-compatible API.",[203,1138,1140],{"className":837,"code":1139,"language":839,"meta":208,"style":208},"kubectl apply -f 18-search-brainstorm\u002Fteam.yaml\nkubectl get swrun brainstorm-demo -w\n",[35,1141,1142,1155],{"__ignoreMap":208},[212,1143,1144,1146,1149,1152],{"class":214,"line":215},[212,1145,847],{"class":846},[212,1147,1148],{"class":253}," apply",[212,1150,1151],{"class":409}," -f",[212,1153,1154],{"class":253}," 18-search-brainstorm\u002Fteam.yaml\n",[212,1156,1157,1159,1161,1163,1166],{"class":214,"line":222},[212,1158,847],{"class":846},[212,1160,850],{"class":253},[212,1162,853],{"class":253},[212,1164,1165],{"class":253}," brainstorm-demo",[212,1167,1168],{"class":409}," -w\n",[27,1170,1171],{},"Watch the tree grow. Watch branches get pruned. Watch the search converge on an answer that a pipeline would never have found.",[1173,1174,1175],"style",{},"html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":208,"searchDepth":222,"depth":222,"links":1177},[1178,1179,1180,1181,1182,1183,1184,1185],{"id":61,"depth":222,"text":62},{"id":157,"depth":222,"text":158},{"id":438,"depth":222,"text":439},{"id":637,"depth":222,"text":638},{"id":741,"depth":222,"text":742},{"id":828,"depth":222,"text":829},{"id":1099,"depth":222,"text":1100},{"id":1124,"depth":222,"text":1125},"deep-dive","2026-05-19","kubeswarm's search mode lets agent teams explore, score, prune, and converge - turning multi-hypothesis problems into structured tree searches on Kubernetes.","md",{},"\u002Fblog\u002Fsearch-tree-orchestration",{"title":17,"description":1188},null,"blog\u002Fsearch-tree-orchestration",[1196,1197,1186,1198],"orchestration","agents","architecture","qmDFT5QcP0t1BjqM4_LYS6GYFO9x2mcOr9LW_oZrlRc",1779206063395]