Experimental. The supported profile is intentionally narrow. It currently
covers direct text sessions on managed Anthropic models, with an optional
OpenComputer sandbox. Flue is pre-1.0, and each deployment includes the exact
Flue version installed in your app.
diggerhq/oc-flue-starter · Fork on GitHub
How Flue differs from the built-in runtimes
The built-in runtimes run Claude Code, Codex, or pi as a managed coding agent. A Flue agent is different: your application is the runtime. OpenComputer deploys and operates that app.
Under the hood, OpenComputer runs Flue’s Cloudflare target as an agent Worker and gives each session
its own Durable Object. This architecture lets a Flue session start without provisioning a virtual
machine. A model-only agent, or one whose custom tools use bundled data, never needs a sandbox.
How a turn runs
OpenComputer returns after it has durably accepted the input. It does not wait for dispatch, the Durable Object, a model call, or sandbox creation. Flue executes one turn at a time for each session; messages sent while a turn is working remain queued and run in order. Flue’s Durable Object is the runtime’s conversation store. The OpenComputer event log is the stable consumer view used by the dashboard, API, and webhooks. OpenComputer resumes projection from a saved cursor after an interruption, so clients do not need to understand Flue submission ids or stream offsets.Start with a prompt
You do not need to write a Flue application to use its edge runtime. A prompt-defined Flue repository has this shape:oc agent init ./support --runtime flue, or create the files
directly:
agent.toml
oc agent deploy from the directory, or import it from GitHub.
OpenComputer compiles prompt.md and up to 32 packaged skills into a pinned
Flue application inside the isolated managed builder. The prompt may be at most
256 KiB; each SKILL.md may be at most 256 KiB, with a 2 MiB combined limit.
Skill directory names use lowercase letters, numbers, and hyphens. mcp.json
is not supported by this profile.
Add package.json and a flue.config.* file when you need custom tools or
application code. Those full-app markers take precedence over prompt.md, and
the next production push graduates the existing agent to the complete Flue app
without replacing its identity or history. Changing the name in agent.toml
still requires a new agent because it changes the Durable Object lineage.
Deploy from GitHub
The shortest path for a prompt-defined or complete Flue app is the dashboard:- Push a prompt-defined root to GitHub, fork the Flue starter, or push your own app.
- Open Agents → Create agent → Import from GitHub.
- Install the OpenComputer GitHub App on the repository, then select the repository, production branch, and root directory.
- Choose Review agent. OpenComputer resolves one exact commit and checks the root without running repository code.
- Review the detected Flue entrypoint and model. Give the OpenComputer agent a human-readable name; it may differ from the
agent.tomlFlue entrypoint. - Choose Deploy agent. A guided setup page opens immediately and keeps the deployment running in the background. It shows compact Prepare, Build, and Deploy progress; expand the build log only when you need it.
- Choose Connect Slack as the next step. Slack authorization returns to setup, which changes to Open Slack as soon as both the agent and connection are ready and prompts you to send your first message.
- Send the message in Slack. Setup detects the real managed-Slack session, previews the first exchange, and links to the full session in OpenComputer. If you leave early, use Continue setup from the agent page.
agent.toml, prompt.md, and optional skills/. A complete app also needs
package.json and a committed package-lock.json; its package must declare a
Node engine compatible with the exact managed builder version and a semver
dependency on the Flue CLI. npm workspaces, files above the selected root,
private registries, submodules, Git LFS, custom install/build commands, and
build-time secrets are not supported.
agent.toml is authoritative. If it is malformed, declares an unsupported runtime, or is missing
from a root that otherwise has strong Flue markers, review returns This Flue agent needs a fix.
OpenComputer does not fall back to another runtime. A folder containing
prompt.md or skills but no agent.toml is unrecognized; add the explicit
Flue manifest, choose another folder, fork the starter, or create a built-in
agent manually.
For a monorepo, reviewing an unrecognized parent can suggest bounded candidate roots. Selecting a
candidate changes the root and performs a fresh review—it never deploys the suggestion automatically.
OpenComputer resolves the selected branch to one commit, fetches only that tracked tree in a
short-lived Git sandbox, and transfers tokenless source to a separate build sandbox. The build runs
fixed npm ci --no-audit --no-fund and offline oc agent build commands in an ordinary disposable
OpenComputer sandbox. The build request carries no GitHub token, OpenComputer key, model
credential, Workers credential, or secret store.
Repository import creates the initial deployment from the selected production
branch. Each later push to that branch that touches the selected root
automatically creates another deployment for the new exact commit. Flue
ignores pushes to other branches because it has one live Worker and no
preview/staged Worker in the current profile.
source_profile_changed; the active revision stays live. A prompt-defined root may
graduate to a complete Flue app, but not in the opposite direction. Otherwise restore the previous
profile, or unlink the source and import the repository as a new agent. Unlinking does not delete
the existing agent, its active revision, or its sessions.
Deploy from your machine
Requirements: theoc CLI and an OpenComputer organization with Managed model
access. A prompt-defined root needs no local Node installation: the CLI uploads
its bounded behavior files and the isolated managed builder performs synthesis,
dependency installation, and the Flue build.
oc session steer <session-id> "...", inspect it with
oc session logs <session-id>, or open it in the
dashboard.
Validate or build without deploying
The CLI exposes the same credential-free artifact builder used by managed repository builds:bundle.tgz and deployment.json. It does not fetch source, install
dependencies, authenticate, upload, or deploy; npm ci is intentionally a separate step.
Add OpenComputer to a Flue app
Install the integration alongside Flue:src/agents/support-triage.ts
src/app.ts
agent.toml
defineAgent. DEFAULT_MODEL currently resolves to anthropic/claude-haiku-4-5.
If your project owns a custom app.ts, keep Flue’s routes, import @opencomputer/flue/wire for
telemetry, and expose a GET /health route that returns success. The default app is the simpler
choice when you do not need additional routes.
What @opencomputer/flue supplies
OpenComputer binds a platform-managed credential for its gateway during deployment. Your provider
key is not compiled into the app or exposed to the Worker.
Custom tools and packaged skills
CustomdefineTool handlers run inside the Worker. Import any data or templates they need so the
Cloudflare build includes those files:
src/tools/lookup-order.ts
fetch destinations are not part of the supported profile. Commands run through an
optional OpenComputer sandbox follow the sandbox’s separate network policy.
Optional sandbox and working repositories
AddocSandbox only when the agent needs a Linux shell or durable files:
ocSandbox performs no provisioning during Worker startup or Flue runtime initialization.
The first real shell or file operation resolves one sandbox for the session; later operations and
turns reuse it.
The workspace starts empty. Add a working repository
at session creation or with add_source. Flue pins the requested ref immediately but creates the
session sandbox and materializes files only when the app first uses a repository tool. The agent may
edit those files and call github_publish_pull_request; OpenComputer performs authenticated Git
operations outside the tenant Worker and session sandbox.
ocRepoTools adds list_working_repos, add_source, and
github_publish_pull_request. Tell the agent to list first, state the exact
owner/repo it resolved, and ask when the user’s target is ambiguous. Repository
names do not need to be embedded in the prompt.
Variables and secrets
Non-secret Worker variables belong inagent.toml:
agent.toml
OC_ or FLUE_
are reserved for the platform. Never put a secret in agent.toml or source code.
Deployment and revision behavior
A deployment is one time-aware attempt and can fail. A revision exists only after that attempt verifies successfully. Managed repository deployments persist one chronological log across thequeued, fetching, validating, installing, building, uploading, deploying, and
verifying states. Refreshing the dashboard does not lose that log.
oc agent deploy performs these operations:
- Scans the source tree for credential-shaped values.
- Runs the app’s installed
flue build --target cloudflare. - Uploads only the generated JavaScript modules and a restricted deployment descriptor.
- Applies platform-owned bindings, variables, secrets, and Durable Object migrations, then uploads the agent Worker.
- Keeps the deployment in
verifyinguntil the exact live Worker returns two consecutive healthy responses. Only then does the CLI report the revision as ready.
--verbose to stream it; if the build fails, the CLI replays
the captured output automatically.
Session behavior
Flue uses the same session ids, text input, event stream, steering, cancellation, result endpoint, and dashboard as the other runtimes. The important differences are:- Session creation and steering return after durable acceptance. Model execution continues asynchronously.
- Each accepted input receives an OpenComputer
trn_...id. Flue’s internal submission identity is not part of the public API. - Follow-up messages queue behind the working turn and run in order.
- The model is compiled into the deployed app. Per-session model overrides are rejected.
- Durable model-call usage is folded into turn and session usage with
attribution: "best_effort". Use it for visibility; the agent/org gateway is the hard spend-enforcement authority. - Generic
tokens,turn_seconds, andturnslimits are not yet enforced on the Flue execution path. Do not use them as a safety boundary for this runtime. - Archiving makes the OpenComputer session read-only but retains the Flue conversation in Durable Object storage. Each session is subject to Cloudflare’s 10 GB Durable Object storage limit.
Current limitations
- Dashboard sessions and the OpenComputer-managed Slack app deliver direct text through the hosted session wire. Native Flue channel bindings and workflows are not exposed by this hosting path.
- Working-repository checkout and pull-request publishing are available through the owner-bound OpenComputer GitHub App. Pull-request watches are not part of the current Flue profile.
- Repository deployment accepts one self-contained npm root with a committed npm lockfile. Pushes to its linked production branch deploy automatically; preview branches and staged Flue Workers are not supported.
- Each production push is re-inspected at its exact commit. Valid Flue changes—including the
entrypoint, model, variables, package, and app source—deploy within the pinned
flue-app-v1profile; removing or replacing that profile stops before build and leaves the active revision unchanged. - File and image attachments are not supported.
- The managed gateway currently supports Anthropic models and requires Managed model access for the organization. Per-session model selection is not supported.
- Worker code has a platform-managed outbound allowlist. Tenant-configurable egress is not available.
- Platform turn deadlines, maximum-turn enforcement, automatic conversation compaction, and automatic tenant-Worker rollback are not available yet.
- Subagents may execute inside Flue, but their event projection and lifecycle are outside the tested profile.
Troubleshooting
-
Repository inspection fails: confirm the GitHub App can read the repository, the selected
branch and root exist, and the root contains
agent.toml,package.json, andpackage-lock.json. - Managed install or build fails: open the deployment detail page. The safe error summary remains available even if log output was truncated; fix the source and push the production branch again.
-
flue buildis unavailable: runnpm installwith Node 22.19 or newer.oc agent deploynever downloads a missing build tool for you. -
Credential scan refuses the deploy: remove the reported key from source and store application
secrets with
oc agent secret set ... --from-stdin. - Deployment fails while verifying: the uploaded Worker did not reach a stable healthy response. Inspect the deployment error, correct the import-time or health-route failure, and deploy again.
-
Provider authentication fails on the first turn: confirm that Managed model access is active for
the organization and that the agent uses an
anthropic/...model. -
A skill is missing: import its
SKILL.mdwithwith { type: 'skill' }and include it in the agent’sskillsarray. -
A session shows an error or stops advancing: inspect the dashboard’s All events view or run
oc session logs <session-id>. Runtime failures are recorded without requiring a diagnostic redeployment.