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.
Everything agents need to share state, react to changes, and work safely in parallel.
Fetch full contents or byte ranges with the same API across local and remote volumes.
Create, overwrite, append, and patch files safely from agents and tools.
Subscribe to file events and trigger follow-up work the moment something changes.
Mount the same workspace into multiple agents so they can collaborate on identical state.
Coordinate concurrent writes with explicit locks and conflict-aware workflows.
Control which agents can read, write, watch, or administer each path.
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.
Read files, watch directories, and attach metadata from TypeScript, Python, or straight HTTP. The primitives stay the same even when your harness changes.
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);
},
});Purpose-built shared storage for multi-agent systems.
No NFS setup, no homegrown sync daemon, no object-store glue code. Relayfile gives agents one coherent filesystem abstraction.
Create a volume, write a file, and start watching changes in minutes. The API is designed for immediate use from scripts and SDKs.
Use Relayfile from custom agent harnesses, MCP servers, background jobs, editors, or production services without changing the core model.
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.
curl -X POST https://api.agentrelay.dev/v1/volumes \
-H "authorization: Bearer $RELAY_API_KEY" \
-H "content-type: application/json" \
-d '{"name":"workspace"}'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."
}'curl "https://api.agentrelay.dev/v1/files/watch?volume=workspace&prefix=%2Fdocs" \
-H "authorization: Bearer $RELAY_API_KEY"Relayfile extends the Agent Relay platform with shared storage for agents that communicate, coordinate, and act on the same files.