Skip to content

docs: add Flue integration guide - #332

Merged
OndrejDrapalik merged 3 commits into
mainfrom
docs/flue-integration-guide
Aug 6, 2026
Merged

docs: add Flue integration guide#332
OndrejDrapalik merged 3 commits into
mainfrom
docs/flue-integration-guide

Conversation

@OndrejDrapalik

Copy link
Copy Markdown
Contributor

Summary

Flue (the agent framework from the Astro team) ships its E2B support as a blueprint — flue add sandbox e2b prints a Markdown guide that a coding agent applies, leaving the adapter in the user's repo as src/sandboxes/e2b.ts. There is no @e2b/flue package, so the page is written around that shape: scaffold, add the adapter, write a ~25-line agent, run it.

Changes

  • docs/agents/flue.mdx — new page: comparison against Flue's built-in bash() virtual sandbox and local(), project setup, the blueprint step, a one-agent/one-sandbox worked example, sandbox reuse across turns keyed on the agent instance id, custom templates, lifecycle ownership, and troubleshooting
  • docs.json — register the page in the Agents nav group, after Vercel Eve
  • images/icons/flue.svg — nav icon, traced from Flue's own mark

Verification

Everything on the page was executed in a throwaway project against live sandboxes (@flue/runtime 2.0.3, @flue/cli 2.0.3, e2b 2.38.0, Node 22.23.1 and 24.11.0):

  • flue init file list, flue add sandbox e2b --print, adapter written verbatim, tsc --noEmit clean
  • Agent run end to end: the bash tool returned real output from the sandbox, which was then visible via Sandbox.list({ query: { metadata: ... } })
  • Reuse across turns: turn two reconnected to the same sandbox id and read back the file turn one wrote
  • Every troubleshooting entry reproduced, including the one worth knowing about — the verbatim blueprint's exec() doesn't catch CommandExitError, so a failing command reaches the model as a bare exit status 1 with stderr dropped. The page carries the fix.
  • Rendered under mint dev: page, nav entry, icon, and internal links all resolve

Note: mint dev crashes on this repo before serving, on a pre-existing generated filename from openapi-public.yml (ENAMETOOLONG ... freeze-the-guest-rootfs-...mdx). Unrelated to this PR; the render check ran on a local copy with only that summary: shortened.

@mintlify

mintlify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
e2b 🟢 Ready View Preview Aug 5, 2026, 11:02 PM

Comment thread docs/agents/flue.mdx Outdated
query: { metadata: { flueInstance: options.id }, state: ['running', 'paused'] },
}).nextItems();

// connect() resets the timeout to E2B's 5-minute default, so set it again.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connect should not reset the timeout. It only extends it if timeout is shorter than used value.

@OndrejDrapalik OndrejDrapalik Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, had it backwards. Checked against prod: 20 min left stays 20 min whether or not I pass a timeout, and 1 min left gets bumped to 5. Fixed in 034eb94.

Heads up, persistence.mdx says the timeout resets on connect — that's where I got it from. Left it for a follow-up.

@OndrejDrapalik
OndrejDrapalik merged commit b2cb586 into main Aug 6, 2026
9 checks passed
@OndrejDrapalik
OndrejDrapalik deleted the docs/flue-integration-guide branch August 6, 2026 12:30
beran-t added a commit that referenced this pull request Aug 6, 2026
* docs: correct connect timeout behavior in persistence

Connecting to a sandbox does not reset its timeout - it only extends
the lifetime (new expiry is the later of the current expiry and now +
timeout). Verified against e2b-dev/infra (sandbox_connect.go passes
allowShorter=false) and both SDKs. Follow-up to #332.

* docs: reword timeout section to open with 'When connecting to a sandbox'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants