Installation
Install the Node runtime:npm install @struktoai/mirage-node and yarn add @struktoai/mirage-node work too.
Create a Workspace
Start with the RAM VFS so you can try Mirage without credentials.Run Commands
Once a VFS is mounted, you can use Mirage like a shell over your virtual filesystem:Output Limits
To keep huge reads from flooding an agent,cat, grep, rg, head, and
tail cap their output at 2000 lines, and every command stops after 600
seconds. When a cap fires, the agent sees the truncated output plus a stderr
notice (cat: output truncated at limit (2000 lines); ...).
Set your own limits in three places. A mount’s third tuple element covers
commands that run on it, commandLimits is the default for every session,
and a profile’s commandLimits applies to sessions created with it:
timeoutSeconds if you still want a deadline; commands it does not name keep
their defaults.
maxLines/maxBytescap the output;nullmeans no cap.timeoutSecondsis a deadline; a command that runs past it exits 124.onExceed: OnExceed.TRUNCATE(default) keeps the capped output, adds a stderr notice, and leaves the exit code alone.ERRORdrops the output and exits 1, so&&and||see the failure.
cat big.txt; echo end still prints end. Data going into a pipe, a
redirect, or $(...) is never cut, so cat big.txt | wc -l counts every
line. The workspace YAML takes the same fields, in snake_case, under
command_limits; see
Command limits.
Workspace documents and sessions
See Workspace to expose optional, profile-aware/VFS.md and /SKILL.md files and change a session’s profile through the application API, CLI or HTTP.
Next Steps
- See TypeScript Installation for optional native peers (FUSE, Redis, Postgres, MongoDB, SSH, Email).
- Browse TypeScript Agents to wire Mirage into OpenAI Agents SDK, Vercel AI SDK, LangChain, Mastra, and more.
- Pick a real backend from the VFS section, such as S3, Slack, or Discord.