Workspace configuration
A workspace is constructed with mount paths mapped to resources. The README shows RAMResource() and S3Resource(S3Config(bucket="my-bucket")); a mount can also include a mode such as MountMode.EXEC or MountMode.WRITE.
| Configuration |
Purpose |
Workspace({...}) |
Creates the virtual workspace from mount paths and resources |
S3Config(bucket=...) |
Selects the S3 bucket for S3Resource |
MountMode.EXEC |
Mount mode used in the examples for executable access |
MountMode.WRITE |
Mount mode used in the examples for writable access |
runtimes=[...] |
Selects command runtimes; MontyRuntime(captures=["python", "python3"]) captures those command names |
ws.register_cli(name, implementation, config) |
Registers a CLI under a virtual-terminal head word |
The README also shows credentials supplied through resource or CLI configuration, including S3Config(...) and a Slack configuration containing token.
Commands and workspace operations
ws.execute("...") runs a shell command in the workspace. Documented examples use cp, grep, wc, pipes and redirected output. A script stored in a mounted resource can be invoked with python3, for example python3 /slack/...py > /redis/report.txt.
The command-line interface provides mirage workspace create, mirage execute, mirage provision, mirage workspace snapshot and mirage workspace load. The examples use --workspace_id, --command and --id, and save snapshots as .tar files. ws.snapshot("demo.tar") provides the SDK equivalent.
Resources and runtimes
The README lists mounts for RAM, disk, Redis, S3-compatible services, Gmail and Google Drive services, GitHub, Linear, Notion, Trello, Slack, Discord, email, MongoDB, Postgres, LanceDB, Qdrant and SSH. The upstream summary additionally identifies S3, Redis, Slack, Gmail, Notion and Postgres as DSH-mounted resources. Runtime choices include in-process monty, pyodide and quickjs, plus remote docker, e2b and daytona.
Requirements and platform
The documented SDK requirements are Python >=3.11 for mirage-ai, Node.js >=20 for the TypeScript SDK, and macOS or Linux. FUSE-based mounts require platform support. The TypeScript packages include @struktoai/mirage-node, @struktoai/mirage-browser and @struktoai/mirage-agents.
Written from the project's own documentation and kept in sync with it. Where the two disagree, the source is authoritative — read the README on GitHub