[{"data":1,"prerenderedAt":1632},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fcognets\u002Fbuilding\u002Fbeyond-llm":3},{"id":4,"title":5,"body":6,"description":1625,"extension":1626,"meta":1627,"navigation":124,"path":1628,"seo":1629,"stem":1630,"__hash__":1631},"docs\u002Fdocs\u002Fv2\u002Fcognets\u002Fbuilding\u002Fbeyond-llm.md","Cognition Beyond the LLM",{"type":7,"value":8,"toc":1617},"minimark",[9,13,17,25,28,33,40,374,377,665,668,675,679,682,690,966,972,976,982,1249,1252,1256,1259,1266,1279,1285,1288,1504,1507,1511,1514,1517,1520,1524,1527,1607,1610,1613],[10,11,5],"h1",{"id":12},"cognition-beyond-the-llm",[14,15,16],"p",{},"Everything in this section so far has had no language model in it.",[14,18,19,20,24],{},"The loop, the clock, the world, the log, the telemetry — none of it assumes inference.\n",[21,22,23],"code",{},"kernel.stream()"," is one verb of seven, and a cognet that never calls it is still a\ncognet: same wake machinery, same phases, same durable record, same flame graph.",[14,26,27],{},"This page is what that buys.",[29,30,32],"h2",{"id":31},"the-same-loop-twice","The same loop, twice",[14,34,35,36,39],{},"Here is ",[21,37,38],{},"zero",", reduced to its shape:",[41,42,47],"pre",{"className":43,"code":44,"language":45,"meta":46,"style":46},"language-ts shiki shiki-themes dark-plus","loop(async ({ signal, stop }) => {\n    await phase(\"sync\", async () => sync())\n\n    const messages = await phase(\"render\", async () => renderContext(state))\n\n    const { blocks, done } = await phase(\"invoke\", async () => {\n        return collectFrom(kernel.stream({ messages, signal }))\n    })\n\n    if (blocks.length > 0) {\n        await phase(\"act\", async () => { await kernel.run(blocks, { signal }) })\n    }\n\n    if (done && blocks.length === 0) stop()\n})\n","ts","",[21,48,49,88,119,126,168,173,211,244,250,255,281,326,332,337,368],{"__ignoreMap":46},[50,51,54,58,62,66,69,73,76,79,82,85],"span",{"class":52,"line":53},"line",1,[50,55,57],{"class":56},"sCudf","loop",[50,59,61],{"class":60},"sTNBD","(",[50,63,65],{"class":64},"scz_3","async",[50,67,68],{"class":60}," ({ ",[50,70,72],{"class":71},"s3F5K","signal",[50,74,75],{"class":60},", ",[50,77,78],{"class":71},"stop",[50,80,81],{"class":60}," }) ",[50,83,84],{"class":64},"=>",[50,86,87],{"class":60}," {\n",[50,89,91,95,98,100,104,106,108,111,113,116],{"class":52,"line":90},2,[50,92,94],{"class":93},"sYbnZ","    await",[50,96,97],{"class":56}," phase",[50,99,61],{"class":60},[50,101,103],{"class":102},"sKc5r","\"sync\"",[50,105,75],{"class":60},[50,107,65],{"class":64},[50,109,110],{"class":60}," () ",[50,112,84],{"class":64},[50,114,115],{"class":56}," sync",[50,117,118],{"class":60},"())\n",[50,120,122],{"class":52,"line":121},3,[50,123,125],{"emptyLinePlaceholder":124},true,"\n",[50,127,129,132,136,139,142,144,146,149,151,153,155,157,160,162,165],{"class":52,"line":128},4,[50,130,131],{"class":64},"    const",[50,133,135],{"class":134},"s9McN"," messages",[50,137,138],{"class":60}," = ",[50,140,141],{"class":93},"await",[50,143,97],{"class":56},[50,145,61],{"class":60},[50,147,148],{"class":102},"\"render\"",[50,150,75],{"class":60},[50,152,65],{"class":64},[50,154,110],{"class":60},[50,156,84],{"class":64},[50,158,159],{"class":56}," renderContext",[50,161,61],{"class":60},[50,163,164],{"class":71},"state",[50,166,167],{"class":60},"))\n",[50,169,171],{"class":52,"line":170},5,[50,172,125],{"emptyLinePlaceholder":124},[50,174,176,178,181,184,186,189,192,194,196,198,201,203,205,207,209],{"class":52,"line":175},6,[50,177,131],{"class":64},[50,179,180],{"class":60}," { ",[50,182,183],{"class":134},"blocks",[50,185,75],{"class":60},[50,187,188],{"class":134},"done",[50,190,191],{"class":60}," } = ",[50,193,141],{"class":93},[50,195,97],{"class":56},[50,197,61],{"class":60},[50,199,200],{"class":102},"\"invoke\"",[50,202,75],{"class":60},[50,204,65],{"class":64},[50,206,110],{"class":60},[50,208,84],{"class":64},[50,210,87],{"class":60},[50,212,214,217,220,222,225,228,231,234,237,239,241],{"class":52,"line":213},7,[50,215,216],{"class":93},"        return",[50,218,219],{"class":56}," collectFrom",[50,221,61],{"class":60},[50,223,224],{"class":71},"kernel",[50,226,227],{"class":60},".",[50,229,230],{"class":56},"stream",[50,232,233],{"class":60},"({ ",[50,235,236],{"class":71},"messages",[50,238,75],{"class":60},[50,240,72],{"class":71},[50,242,243],{"class":60}," }))\n",[50,245,247],{"class":52,"line":246},8,[50,248,249],{"class":60},"    })\n",[50,251,253],{"class":52,"line":252},9,[50,254,125],{"emptyLinePlaceholder":124},[50,256,258,261,264,266,268,271,274,278],{"class":52,"line":257},10,[50,259,260],{"class":93},"    if",[50,262,263],{"class":60}," (",[50,265,183],{"class":71},[50,267,227],{"class":60},[50,269,270],{"class":71},"length",[50,272,273],{"class":60}," > ",[50,275,277],{"class":276},"sDGX8","0",[50,279,280],{"class":60},") {\n",[50,282,284,287,289,291,294,296,298,300,302,304,306,309,311,314,316,318,321,323],{"class":52,"line":283},11,[50,285,286],{"class":93},"        await",[50,288,97],{"class":56},[50,290,61],{"class":60},[50,292,293],{"class":102},"\"act\"",[50,295,75],{"class":60},[50,297,65],{"class":64},[50,299,110],{"class":60},[50,301,84],{"class":64},[50,303,180],{"class":60},[50,305,141],{"class":93},[50,307,308],{"class":71}," kernel",[50,310,227],{"class":60},[50,312,313],{"class":56},"run",[50,315,61],{"class":60},[50,317,183],{"class":71},[50,319,320],{"class":60},", { ",[50,322,72],{"class":71},[50,324,325],{"class":60}," }) })\n",[50,327,329],{"class":52,"line":328},12,[50,330,331],{"class":60},"    }\n",[50,333,335],{"class":52,"line":334},13,[50,336,125],{"emptyLinePlaceholder":124},[50,338,340,342,344,346,349,351,353,355,358,360,363,365],{"class":52,"line":339},14,[50,341,260],{"class":93},[50,343,263],{"class":60},[50,345,188],{"class":71},[50,347,348],{"class":60}," && ",[50,350,183],{"class":71},[50,352,227],{"class":60},[50,354,270],{"class":71},[50,356,357],{"class":60}," === ",[50,359,277],{"class":276},[50,361,362],{"class":60},") ",[50,364,78],{"class":56},[50,366,367],{"class":60},"()\n",[50,369,371],{"class":52,"line":370},15,[50,372,373],{"class":60},"})\n",[14,375,376],{},"And here is a PID controller:",[41,378,380],{"className":43,"code":379,"language":45,"meta":46,"style":46},"loop(async ({ stop }) => {\n    const { error, dt } = await phase(\"sense\", async () => readSensor())\n\n    const command = await phase(\"compute\", async () => {\n        state.integral += error * dt\n        const derivative = (error - state.previous) \u002F dt\n        state.previous = error\n        return Kp * error + Ki * state.integral + Kd * derivative\n    })\n\n    await phase(\"actuate\", async () => {\n        await kernel.output(\"cognet:output:field\", {\n            reading: { value: command, unit: \"throttle\" },\n        })\n    })\n\n    stop()\n})\n",[21,381,382,400,438,442,470,491,519,532,567,571,575,596,615,638,643,647,652,660],{"__ignoreMap":46},[50,383,384,386,388,390,392,394,396,398],{"class":52,"line":53},[50,385,57],{"class":56},[50,387,61],{"class":60},[50,389,65],{"class":64},[50,391,68],{"class":60},[50,393,78],{"class":71},[50,395,81],{"class":60},[50,397,84],{"class":64},[50,399,87],{"class":60},[50,401,402,404,406,409,411,414,416,418,420,422,425,427,429,431,433,436],{"class":52,"line":90},[50,403,131],{"class":64},[50,405,180],{"class":60},[50,407,408],{"class":134},"error",[50,410,75],{"class":60},[50,412,413],{"class":134},"dt",[50,415,191],{"class":60},[50,417,141],{"class":93},[50,419,97],{"class":56},[50,421,61],{"class":60},[50,423,424],{"class":102},"\"sense\"",[50,426,75],{"class":60},[50,428,65],{"class":64},[50,430,110],{"class":60},[50,432,84],{"class":64},[50,434,435],{"class":56}," readSensor",[50,437,118],{"class":60},[50,439,440],{"class":52,"line":121},[50,441,125],{"emptyLinePlaceholder":124},[50,443,444,446,449,451,453,455,457,460,462,464,466,468],{"class":52,"line":128},[50,445,131],{"class":64},[50,447,448],{"class":134}," command",[50,450,138],{"class":60},[50,452,141],{"class":93},[50,454,97],{"class":56},[50,456,61],{"class":60},[50,458,459],{"class":102},"\"compute\"",[50,461,75],{"class":60},[50,463,65],{"class":64},[50,465,110],{"class":60},[50,467,84],{"class":64},[50,469,87],{"class":60},[50,471,472,475,477,480,483,485,488],{"class":52,"line":170},[50,473,474],{"class":71},"        state",[50,476,227],{"class":60},[50,478,479],{"class":71},"integral",[50,481,482],{"class":60}," += ",[50,484,408],{"class":71},[50,486,487],{"class":60}," * ",[50,489,490],{"class":71},"dt\n",[50,492,493,496,499,502,504,507,509,511,514,517],{"class":52,"line":175},[50,494,495],{"class":64},"        const",[50,497,498],{"class":134}," derivative",[50,500,501],{"class":60}," = (",[50,503,408],{"class":71},[50,505,506],{"class":60}," - ",[50,508,164],{"class":71},[50,510,227],{"class":60},[50,512,513],{"class":71},"previous",[50,515,516],{"class":60},") \u002F ",[50,518,490],{"class":71},[50,520,521,523,525,527,529],{"class":52,"line":213},[50,522,474],{"class":71},[50,524,227],{"class":60},[50,526,513],{"class":71},[50,528,138],{"class":60},[50,530,531],{"class":71},"error\n",[50,533,534,536,539,541,543,546,549,551,553,555,557,559,562,564],{"class":52,"line":246},[50,535,216],{"class":93},[50,537,538],{"class":71}," Kp",[50,540,487],{"class":60},[50,542,408],{"class":71},[50,544,545],{"class":60}," + ",[50,547,548],{"class":71},"Ki",[50,550,487],{"class":60},[50,552,164],{"class":71},[50,554,227],{"class":60},[50,556,479],{"class":71},[50,558,545],{"class":60},[50,560,561],{"class":71},"Kd",[50,563,487],{"class":60},[50,565,566],{"class":71},"derivative\n",[50,568,569],{"class":52,"line":252},[50,570,249],{"class":60},[50,572,573],{"class":52,"line":257},[50,574,125],{"emptyLinePlaceholder":124},[50,576,577,579,581,583,586,588,590,592,594],{"class":52,"line":283},[50,578,94],{"class":93},[50,580,97],{"class":56},[50,582,61],{"class":60},[50,584,585],{"class":102},"\"actuate\"",[50,587,75],{"class":60},[50,589,65],{"class":64},[50,591,110],{"class":60},[50,593,84],{"class":64},[50,595,87],{"class":60},[50,597,598,600,602,604,607,609,612],{"class":52,"line":328},[50,599,286],{"class":93},[50,601,308],{"class":71},[50,603,227],{"class":60},[50,605,606],{"class":56},"output",[50,608,61],{"class":60},[50,610,611],{"class":102},"\"cognet:output:field\"",[50,613,614],{"class":60},", {\n",[50,616,617,620,622,625,627,629,632,635],{"class":52,"line":334},[50,618,619],{"class":71},"            reading:",[50,621,180],{"class":60},[50,623,624],{"class":71},"value:",[50,626,448],{"class":71},[50,628,75],{"class":60},[50,630,631],{"class":71},"unit:",[50,633,634],{"class":102}," \"throttle\"",[50,636,637],{"class":60}," },\n",[50,639,640],{"class":52,"line":339},[50,641,642],{"class":60},"        })\n",[50,644,645],{"class":52,"line":370},[50,646,249],{"class":60},[50,648,650],{"class":52,"line":649},16,[50,651,125],{"emptyLinePlaceholder":124},[50,653,655,658],{"class":52,"line":654},17,[50,656,657],{"class":56},"    stop",[50,659,367],{"class":60},[50,661,663],{"class":52,"line":662},18,[50,664,373],{"class":60},[14,666,667],{},"Structurally identical. Both fold input, compute, emit. Both get tick and phase telemetry,\nboth are durable, both can be interrupted, both replay from the log.",[14,669,670,671,674],{},"The difference is entirely inside ",[21,672,673],{},"compute",". One calls a model; one does arithmetic. The\nengine cannot tell them apart, and that is the point.",[29,676,678],{"id":677},"models-out-of-the-hot-loop","Models out of the hot loop",[14,680,681],{},"The interesting architectures aren't \"an LLM in a loop\" — they're pipelines where learned\ncomponents do specific jobs inside a system that mostly isn't learned.",[14,683,684,685,689],{},"A perception stack running at 125Hz cannot wait on a model. But it can run a fast\ndeterministic loop that ",[686,687,688],"em",{},"occasionally"," escalates:",[41,691,693],{"className":43,"code":692,"language":45,"meta":46,"style":46},"loop(async ({ stop }) => {\n    const observation = await phase(\"perceive\", async () => {\n        return await system(\"fuse-sensors\", async () => fuse(readAll()))\n    })\n\n    await phase(\"react\", async () => {\n        \u002F\u002F the fast path — no inference, every tick\n        await kernel.output(\"cognet:output:field\", {\n            reading: { value: reflex(observation), unit: \"steering\" },\n        })\n    })\n\n    \u002F\u002F the slow path — only when the fast path is out of its depth\n    if (novel(observation) && !state.deliberating) {\n        state.deliberating = true\n        void deliberate(observation).finally(() => { state.deliberating = false })\n    }\n\n    stop()\n})\n",[21,694,695,713,741,775,779,783,804,810,826,852,856,860,864,869,894,907,946,950,954,961],{"__ignoreMap":46},[50,696,697,699,701,703,705,707,709,711],{"class":52,"line":53},[50,698,57],{"class":56},[50,700,61],{"class":60},[50,702,65],{"class":64},[50,704,68],{"class":60},[50,706,78],{"class":71},[50,708,81],{"class":60},[50,710,84],{"class":64},[50,712,87],{"class":60},[50,714,715,717,720,722,724,726,728,731,733,735,737,739],{"class":52,"line":90},[50,716,131],{"class":64},[50,718,719],{"class":134}," observation",[50,721,138],{"class":60},[50,723,141],{"class":93},[50,725,97],{"class":56},[50,727,61],{"class":60},[50,729,730],{"class":102},"\"perceive\"",[50,732,75],{"class":60},[50,734,65],{"class":64},[50,736,110],{"class":60},[50,738,84],{"class":64},[50,740,87],{"class":60},[50,742,743,745,748,751,753,756,758,760,762,764,767,769,772],{"class":52,"line":121},[50,744,216],{"class":93},[50,746,747],{"class":93}," await",[50,749,750],{"class":56}," system",[50,752,61],{"class":60},[50,754,755],{"class":102},"\"fuse-sensors\"",[50,757,75],{"class":60},[50,759,65],{"class":64},[50,761,110],{"class":60},[50,763,84],{"class":64},[50,765,766],{"class":56}," fuse",[50,768,61],{"class":60},[50,770,771],{"class":56},"readAll",[50,773,774],{"class":60},"()))\n",[50,776,777],{"class":52,"line":128},[50,778,249],{"class":60},[50,780,781],{"class":52,"line":170},[50,782,125],{"emptyLinePlaceholder":124},[50,784,785,787,789,791,794,796,798,800,802],{"class":52,"line":175},[50,786,94],{"class":93},[50,788,97],{"class":56},[50,790,61],{"class":60},[50,792,793],{"class":102},"\"react\"",[50,795,75],{"class":60},[50,797,65],{"class":64},[50,799,110],{"class":60},[50,801,84],{"class":64},[50,803,87],{"class":60},[50,805,806],{"class":52,"line":213},[50,807,809],{"class":808},"sOLPB","        \u002F\u002F the fast path — no inference, every tick\n",[50,811,812,814,816,818,820,822,824],{"class":52,"line":246},[50,813,286],{"class":93},[50,815,308],{"class":71},[50,817,227],{"class":60},[50,819,606],{"class":56},[50,821,61],{"class":60},[50,823,611],{"class":102},[50,825,614],{"class":60},[50,827,828,830,832,834,837,839,842,845,847,850],{"class":52,"line":252},[50,829,619],{"class":71},[50,831,180],{"class":60},[50,833,624],{"class":71},[50,835,836],{"class":56}," reflex",[50,838,61],{"class":60},[50,840,841],{"class":71},"observation",[50,843,844],{"class":60},"), ",[50,846,631],{"class":71},[50,848,849],{"class":102}," \"steering\"",[50,851,637],{"class":60},[50,853,854],{"class":52,"line":257},[50,855,642],{"class":60},[50,857,858],{"class":52,"line":283},[50,859,249],{"class":60},[50,861,862],{"class":52,"line":328},[50,863,125],{"emptyLinePlaceholder":124},[50,865,866],{"class":52,"line":334},[50,867,868],{"class":808},"    \u002F\u002F the slow path — only when the fast path is out of its depth\n",[50,870,871,873,875,878,880,882,885,887,889,892],{"class":52,"line":339},[50,872,260],{"class":93},[50,874,263],{"class":60},[50,876,877],{"class":56},"novel",[50,879,61],{"class":60},[50,881,841],{"class":71},[50,883,884],{"class":60},") && !",[50,886,164],{"class":71},[50,888,227],{"class":60},[50,890,891],{"class":71},"deliberating",[50,893,280],{"class":60},[50,895,896,898,900,902,904],{"class":52,"line":370},[50,897,474],{"class":71},[50,899,227],{"class":60},[50,901,891],{"class":71},[50,903,138],{"class":60},[50,905,906],{"class":64},"true\n",[50,908,909,912,915,917,919,922,925,928,930,932,934,936,938,940,943],{"class":52,"line":649},[50,910,911],{"class":64},"        void",[50,913,914],{"class":56}," deliberate",[50,916,61],{"class":60},[50,918,841],{"class":71},[50,920,921],{"class":60},").",[50,923,924],{"class":56},"finally",[50,926,927],{"class":60},"(() ",[50,929,84],{"class":64},[50,931,180],{"class":60},[50,933,164],{"class":71},[50,935,227],{"class":60},[50,937,891],{"class":71},[50,939,138],{"class":60},[50,941,942],{"class":64},"false",[50,944,945],{"class":60}," })\n",[50,947,948],{"class":52,"line":654},[50,949,331],{"class":60},[50,951,952],{"class":52,"line":662},[50,953,125],{"emptyLinePlaceholder":124},[50,955,957,959],{"class":52,"line":956},19,[50,958,657],{"class":56},[50,960,367],{"class":60},[50,962,964],{"class":52,"line":963},20,[50,965,373],{"class":60},[14,967,968,969,971],{},"The reflex runs every tick. Deliberation is kicked off without blocking, and its result\nlands in ",[21,970,164],{}," for a later tick to use. That's a two-rate mind — fast reflexes, slow\nreasoning — and it's ordinary TypeScript because the engine has no opinion about what a\ntick contains.",[29,973,975],{"id":974},"multiple-engines-different-jobs","Multiple engines, different jobs",[14,977,978,979,981],{},"Nothing says one cognet calls one model. ",[21,980,23],{}," takes a request; a cognet can\nmake several, for different purposes, in different phases:",[41,983,985],{"className":43,"code":984,"language":45,"meta":46,"style":46},"loop(async ({ signal, stop }) => {\n    const plan = await phase(\"plan\", async () => {\n        return collectFrom(kernel.stream({ messages: planningContext(state), signal }))\n    })\n\n    const critique = await phase(\"critique\", async () => {\n        return collectFrom(kernel.stream({ messages: critiqueContext(plan), signal }))\n    })\n\n    if (critique.rejected) {\n        state.rejections.push(critique)\n        return   \u002F\u002F next tick re-plans with the critique in context\n    }\n\n    await phase(\"act\", async () => { await kernel.run(plan.blocks, { signal }) })\n    stop()\n})\n",[21,986,987,1009,1037,1069,1073,1077,1105,1137,1141,1145,1161,1182,1189,1193,1197,1239,1245],{"__ignoreMap":46},[50,988,989,991,993,995,997,999,1001,1003,1005,1007],{"class":52,"line":53},[50,990,57],{"class":56},[50,992,61],{"class":60},[50,994,65],{"class":64},[50,996,68],{"class":60},[50,998,72],{"class":71},[50,1000,75],{"class":60},[50,1002,78],{"class":71},[50,1004,81],{"class":60},[50,1006,84],{"class":64},[50,1008,87],{"class":60},[50,1010,1011,1013,1016,1018,1020,1022,1024,1027,1029,1031,1033,1035],{"class":52,"line":90},[50,1012,131],{"class":64},[50,1014,1015],{"class":134}," plan",[50,1017,138],{"class":60},[50,1019,141],{"class":93},[50,1021,97],{"class":56},[50,1023,61],{"class":60},[50,1025,1026],{"class":102},"\"plan\"",[50,1028,75],{"class":60},[50,1030,65],{"class":64},[50,1032,110],{"class":60},[50,1034,84],{"class":64},[50,1036,87],{"class":60},[50,1038,1039,1041,1043,1045,1047,1049,1051,1053,1056,1059,1061,1063,1065,1067],{"class":52,"line":121},[50,1040,216],{"class":93},[50,1042,219],{"class":56},[50,1044,61],{"class":60},[50,1046,224],{"class":71},[50,1048,227],{"class":60},[50,1050,230],{"class":56},[50,1052,233],{"class":60},[50,1054,1055],{"class":71},"messages:",[50,1057,1058],{"class":56}," planningContext",[50,1060,61],{"class":60},[50,1062,164],{"class":71},[50,1064,844],{"class":60},[50,1066,72],{"class":71},[50,1068,243],{"class":60},[50,1070,1071],{"class":52,"line":128},[50,1072,249],{"class":60},[50,1074,1075],{"class":52,"line":170},[50,1076,125],{"emptyLinePlaceholder":124},[50,1078,1079,1081,1084,1086,1088,1090,1092,1095,1097,1099,1101,1103],{"class":52,"line":175},[50,1080,131],{"class":64},[50,1082,1083],{"class":134}," critique",[50,1085,138],{"class":60},[50,1087,141],{"class":93},[50,1089,97],{"class":56},[50,1091,61],{"class":60},[50,1093,1094],{"class":102},"\"critique\"",[50,1096,75],{"class":60},[50,1098,65],{"class":64},[50,1100,110],{"class":60},[50,1102,84],{"class":64},[50,1104,87],{"class":60},[50,1106,1107,1109,1111,1113,1115,1117,1119,1121,1123,1126,1128,1131,1133,1135],{"class":52,"line":213},[50,1108,216],{"class":93},[50,1110,219],{"class":56},[50,1112,61],{"class":60},[50,1114,224],{"class":71},[50,1116,227],{"class":60},[50,1118,230],{"class":56},[50,1120,233],{"class":60},[50,1122,1055],{"class":71},[50,1124,1125],{"class":56}," critiqueContext",[50,1127,61],{"class":60},[50,1129,1130],{"class":71},"plan",[50,1132,844],{"class":60},[50,1134,72],{"class":71},[50,1136,243],{"class":60},[50,1138,1139],{"class":52,"line":246},[50,1140,249],{"class":60},[50,1142,1143],{"class":52,"line":252},[50,1144,125],{"emptyLinePlaceholder":124},[50,1146,1147,1149,1151,1154,1156,1159],{"class":52,"line":257},[50,1148,260],{"class":93},[50,1150,263],{"class":60},[50,1152,1153],{"class":71},"critique",[50,1155,227],{"class":60},[50,1157,1158],{"class":71},"rejected",[50,1160,280],{"class":60},[50,1162,1163,1165,1167,1170,1172,1175,1177,1179],{"class":52,"line":283},[50,1164,474],{"class":71},[50,1166,227],{"class":60},[50,1168,1169],{"class":71},"rejections",[50,1171,227],{"class":60},[50,1173,1174],{"class":56},"push",[50,1176,61],{"class":60},[50,1178,1153],{"class":71},[50,1180,1181],{"class":60},")\n",[50,1183,1184,1186],{"class":52,"line":328},[50,1185,216],{"class":93},[50,1187,1188],{"class":808},"   \u002F\u002F next tick re-plans with the critique in context\n",[50,1190,1191],{"class":52,"line":334},[50,1192,331],{"class":60},[50,1194,1195],{"class":52,"line":339},[50,1196,125],{"emptyLinePlaceholder":124},[50,1198,1199,1201,1203,1205,1207,1209,1211,1213,1215,1217,1219,1221,1223,1225,1227,1229,1231,1233,1235,1237],{"class":52,"line":370},[50,1200,94],{"class":93},[50,1202,97],{"class":56},[50,1204,61],{"class":60},[50,1206,293],{"class":102},[50,1208,75],{"class":60},[50,1210,65],{"class":64},[50,1212,110],{"class":60},[50,1214,84],{"class":64},[50,1216,180],{"class":60},[50,1218,141],{"class":93},[50,1220,308],{"class":71},[50,1222,227],{"class":60},[50,1224,313],{"class":56},[50,1226,61],{"class":60},[50,1228,1130],{"class":71},[50,1230,227],{"class":60},[50,1232,183],{"class":71},[50,1234,320],{"class":60},[50,1236,72],{"class":71},[50,1238,325],{"class":60},[50,1240,1241,1243],{"class":52,"line":649},[50,1242,657],{"class":56},[50,1244,367],{"class":60},[50,1246,1247],{"class":52,"line":654},[50,1248,373],{"class":60},[14,1250,1251],{},"A planner and a critic, each with its own context, in named phases you can profile\nseparately. The orchestration overhead that usually makes this painful — wiring, state\nthreading, observability, interrupt handling — is what the engine already provides.",[29,1253,1255],{"id":1254},"embodied-agents","Embodied agents",[14,1257,1258],{},"An embodied agent needs three things the engine gives it directly.",[14,1260,1261,1265],{},[1262,1263,1264],"strong",{},"A clock",", because the world doesn't wait for a stimulus. That's continuous mode.",[14,1267,1268,1271,1272,1275,1276,227],{},[1262,1269,1270],{},"Durability across power loss",", because a robot that only survives graceful shutdown\nisn't deployable. The log-shaped mind is exactly this: ",[21,1273,1274],{},"kill -9"," costs nothing, and cold\nboot is a fold from ",[21,1277,1278],{},"-1",[14,1280,1281,1284],{},[1262,1282,1283],{},"An identity and a policy",", because an autonomous physical system should be a known\nentity with an owner and enforced constraints. That's the Axon perimeter around the\ncognet, not something the cognet has to implement.",[14,1286,1287],{},"The body arrives as a module. ROS topics become stimuli, actions become effects:",[41,1289,1291],{"className":43,"code":1290,"language":45,"meta":46,"style":46},"loop(async ({ stimuli, stop }) => {\n    await phase(\"sense\", async () => {\n        for (const stimulus of stimuli) {\n            foldObservation(state, stimulus)\n        }\n    })\n\n    const gait = await phase(\"plan\", async () => nextGaitCommand(state))\n\n    await phase(\"actuate\", async () => {\n        await kernel.run(`await robot.setJoints(${JSON.stringify(gait)})`)\n    })\n\n    stop()\n})\n",[21,1292,1293,1316,1336,1357,1373,1378,1382,1386,1420,1424,1444,1486,1490,1494,1500],{"__ignoreMap":46},[50,1294,1295,1297,1299,1301,1303,1306,1308,1310,1312,1314],{"class":52,"line":53},[50,1296,57],{"class":56},[50,1298,61],{"class":60},[50,1300,65],{"class":64},[50,1302,68],{"class":60},[50,1304,1305],{"class":71},"stimuli",[50,1307,75],{"class":60},[50,1309,78],{"class":71},[50,1311,81],{"class":60},[50,1313,84],{"class":64},[50,1315,87],{"class":60},[50,1317,1318,1320,1322,1324,1326,1328,1330,1332,1334],{"class":52,"line":90},[50,1319,94],{"class":93},[50,1321,97],{"class":56},[50,1323,61],{"class":60},[50,1325,424],{"class":102},[50,1327,75],{"class":60},[50,1329,65],{"class":64},[50,1331,110],{"class":60},[50,1333,84],{"class":64},[50,1335,87],{"class":60},[50,1337,1338,1341,1343,1346,1349,1352,1355],{"class":52,"line":121},[50,1339,1340],{"class":93},"        for",[50,1342,263],{"class":60},[50,1344,1345],{"class":64},"const",[50,1347,1348],{"class":134}," stimulus",[50,1350,1351],{"class":64}," of",[50,1353,1354],{"class":71}," stimuli",[50,1356,280],{"class":60},[50,1358,1359,1362,1364,1366,1368,1371],{"class":52,"line":128},[50,1360,1361],{"class":56},"            foldObservation",[50,1363,61],{"class":60},[50,1365,164],{"class":71},[50,1367,75],{"class":60},[50,1369,1370],{"class":71},"stimulus",[50,1372,1181],{"class":60},[50,1374,1375],{"class":52,"line":170},[50,1376,1377],{"class":60},"        }\n",[50,1379,1380],{"class":52,"line":175},[50,1381,249],{"class":60},[50,1383,1384],{"class":52,"line":213},[50,1385,125],{"emptyLinePlaceholder":124},[50,1387,1388,1390,1393,1395,1397,1399,1401,1403,1405,1407,1409,1411,1414,1416,1418],{"class":52,"line":246},[50,1389,131],{"class":64},[50,1391,1392],{"class":134}," gait",[50,1394,138],{"class":60},[50,1396,141],{"class":93},[50,1398,97],{"class":56},[50,1400,61],{"class":60},[50,1402,1026],{"class":102},[50,1404,75],{"class":60},[50,1406,65],{"class":64},[50,1408,110],{"class":60},[50,1410,84],{"class":64},[50,1412,1413],{"class":56}," nextGaitCommand",[50,1415,61],{"class":60},[50,1417,164],{"class":71},[50,1419,167],{"class":60},[50,1421,1422],{"class":52,"line":252},[50,1423,125],{"emptyLinePlaceholder":124},[50,1425,1426,1428,1430,1432,1434,1436,1438,1440,1442],{"class":52,"line":257},[50,1427,94],{"class":93},[50,1429,97],{"class":56},[50,1431,61],{"class":60},[50,1433,585],{"class":102},[50,1435,75],{"class":60},[50,1437,65],{"class":64},[50,1439,110],{"class":60},[50,1441,84],{"class":64},[50,1443,87],{"class":60},[50,1445,1446,1448,1450,1452,1454,1456,1459,1462,1465,1467,1470,1472,1475,1478,1481,1484],{"class":52,"line":283},[50,1447,286],{"class":93},[50,1449,308],{"class":71},[50,1451,227],{"class":60},[50,1453,313],{"class":56},[50,1455,61],{"class":60},[50,1457,1458],{"class":102},"`await robot.setJoints(",[50,1460,1461],{"class":64},"${",[50,1463,1464],{"class":134},"JSON",[50,1466,227],{"class":60},[50,1468,1469],{"class":56},"stringify",[50,1471,61],{"class":60},[50,1473,1474],{"class":71},"gait",[50,1476,1477],{"class":60},")",[50,1479,1480],{"class":64},"}",[50,1482,1483],{"class":102},")`",[50,1485,1181],{"class":60},[50,1487,1488],{"class":52,"line":328},[50,1489,249],{"class":60},[50,1491,1492],{"class":52,"line":334},[50,1493,125],{"emptyLinePlaceholder":124},[50,1495,1496,1498],{"class":52,"line":339},[50,1497,657],{"class":56},[50,1499,367],{"class":60},[50,1501,1502],{"class":52,"line":370},[50,1503,373],{"class":60},[14,1505,1506],{},"The cognet doesn't know it's driving a robot. It folds stimuli, computes, and asks the\nkernel to run code. Whether that code moves a servo, posts to an API, or writes a file is\nthe kernel's business and the agent's policy — not the mind's.",[29,1508,1510],{"id":1509},"virtual-organisms","Virtual organisms",[14,1512,1513],{},"The same properties that suit a robot suit a simulation, and the simulation is easier to\nrun a thousand times.",[14,1515,1516],{},"A cognet in a simulated world is a complete experimental subject: its entire decision\nhistory is in the log, replayable, with a flame graph of every tick. You can kill it\nmid-decision and watch it reconstitute. You can run the identical cognet against a\ndifferent world by swapping the stimulus source, with no change to the brain.",[14,1518,1519],{},"For studying cognition rather than shipping a product, that reproducibility is the whole\ngame — and it comes from the same constraints that make the engine portable in the first\nplace.",[29,1521,1523],{"id":1522},"whats-ready-today","What's ready today",[14,1525,1526],{},"Honesty about the boundary:",[1528,1529,1530,1543],"table",{},[1531,1532,1533],"thead",{},[1534,1535,1536,1540],"tr",{},[1537,1538,1539],"th",{},"Capability",[1537,1541,1542],{},"Status",[1544,1545,1546,1555,1563,1570,1580,1587,1599],"tbody",{},[1534,1547,1548,1552],{},[1549,1550,1551],"td",{},"Invocation-mode cognets",[1549,1553,1554],{},"shipping — this is what every agent runs",[1534,1556,1557,1560],{},[1549,1558,1559],{},"Arbitrary loop structure, phases, systems",[1549,1561,1562],{},"shipping",[1534,1564,1565,1568],{},[1549,1566,1567],{},"Multiple engines per tick, no engine at all",[1549,1569,1562],{},[1534,1571,1572,1578],{},[1549,1573,1574,1575,1577],{},"Log-shaped memory, ",[21,1576,1274],{}," durability",[1549,1579,1562],{},[1534,1581,1582,1585],{},[1549,1583,1584],{},"Full tick\u002Fphase\u002Fsystem telemetry",[1549,1586,1562],{},[1534,1588,1589,1594],{},[1549,1590,1591],{},[1262,1592,1593],{},"Continuous mode",[1549,1595,1596],{},[1262,1597,1598],{},"declared, not implemented — selecting it throws",[1534,1600,1601,1604],{},[1549,1602,1603],{},"Entity\u002Fcomponent authoring API",[1549,1605,1606],{},"live in the engine, not yet exposed to cognet source",[14,1608,1609],{},"Continuous mode is the gap that matters for most of this page. The type, wiring, and\nlifecycle are landed; what's deliberately unanswered is wake-overlap policy — when a tick\noutruns its interval, does the next one skip, queue, or run concurrently?",[14,1611,1612],{},"That question has no good abstract answer. It wants a real workload, which means the first\nserious continuous cognet gets to decide it. If you're building one, that's a conversation\nworth having before you start.",[1614,1615,1616],"style",{},"html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}html pre.shiki code .sDGX8, html code.shiki .sDGX8{--shiki-default:#B5CEA8}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 .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}",{"title":46,"searchDepth":90,"depth":90,"links":1618},[1619,1620,1621,1622,1623,1624],{"id":31,"depth":90,"text":32},{"id":677,"depth":90,"text":678},{"id":974,"depth":90,"text":975},{"id":1254,"depth":90,"text":1255},{"id":1509,"depth":90,"text":1510},{"id":1522,"depth":90,"text":1523},"Control loops, perception stacks, embodied agents — the same engine at a different fill rate.","md",{},"\u002Fdocs\u002Fv2\u002Fcognets\u002Fbuilding\u002Fbeyond-llm",{"title":5,"description":1625},"docs\u002Fv2\u002Fcognets\u002Fbuilding\u002Fbeyond-llm","m7zAnx36KlgXV2ut6zmqqYtWuTbnrhygzqTdVdkQ35U",1785156432039]