[{"data":1,"prerenderedAt":564},["ShallowReactive",2],{"navigation":3,"\u002Fconcepts\u002Fharnesses":169,"\u002Fconcepts\u002Fharnesses-surround":559},[4,28,85,127,157],{"title":5,"path":6,"stem":7,"children":8,"icon":27},"Getting Started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,12,17,22],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-house",{"title":13,"path":14,"stem":15,"icon":16},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":18,"path":19,"stem":20,"icon":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":23,"path":24,"stem":25,"icon":26},"Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F4.architecture","i-lucide-layers","i-lucide-rocket",{"title":29,"icon":30,"path":31,"stem":32,"children":33,"page":84},"Concepts","i-lucide-lightbulb","\u002Fconcepts","2.concepts",[34,39,44,49,54,59,64,69,74,79],{"title":35,"path":36,"stem":37,"icon":38},"Durable agents","\u002Fconcepts\u002Fdurable-agents","2.concepts\u002F1.durable-agents","i-lucide-infinity",{"title":40,"path":41,"stem":42,"icon":43},"Glossary","\u002Fconcepts\u002Fglossary","2.concepts\u002F10.glossary","i-lucide-book-a",{"title":45,"path":46,"stem":47,"icon":48},"Restate in five minutes","\u002Fconcepts\u002Frestate-primer","2.concepts\u002F2.restate-primer","i-lucide-cpu",{"title":50,"path":51,"stem":52,"icon":53},"Entities & addressing","\u002Fconcepts\u002Fentities-addressing","2.concepts\u002F3.entities-addressing","i-lucide-at-sign",{"title":55,"path":56,"stem":57,"icon":58},"Timelines & events","\u002Fconcepts\u002Ftimelines-events","2.concepts\u002F4.timelines-events","i-lucide-list-ordered",{"title":60,"path":61,"stem":62,"icon":63},"Projections & the catalog","\u002Fconcepts\u002Fprojections-catalog","2.concepts\u002F5.projections-catalog","i-lucide-database",{"title":65,"path":66,"stem":67,"icon":68},"Workspaces & execution","\u002Fconcepts\u002Fworkspaces","2.concepts\u002F6.workspaces","i-lucide-terminal",{"title":70,"path":71,"stem":72,"icon":73},"Harnesses","\u002Fconcepts\u002Fharnesses","2.concepts\u002F7.harnesses","i-lucide-plug",{"title":75,"path":76,"stem":77,"icon":78},"Multi-agent patterns","\u002Fconcepts\u002Fmulti-agent","2.concepts\u002F8.multi-agent","i-lucide-network",{"title":80,"path":81,"stem":82,"icon":83},"Lifecycle & control","\u002Fconcepts\u002Flifecycle","2.concepts\u002F9.lifecycle","i-lucide-sliders-horizontal",false,{"title":86,"icon":87,"path":88,"stem":89,"children":90,"page":84},"Guides","i-lucide-book-open","\u002Fguides","3.guides",[91,106],{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":84},"Agents","i-lucide-bot","\u002Fguides\u002Fagents","3.guides\u002F1.agents",[97,101],{"title":98,"path":99,"stem":100,"icon":93},"Building agents","\u002Fguides\u002Fagents\u002Fbuilding-agents","3.guides\u002F1.agents\u002F1.building-agents",{"title":102,"path":103,"stem":104,"icon":105},"Frontend integration","\u002Fguides\u002Fagents\u002Ffrontend-integration","3.guides\u002F1.agents\u002F2.frontend-integration","i-lucide-monitor",{"title":107,"icon":108,"path":109,"stem":110,"children":111,"page":84},"Operations","i-lucide-server-cog","\u002Fguides\u002Foperations","3.guides\u002F2.operations",[112,117,122],{"title":113,"path":114,"stem":115,"icon":116},"Self-hosting","\u002Fguides\u002Foperations\u002Fself-hosting","3.guides\u002F2.operations\u002F1.self-hosting","i-lucide-server",{"title":118,"path":119,"stem":120,"icon":121},"Auth & API keys","\u002Fguides\u002Foperations\u002Fauth-api-keys","3.guides\u002F2.operations\u002F2.auth-api-keys","i-lucide-key-round",{"title":123,"path":124,"stem":125,"icon":126},"Backup & restore","\u002Fguides\u002Foperations\u002Fbackup-restore","3.guides\u002F2.operations\u002F3.backup-restore","i-lucide-database-backup",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":84},"Reference","i-lucide-book-marked","\u002Freference","4.reference",[133,138,143,148,153],{"title":134,"path":135,"stem":136,"icon":137},"Event schema","\u002Freference\u002Fevents","4.reference\u002F1.events","i-lucide-list-tree",{"title":139,"path":140,"stem":141,"icon":142},"Addressing","\u002Freference\u002Faddressing","4.reference\u002F2.addressing","i-lucide-map-pin",{"title":144,"path":145,"stem":146,"icon":147},"Gateway HTTP API","\u002Freference\u002Fgateway-api","4.reference\u002F3.gateway-api","i-lucide-webhook",{"title":149,"path":150,"stem":151,"icon":152},"CLI","\u002Freference\u002Fcli","4.reference\u002F4.cli","i-lucide-square-terminal",{"title":154,"path":155,"stem":156,"icon":83},"Configuration","\u002Freference\u002Fconfiguration","4.reference\u002F5.configuration",{"title":158,"path":159,"stem":160,"children":161,"icon":163},"Contributing","\u002Fcontributing","5.contributing\u002F1.index",[162,164],{"title":158,"path":159,"stem":160,"icon":163},"i-lucide-git-pull-request",{"title":165,"path":166,"stem":167,"icon":168},"The package map","\u002Fcontributing\u002Fpackage-map","5.contributing\u002F2.package-map","i-lucide-boxes",{"id":170,"title":70,"body":171,"description":552,"extension":553,"links":554,"meta":555,"navigation":556,"path":71,"seo":557,"stem":72,"__hash__":558},"docs\u002F2.concepts\u002F7.harnesses.md",{"type":172,"value":173,"toc":545},"minimark",[174,188,193,214,217,414,418,421,463,474,478,481,489,492,496,503,510,529,533,541],[175,176,177,178,182,183,187],"p",{},"The ",[179,180,181],"strong",{},"harness"," is the engine that runs the model loop inside a ",[184,185,186],"a",{"href":36},"wake",": it calls the model, executes the tools the model asks for, and repeats until the turn ends. You pick one per agent — and swapping it changes nothing else about the agent.",[189,190,192],"h2",{"id":191},"two-harnesses-in-a-nutshell","Two harnesses, in a nutshell",[194,195,196,206],"ul",{},[197,198,199,205],"li",{},[179,200,201],{},[202,203,204],"code",{},"native(...)"," is the default: teaspill owns the loop, works with any model provider, and records every step durably — the finest-grained recovery. Start here.",[197,207,208,213],{},[179,209,210],{},[202,211,212],{},"claudeAgentSdk(...)"," runs the loop through the Claude Agent SDK: pick it when you specifically want Claude Code's behavior — its session semantics, its context management — inside a durable agent.",[175,215,216],{},"The choice is one field in your agent definition:",[218,219,220,326],"code-group",{},[221,222,228],"pre",{"className":223,"code":224,"filename":225,"language":226,"meta":227,"style":227},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","harness: native({\n  model: \"claude-sonnet-4-5\",\n  systemPrompt: \"Research the topic, then spawn a summarizer.\",\n  ingressUrl: process.env.RESTATE_INGRESS_URL!,\n})\n","native","ts","",[202,229,230,253,275,292,317],{"__ignoreMap":227},[231,232,235,238,242,246,250],"span",{"class":233,"line":234},"line",1,[231,236,181],{"class":237},"sBMFI",[231,239,241],{"class":240},"sMK4o",":",[231,243,245],{"class":244},"s2Zo4"," native",[231,247,249],{"class":248},"sTEyZ","(",[231,251,252],{"class":240},"{\n",[231,254,256,260,262,265,269,272],{"class":233,"line":255},2,[231,257,259],{"class":258},"swJcz","  model",[231,261,241],{"class":240},[231,263,264],{"class":240}," \"",[231,266,268],{"class":267},"sfazB","claude-sonnet-4-5",[231,270,271],{"class":240},"\"",[231,273,274],{"class":240},",\n",[231,276,278,281,283,285,288,290],{"class":233,"line":277},3,[231,279,280],{"class":258},"  systemPrompt",[231,282,241],{"class":240},[231,284,264],{"class":240},[231,286,287],{"class":267},"Research the topic, then spawn a summarizer.",[231,289,271],{"class":240},[231,291,274],{"class":240},[231,293,295,298,300,303,306,309,311,314],{"class":233,"line":294},4,[231,296,297],{"class":258},"  ingressUrl",[231,299,241],{"class":240},[231,301,302],{"class":248}," process",[231,304,305],{"class":240},".",[231,307,308],{"class":248},"env",[231,310,305],{"class":240},[231,312,313],{"class":248},"RESTATE_INGRESS_URL",[231,315,316],{"class":240},"!,\n",[231,318,320,323],{"class":233,"line":319},5,[231,321,322],{"class":240},"}",[231,324,325],{"class":248},")\n",[221,327,330],{"className":223,"code":328,"filename":329,"language":226,"meta":227,"style":227},"harness: claudeAgentSdk({\n  model: \"claude-sonnet-4-5\",\n  systemPrompt: \"Research the topic, then spawn a summarizer.\",\n  sessionStore: \"\u002Fdata\u002Fcasdk-sessions\",\n  ingressUrl: process.env.RESTATE_INGRESS_URL!,\n})\n","claudeAgentSdk",[202,331,332,345,359,373,389,407],{"__ignoreMap":227},[231,333,334,336,338,341,343],{"class":233,"line":234},[231,335,181],{"class":237},[231,337,241],{"class":240},[231,339,340],{"class":244}," claudeAgentSdk",[231,342,249],{"class":248},[231,344,252],{"class":240},[231,346,347,349,351,353,355,357],{"class":233,"line":255},[231,348,259],{"class":258},[231,350,241],{"class":240},[231,352,264],{"class":240},[231,354,268],{"class":267},[231,356,271],{"class":240},[231,358,274],{"class":240},[231,360,361,363,365,367,369,371],{"class":233,"line":277},[231,362,280],{"class":258},[231,364,241],{"class":240},[231,366,264],{"class":240},[231,368,287],{"class":267},[231,370,271],{"class":240},[231,372,274],{"class":240},[231,374,375,378,380,382,385,387],{"class":233,"line":294},[231,376,377],{"class":258},"  sessionStore",[231,379,241],{"class":240},[231,381,264],{"class":240},[231,383,384],{"class":267},"\u002Fdata\u002Fcasdk-sessions",[231,386,271],{"class":240},[231,388,274],{"class":240},[231,390,391,393,395,397,399,401,403,405],{"class":233,"line":319},[231,392,297],{"class":258},[231,394,241],{"class":240},[231,396,302],{"class":248},[231,398,305],{"class":240},[231,400,308],{"class":248},[231,402,305],{"class":240},[231,404,313],{"class":248},[231,406,316],{"class":240},[231,408,410,412],{"class":233,"line":409},6,[231,411,322],{"class":240},[231,413,325],{"class":248},[189,415,417],{"id":416},"what-never-changes","What never changes",[175,419,420],{},"Everything around the loop is identical whichever harness runs it:",[194,422,423,444,457],{},[197,424,425,426,429,430,433,434,433,437,433,440,443],{},"The same ",[179,427,428],{},"platform tools"," (",[202,431,432],{},"spawn_agent",", ",[202,435,436],{},"send_message",[202,438,439],{},"wait",[202,441,442],{},"finish",", …) and the same workspace tools, with the same behavior.",[197,445,425,446,452,453,456],{},[179,447,448,451],{},[184,449,450],{"href":56},"timeline"," events"," — a UI reading the timeline can't tell which harness produced it, beyond a field on ",[202,454,455],{},"run_started"," saying so.",[197,458,425,459,462],{},[179,460,461],{},"exactly-once guarantee"," on every side-effecting tool call: spawning a child or running a command happens once, no matter how the run is retried.",[175,464,465,466,469,470,473],{},"So harness choice is a per-agent behavior decision, not an architecture decision. A ",[202,467,468],{},"researcher"," on the native harness can spawn a ",[202,471,472],{},"summarizer"," on the Claude Agent SDK harness and neither notices.",[189,475,477],{"id":476},"how-to-choose","How to choose",[175,479,480],{},"Default to native. It is the shortest path, it works with any provider, and its step-level recovery means the least repeated work after a crash. Its context management is teaspill's own: when a conversation crosses the configured context budget, the harness writes a summarization event and the model continues on the folded context — history stays complete for readers.",[175,482,483,484,488],{},"Reach for the Claude Agent SDK harness when the ",[485,486,487],"em",{},"behavior"," you want is Claude Code's: you've tuned prompts against it, you rely on its compaction and session handling, or you're migrating an existing Claude Code workflow into a durable agent. The trade is provider lock-in and coarser recovery for fidelity to a loop you already trust.",[175,490,491],{},"Neither choice is final — the harness is per agent, and changing it doesn't touch your tools, your schemas, or anything already on the timeline.",[189,493,495],{"id":494},"the-durability-difference","The durability difference",[175,497,498,499,502],{},"Both harnesses survive crashes; they differ in how much of a run's ",[485,500,501],{},"interior"," survives.",[175,504,505,506,509],{},"The native harness records every step: each model call and tool call is its own recorded step, so a crash mid-run resumes at the last completed step. The Claude Agent SDK harness keeps a durable ",[179,507,508],{},"session"," as its working memory across wakes; if the session is ever missing or out of date, it rebuilds a fresh one from the timeline and continues — nothing is lost, at the cost of a slower first turn.",[511,512,513],"accordion",{},[514,515,518],"accordion-item",{"icon":516,"label":517},"i-lucide-microscope","Under the hood: warm resumes vs cold rebuilds",[175,519,520,521,524,525,528],{},"On each wake the SDK harness checks its stored session against the timeline's position. If the session is present, produced by the same pinned SDK version, and consistent with the last committed event, it resumes ",[179,522,523],{},"warm"," — the fast path, and the normal one when the session store lives on a persistent volume. Any mismatch triggers a ",[179,526,527],{},"cold rebuild",": the canonical timeline is projected into a fresh session, which is slower but always correct, because the timeline — not the session — is the source of truth. Running without a persistent session store means every fresh process cold-rebuilds; that is a sanctioned degraded mode, not a failure.",[189,530,532],{"id":531},"next-steps","Next steps",[175,534,535,536,538,539,305],{},"Harness configuration — model options, tool restrictions, context budgets, session stores — is covered field by field in ",[184,537,98],{"href":99},". To see agents cooperate regardless of harness, continue to ",[184,540,75],{"href":76},[542,543,544],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":227,"searchDepth":234,"depth":255,"links":546},[547,548,549,550,551],{"id":191,"depth":255,"text":192},{"id":416,"depth":255,"text":417},{"id":476,"depth":255,"text":477},{"id":494,"depth":255,"text":495},{"id":531,"depth":255,"text":532},"The engine that runs the model loop inside a wake — native for any provider, or Claude Agent SDK for Claude Code semantics.","md",null,{},{"icon":73},{"title":70,"description":552},"WFVKV3QTZGdLgX8htXwEUSh_65Ns-i7fUhCM3wmoc2w",[560,562],{"title":65,"path":66,"stem":67,"description":561,"icon":68,"children":-1},"The sandboxed environment an agent's tools run in, and the executor plane that hosts it.",{"title":75,"path":76,"stem":77,"description":563,"icon":78,"children":-1},"Spawn, send, observe — the whole coordination surface, and the patterns you build with it.",1784473423161]