An open-source, faster Devin alternative
TypeScript
docs: nest Labs (coming soon) under Durable Agent Sessions; tone down copy
Igor Zalutskie081cd5032bc
diff --git a/docs/agent-sessions/artifacts.mdx b/docs/agent-sessions/artifacts.mdxindex fb442bdf..4fd9940e 100644--- a/docs/agent-sessions/artifacts.mdx+++ b/docs/agent-sessions/artifacts.mdx@@ -5,9 +5,9 @@ description: "A session's published outputs — live previews and durable files<Note>**Coming soon.** This page is our current thinking, not a shipped contract — names and shapes may change. What works *today*: large event bodies already spill to a [`content_ref`](/agent-sessions/events) you can fetch, and events can carry forward [`refs.artifacts[]`](/agent-sessions/events). The first-class collection below is what comes next.</Note>-A session does its work in a private scratch sandbox. **Artifacts** are the subset it deliberately *publishes* for you and your UI to consume — a durable, session-scoped collection that survives reconnects and page reloads, so a "preview" or "outputs" panel can be rebuilt at any time, not just caught live. A **preview** is one kind of artifact: a live URL to something the agent is running (a dev server, a built app).+A session does its work in a private scratch sandbox. **Artifacts** are the subset it deliberately *publishes* for your UI to consume — a durable, session-scoped collection you can fetch on load and stream for updates, so a preview or outputs panel survives reconnects and reloads. A **preview** is one kind of artifact: a live URL to something the agent is running (a dev server, a built app).-## Two kinds, two lifetimes+## Durable vs liveThe split is what lets a panel survive a refresh:@@ -21,7 +21,7 @@ The runtime would get two tools alongside `bash`/`read`/`write`:- `oc.preview(port)` — expose a port of the session's machine as a preview URL.- `oc.publish(path)` — snapshot a file as a durable artifact.-Each publish appends a `user`-level event and upserts the artifact, so it reaches your UI the moment it happens — the agent builds, then *shows* you.+Each publish appends a `user`-level event and upserts the artifact, so it reaches your UI as soon as it's produced.## How your app would consume itdiff --git a/docs/agent-sessions/runtimes.mdx b/docs/agent-sessions/runtimes.mdxindex d16f2932..5805a595 100644--- a/docs/agent-sessions/runtimes.mdx+++ b/docs/agent-sessions/runtimes.mdx@@ -26,7 +26,7 @@ Each **turn is one bounded run**, invoke-style — it:2. drives the Claude Agent SDK loop,3. **streams every step back as events** over the authenticated events API,4. performs side effects only through the remote [sandbox tools](/agent-sessions/runtime-tools) (`bash` / `read` / `write` / `ls`, plus `say` / `ask`), and-5. **exits when it has nothing left to do** — it yields rather than busy-waits (waiting on a person, a build, or the clock costs no compute).+5. **exits when it has nothing left to do** — it yields rather than busy-waits, so time spent waiting costs no compute.Across turns it continues an on-box **journal**; the durable record is the event log *plus* that journal, which the platform checkpoints at each boundary and restores on recovery ([durability](/agent-sessions/durability)).@@ -34,11 +34,11 @@ Across turns it continues an on-box **journal**; the durable record is the eventA regional **supervisor** owns each running session and keeps the runtime healthy — you never restart anything:-- **One driver at a time.** The supervisor holds a **fenced lease** on the session: exactly one runtime instance may write at a time, and the fence rejects a stale or zombie instance (e.g. a slow machine that returns after it was given up) — no split-brain, no double-writes.+- **One driver at a time.** The supervisor holds a **fenced lease** on the session: exactly one runtime instance can write at a time, and the fence rejects writes from a stale instance (e.g. a slow machine that returns after it was given up), so a session never has two concurrent writers.- **Liveness.** The lease is renewed while a turn runs. If the runtime's machine dies, the lease lapses and the supervisor **re-claims the turn and continues it** from the journal.- **Crash / hang / lost machine.** A bad exit restarts the turn in place (bounded attempts, with crash-loop backoff); a hung turn is bounded by a **deadline** and ends `deadline_exceeded`; a lost machine is recreated and **restored from the last checkpoint**. Full matrix in [durability](/agent-sessions/durability#limits).-- **Failures surface — never an eternal spinner.** If a turn can't even start (the model key can't be resolved, the runtime image can't be fetched), the turn ends with an **`error` event carrying the reason** and the session returns to idle, instead of hanging.-- **Backstop reconciler.** A periodic sweep re-dispatches work whose wake-up was missed, re-claims turns whose lease expired, and resets sessions left `running` after a crash — so nothing strands silently.+- **A turn that can't start fails cleanly.** If the model key can't be resolved or the runtime image can't be fetched, the turn ends with an **`error` event carrying the reason** and the session returns to idle, rather than hanging.+- **Backstop reconciler.** A periodic sweep re-dispatches work whose wake-up was missed, re-claims turns whose lease expired, and resets sessions left `running` after a crash, so stranded work is picked up.- **Observable.** Every turn and machine transition — turn start / complete / error, sandbox create / provision / hibernate, lease renew / fence — is recorded, so the platform can show exactly where a session is and why a turn ended the way it did.## Coming soondiff --git a/docs/docs.json b/docs/docs.jsonindex 59c2d9e3..7c81b610 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -73,7 +73,15 @@"agent-sessions/webhooks","agent-sessions/runtimes","agent-sessions/runtime-tools",- "agent-sessions/api-reference"+ "agent-sessions/api-reference",+ {+ "group": "Labs",+ "tag": "Coming soon",+ "expanded": true,+ "pages": [+ "agent-sessions/artifacts"+ ]+ }]},{@@ -272,13 +280,6 @@"pages": ["troubleshooting"]- },- {- "group": "Labs",- "tag": "Coming soon",- "pages": [- "agent-sessions/artifacts"- ]}]},