Skip to content

feat(sprites): add Fly.io Sprites sandbox provider - #807

Open
Kyle McLaren (kylemclaren) wants to merge 3 commits into
langchain-ai:mainfrom
superfly:feat/sprites-sandbox-provider
Open

feat(sprites): add Fly.io Sprites sandbox provider#807
Kyle McLaren (kylemclaren) wants to merge 3 commits into
langchain-ai:mainfrom
superfly:feat/sprites-sandbox-provider

Conversation

@kylemclaren

@kylemclaren Kyle McLaren (kylemclaren) commented Aug 31, 2026

Copy link
Copy Markdown

This PR adds @langchain/sprites. This package is a sandbox backend for Fly.io Sprites. It implements the SandboxBackendProtocol. It has the same structure as the daytona and modal provider packages.

Sprites are persistent Linux VMs with names. A Sprite starts in 1 to 2 seconds. A Sprite stops automatically when it is idle. A stopped Sprite has no cost. A Sprite can make a checkpoint of the full machine state in less than one second. A Sprite can restore that checkpoint.

Contents

  • SpritesSandbox extends BaseSandbox. The execute() method runs commands with bash -lc. So pipes and glob patterns operate correctly. The uploadFiles() and downloadFiles() methods use the Sprites SDK filesystem API.
  • Persistence functions: SpritesSandbox.fromName() connects again to an applicable sandbox. checkpoint() and restore() roll back the full machine state. deleteAll(prefix) removes the test sandboxes in CI.
  • Factory functions that are the same as in the other providers (sync and async).
  • Tests: 54 unit tests with a mock SDK. The integration suite runs @langchain/sandbox-standard-tests and Sprites tests (reconnect, checkpoint, restore).
  • A changeset for an initial 0.1.0 release.
  • CI: one line supplies SPRITES_TOKEN to the test-int environment.

Test results

  • pnpm typecheck, pnpm build, pnpm format:check, pnpm lint, and pnpm test:unit pass.
  • The integration suite passes 98 of 98 tests against the live Sprites API.
  • The integration tests do not run when SPRITES_TOKEN is not set. This is the same pattern as in modal. CI stays green until the secret is available.

Note for maintainers

The integration tests need a SPRITES_TOKEN repository secret. Fly.io can supply the token.

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5489462

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@langchain/sprites Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security

socket-security Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​fly/​sprites@​0.2.17710010094100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

deepagents-acp

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/deepagents-acp@807

deepagents

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/deepagents@807

@langchain/sandbox-standard-tests

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/sandbox-standard-tests@807

@langchain/daytona

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/daytona@807

@langchain/deno

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/deno@807

@langchain/modal

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/modal@807

@langchain/node-vfs

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/node-vfs@807

@langchain/quickjs

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/quickjs@807

@langchain/sprites

npm i https://pkg.pr.new/langchain-ai/deepagentsjs/@langchain/sprites@807

commit: 5489462

Adds @langchain/sprites, a Fly.io Sprites backend implementing the
SandboxBackendProtocol. Sprites are persistent named Linux VMs with 1-2s
creation, idle suspend, and sub-second full-machine checkpoint/restore.

- execute() via bash -lc with configurable timeout and workdir
- uploadFiles/downloadFiles via the Sprites filesystem API
- fromName() reconnect to suspended sandboxes
- checkpoint()/restore() for rolling back agent changes
- deleteAll(prefix) for CI cleanup
- Standard-tests conformance suite passes (98/98) against the live API;
  integration tests skip when SPRITES_TOKEN is unset

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AfkkQ2YUcajyBqtcQ5FYBN
Pass SPRITES_TOKEN to the integration test job and add the sprites
scope to the PR title lint, matching the other provider packages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AfkkQ2YUcajyBqtcQ5FYBN
The Sprites documentation lives at docs.sprites.dev and the product
page at fly.io/sprites.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AfkkQ2YUcajyBqtcQ5FYBN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant