Skip to main content
The VFS sandbox runs entirely locally using an in-memory virtual file system. No cloud services, Docker, or external dependencies required - perfect for development and testing. It uses node-vfs-polyfill which implements the upcoming Node.js VFS feature (nodejs/node#61478).

Setup

No authentication required.

Usage with deepagents

Standalone usage

Configuration

How it works

VFS uses a hybrid approach for maximum compatibility:
  1. File storage: Files are stored in-memory using a virtual file system
  2. Command execution: When executing commands, files sync to a temp directory, the command runs, and changes sync back to VFS
  3. Fallback mode: If node-vfs-polyfill is unavailable, falls back to using a temp directory for both storage and execution
This provides the benefits of in-memory storage (isolation, speed) while maintaining full shell command execution support.

File operations

Factory functions

Error handling

Error codes

When to use VFS

Best suited for:
  • Local development and testing
  • CI/CD pipelines without Docker
  • Quick prototyping without cloud setup
  • Environments where external services aren’t available
Not ideal for:
  • Production workloads requiring true container isolation
  • Persistent storage across sessions
  • Heavy computational tasks (no resource limits)

Future: Native Node.js VFS

This package uses node-vfs-polyfill which implements the upcoming Node.js VFS feature being developed in nodejs/node#61478. When the official node:vfs module lands in Node.js, this package will be updated to use the native implementation.