[{"data":1,"prerenderedAt":430},["ShallowReactive",2],{"navigation":3,"\u002Fconcepts\u002Ftimelines-events":169,"\u002Fconcepts\u002Ftimelines-events-surround":425},[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":55,"body":171,"description":418,"extension":419,"links":420,"meta":421,"navigation":422,"path":56,"seo":423,"stem":57,"__hash__":424},"docs\u002F2.concepts\u002F4.timelines-events.md",{"type":172,"value":173,"toc":408},"minimark",[174,188,193,209,220,226,230,245,255,282,308,312,322,325,329,343,353,357,364,399,403],[175,176,177,178,182,183,187],"p",{},"Every agent writes an append-only ",[179,180,181],"strong",{},"timeline"," of everything it does, and your UI can replay it or live-follow it. This page teaches the timeline's shape and vocabulary; the field-by-field specification lives in the ",[184,185,186],"a",{"href":135},"Event schema reference",".",[189,190,192],"h2",{"id":191},"the-timeline","The timeline",[175,194,195,196,200,201,204,205,208],{},"The timeline is the record of one entity's life — messages, tool calls, results, lifecycle markers — as numbered events. The number is called ",[197,198,199],"code",{},"seq",", and it is strict: ",[179,202,203],{},"0-based, counting up by exactly one, with no gaps."," The first event of every entity is ",[197,206,207],{},"entity_spawned"," at seq 0.",[175,210,211,212,216,217,219],{},"Gaplessness is a feature you can lean on. A reader holding events 0–41 ",[213,214,215],"em",{},"knows"," it has missed nothing; a reader that sees 43 after 41 ",[213,218,215],{}," something is wrong and can say so. \"Did I miss anything?\" is always answerable — which is what makes timelines safe to build UIs on.",[175,221,222,223,225],{},"Each event carries its entity's URL, its ",[197,224,199],{},", a timestamp, a type, and a typed payload. There are fifteen event types in all; you'll meet them fastest by scenario.",[189,227,229],{"id":228},"a-wake-on-the-timeline","A wake, on the timeline",[175,231,232,233,236,237,240,241,244],{},"One ",[184,234,235],{"href":36},"wake"," writes a bracketed group of events. Here is our ",[197,238,239],{},"researcher"," handling a request and delegating to a ",[197,242,243],{},"summarizer",":",[246,247,252],"pre",{"className":248,"code":250,"language":251},[249],"language-text","seq 4   run_started      wake source: message\nseq 5   message          role: user — \"look into the history of tea\"\nseq 6   tool_call        spawn_agent → summarizer\nseq 7   tool_result      \"Spawned summarizer as \u002Ft\u002Fdefault\u002Fa\u002Fsummarizer\u002F01j…\"\nseq 8   child_spawned    childId: \u002Ft\u002Fdefault\u002Fa\u002Fsummarizer\u002F01j…\nseq 9   tool_call        wait\nseq 10  tool_result      \"Turn yielded.\"\nseq 11  run_finished     outcome: success, token usage\n","text",[197,253,250],{"__ignoreMap":254},"",[175,256,257,258,261,262,265,266,269,270,273,274,277,278,281],{},"Every wake opens with ",[197,259,260],{},"run_started"," and closes with ",[197,263,264],{},"run_finished",". In between: ",[197,267,268],{},"message"," events for finalized conversation turns, ",[197,271,272],{},"tool_call","\u002F",[197,275,276],{},"tool_result"," pairs for every tool the model used, and ",[197,279,280],{},"reasoning"," for finalized thinking (display-only — it is never fed back to the model).",[175,283,284,285,288,289,292,293,296,297,300,301,304,305,187],{},"Family and lifecycle activity appears the same way: ",[197,286,287],{},"child_spawned"," and ",[197,290,291],{},"child_finished"," bracket a sub-agent's life from the parent's point of view; ",[197,294,295],{},"control"," records an outside intervention; ",[197,298,299],{},"error"," records a failure; ",[197,302,303],{},"archived"," marks the end of an episode. All fifteen types are cataloged in the ",[184,306,307],{"href":135},"reference",[189,309,311],{"id":310},"token-deltas-the-live-channel","Token deltas: the live channel",[175,313,314,315,317,318,321],{},"While the model is mid-sentence, the finalized ",[197,316,268],{}," event doesn't exist yet. ",[179,319,320],{},"Token deltas"," are the live, streaming fragments of a message while the model is still producing it. They ride a sibling stream next to the timeline, they are droppable, and they are always superseded by the finalized event.",[175,323,324],{},"Roughly: deltas are for pixels, events are for truth. A UI renders deltas as they arrive for that live-typing feel; the moment the finalized event lands on the timeline, all buffered deltas for it are discarded. If a delta is lost in transit nothing is harmed — the finalized event always contains the complete text.",[189,326,328],{"id":327},"snapshots-joining-late","Snapshots: joining late",[175,330,331,332,335,336,339,340,342],{},"A conversation that has run for weeks might hold thousands of events. A ",[179,333,334],{},"snapshot"," (",[197,337,338],{},"state_snapshot",") is a periodic event that carries the entity's complete state at that point, so a UI can join at the latest snapshot and fold forward from there instead of replaying from event 0. Snapshots occupy a normal ",[197,341,199],{}," slot like any other event, so the \"no gaps\" arithmetic keeps working across them.",[344,345,346],"note",{},[175,347,348,349,352],{},"The ",[184,350,351],{"href":103},"Frontend integration guide"," shows fast-join in practice — the client SDK does the snapshot bookkeeping for you.",[189,354,356],{"id":355},"history-never-control-flow","History, never control flow",[175,358,359,360,363],{},"One rule shapes everything above. Roughly: ",[179,361,362],{},"the platform writes the timeline for you and your UI — it never reads the timeline to decide what to do next."," The agent's own durable state is the single source of truth; the timeline is a one-way copy of what happened.",[365,366,367,379],"accordion",{},[368,369,372],"accordion-item",{"icon":370,"label":371},"i-lucide-microscope","Why the timeline is never read for control flow",[175,373,374,375,378],{},"If the platform both wrote history and read it back to make decisions, there would be two sources of truth — the agent's state and its history — and every disagreement between them would be a bug with no right answer. teaspill keeps the arrow one-way: state lives with the agent object, and the timeline can always be regenerated ",[213,376,377],{},"forward"," from what agents do, never the reverse. This is also what keeps reading cheap and safe: a timeline is append-only and cacheable, and no reader — however slow, however many — can affect a running agent.",[368,380,382],{"icon":370,"label":381},"How events get their numbers exactly once",[175,383,384,385,387,388,391,392,395,396,398],{},"Only the entity's own handler assigns ",[197,386,199],{}," — the ",[184,389,390],{"href":71},"harness"," produces unnumbered events, and the one writer numbers them at commit time through an outbox. The outbox appends to the history store via an idempotent producer keyed on ",[197,393,394],{},"(entityId, seq)",", so a crash-and-retry between \"appended\" and \"confirmed\" replays as a harmless duplicate, never a double write or a gap. Readers in turn deduplicate by the ",[197,397,199],{}," embedded in each event, so even a rare server-side duplicate record collapses cleanly.",[189,400,402],{"id":401},"next-steps","Next steps",[175,404,405,406,187],{},"The timeline is one of two things you read from teaspill. The other — the live registry of every entity — is next: ",[184,407,60],{"href":61},{"title":254,"searchDepth":409,"depth":410,"links":411},1,2,[412,413,414,415,416,417],{"id":191,"depth":410,"text":192},{"id":228,"depth":410,"text":229},{"id":310,"depth":410,"text":311},{"id":327,"depth":410,"text":328},{"id":355,"depth":410,"text":356},{"id":401,"depth":410,"text":402},"The append-only record of everything an agent does — numbered events your UI can replay, live-follow, or join late.","md",null,{},{"icon":58},{"title":55,"description":418},"HyqY_rO2-M8PR0Ce7w8AAfXM4_KjJmI8UhKtBxJWkRw",[426,428],{"title":50,"path":51,"stem":52,"description":427,"icon":53,"children":-1},"Every running agent is an entity with one URL-shaped id, and that single string identifies it everywhere.",{"title":60,"path":61,"stem":62,"description":429,"icon":63,"children":-1},"The read side of teaspill — one-way copies of what agents do, and the live registry your UI subscribes to.",1784473422064]