[{"data":1,"prerenderedAt":1189},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fconcepts\u002Fair-format":3},{"id":4,"title":5,"body":6,"description":16,"extension":1183,"meta":1184,"navigation":270,"path":1185,"seo":1186,"stem":1187,"__hash__":1188},"docs\u002Fdocs\u002Fv2\u002Fconcepts\u002Fair-format.md","AIR Format",{"type":7,"value":8,"toc":1173},"minimark",[9,13,17,29,34,41,44,47,51,54,157,161,170,309,312,316,319,702,705,709,715,944,951,955,960,1055,1067,1071,1084,1087,1103,1107,1114,1156,1159,1169],[10,11,5],"h1",{"id":12},"air-format",[14,15,16],"p",{},"AIR — Agent Intermediate Representation — is the format used to construct the context\nwindow that gets sent to the model on every loop tick. It is an open standard, independent\nof any model provider, and used by every Axon agent regardless of which engine is\nconfigured.",[14,18,19,23,24,28],{},[20,21,22],"strong",{},"You do not manage AIR."," Everything in the format except the ",[25,26,27],"code",{},"\u003Csystem>"," block is\ninjected automatically by the runtime from the agent's runtime state — tool\ndeclarations, process snapshots, session history, output contracts. You write prompts and\ntools; the runtime assembles the context. This page is for engineers who are curious about\nwhat the model actually sees.",[30,31,33],"h2",{"id":32},"why-a-format","Why a format",[14,35,36,37,40],{},"Every LLM API expects messages — a flat array of ",[25,38,39],{},"{role, content}"," pairs. That shape\ncomes from chat product UIs, not from agent architecture. It has no concept of tools,\nprocess state, causal timelines, or output contracts.",[14,42,43],{},"AIR is the layer between the agent's internal world and what the model receives. Instead\nof hand-crafting message arrays, systems write typed entries into the agent's state. AIR\nrenders those entries into a structured, deterministic context window. The model never\nsees raw agent internals — only the AIR projection.",[14,45,46],{},"This decouples context window construction from agent behaviour. When context assembly\nimproves, the agent gets better automatically. Nothing about the agent's tools, prompts,\nor scripts changes.",[30,48,50],{"id":49},"structure","Structure",[14,52,53],{},"A rendered AIR context window is a sequence of typed blocks assembled in a fixed order:",[55,56,57,73],"table",{},[58,59,60],"thead",{},[61,62,63,67,70],"tr",{},[64,65,66],"th",{},"Block",[64,68,69],{},"Who writes it",[64,71,72],{},"Purpose",[74,75,76,90,102,120,133,145],"tbody",{},[61,77,78,84,87],{},[79,80,81],"td",{},[25,82,83],{},"\u003Cmeta>",[79,85,86],{},"Axon",[79,88,89],{},"Format preamble — tells the model how to read the context",[61,91,92,97,99],{},[79,93,94],{},[25,95,96],{},"\u003Cenv>",[79,98,86],{},[79,100,101],{},"Execution environment — tool namespaces, live processes, subagents",[61,103,104,108,113],{},[79,105,106],{},[25,107,27],{},[79,109,110],{},[20,111,112],{},"You",[79,114,115,116,119],{},"Your agent's identity and instructions — rendered from ",[25,117,118],{},"boot.vue"," and loaded prompts",[61,121,122,127,130],{},[79,123,124],{},[25,125,126],{},"\u003Ccontract>",[79,128,129],{},"Runtime",[79,131,132],{},"Output grammar — which response modes the model is permitted to use",[61,134,135,140,142],{},[79,136,137],{},[25,138,139],{},"\u003Cstate>",[79,141,129],{},[79,143,144],{},"Session state — current truth assembled from the agent's runtime state",[61,146,147,152,154],{},[79,148,149],{},[25,150,151],{},"\u003Ctimeline>",[79,153,129],{},[79,155,156],{},"The causal turn sequence — everything that has happened, in order",[30,158,160],{"id":159},"the-environment-block","The environment block",[14,162,163,165,166,169],{},[25,164,96],{}," declares the agent's execution environment. The ",[25,167,168],{},"\u003Cscope>"," contains TypeScript\ndeclarations for every tool namespace in scope — what the agent can call and how.",[171,172,177],"pre",{"className":173,"code":174,"language":175,"meta":176,"style":176},"language-xml shiki shiki-themes dark-plus","\u003Cenv>\n    \u003Cscope lang=\"ts\">\n        declare namespace fs {\n          \u002F** Read a file as UTF-8 text. *\u002F\n          export declare function read(path: string): Promise\u003Cstring>;\n          \u002F** Write content to a file. *\u002F\n          export declare function write(path: string, content: string): Promise\u003C{ bytes: number }>;\n        }\n\n        declare const process: {\n          run(command: string, opts?: { cwd?: string }): Promise\u003C{ ok: boolean; stdout: string; stderr: string }>\n        }\n    \u003C\u002Fscope>\n\u003C\u002Fenv>\n","xml","",[25,178,179,195,218,224,230,247,253,259,265,272,278,284,289,299],{"__ignoreMap":176},[180,181,184,188,192],"span",{"class":182,"line":183},"line",1,[180,185,187],{"class":186},"srRes","\u003C",[180,189,191],{"class":190},"scz_3","env",[180,193,194],{"class":186},">\n",[180,196,198,201,204,208,212,216],{"class":182,"line":197},2,[180,199,200],{"class":186},"    \u003C",[180,202,203],{"class":190},"scope",[180,205,207],{"class":206},"s3F5K"," lang",[180,209,211],{"class":210},"sTNBD","=",[180,213,215],{"class":214},"sKc5r","\"ts\"",[180,217,194],{"class":186},[180,219,221],{"class":182,"line":220},3,[180,222,223],{"class":210},"        declare namespace fs {\n",[180,225,227],{"class":182,"line":226},4,[180,228,229],{"class":210},"          \u002F** Read a file as UTF-8 text. *\u002F\n",[180,231,233,236,238,241,244],{"class":182,"line":232},5,[180,234,235],{"class":210},"          export declare function read(path: string): Promise",[180,237,187],{"class":186},[180,239,240],{"class":190},"string",[180,242,243],{"class":186},">",[180,245,246],{"class":210},";\n",[180,248,250],{"class":182,"line":249},6,[180,251,252],{"class":210},"          \u002F** Write content to a file. *\u002F\n",[180,254,256],{"class":182,"line":255},7,[180,257,258],{"class":210},"          export declare function write(path: string, content: string): Promise\u003C{ bytes: number }>;\n",[180,260,262],{"class":182,"line":261},8,[180,263,264],{"class":210},"        }\n",[180,266,268],{"class":182,"line":267},9,[180,269,271],{"emptyLinePlaceholder":270},true,"\n",[180,273,275],{"class":182,"line":274},10,[180,276,277],{"class":210},"        declare const process: {\n",[180,279,281],{"class":182,"line":280},11,[180,282,283],{"class":210},"          run(command: string, opts?: { cwd?: string }): Promise\u003C{ ok: boolean; stdout: string; stderr: string }>\n",[180,285,287],{"class":182,"line":286},12,[180,288,264],{"class":210},[180,290,292,295,297],{"class":182,"line":291},13,[180,293,294],{"class":186},"    \u003C\u002F",[180,296,203],{"class":190},[180,298,194],{"class":186},[180,300,302,305,307],{"class":182,"line":301},14,[180,303,304],{"class":186},"\u003C\u002F",[180,306,191],{"class":190},[180,308,194],{"class":186},[14,310,311],{},"Live subprocesses and spawned subagents appear here too — the agent sees their status\nand output at the point the context was constructed.",[30,313,315],{"id":314},"the-timeline","The timeline",[14,317,318],{},"The timeline is not a chat log. It is a causal sequence of typed turns — everything that\nhas happened in the current session, in order. User messages, agent text, executed code,\nstdout results, system notes.",[171,320,322],{"className":173,"code":321,"language":175,"meta":176,"style":176},"\u003Ctimeline>\n    \u003Cuser id=\"u1\">\n        can you add a sum() function to testing-ground\u002Fsum.js and run the tests?\n    \u003C\u002Fuser>\n\n    \u003Cagent>\n        \u003Ctypescript id=\"e1\">\n            const content = await fs.read(\"testing-ground\u002Fsum.js\")\n            content\n        \u003C\u002Ftypescript>\n    \u003C\u002Fagent>\n\n    \u003Cstdout for=\"e1\" ok=\"true\">\n        read  testing-ground\u002Fsum.js  67B\n        function add(a, b) {\n          return a + b\n        }\n\n        module.exports = { add }\n    \u003C\u002Fstdout>\n\n    \u003Cagent>\n        \u003Ctypescript id=\"e2\">\n            const result = await fs.edit(\"testing-ground\u002Fsum.js\", [\n              { op: \"insertAfter\", find: \"module.exports = { add }\", content: \"\\nfunction sum(numbers) {\\n  return numbers.reduce((total, n) => total + n, 0)\\n}\\n\" },\n              { op: \"replace\", find: \"module.exports = { add }\", replace: \"module.exports = { add, sum }\" },\n            ])\n            result\n        \u003C\u002Ftypescript>\n    \u003C\u002Fagent>\n\n    \u003Cstdout for=\"e2\" ok=\"true\">\n        fs.edit  {\"ops\":[{\"ok\":true,\"count\":1},{\"ok\":true,\"count\":1}]}  ✓\n    \u003C\u002Fstdout>\n\n    \u003Cagent>\n        \u003Ctext>\n            Done. Added `sum(numbers)` — reduces the array left-to-right. Tests pass.\n        \u003C\u002Ftext>\n    \u003C\u002Fagent>\n\n    \u003Cuser id=\"u2\">\n        nice — what port is the dev server on?\n    \u003C\u002Fuser>\n\u003C\u002Ftimeline>\n",[25,323,324,333,350,355,363,367,376,393,398,403,412,420,424,448,453,459,465,470,475,481,490,495,504,520,526,532,538,544,550,559,568,573,594,600,609,614,623,633,639,648,657,662,678,684,693],{"__ignoreMap":176},[180,325,326,328,331],{"class":182,"line":183},[180,327,187],{"class":186},[180,329,330],{"class":190},"timeline",[180,332,194],{"class":186},[180,334,335,337,340,343,345,348],{"class":182,"line":197},[180,336,200],{"class":186},[180,338,339],{"class":190},"user",[180,341,342],{"class":206}," id",[180,344,211],{"class":210},[180,346,347],{"class":214},"\"u1\"",[180,349,194],{"class":186},[180,351,352],{"class":182,"line":220},[180,353,354],{"class":210},"        can you add a sum() function to testing-ground\u002Fsum.js and run the tests?\n",[180,356,357,359,361],{"class":182,"line":226},[180,358,294],{"class":186},[180,360,339],{"class":190},[180,362,194],{"class":186},[180,364,365],{"class":182,"line":232},[180,366,271],{"emptyLinePlaceholder":270},[180,368,369,371,374],{"class":182,"line":249},[180,370,200],{"class":186},[180,372,373],{"class":190},"agent",[180,375,194],{"class":186},[180,377,378,381,384,386,388,391],{"class":182,"line":255},[180,379,380],{"class":186},"        \u003C",[180,382,383],{"class":190},"typescript",[180,385,342],{"class":206},[180,387,211],{"class":210},[180,389,390],{"class":214},"\"e1\"",[180,392,194],{"class":186},[180,394,395],{"class":182,"line":261},[180,396,397],{"class":210},"            const content = await fs.read(\"testing-ground\u002Fsum.js\")\n",[180,399,400],{"class":182,"line":267},[180,401,402],{"class":210},"            content\n",[180,404,405,408,410],{"class":182,"line":274},[180,406,407],{"class":186},"        \u003C\u002F",[180,409,383],{"class":190},[180,411,194],{"class":186},[180,413,414,416,418],{"class":182,"line":280},[180,415,294],{"class":186},[180,417,373],{"class":190},[180,419,194],{"class":186},[180,421,422],{"class":182,"line":286},[180,423,271],{"emptyLinePlaceholder":270},[180,425,426,428,431,434,436,438,441,443,446],{"class":182,"line":291},[180,427,200],{"class":186},[180,429,430],{"class":190},"stdout",[180,432,433],{"class":206}," for",[180,435,211],{"class":210},[180,437,390],{"class":214},[180,439,440],{"class":206}," ok",[180,442,211],{"class":210},[180,444,445],{"class":214},"\"true\"",[180,447,194],{"class":186},[180,449,450],{"class":182,"line":301},[180,451,452],{"class":210},"        read  testing-ground\u002Fsum.js  67B\n",[180,454,456],{"class":182,"line":455},15,[180,457,458],{"class":210},"        function add(a, b) {\n",[180,460,462],{"class":182,"line":461},16,[180,463,464],{"class":210},"          return a + b\n",[180,466,468],{"class":182,"line":467},17,[180,469,264],{"class":210},[180,471,473],{"class":182,"line":472},18,[180,474,271],{"emptyLinePlaceholder":270},[180,476,478],{"class":182,"line":477},19,[180,479,480],{"class":210},"        module.exports = { add }\n",[180,482,484,486,488],{"class":182,"line":483},20,[180,485,294],{"class":186},[180,487,430],{"class":190},[180,489,194],{"class":186},[180,491,493],{"class":182,"line":492},21,[180,494,271],{"emptyLinePlaceholder":270},[180,496,498,500,502],{"class":182,"line":497},22,[180,499,200],{"class":186},[180,501,373],{"class":190},[180,503,194],{"class":186},[180,505,507,509,511,513,515,518],{"class":182,"line":506},23,[180,508,380],{"class":186},[180,510,383],{"class":190},[180,512,342],{"class":206},[180,514,211],{"class":210},[180,516,517],{"class":214},"\"e2\"",[180,519,194],{"class":186},[180,521,523],{"class":182,"line":522},24,[180,524,525],{"class":210},"            const result = await fs.edit(\"testing-ground\u002Fsum.js\", [\n",[180,527,529],{"class":182,"line":528},25,[180,530,531],{"class":210},"              { op: \"insertAfter\", find: \"module.exports = { add }\", content: \"\\nfunction sum(numbers) {\\n  return numbers.reduce((total, n) => total + n, 0)\\n}\\n\" },\n",[180,533,535],{"class":182,"line":534},26,[180,536,537],{"class":210},"              { op: \"replace\", find: \"module.exports = { add }\", replace: \"module.exports = { add, sum }\" },\n",[180,539,541],{"class":182,"line":540},27,[180,542,543],{"class":210},"            ])\n",[180,545,547],{"class":182,"line":546},28,[180,548,549],{"class":210},"            result\n",[180,551,553,555,557],{"class":182,"line":552},29,[180,554,407],{"class":186},[180,556,383],{"class":190},[180,558,194],{"class":186},[180,560,562,564,566],{"class":182,"line":561},30,[180,563,294],{"class":186},[180,565,373],{"class":190},[180,567,194],{"class":186},[180,569,571],{"class":182,"line":570},31,[180,572,271],{"emptyLinePlaceholder":270},[180,574,576,578,580,582,584,586,588,590,592],{"class":182,"line":575},32,[180,577,200],{"class":186},[180,579,430],{"class":190},[180,581,433],{"class":206},[180,583,211],{"class":210},[180,585,517],{"class":214},[180,587,440],{"class":206},[180,589,211],{"class":210},[180,591,445],{"class":214},[180,593,194],{"class":186},[180,595,597],{"class":182,"line":596},33,[180,598,599],{"class":210},"        fs.edit  {\"ops\":[{\"ok\":true,\"count\":1},{\"ok\":true,\"count\":1}]}  ✓\n",[180,601,603,605,607],{"class":182,"line":602},34,[180,604,294],{"class":186},[180,606,430],{"class":190},[180,608,194],{"class":186},[180,610,612],{"class":182,"line":611},35,[180,613,271],{"emptyLinePlaceholder":270},[180,615,617,619,621],{"class":182,"line":616},36,[180,618,200],{"class":186},[180,620,373],{"class":190},[180,622,194],{"class":186},[180,624,626,628,631],{"class":182,"line":625},37,[180,627,380],{"class":186},[180,629,630],{"class":190},"text",[180,632,194],{"class":186},[180,634,636],{"class":182,"line":635},38,[180,637,638],{"class":210},"            Done. Added `sum(numbers)` — reduces the array left-to-right. Tests pass.\n",[180,640,642,644,646],{"class":182,"line":641},39,[180,643,407],{"class":186},[180,645,630],{"class":190},[180,647,194],{"class":186},[180,649,651,653,655],{"class":182,"line":650},40,[180,652,294],{"class":186},[180,654,373],{"class":190},[180,656,194],{"class":186},[180,658,660],{"class":182,"line":659},41,[180,661,271],{"emptyLinePlaceholder":270},[180,663,665,667,669,671,673,676],{"class":182,"line":664},42,[180,666,200],{"class":186},[180,668,339],{"class":190},[180,670,342],{"class":206},[180,672,211],{"class":210},[180,674,675],{"class":214},"\"u2\"",[180,677,194],{"class":186},[180,679,681],{"class":182,"line":680},43,[180,682,683],{"class":210},"        nice — what port is the dev server on?\n",[180,685,687,689,691],{"class":182,"line":686},44,[180,688,294],{"class":186},[180,690,339],{"class":190},[180,692,194],{"class":186},[180,694,696,698,700],{"class":182,"line":695},45,[180,697,304],{"class":186},[180,699,330],{"class":190},[180,701,194],{"class":186},[14,703,704],{},"Tool calls and their results appear inline at the point they occurred. The model sees the\nfull causal chain: what it decided, what ran, what came back. This is what enables\ncoherent multi-step work — the model reasons over what actually happened, not an\nabstracted summary.",[30,706,708],{"id":707},"the-contract","The contract",[14,710,711,712,714],{},"The ",[25,713,126],{}," block declares which output modes the model is permitted to use in its\nresponse. The model doesn't decide its output format — the contract does.",[171,716,718],{"className":173,"code":717,"language":175,"meta":176,"style":176},"\u003Ccontract>\n    ## Blocks\n\n    - `\u003Ctypescript>` — TypeScript executed immediately. Tool namespaces are in scope.\n    - `\u003Ctext>` — Plain language communication to the user.\n    - `\u003Cdone\u002F>` — signals the task is fully complete.\n\n    ## Rules\n\n    - Every word of output must be inside a block. No text outside XML tags — ever.\n    - After an executable block — stop. The runtime executes your code and returns output.\n    - After a `\u003Ctext>` block with nothing left to do — emit `\u003Cdone\u002F>`.\n\n    ## Examples\n\n    Acting:\n    ```\n    \u003Ctypescript>\u002F\u002F code here\u003C\u002Ftypescript>\n    ```\n    Communicating:\n    ```\n    \u003Ctext>message here\u003C\u002Ftext>\n    ```\n    Task complete:\n    ```\n    \u003Ctext>summary here\u003C\u002Ftext>\u003Cdone\u002F>\n    ```\n\u003C\u002Fcontract>\n",[25,719,720,729,734,738,752,765,780,784,789,793,798,803,826,830,835,839,844,849,866,870,875,879,896,900,905,909,932,936],{"__ignoreMap":176},[180,721,722,724,727],{"class":182,"line":183},[180,723,187],{"class":186},[180,725,726],{"class":190},"contract",[180,728,194],{"class":186},[180,730,731],{"class":182,"line":197},[180,732,733],{"class":210},"    ## Blocks\n",[180,735,736],{"class":182,"line":220},[180,737,271],{"emptyLinePlaceholder":270},[180,739,740,743,745,747,749],{"class":182,"line":226},[180,741,742],{"class":210},"    - `",[180,744,187],{"class":186},[180,746,383],{"class":190},[180,748,243],{"class":186},[180,750,751],{"class":210},"` — TypeScript executed immediately. Tool namespaces are in scope.\n",[180,753,754,756,758,760,762],{"class":182,"line":232},[180,755,742],{"class":210},[180,757,187],{"class":186},[180,759,630],{"class":190},[180,761,243],{"class":186},[180,763,764],{"class":210},"` — Plain language communication to the user.\n",[180,766,767,769,771,774,777],{"class":182,"line":249},[180,768,742],{"class":210},[180,770,187],{"class":186},[180,772,773],{"class":190},"done",[180,775,776],{"class":186},"\u002F>",[180,778,779],{"class":210},"` — signals the task is fully complete.\n",[180,781,782],{"class":182,"line":255},[180,783,271],{"emptyLinePlaceholder":270},[180,785,786],{"class":182,"line":261},[180,787,788],{"class":210},"    ## Rules\n",[180,790,791],{"class":182,"line":267},[180,792,271],{"emptyLinePlaceholder":270},[180,794,795],{"class":182,"line":274},[180,796,797],{"class":210},"    - Every word of output must be inside a block. No text outside XML tags — ever.\n",[180,799,800],{"class":182,"line":280},[180,801,802],{"class":210},"    - After an executable block — stop. The runtime executes your code and returns output.\n",[180,804,805,808,810,812,814,817,819,821,823],{"class":182,"line":286},[180,806,807],{"class":210},"    - After a `",[180,809,187],{"class":186},[180,811,630],{"class":190},[180,813,243],{"class":186},[180,815,816],{"class":210},"` block with nothing left to do — emit `",[180,818,187],{"class":186},[180,820,773],{"class":190},[180,822,776],{"class":186},[180,824,825],{"class":210},"`.\n",[180,827,828],{"class":182,"line":291},[180,829,271],{"emptyLinePlaceholder":270},[180,831,832],{"class":182,"line":301},[180,833,834],{"class":210},"    ## Examples\n",[180,836,837],{"class":182,"line":455},[180,838,271],{"emptyLinePlaceholder":270},[180,840,841],{"class":182,"line":461},[180,842,843],{"class":210},"    Acting:\n",[180,845,846],{"class":182,"line":467},[180,847,848],{"class":210},"    ```\n",[180,850,851,853,855,857,860,862,864],{"class":182,"line":472},[180,852,200],{"class":186},[180,854,383],{"class":190},[180,856,243],{"class":186},[180,858,859],{"class":210},"\u002F\u002F code here",[180,861,304],{"class":186},[180,863,383],{"class":190},[180,865,194],{"class":186},[180,867,868],{"class":182,"line":477},[180,869,848],{"class":210},[180,871,872],{"class":182,"line":483},[180,873,874],{"class":210},"    Communicating:\n",[180,876,877],{"class":182,"line":492},[180,878,848],{"class":210},[180,880,881,883,885,887,890,892,894],{"class":182,"line":497},[180,882,200],{"class":186},[180,884,630],{"class":190},[180,886,243],{"class":186},[180,888,889],{"class":210},"message here",[180,891,304],{"class":186},[180,893,630],{"class":190},[180,895,194],{"class":186},[180,897,898],{"class":182,"line":506},[180,899,848],{"class":210},[180,901,902],{"class":182,"line":522},[180,903,904],{"class":210},"    Task complete:\n",[180,906,907],{"class":182,"line":528},[180,908,848],{"class":210},[180,910,911,913,915,917,920,922,924,927,929],{"class":182,"line":534},[180,912,200],{"class":186},[180,914,630],{"class":190},[180,916,243],{"class":186},[180,918,919],{"class":210},"summary here",[180,921,304],{"class":186},[180,923,630],{"class":190},[180,925,926],{"class":186},">\u003C",[180,928,773],{"class":190},[180,930,931],{"class":186},"\u002F>\n",[180,933,934],{"class":182,"line":540},[180,935,848],{"class":210},[180,937,938,940,942],{"class":182,"line":546},[180,939,304],{"class":186},[180,941,726],{"class":190},[180,943,194],{"class":186},[14,945,946,947,950],{},"When the model responds outside the declared modes, that is a format violation. The\nruntime detects it, injects an ",[25,948,949],{},"\u003Cerror>"," entry into the next tick's timeline, and the\nmodel self-corrects.",[30,952,954],{"id":953},"the-state-block","The state block",[14,956,957,959],{},[25,958,139],{}," carries arbitrary structured context — the current truth of the world at the\ntime the context was constructed. Each item has a name and an optional language hint for\nrendering.",[171,961,963],{"className":173,"code":962,"language":175,"meta":176,"style":176},"\u003Cstate>\n    \u003Ccwd lang=\"txt\">\n        \u002Fhome\u002Fcody\u002Fgit\u002Fmy-agent\n    \u003C\u002Fcwd>\n    \u003Cplan lang=\"json\">\n        [\n          { \"step\": 1, \"task\": \"Read package.json\", \"done\": true },\n          { \"step\": 2, \"task\": \"Add sum() function\", \"done\": false }\n        ]\n    \u003C\u002Fplan>\n\u003C\u002Fstate>\n",[25,964,965,974,990,995,1003,1019,1024,1029,1034,1039,1047],{"__ignoreMap":176},[180,966,967,969,972],{"class":182,"line":183},[180,968,187],{"class":186},[180,970,971],{"class":190},"state",[180,973,194],{"class":186},[180,975,976,978,981,983,985,988],{"class":182,"line":197},[180,977,200],{"class":186},[180,979,980],{"class":190},"cwd",[180,982,207],{"class":206},[180,984,211],{"class":210},[180,986,987],{"class":214},"\"txt\"",[180,989,194],{"class":186},[180,991,992],{"class":182,"line":220},[180,993,994],{"class":210},"        \u002Fhome\u002Fcody\u002Fgit\u002Fmy-agent\n",[180,996,997,999,1001],{"class":182,"line":226},[180,998,294],{"class":186},[180,1000,980],{"class":190},[180,1002,194],{"class":186},[180,1004,1005,1007,1010,1012,1014,1017],{"class":182,"line":232},[180,1006,200],{"class":186},[180,1008,1009],{"class":190},"plan",[180,1011,207],{"class":206},[180,1013,211],{"class":210},[180,1015,1016],{"class":214},"\"json\"",[180,1018,194],{"class":186},[180,1020,1021],{"class":182,"line":249},[180,1022,1023],{"class":210},"        [\n",[180,1025,1026],{"class":182,"line":255},[180,1027,1028],{"class":210},"          { \"step\": 1, \"task\": \"Read package.json\", \"done\": true },\n",[180,1030,1031],{"class":182,"line":261},[180,1032,1033],{"class":210},"          { \"step\": 2, \"task\": \"Add sum() function\", \"done\": false }\n",[180,1035,1036],{"class":182,"line":267},[180,1037,1038],{"class":210},"        ]\n",[180,1040,1041,1043,1045],{"class":182,"line":274},[180,1042,294],{"class":186},[180,1044,1009],{"class":190},[180,1046,194],{"class":186},[180,1048,1049,1051,1053],{"class":182,"line":280},[180,1050,304],{"class":186},[180,1052,971],{"class":190},[180,1054,194],{"class":186},[14,1056,1057,1058,1060,1061,1063,1064,1066],{},"If ",[25,1059,139],{}," and ",[25,1062,151],{}," conflict, the model trusts ",[25,1065,139],{},". State is resolved\ntruth; the timeline is historical record.",[30,1068,1070],{"id":1069},"what-the-model-receives","What the model receives",[14,1072,1073,1074,1077,1078,1060,1081,1083],{},"At the LLM API level, AIR renders to a flat ",[25,1075,1076],{},"messages"," array — ",[25,1079,1080],{},"system",[25,1082,339],{}," roles,\nplain string content. The model doesn't know it's reading AIR. It receives a\nwell-structured context and produces output in the declared format.",[14,1085,1086],{},"The AIR rendering layer handles:",[1088,1089,1090,1094,1097,1100],"ul",{},[1091,1092,1093],"li",{},"Block ordering and assembly",[1091,1095,1096],{},"Timeline compression when context budget is exceeded",[1091,1098,1099],{},"Format error injection for self-correction",[1091,1101,1102],{},"Live process state merging into the env block",[30,1104,1106],{"id":1105},"inspecting-context","Inspecting context",[14,1108,1109,1110,1113],{},"Every rendered context window is emitted as an event in the session trace — stored in\n",[25,1111,1112],{},"data\u002Fsessions\u002F",". When debugging unexpected model behaviour, reading the context event for\nthat tick shows exactly what the model saw.",[171,1115,1119],{"className":1116,"code":1117,"language":1118,"meta":176,"style":176},"language-bash shiki shiki-themes dark-plus","# tail the session trace for the last run\ncat data\u002Fsessions\u002F\u003Csession-id>.jsonl | grep air:context\n","bash",[25,1120,1121,1127],{"__ignoreMap":176},[180,1122,1123],{"class":182,"line":183},[180,1124,1126],{"class":1125},"sOLPB","# tail the session trace for the last run\n",[180,1128,1129,1133,1136,1138,1141,1144,1147,1150,1153],{"class":182,"line":197},[180,1130,1132],{"class":1131},"sCudf","cat",[180,1134,1135],{"class":214}," data\u002Fsessions\u002F",[180,1137,187],{"class":210},[180,1139,1140],{"class":214},"session-i",[180,1142,1143],{"class":210},"d>",[180,1145,1146],{"class":214},".jsonl",[180,1148,1149],{"class":210}," | ",[180,1151,1152],{"class":1131},"grep",[180,1154,1155],{"class":214}," air:context\n",[1157,1158],"hr",{},[14,1160,1161,1168],{},[20,1162,1163],{},[1164,1165,1167],"a",{"href":1166},"\u002Fdocs\u002Fv2\u002Fconcepts\u002Fagent-output","Agent Output"," — the output side: what the model\nemits, how TypeScript blocks execute in the capsule, and how results feed back into the\ntimeline.",[1170,1171,1172],"style",{},"html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}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 .srRes, html code.shiki .srRes{--shiki-default:#808080}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}",{"title":176,"searchDepth":197,"depth":197,"links":1174},[1175,1176,1177,1178,1179,1180,1181,1182],{"id":32,"depth":197,"text":33},{"id":49,"depth":197,"text":50},{"id":159,"depth":197,"text":160},{"id":314,"depth":197,"text":315},{"id":707,"depth":197,"text":708},{"id":953,"depth":197,"text":954},{"id":1069,"depth":197,"text":1070},{"id":1105,"depth":197,"text":1106},"md",{},"\u002Fdocs\u002Fv2\u002Fconcepts\u002Fair-format",{"title":5,"description":16},"docs\u002Fv2\u002Fconcepts\u002Fair-format","9Ae14F4EeIql1cCMPcAkcxhacK7mcbL417QxYnhKZTA",1785671807732]