Caution
Snapflow is very much in early development, and things may change or break without notice!
Isolated and fast sandbox environments for AI agents, code execution, automation and more.
Explore the docs »
Mothership
·
Report Bug
·
Request Feature
Table of Contents
Snapflow provides on-demand sandbox environments that are isolated, fast, and disposable. Each sandbox runs in its own container with full filesystem, process, git, and network access through a simple SDK.
Use cases include:
- Environments for AI Agents - give LLMs full access to a computer safely
- Code execution - run untrusted or user-submitted code without risk to your infrastructure
- Automation - spin up environments on the fly for CI tasks, testing, or data processing
- Scraping - automate browsers in order to scrape the web
- Development - create reproducible, throwaway environments for prototyping
- Rust
- TypeScript & Bun
- Docker
- React
- PostgreSQL
- Redis
- Cloudflare R2
Install the SDK:
npm install @snapflow/sdkCreate a sandbox and run code in it:
import { Snapflow } from "@snapflow/sdk";
const snapflow = new Snapflow();
const sandbox = await snapflow.sandbox().create();
// Run a command
const result = await sandbox.exec("echo 'Hello from Snapflow!'");
console.log(result.output);
// Write and read files
await sandbox.fs.uploadFile("/home/user/hello.txt", "Hello, world!");
const content = await sandbox.fs.downloadFile("/home/user/hello.txt");
// Clean up
await sandbox.destroy();Set your API key as an environment variable:
export snapflow_API_KEY="your-api-key"Or pass it directly:
const snapflow = new Snapflow({ apiKey: "your-api-key" });For more examples and full API reference, check the documentation.
Coming Soon
- Beta Release
- Self hosting guides and setup
See the open issues for a full list of proposed features (and known issues).
Snapflow is open source software licensed under AGPLv3. Contributions are welcome.
See CONTRIBUTING.md for development processes and how to propose changes, and CODE_OF_CONDUCT.md for community guidelines.
Distributed under the AGPLv3. See LICENSE for more information.