Skip to main content
Providers abstract how agents interact with the filesystem and shell. Instead of coupling tool logic to Node.js APIs, OpenHarness defines two interfaces — FsProvider and ShellProvider — that you can implement for any environment. This lets you run the same agent code locally, in a sandbox, or in the cloud, just by swapping the provider.

Interfaces

FsProvider

ShellProvider

Environment

The Environment type combines both providers:

Built-in Providers

NodeFsProvider

The default filesystem provider for Node.js environments. Uses node:fs under the hood.
Options:
Safety features:
  • File size guard — throws FileTooLargeError if a file exceeds maxFileSize
  • Auto-mkdirwriteFile creates parent directories automatically
  • Path resolution — relative paths are resolved from cwd

NodeShellProvider

The default shell provider for Node.js. Runs commands via bash -c.
Options:
The exec method supports per-call timeout (default 30s), cwd, and env overrides.

VfsFsProvider

A virtual filesystem provider from the @openharness/provider-vfs package. Provides sandboxed, in-memory, or SQLite-backed file access — ideal for testing, isolated execution, or environments without a real filesystem.
By default, VfsFsProvider uses an in-memory backend mounted at /workspace. It initializes lazily on first use. Options:

Storage Backends

The VFS provider supports three backends via @platformatic/vfs (or the future node:vfs):
In-memory filesystem — fast, ephemeral, no persistence:

Accessing the VFS Instance

For advanced use cases, you can access the underlying VirtualFileSystem:

Custom Providers

Implement the FsProvider and/or ShellProvider interfaces to support any environment:
Possible targets:
  • E2B sandboxes for isolated code execution
  • Cloudflare Workers for edge deployment
  • Daytona for managed dev environments
  • Docker containers for reproducible builds
  • Custom APIs wrapping remote filesystems