An open-source, faster Devin alternative
TypeScript
docs: Run Flue agents (Labs) — flue.mdx + runtimes/custom-runtimes/nav
Igor Zalutski026ab789ec01
diff --git a/docs/agent-sessions/custom-runtimes.mdx b/docs/agent-sessions/custom-runtimes.mdxindex f1a071c8..932243e7 100644--- a/docs/agent-sessions/custom-runtimes.mdx+++ b/docs/agent-sessions/custom-runtimes.mdx@@ -4,7 +4,9 @@ title: "Custom runtimes"description: "Package your own agent harness as a runtime"----<Note>**Labs preview.** Custom runtimes are not part of the stable Durable Sessions API. Production sessions use the built-in [runtimes](/agent-sessions/runtimes): `claude` and `codex`.</Note>+<Note>**Labs preview.** Custom runtimes are not part of the stable Durable Sessions API. Production sessions use the built-in [runtimes](/agent-sessions/runtimes): `claude`, `codex`, and `pi`.</Note>++Building on the [Flue framework](https://flueframework.com)? There's a supported path that skips all of this: [Run Flue agents](/agent-sessions/flue) deploys your Flue app onto the platform's brain contract directly. Custom runtimes remain the general escape hatch for any other harness.A custom runtime lets you run your own agent harness on Durable Agent Sessions. Once registered, select it on an agent with `runtime: "<name>"`; sessions, events, steering, webhooks, recovery, and sandbox tools use the same public API as built-in runtimes.diff --git a/docs/agent-sessions/flue.mdx b/docs/agent-sessions/flue.mdxnew file mode 100644index 00000000..f4a0be2d--- /dev/null+++ b/docs/agent-sessions/flue.mdx@@ -0,0 +1,118 @@+---+mode: "wide"+title: "Run Flue agents"+description: "Deploy a Flue app to OpenComputer as a durable session"+---++<Note>**Labs preview.** Flue support is experimental and intentionally+constrained — the supported profile below will widen. Flue itself is pre-1.0;+each deploy pins your exact Flue version inside the artifact, so upstream+changes never break a deployed agent.</Note>++[Flue](https://flueframework.com) is a TypeScript agent framework by the Astro+team. OpenComputer runs Flue apps as [durable sessions](/agent-sessions/overview):+your agent keeps its conversation across crashes and restarts, hibernates+between turns, executes file/shell tools in an isolated workspace sandbox, and+wakes on messages or [GitHub watches](/agent-sessions/watches) — with model+usage on [Managed billing](/agent-sessions/credentials) or your Anthropic key.++Your app stays plain Flue. The integration is one entry file:++```ts oc.ts+import { serveOC } from '@opencomputer/flue';+import agent from './agents/support.ts';++serveOC(agent);+```++Start from the template: [`diggerhq/oc-flue-starter`](https://github.com/diggerhq/oc-flue-starter).++## Quickstart++```sh+git clone https://github.com/diggerhq/oc-flue-starter && cd oc-flue-starter+npm install++# create the agent (name must match agent.toml)+oc agent create support-triage --runtime flue --model anthropic/claude-sonnet-5++# build + deploy: bundles your app, uploads the artifact, verifies it boots,+# activates a new revision+oc agent deploy++# talk to it+oc session create --input "Customer says order 1042 hasn't arrived — what do I tell them?"+oc session logs <session-id>+```++Reply to an agent's question with `oc session steer <session-id> "..."`, or+chat in the [dashboard](https://app.opencomputer.dev). To let the agent load+[skills](/agent-sessions/skills), attach a repo containing `.agents/skills/**`+as a session source: `oc session create --input "..." --source owner/repo`.++## The supported profile++`oc agent deploy` validates these — violations fail at build or deploy, never+mid-conversation.++| Works today | Not yet |+| --- | --- |+| One agent per app, exported via `serveOC` | Multiple agents per app |+| `anthropic/…` models (Managed or your key) | Other providers |+| Custom `defineTool` tools + subagents (run in-process with your app) | Flue channels (Slack/Discord ingress) |+| Workspace skills (`.agents/skills/**` via a session source) | Packaged skill imports (`with { type: 'skill' }`) |+| GitHub watches as input events | Flue workflows / `?wait=result` |++Rules the deploy enforces:++- **Model declared once, everywhere the same**: `model` in your agent code,+ `agent.toml`, and the OC agent record must be equal.+- **Don't set `sandbox:`** — OpenComputer supplies the session's sandbox.+- **No `db.ts`** — conversation durability is provided by the platform.+- **Reserved tool names**: `bash`, `read`, `write`, `edit`, `ls`, `say`,+ `ask` — a custom tool can't use these.+- **No keys in the repo or bundle** — model credentials come from your+ OpenComputer account.++## Models++Use `anthropic/<model>` with the same ids as the other runtimes —+`anthropic/claude-sonnet-5` (balanced, the template default),+`anthropic/claude-opus-4-8` (most capable), `anthropic/claude-haiku-4-5`+(fastest/cheapest). Managed billing routes and meters usage exactly like the+`claude` and `pi` runtimes; bring-your-own Anthropic keys work unchanged via+[credentials](/agent-sessions/credentials).++## Deploys and revisions++`oc agent deploy` builds your app with **your** Flue version into a+content-addressed artifact, uploads it, **boot-verifies it** in a scratch+sandbox (a bundle that can't start never activates), and creates an immutable+[revision](/agent-sessions/revisions). Sessions pin their revision at create:+a new deploy affects new sessions, in-flight sessions keep theirs, and+rollback is repointing the active revision.++## How it runs++Your artifact is the session's **resident brain** — it stays warm across+turns and hibernates with the session. File and shell tools execute on a+separate **workspace sandbox**, not on the box holding credentials; every+step, tool call, and answer lands in the session's durable+[event log](/agent-sessions/events). Custom `defineTool` code runs in-process+with your app: it executes inside your agent's sandbox with **unrestricted+outbound network access in this release** — this will move behind an egress+policy. Model traffic always routes through OpenComputer's credential proxy+(your key is never inside the sandbox).++## Troubleshooting++- **Deploy fails at verification** — your bundle didn't boot. The deploy+ output includes the probe error; the usual causes are a profile violation+ (`sandbox:` set, packaged-skill import, reserved tool name) or a top-level+ crash in your app code.+- **Model rejected at deploy** — the three model declarations diverge, or the+ model isn't `anthropic/…`.+- **`provider 401` on the first turn** — no usable model credential: enable+ Managed billing or attach an Anthropic credential to the agent.+- **Skill not loading** — workspace skills need the repo attached as a+ *session source* (`--source`), and the files under `.agents/skills/<name>/`.diff --git a/docs/agent-sessions/runtimes.mdx b/docs/agent-sessions/runtimes.mdxindex df0d794f..8b73c378 100644--- a/docs/agent-sessions/runtimes.mdx+++ b/docs/agent-sessions/runtimes.mdx@@ -11,12 +11,14 @@ A **runtime** executes the agent loop: provider SDK, model calls, and tool use.| `claude` | `anthropic/…` (e.g. `anthropic/claude-opus-4-8`) | Managed, or an Anthropic key || `codex` | `openai/…` (e.g. `openai/gpt-5-codex`) | Managed, or an OpenAI key || `pi` | `anthropic/…` today — the runtime is provider-agnostic by construction; more providers land next | Managed, or an Anthropic key |+| `flue` <sup>Labs</sup> | `anthropic/…` today | Managed, or an Anthropic key |`model` is passed straight through to the provider, so any model that provider serves works — only the **`provider/` prefix** is validated against the runtime (a bad prefix is rejected at agent create, a model the provider doesn't recognize fails on the first turn). Common choices:- **`claude`:** `anthropic/claude-sonnet-5` (default, balanced), `anthropic/claude-opus-4-8` (most capable), `anthropic/claude-fable-5`, `anthropic/claude-haiku-4-5` (fastest/cheapest).- **`codex`:** `openai/gpt-5-codex`.- **`pi`:** the `anthropic/…` catalog above. The runtime itself is provider-agnostic; additional providers are next.+- **`flue`** (Labs): the `anthropic/…` catalog above — but the model is declared in your app's code; see [Run Flue agents](/agent-sessions/flue).Sessions, [events](/agent-sessions/events), [steering](/agent-sessions/messaging), [tools](/agent-sessions/runtime-tools), and [webhooks](/agent-sessions/webhooks) share the same API across runtimes. `runtime` is fixed once the agent exists; to switch engines, create a new agent.@@ -76,6 +78,18 @@ Content-Type: application/jsonThe provider is taken from the model's `provider/` prefix — so as more providers land, switching provider is just a different `model` on the same `pi` agent, not a separate runtime.+## `flue` <sup>Labs</sup>++Unlike the runtimes above, `flue` doesn't run a platform-provided harness —+it runs **your app**, built with the [Flue framework](https://flueframework.com)+and deployed with `oc agent deploy`. Your code defines the agent+(instructions, typed tools, subagents); OpenComputer provides the durable+session around it: the event log, sandbox tools, steering, hibernation, and+recovery are the same as every other runtime. `anthropic/…` models today,+Managed or your Anthropic key. Experimental — see+[Run Flue agents](/agent-sessions/flue) for the supported profile and+quickstart.+The runtime, model, and credential have to agree. `claude` needs an `anthropic/…` model and an Anthropic key; `codex` needs an `openai/…` model and an OpenAI key; `pi` runs `anthropic/…` models today and needs an Anthropic key (or Managed). A mismatch is rejected when you create the agent, with a clear error — so a session never starts on a broken pairing. See [model credentials](/agent-sessions/credentials).## Architecturediff --git a/docs/docs.json b/docs/docs.jsonindex c1991a89..f01e72a4 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -92,6 +92,7 @@"tag": "Labs","expanded": true,"pages": [+ "agent-sessions/flue","agent-sessions/custom-runtimes","agent-sessions/triggers","agent-sessions/channels",