HEADLESS FILESYSTEM FOR AGENTS

Files
for agents

Relayfile gives AI agents one place to read, write, watch, and coordinate files. Shared volumes, locks, metadata, and realtime change events let multi-agent systems work on the same state without building storage plumbing first.

relayfile workspace
workspaceshared volume
/planswatching
brief.mdupdated 2s ago
tasks.jsonlocked by Builder
deploy.logstreaming
WATCH/plans
WRITE/docs/spec.md
LOCK/tasks.json

Filesystem primitives for agent coordination

Everything agents need to share state, react to changes, and work safely in parallel.

01

Read Files

Fetch full contents or byte ranges with the same API across local and remote volumes.

02

Write Files

Create, overwrite, append, and patch files safely from agents and tools.

03

Watch Changes

Subscribe to file events and trigger follow-up work the moment something changes.

04

Shared Volumes

Mount the same workspace into multiple agents so they can collaborate on identical state.

05

File Locking

Coordinate concurrent writes with explicit locks and conflict-aware workflows.

06

Permissions

Control which agents can read, write, watch, or administer each path.

Works with every AI tool

Use Relayfile from coding agents, task runners, MCP hosts, CI, or your own orchestration layer. If it can make HTTP calls, it can share files through Relayfile.

Claude CodeCodexGemini CLIOpenCodeCopilotAiderGooseCustom agents
SDK

One API surface across every client

Read files, watch directories, and attach metadata from TypeScript, Python, or straight HTTP. The primitives stay the same even when your harness changes.

Typed APIs for file reads, writes, watches, and metadata.
Works cleanly in app servers, workers, and agent harnesses.
Matches the same resource model as the HTTP API.
TypeScript
import { Relayfile } from '@agent-relay/relayfile';

const relayfile = new Relayfile({
  apiKey: process.env.RELAY_API_KEY,
});

await relayfile.files.write({
  volume: 'workspace',
  path: '/plans/launch.md',
  content: '# Launch plan\n\n- ship relayfile',
});

const notes = await relayfile.files.read({
  volume: 'workspace',
  path: '/plans/launch.md',
});

const stream = await relayfile.watch.subscribe({
  volume: 'workspace',
  prefix: '/plans',
  onEvent(event) {
    console.log(event.type, event.path);
  },
});

Why Relayfile

Purpose-built shared storage for multi-agent systems.

01

Zero infrastructure

No NFS setup, no homegrown sync daemon, no object-store glue code. Relayfile gives agents one coherent filesystem abstraction.

02

Instant setup

Create a volume, write a file, and start watching changes in minutes. The API is designed for immediate use from scripts and SDKs.

03

Framework-agnostic

Use Relayfile from custom agent harnesses, MCP servers, background jobs, editors, or production services without changing the core model.

Get started in three requests

Create a workspace, write shared state, and subscribe to file changes. Relayfile is designed to be useful before you build any additional abstractions around it.

01

Create a volume

curl -X POST https://api.agentrelay.dev/v1/volumes \
  -H "authorization: Bearer $RELAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"workspace"}'
02

Write a file

curl -X PUT https://api.agentrelay.dev/v1/files/content \
  -H "authorization: Bearer $RELAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "volume":"workspace",
    "path":"/docs/spec.md",
    "content":"# Relayfile\n\nShared state for agents."
  }'
03

Watch for changes

curl "https://api.agentrelay.dev/v1/files/watch?volume=workspace&prefix=%2Fdocs" \
  -H "authorization: Bearer $RELAY_API_KEY"
Powered by Agent Relay

Relayfile extends the Agent Relay platform with shared storage for agents that communicate, coordinate, and act on the same files.