An open-source, faster Devin alternative
TypeScript
docs(flue): plain technical phrasing pass
Igor Zalutskif45fa55406dc
diff --git a/docs/agent-sessions/flue.mdx b/docs/agent-sessions/flue.mdxindex d7e1bd29..56ebd254 100644--- a/docs/agent-sessions/flue.mdx+++ b/docs/agent-sessions/flue.mdx@@ -58,38 +58,36 @@ session can exist.| Model credentials | Env keys or `registerProvider` in code | **No keys anywhere in the app.** Managed billing or an [OC credential](/agent-sessions/credentials); routing is injected at run time || Model choice | In code | Still in code — but declared three times total (`defineAgent`, `agent.toml`, the OC agent) and all three **must be equal**; the deploy rejects divergence || Skills | Packaged imports (`with {type:'skill'}`) or workspace files | **`src/skills/<name>/SKILL.md`** — ships with every deploy. Packaged imports are a build error (for now) |-| Asking the user | No human-in-the-loop primitive | Your agent gets an **`ask` tool**: the session yields, waits at zero compute, resumes with the answer |+| Asking the user | No human-in-the-loop primitive | An **`ask` tool** is added: the session yields `needs_input` and hibernates until the user replies || Channels / workflows | Slack/Discord ingress, `defineWorkflow` | Not supported — inbound is session messages + [GitHub watches](/agent-sessions/watches) || Tool names | Anything | `bash`, `read`, `write`, `edit`, `ls`, `say`, `ask` are **reserved** (build error) |## What `@opencomputer/flue` does-`serveOC(agent)` runs your app as the session's brain and wires the platform-in — this is everything the package does, so you don't have to:--- **Durable conversation, zero config.** It opens Flue's conversation store- on the session's persistent state volume. Your agent resumes with full- context after hibernation, crashes, or machine moves. (This is why `db.ts`- is rejected — a second store would fork the source of truth.)-- **Sandbox wiring.** Flue's built-in `read`/`write`/`edit`/`bash` tools- execute on the session's **workspace sandbox** — a separate machine from- your app process, where attached repos are checked out. Your **custom- `defineTool` code runs in-process** with your app (see the note on network- access below).-- **Two injected tools**: `say` (surface a message to the user mid-run) and- `ask` (ask and wait — the session yields `needs_input`, hibernates, and- your agent continues when the user replies).-- **Model routing.** At run time it registers the Anthropic provider against- OpenComputer's credential system — managed metering or your key — so the- model string in your code just works and no secret ever enters your bundle- or repo.-- **Turn integration.** Each session turn is admitted into Flue's engine- idempotently (safe under platform retries) and every step — model text,- your custom tool calls, sandbox operations — lands in the session's- [event log](/agent-sessions/events).-- **Engine subordination.** Flue's internal retry/timeout knobs are pinned- under the platform's turn budget, so the platform's cancel/retry/deadline- semantics are the only ones you reason about.+`serveOC(agent)` runs your agent as the session's resident process and+connects it to the platform:++- **Conversation persistence.** Opens Flue's conversation store on the+ session's state volume. History survives process restarts, hibernation,+ and machine moves. A `db.ts` is rejected at deploy because a second store+ would fork the conversation history.+- **Sandbox.** Flue's built-in `read`/`write`/`edit`/`bash` tools execute on+ the session's workspace sandbox — a separate machine from your app+ process, where attached repos are checked out. Custom `defineTool` code+ runs in-process with your app (see the network-access note below).+- **Two added tools.** `say` posts a message to the user mid-run. `ask` asks+ a question: the session yields `needs_input` and hibernates until the user+ replies, then the run continues with the answer.+- **Model credentials.** Registers the Anthropic provider with credentials+ resolved from the platform — managed metering or your key. The bundle and+ repo contain no credentials.+- **Turn handling.** Each session turn is admitted into Flue's engine with+ an idempotent id, so platform-level retries can't double-run it. Every+ step — model text, custom tool calls, sandbox operations — is written to+ the session's [event log](/agent-sessions/events).+- **Retries and timeouts.** Flue's internal retry and timeout settings are+ capped below the platform's turn deadline. Cancel, retry, and deadline+ behavior is the platform's; there is no second layer to reason about.`oc-flue-build` (the package's build command, run by `oc agent deploy`)bundles `src/oc.ts` with **your** installed Flue version via esbuild, collects@@ -121,19 +119,19 @@ Two rules that follow from tools running inside the deployed artifact:data and templates (as above); the repo checkout is not on the app'sfilesystem.- **Outbound network**: custom tools currently have unrestricted outbound- access from the agent's sandbox; this will move behind an egress policy.- Don't bake secrets into the bundle to call your APIs — that egress story- is coming; keep v0 tools self-contained where you can.+ access from the agent's sandbox. An egress policy is planned; until it+ exists, don't embed secrets in the bundle to call your own APIs — prefer+ self-contained tools.## SkillsPut the agent's own skills at `src/skills/<name>/SKILL.md`-([SKILL.md format](/agent-sessions/skills)). They ride the artifact and are-placed into the agent's workspace at run time, where Flue's native discovery-picks them up — updating a skill is a redeploy, and rollback rolls the skills-back too. Separately, any repo you attach as a session source contributes its-own `.agents/skills/**` (that convention means "skills for agents working on-that repo"); on a name clash, your app's skill wins.+([SKILL.md format](/agent-sessions/skills)). The build packages them into the+artifact; at run time they are written into the agent's workspace, where+Flue's normal discovery finds them. Changing a skill is a redeploy; a+rollback also reverts skills. Separately, a repo attached as a session source+contributes its own `.agents/skills/**` (that convention means "skills for+agents working on that repo"); on a name clash, the app's skill wins.## Models