MirageThe World's First Virtual Terminal for AI Agents

Agents don't need a sandbox, they need the terminal they were trained on.

npm install @struktoai/mirage-node
npm install @struktoai/mirage-browser
const ws = new Workspace({
  '/tmp':   [new RAMVFS(), MountMode.EXEC],
  '/redis': [new RedisVFS({ url: redisUrl }), MountMode.WRITE],
  '/slack': [new SlackVFS({ token: slackToken }), MountMode.EXEC],
}, {
  runtimes: [buildRuntime('monty', { captures: ['python', 'python3'] }), 'workspace'],
})
// one grep sweeps every source
await ws.shell('grep -rln session /redis /tmp')
// run a script that lives in Slack, report into Redis
await ws.shell('python3 /slack/report.py > /redis/report.txt')
// read the report back with a POSIX-style call
const report = await ws.vfs.read('/redis/report.txt')
// a typed CLI under a head word, found by man and which
ws.registerCli('slack', SLACK, { token: slackToken })
await ws.shell('slack send-message --channel general --text "report is up"')

Virtual Terminal Overview

A Real Example

A real Mirage workspace, running in your browser.

mounts:
/slack:
vfs: slack?
config:
token:
search_token:
content_search: true?
mode: read
?

A real Mirage Virtual Terminal, running in browser?

A Unified Virtual Filesystem

S3, Google Drive, Slack, Gmail and more mount under one root, read with ls, grep and jq.

VFS

Virtual Command Line Tools

git, slack and ntn run inside the workspace, with nothing installed.

VFSVirtual CLI

The Mirage Shell

Pipes and redirection work across every mount, CLI and script.

$ grep -rl VFS | Virtual CLI | Script

Virtual Runtimes

Any command can run on any runtime, from Monty in process to a sandbox in the cloud.

$ grep -rl VFS | Virtual CLI | Script

Runtime

Policy Engine

A script decides whether each command runs, asks first or is refused, and where it runs.

Policy

$ grep -rl VFS | Virtual CLI | Script

Runtime

Authentication and Notifications

Credentials come from your secret store, and outside changes arrive as changes to files.

Authentication
Notifications
Policy

$ grep -rl VFS | Virtual CLI | Script

Runtime

Profiles and Agents

Each agent runs under a profile that decides what it can see and do.

Authentication
Notifications
Profile 1…
Policy

$ grep -rl VFS | Virtual CLI | Script

Runtime

Portability

Mirage runs in your server, in a browser tab, or as a real mountpoint.

Authentication
Notifications
Agents & Harness
Profile 1…
Policy

$ grep -rl VFS | Virtual CLI | Script

Runtime

Performance and Efficiency

AgentVFS's benchmark shows agents need far fewer tokens through a virtual filesystem than through MCP.

MCPRequests 0Tokens 0.00M
VFSRequests 0Tokens 0.00M
$
Token reduction
Up to 88%
Average success rate increase
+5.5%