Skip to main content
Registry

File Systems

Mount these file systems as the root or at any sub-path inside the agent's environment.

Host Directory

Project a real host directory into the VM, Docker-style. The guest sees only the mounted subtree, never the wider host filesystem.

CategoryStatusDocs
File System Built in Guide

Configuration

Built into the SDK, with no separate install. Enable it in your VM config.

import { AgentOs } from "@rivet-dev/agentos-core";

const vm = await AgentOs.create({
  mounts: [
    {
      path: "/home/agentos/repo",
      plugin: { id: "host_dir", config: { hostPath: "/path/to/repo" } },
      readOnly: true,
    },
  ],
});

S3

Mount an S3-compatible bucket as a filesystem. File contents are chunked into S3 objects, keeping large files, partial reads/writes, and snapshots efficient.

CategoryStatusDocs
File System Built in Guide

Configuration

Built into the SDK, with no separate install. Enable it in your VM config.

import { AgentOs } from "@rivet-dev/agentos-core";

const vm = await AgentOs.create({
  mounts: [
    {
      path: "/home/agentos/data",
      plugin: {
        id: "chunked_s3",
        config: { bucket: "my-bucket", prefix: "agent-data/", region: "us-east-1" },
      },
    },
  ],
});

Google Drive

Mount a Google Drive folder as a filesystem for reading and writing documents and files.

CategoryStatusDocs
File System Built in Guide

Configuration

Built into the SDK, with no separate install. Enable it in your VM config.

import { AgentOs } from "@rivet-dev/agentos-core";

const vm = await AgentOs.create({
  mounts: [
    {
      path: "/home/agentos/drive",
      plugin: {
        id: "google_drive",
        config: {
          credentials: {
            clientEmail: process.env.GOOGLE_DRIVE_CLIENT_EMAIL!,
            privateKey: process.env.GOOGLE_DRIVE_PRIVATE_KEY!,
          },
          folderId: process.env.GOOGLE_DRIVE_FOLDER_ID!,
        },
      },
    },
  ],
});

In-Memory

Mount an ephemeral in-memory directory. Fast scratch space that is discarded when the VM is destroyed.

CategoryStatusDocs
File System Built in Guide

Configuration

Built into the SDK, with no separate install. Enable it in your VM config.

import { AgentOs } from "@rivet-dev/agentos-core";

const vm = await AgentOs.create({
  mounts: [
    // Ephemeral scratch space for large intermediate artifacts (build
    // output, downloads, caches). Lives in memory only and is discarded when
    // the VM is disposed.
    { path: "/tmp/scratch", plugin: { id: "memory", config: {} } },
  ],
});

Sandbox

Mount a sandbox filesystem and expose process management bindings. Works with any Sandbox Agent provider.

CategoryStatusPackageDocs
Bindings, File System Available @rivet-dev/agentos-sandbox Guide

Install

npm install @rivet-dev/agentos-core @rivet-dev/agentos-sandbox sandbox-agent

Add to agentOS

Mount the sandbox filesystem and register its host functions with @rivet-dev/agentos-sandbox.

import { AgentOs } from "@rivet-dev/agentos-core";
import { sandboxAgentProvider } from "@rivet-dev/agentos-sandbox";
import { docker } from "sandbox-agent/docker";

// Mount the sandbox filesystem and register its host functions in the VM
const vm = await AgentOs.create({
  sandbox: { provider: sandboxAgentProvider(docker()) },
});