mirage
The World's First Virtual Terminal for AI Agents
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/strukto-ai/mirage with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/strukto-ai/mirage'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/strukto-ai--mirage)HTML
<a href="/listings/strukto-ai--mirage"><img src="/api/listings/strukto-ai--mirage/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
These steps run a script from the network that findsafeskills does not scan.
- **Python** ≥ 3.11 for the `mirage-ai` package and the `mirage` CLI - **Node.js** 22.20+ on Node 22, 24.12+ on Node 24, or 25+ for the TypeScript SDK
Python
uv add mirage-ai # installs the `mirage` library and the `mirage` CLI binary uv add 'mirage-ai[openai]' # OpenAI Agents adapter; each agent framework is an extra
TypeScript
npm install @struktoai/mirage-node # Node.js servers and CLIs npm install @struktoai/mirage-browser # browser / edge runtimes npm install @struktoai/mirage-vercel # Vercel AI adapter; each agent framework has its own package
Both runtime packages pull in `@struktoai/mirage-core` automatically.
CLI
curl -fsSL https://strukto.ai/mirage/install.sh | sh # or npm install -g @struktoai/mirage-cli # or uvx --from mirage-ai mirage # or npx @struktoai/mirage-cli
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 14 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "name": "mirage",
- "description": "Mirage filesystem tools and backend authoring skills for Claude Code.",
- "owner": {
- "name": "Strukto.AI"
- },
- "plugins": [
- {
- "name": "mirage",
- "source": "./plugins/mirage",
- "description": "Use Mirage-mounted cloud, database, and local data as a virtual filesystem."
- }
- ]
- }
README.md · README · 315 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- <h1 align="center">
- <a href="https://www.strukto.ai/mirage">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/mirage-header-dark.svg">
- <img src="assets/mirage-header-light.svg" width="100%" alt="Mirage: A Virtual Terminal for AI Agents" />
- </picture>
- </a>
- <a href="https://agentvfs.org">
- <picture>
- <source media="(max-width: 767px) and (prefers-color-scheme: dark)" srcset="assets/agentvfs-banner-narrow-dark.svg">
- <source media="(max-width: 767px)" srcset="assets/agentvfs-banner-narrow-light.svg">
- <source media="(prefers-color-scheme: dark)" srcset="assets/agentvfs-banner-dark.svg">
- <img src="assets/agentvfs-banner-light.svg" width="100%" alt="AgentVFS: the open, vendor-neutral virtual filesystem interface for AI agents" />
- </picture>
- </a>
- </h1>
- <p align="center">
- <a href="https://docs.mirage.strukto.ai" alt="Documentation">
- <img src="https://img.shields.io/badge/mirage-docs-0C0C0C?labelColor=F0ECE2" /></a>
- <a href="https://github.com/strukto-ai/mirage/releases" alt="Status">
- <img src="https://img.shields.io/badge/status-preview-0C0C0C?labelColor=F0ECE2" alt="Status: preview" /></a>
- <a href="https://www.strukto.ai" alt="Website">
- <img src="https://img.shields.io/badge/made by-strukto.ai-0C0C0C?labelColor=F0ECE2" /></a>
- <a href="https://github.com/strukto-ai/mirage/blob/main/LICENSE" alt="License">
- <img src="https://img.shields.io/badge/license-Apache--2.0-0C0C0C?labelColor=F0ECE2" /></a>
- <a href="https://doi.org/10.5281/zenodo.23504502" alt="DOI">
- <img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.23504502-0C0C0C?labelColor=F0ECE2" alt="DOI 10.5281/zenodo.23504502" /></a>
- <a href="https://discord.gg/u8BPQ65KsS" alt="Discord">
- <img src="https://img.shields.io/badge/discord-join-0C0C0C?labelColor=F0ECE2&logo=discord&logoColor=0C0C0C" /></a>
- <a href="assets/wechat-qr-code.jpg" aria-label="WeChat community">
- <img src="https://img.shields.io/badge/wechat-join-0C0C0C?labelColor=F0ECE2&logo=wechat&logoColor=0C0C0C" alt="WeChat community" /></a>
- <br/>
- <a href="https://docs.mirage.strukto.ai/python/quickstart" alt="Python docs">
- <img src="https://img.shields.io/badge/python-docs-0C0C0C?labelColor=F0ECE2&logo=python&logoColor=0C0C0C" alt="Python docs"></a>
- <a href="https://pypi.org/project/mirage-ai/" alt="PyPI Version">
- <img src="https://img.shields.io/pypi/v/mirage-ai.svg?color=0C0C0C&labelColor=F0ECE2"/></a>
- <br/>
- <a href="https://docs.mirage.strukto.ai/typescript/quickstart" alt="TypeScript docs">
- <img src="https://img.shields.io/badge/typescript-docs-0C0C0C?labelColor=F0ECE2&logo=typescript&logoColor=0C0C0C" alt="TypeScript docs"></a>
- <a href="https://www.npmjs.com/package/@struktoai/mirage-node" alt="NPM Version">
- <img src="https://img.shields.io/npm/v/@struktoai/mirage-node.svg?color=0C0C0C&labelColor=F0ECE2"/></a>
- </p>
- <p align="center">
- <a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-F0ECE2"></a>
- <a href="./readme/README.zh-CN.md"><img alt="简体中文 README" src="https://img.shields.io/badge/简体中文-F0ECE2"></a>
- <a href="./readme/README.zh-TW.md"><img alt="繁體中文 README" src="https://img.shields.io/badge/繁體中文-F0ECE2"></a>
- <a href="./readme/README.fr.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-F0ECE2"></a>
- <a href="./readme/README.de.md"><img alt="README auf Deutsch" src="https://img.shields.io/badge/Deutsch-F0ECE2"></a>
- <a href="./readme/README.vi.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-F0ECE2"></a>
- <a href="./readme/README.ko.md"><img alt="README 한국어" src="https://img.shields.io/badge/%ED%95%9C%EA%B5%AD%EC%96%B4-F0ECE2"></a>
- </p>
- AI agents work in a terminal. Mirage is **a virtual terminal** that separates the terminal interface, the data storage and the computing machines. Mirage routes each command to the machine that fits it, across heterogeneous machines such as containers, microVMs, cloud sandboxes and SSH hosts. Files, CLIs and machines are added to it separately, which keeps it flexible and its infrastructure cost low, and lets agents work in the most efficient and safest way.
- <p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/mirage-terminal-dark.svg">
- <img src="assets/mirage-terminal-light.svg" alt="Mirage over three virtual filesystems (S3, Slack, Google Drive), three virtual CLIs (gh, linear, deepwiki-mcp) and three VMs (Monty, an E2B sandbox, an EC2 GPU): one grep searches all three filesystems, the three CLIs feed one grep, and one pipeline runs a stage on each VM" width="100%">
- </picture>
- </p>
- - **Controllable.** Decide what each agent reaches, which files it sees, which credentials its virtual filesystems and CLIs use without showing them, and which machine runs each of its programs.
- - **Scriptable.** The whole terminal is defined in code or a config file, from its virtual filesystems, CLIs and machines to its rules, such as which commands need approval and how much output an agent gets back.
- - **Managed.** Mirage manages the virtual terminal's infrastructure, composed from the chosen backends. The virtual filesystem sits on S3, Drive, a database or RAM, jobs and history on RAM, Redis or disk, and whole workspaces can be saved as snapshots. Every command an agent runs is recorded and can be sent to an OpenTelemetry backend as a trace.
- <p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/mirage-arch-dark.svg">
- <img src="assets/mirage-arch-light.svg" alt="Mirage architecture: agents and harness reach profiles and the Mirage shell, which resolve Unix-like commands, virtual CLIs and programming languages onto machines, runtimes and the virtual filesystem, with service credentials, the policy engine and notifications alongside" width="100%">
- </picture>
- </p>
- Here is an example of launching Mirage inside an application:
- ```python
- ws = Workspace(
- {
- "/s3": (S3VFS(S3Config(bucket="my-bucket")), MountMode.WRITE),
- "/slack": (SlackVFS(SlackConfig(token=slack_bot_token)), MountMode.EXEC),
- "/gmail": (GmailVFS(GmailConfig(**google_credentials)), MountMode.READ),
- },
- # Install the Slack CLI, run by name and listed by `man` and `which` like any program
- clis={"slack": (SLACK, {"token": slack_bot_token})},
- # the analyst profile hides /s3/secrets and denies posting to Slack and curl
- profiles={
- "analyst": {
- "paths": {"hide": ["/s3/secrets"]},
- "commands": {"deny": ["slack send-message", "curl"]},
- },
- },
- # python runs in process on monty, or on the e2b sandbox
- machines={
- "py": {"provider": "in_process", "runtime": "monty"},
- "box": {"provider": "e2b", "sandbox_id": sandbox_id, "mount_type": "ssh", "captures": ["python", "python3"]},
- },
- # route the underlying computation: numpy lines run on the machine, the rest on monty
- route_policy=lambda ctx: "box" if "numpy" in ctx.line else None,
- )
- # Add an agent using the analyst profile
- alice = await ws.session("alice", profile="analyst")
- # one grep sweeps S3, Slack and Gmail, on each service's own search where it has one
- await alice.shell("grep -rlw invoice /s3 /slack /gmail")
- # run a script that lives in Slack on monty, file the report into S3
- await alice.shell("python3 /slack/channels/general__C0123/2026-10-21/files/report__F0456.py > /s3/report.txt")
- # numpy is not in monty, so the route policy sends this line to e2b
- await alice.shell("python3 -c 'import numpy; print(numpy.arange(10).sum())'")
- ```
- And what `alice` sees in the shell:
- ```console
- $ grep -rlw invoice /s3 /slack /gmail
- /s3/billing/2026-10.csv
- /gmail/INBOX/2026-10-21/Invoice_1042__18f3a9c2b7d1e0f4.gmail.json
- $ ls /s3
- billing
- report.txt
- $ cat /s3/secrets/aws.txt
- cat: /s3/secrets/aws.txt: No such file or directory
- $ slack send-message --channel general --text "report is up"
- slack: Permission denied
- ```
- ## About
- - **Unified virtual terminal interface, not N SDKs and M MCPs.** Every backend speaks the same filesystem semantics, so pipelines compose across services.
- - **A virtual filesystem over every source.** S3, Google Drive, Slack, Gmail, Redis and the rest mount side by side under one root, so an agent reaches all of them through a unified interface with the unix tools it already knows, like `ls`, `grep`, `find` and `jq`.
- - **Virtual command line tools (CLIs).** `git`, `slack` and `ntn` are answered by Mirage itself, so an agent drives the service with nothing installed, across different runtimes and machines, and one tool can be virtualized into two or more, each under its own name with its own credentials.
- - **Routed, dynamic machines.** Python, JavaScript and any other command can be sent to a configured machine, in process, sandboxed or remote, which decouples computation from storage and lets either change without touching the other.
- - **The virtualized Mirage shell.** It binds the filesystem, the CLIs and the machines into one command line, so pipes, redirection, variables, jobs and history work across all three.
- - **Lightweight by design.** A workspace, the virtual terminal itself, takes about 100 KB of memory and each new session about 10 KB, so one process serves many agents without a container or VM per agent.
- - **Profiles designed for agents.** `allow`, `ask` and `deny` govern commands and CLIs, while `hide` and `show` govern files and folders, so a hidden path is not merely unreadable but absent from the filesystem the agent sees.
- - **A scriptable policy engine.** A policy script can prohibit any dangerous action before it runs, and the same stack gates every VFS op and session write, so neither a file nor an environment variable leaks.
- - **Notifications wired into the VFS and agents.** External changes become an event stream on the mount, so a new Slack reply surfaces as a change to the chat file in the virtual filesystem, and the agent reacts to it instead of rescanning the tree.
- ## Virtual Filesystem
- Everything [Mirage](https://www.strukto.ai/mirage) "mounts" as one unified virtual filesystem for AI agents. Each
- service sits side-by-side under a single root and answers the same POSIX semantics.
- | | VFS |
- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
- | **Object Storage** | <a href="https://docs.mirage.strukto.ai/home/setup/s3"><img src="https://api.iconify.design/logos/aws-s3.svg" width="20" height="20" alt="Amazon S3" title="Amazon S3" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/r2"><img src="https://cdn.simpleicons.org/cloudflare" width="20" height="20" alt="Cloudflare R2" title="Cloudflare R2" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/gcs"><img src="https://api.iconify.design/logos/google-cloud.svg" width="25" height="20" alt="Google Cloud Storage" title="Google Cloud Storage" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/oci"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/oracle.svg" width="32" height="20" alt="Oracle OCI" title="Oracle OCI" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/supabase"><img src="https://api.iconify.design/logos/supabase-icon.svg" width="19" height="20" alt="Supabase Storage" title="Supabase Storage" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/minio"><img src="https://cdn.simpleicons.org/minio" width="20" height="20" alt="MinIO" title="MinIO" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/ceph"><img src="https://cdn.simpleicons.org/ceph" width="20" height="20" alt="Ceph" title="Ceph" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/seaweedfs"><img src="assets/icons/seaweedfs.svg" width="20" height="20" alt="SeaweedFS" title="SeaweedFS" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/wasabi"><img src="https://cdn.simpleicons.org/wasabi" width="20" height="20" alt="Wasabi" title="Wasabi" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/backblaze"><img src="https://cdn.simpleicons.org/backblaze" width="20" height="20" alt="Backblaze B2" title="Backblaze B2" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/digitalocean"><img src="https://cdn.simpleicons.org/digitalocean" width="20" height="20" alt="DigitalOcean Spaces" title="DigitalOcean Spaces" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/aliyun"><img src="https://cdn.simpleicons.org/alibabacloud" width="20" height="20" alt="Alibaba Cloud OSS" title="Alibaba Cloud OSS" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/tencent"><img src="assets/icons/tencent.png" width="20" height="20" alt="Tencent Cloud COS" title="Tencent Cloud COS" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/scaleway"><img src="https://cdn.simpleicons.org/scaleway" width="20" height="20" alt="Scaleway" title="Scaleway" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/qingstor"><img src="assets/icons/qingstor.png" width="20" height="20" alt="QingStor" title="QingStor" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/hf_buckets"><img src="https://cdn.simpleicons.org/huggingface" width="20" height="20" alt="Hugging Face Buckets" title="Hugging Face Buckets" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/gridfs"><img src="https://cdn.simpleicons.org/mongodb" width="20" height="20" alt="GridFS" title="GridFS" /></a> |
- | **Files and Documents** | <a href="https://docs.mirage.strukto.ai/home/setup/google"><img src="https://cdn.simpleicons.org/googledrive" width="20" height="20" alt="Google Drive" title="Google Drive" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/google"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/google-docs.svg" width="14" height="20" alt="Google Docs" title="Google Docs" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/google"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/google-sheets.svg" width="15" height="20" alt="Google Sheets" title="Google Sheets" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/google"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/google-slides.svg" width="15" height="20" alt="Google Slides" title="Google Slides" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/onedrive"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/microsoft-onedrive.svg" width="30" height="20" alt="OneDrive" title="OneDrive" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/sharepoint"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/microsoft-sharepoint.svg" width="20" height="20" alt="SharePoint" title="SharePoint" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/box"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/box.svg" width="20" height="20" alt="Box" title="Box" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/dropbox"><img src="https://cdn.simpleicons.org/dropbox" width="20" height="20" alt="Dropbox" title="Dropbox" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/nextcloud"><img src="https://cdn.simpleicons.org/nextcloud" width="20" height="20" alt="Nextcloud" title="Nextcloud" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/tidb"><img src="https://cdn.simpleicons.org/tidb" width="20" height="20" alt="TiDB Cloud Filesystem" title="TiDB Cloud Filesystem" /></a> |
- | **Messaging and Work** | <a href="https://docs.mirage.strukto.ai/home/setup/slack"><img src="https://api.iconify.design/logos/slack-icon.svg" width="20" height="20" alt="Slack" title="Slack" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/discord"><img src="https://cdn.simpleicons.org/discord" width="20" height="20" alt="Discord" title="Discord" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/google"><img src="https://cdn.simpleicons.org/gmail" width="20" height="20" alt="Gmail" title="Gmail" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/email"><img src="https://api.iconify.design/lucide/mail.svg?color=%23888888" width="20" height="20" alt="IMAP / SMTP email" title="IMAP / SMTP email" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/github"><img src="https://cdn.simpleicons.org/github/181717/e6edf3" width="20" height="20" alt="GitHub" title="GitHub" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/linear"><img src="https://cdn.simpleicons.org/linear" width="20" height="20" alt="Linear" title="Linear" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/notion"><img src="https://cdn.simpleicons.org/notion/000000/e6edf3" width="20" height="20" alt="Notion" title="Notion" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/trello"><img src="https://cdn.simpleicons.org/trello" width="20" height="20" alt="Trello" title="Trello" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/gcal"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/google-calendar.svg" width="20" height="20" alt="Google Calendar" title="Google Calendar" /></a> |
- | **Databases and Data Platforms** | <a href="https://docs.mirage.strukto.ai/home/setup/postgres"><img src="https://cdn.simpleicons.org/postgresql" width="20" height="20" alt="PostgreSQL" title="PostgreSQL" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/mongodb"><img src="https://cdn.simpleicons.org/mongodb" width="20" height="20" alt="MongoDB" title="MongoDB" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/redis"><img src="https://cdn.simpleicons.org/redis" width="20" height="20" alt="Redis" title="Redis" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/redis"><img src="https://cdn.simpleicons.org/upstash" width="20" height="20" alt="Upstash Redis" title="Upstash Redis" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/sql"><img src="https://api.iconify.design/lucide/database.svg?color=%23888888" width="20" height="20" alt="SQL" title="SQL" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/airtable"><img src="https://cdn.simpleicons.org/airtable" width="20" height="20" alt="Airtable" title="Airtable" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/lancedb"><img src="assets/icons/lancedb.png" width="20" height="20" alt="LanceDB" title="LanceDB" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/qdrant"><img src="https://cdn.simpleicons.org/qdrant" width="20" height="20" alt="Qdrant" title="Qdrant" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/chroma"><img src="https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/chroma.svg" width="31" height="20" alt="Chroma" title="Chroma" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/mem0"><img src="docs/images/mem0.svg" width="20" height="20" alt="Mem0" title="Mem0" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/hf_datasets"><img src="https://cdn.simpleicons.org/huggingface" width="20" height="20" alt="Hugging Face Datasets" title="Hugging Face Datasets" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/hf_models"><img src="https://cdn.simpleicons.org/huggingface" width="20" height="20" alt="Hugging Face Models" title="Hugging Face Models" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/hf_spaces"><img src="https://cdn.simpleicons.org/huggingface" width="20" height="20" alt="Hugging Face Spaces" title="Hugging Face Spaces" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/databricks"><img src="https://cdn.simpleicons.org/databricks" width="20" height="20" alt="Databricks Volumes" title="Databricks Volumes" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/dify"><img src="https://cdn.simpleicons.org/dify" width="20" height="20" alt="Dify" title="Dify" /></a> |
- | **Observability** | <a href="https://docs.mirage.strukto.ai/home/setup/langfuse"><img src="docs/images/langfuse-logo.svg" width="20" height="20" alt="Langfuse" title="Langfuse" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/jaeger"><img src="https://cdn.simpleicons.org/jaeger" width="20" height="20" alt="Jaeger" title="Jaeger" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/wandb"><img src="https://cdn.simpleicons.org/weightsandbiases" width="20" height="20" alt="Weights & Biases" title="Weights & Biases" /></a> |
- | **Local and Remote** | <a href="https://docs.mirage.strukto.ai/home/setup/ram"><img src="https://api.iconify.design/lucide/memory-stick.svg?color=%23888888" width="20" height="20" alt="RAM" title="RAM" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/disk"><img src="https://api.iconify.design/lucide/hard-drive.svg?color=%23888888" width="20" height="20" alt="Disk" title="Disk" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/opfs"><img src="https://api.iconify.design/lucide/folder-lock.svg?color=%23888888" width="20" height="20" alt="OPFS" title="OPFS" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/ssh"><img src="docs/images/ssh-logo.svg" width="20" height="20" alt="SSH" title="SSH" /></a> |
- Agents reach it through the Python and TypeScript SDKs, the `mirage` CLI, or a real
- mountpoint over FUSE and FSKit, then work it with the unix tools they already know,
- like `ls`, `grep`, `find` and `jq`.
- ## Virtual Command Line Tool
- These command line tools are virtualized: [Mirage](https://www.strukto.ai/mirage) answers `git`, `slack` or `ntn`
- itself, so an agent drives the service without that program being installed on the
- machine. Each one mimics the real tool, so an agent that knows the CLI needs nothing
- new. Because they are virtual, the same tool can be installed more than once under
- different names, each with its own credentials, so every agent gets exactly the
- accounts it is given.
- | | CLIs |
- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
- | **Code** | <a href="https://docs.mirage.strukto.ai/home/setup/cli/git"><img src="https://cdn.simpleicons.org/git" width="20" height="20" alt="git" title="git" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/gh"><img src="https://cdn.simpleicons.org/github/181717/e6edf3" width="20" height="20" alt="gh" title="gh" /></a> |
- | **Communication** | <a href="https://docs.mirage.strukto.ai/home/setup/cli/slack"><img src="https://api.iconify.design/logos/slack-icon.svg" width="20" height="20" alt="slack" title="slack" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/discord"><img src="https://cdn.simpleicons.org/discord" width="20" height="20" alt="discord" title="discord" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/himalaya"><img src="assets/icons/himalaya.png" width="20" height="20" alt="himalaya" title="himalaya" /></a> |
- | **Work and Data** | <a href="https://docs.mirage.strukto.ai/home/setup/cli/linear"><img src="https://cdn.simpleicons.org/linear" width="20" height="20" alt="linear" title="linear" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/ntn"><img src="https://cdn.simpleicons.org/notion/000000/e6edf3" width="20" height="20" alt="ntn" title="ntn" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/trello"><img src="https://cdn.simpleicons.org/trello" width="20" height="20" alt="trello" title="trello" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/airtable"><img src="https://cdn.simpleicons.org/airtable" width="20" height="20" alt="airtable" title="airtable" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/gws"><img src="https://cdn.simpleicons.org/google" width="20" height="20" alt="gws" title="gws" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/hf"><img src="https://cdn.simpleicons.org/huggingface" width="20" height="20" alt="hf" title="hf" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/office"><img src="https://api.iconify.design/lucide/file-spreadsheet.svg?color=%23888888" width="20" height="20" alt="office" title="office" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/pdftotext"><img src="https://api.iconify.design/lucide/file-text.svg?color=%23888888" width="20" height="20" alt="pdftotext" title="pdftotext" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/cli/pdfinfo"><img src="https://api.iconify.design/lucide/file-search.svg?color=%23888888" width="20" height="20" alt="pdfinfo" title="pdfinfo" /></a> |
- ## Virtual Machine
- Machines are virtualized the same way, and not only for coding languages. Any
- command on the line can be sent to a configured machine, so Python might run
- in-process with [Monty](https://pydantic.dev/articles/pydantic-monty) while
- another command, say `kubectl`, runs on a remote machine over SSH. Which machine
- serves a given line can be decided by a
- [scripted machine router](https://docs.mirage.strukto.ai/home/policy/route-machine).
- | | Machines |
- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
- | **Python** | <a href="https://docs.mirage.strukto.ai/home/setup/runtime/monty"><img src="https://cdn.simpleicons.org/pydantic" width="20" height="20" alt="Monty" title="Monty" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/runtime/wasi"><img src="https://cdn.simpleicons.org/webassembly" width="20" height="20" alt="WASI CPython on wasmtime" title="WASI CPython on wasmtime" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/runtime/pyodide"><img src="assets/icons/pyodide.svg" width="56" height="20" alt="Pyodide" title="Pyodide" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/host"><img src="docs/images/sandlock-logo.svg" width="20" height="20" alt="sandlock" title="sandlock" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/host"><img src="https://cdn.simpleicons.org/python" width="20" height="20" alt="Host CPython" title="Host CPython" /></a> |
- | **JavaScript** | <a href="https://docs.mirage.strukto.ai/home/setup/runtime/quickjs"><img src="assets/icons/quickjs.png" width="20" height="20" alt="QuickJS, serving node and js" title="QuickJS, serving node and js" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/runtime/quickjs"><img src="https://cdn.simpleicons.org/javascript" width="20" height="20" alt="JavaScript" title="JavaScript" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/runtime/quickjs"><img src="https://cdn.simpleicons.org/typescript" width="20" height="20" alt="TypeScript" title="TypeScript" /></a> |
- | **Machines** | <a href="https://docs.mirage.strukto.ai/home/setup/machine/docker"><img src="https://cdn.simpleicons.org/docker" width="20" height="20" alt="Docker" title="Docker" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/kubernetes"><img src="https://cdn.simpleicons.org/kubernetes" width="20" height="20" alt="Kubernetes" title="Kubernetes" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/e2b"><img src="docs/images/e2b-logo.svg" width="20" height="20" alt="E2B" title="E2B" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/daytona"><img src="docs/images/daytona-logo.svg" width="20" height="20" alt="Daytona" title="Daytona" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/cloudflare_container"><img src="https://cdn.simpleicons.org/cloudflare" width="20" height="20" alt="Cloudflare Container" title="Cloudflare Container" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/boxd"><img src="docs/images/boxd-logo.svg" width="20" height="20" alt="boxd" title="boxd" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/smolvm"><img src="docs/images/smolvm-logo.svg" width="20" height="20" alt="smolVM" title="smolVM" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/microsandbox"><img src="docs/images/microsandbox-logo.svg" width="20" height="20" alt="Microsandbox" title="Microsandbox" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/apple_container"><img src="https://cdn.simpleicons.org/apple/000000/e6edf3" width="20" height="20" alt="Apple Container" title="Apple Container" /></a> <a href="https://docs.mirage.strukto.ai/home/setup/machine/ssh"><img src="docs/images/ssh-logo.svg" width="20" height="20" alt="SSH" title="SSH" /></a> |
- ## Security
- A profile decides what a session may run and what it may see. Commands are governed
- by customizable `allow`, `ask` and `deny` rules, and paths by `hide` and `show`, so a
- hidden file is not merely unreadable but absent from the filesystem the agent sees.
- For anything those rules cannot express, a profile can name a policy script that runs
- at the gate on every command and answers allow, deny or ask itself, though like every
- rule it can only restrict and never grant. Separately, a host can register its own
- policies on the [policy engine](https://docs.mirage.strukto.ai/home/policy/policies), an
- ordered stack the workspace consults on every command, VFS op and session write. See
- the [policy docs](https://docs.mirage.strukto.ai/home/policy/overview).
- ## Service Credentials
- Service credentials integrate with the stores secrets already live in,
- including AWS Secrets Manager, 1Password and dotenv, so an environment variable
- in Mirage can resolve straight to a credential held in one of them.
- | | Sources |
- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
- | **Built in** | <a href="https://docs.mirage.strukto.ai/home/service-credentials#sources"><img src="assets/icons/terminal.svg" width="20" height="20" alt="Environment" title="Environment" /></a> <a href="https://docs.mirage.strukto.ai/home/service-credentials#sources"><img src="https://cdn.simpleicons.org/dotenv" width="20" height="20" alt="dotenv" title="dotenv" /></a> |
- | **Custom** | <a href="https://docs.mirage.strukto.ai/home/service-credentials/1password"><img src="https://cdn.simpleicons.org/1password" width="20" height="20" alt="1Password" title="1Password" /></a> <a href="https://docs.mirage.strukto.ai/home/service-credentials/aws-secrets-manager"><img src="https://api.iconify.design/logos/aws-secrets-manager.svg" width="20" height="20" alt="AWS Secrets Manager" title="AWS Secrets Manager" /></a> |
- ## Installation
- - **Python** ≥ 3.12 for the `mirage-ai` package and the `mirage` CLI
- - **Node.js** 22.20+ on Node 22, 24.12+ on Node 24, or 25+ for the TypeScript SDK
- ### Python
- ```bash
- uv add mirage-ai # installs the `mirage` library and the `mirage` CLI binary
- uv add 'mirage-ai[openai]' # OpenAI Agents adapter; each agent framework is an extra
- uv add 'mirage-ai[monty]' # Monty, the in-process Python runtime the examples run on
- ```
- ### TypeScript
- ```bash
- npm install @struktoai/mirage-node # Node.js servers and CLIs
- npm install @struktoai/mirage-browser # browser / edge runtimes
- ```
- Both runtime packages pull in `@struktoai/mirage-core` automatically.
- ### CLI
- ```bash
- npm install -g @struktoai/mirage-cli
- # or
- uvx --from mirage-ai mirage
- # or
- npx @struktoai/mirage-cli
- ```
- To get started, see the quickstarts for
- [Python](https://docs.mirage.strukto.ai/python/quickstart),
- [TypeScript](https://docs.mirage.strukto.ai/typescript/quickstart) and the
- [CLI](https://docs.mirage.strukto.ai/home/access/cli).
- ## Scriptable Policy
- A profile can name policy scripts for what its rules cannot express. A script's
- `pre_command` takes the command, can open the files it names, and returns a
- deny, an ask or `None`. This one disables `rm`, and a Python script whose code
- deletes files:
- ```python
- def deletes(path):
- try:
- code = open(path).read()
- except OSError:
- return False
- return any(call in code for call in ("os.remove", "os.unlink", "shutil.rmtree"))
- def pre_command(ctx):
- if ctx["command"] == "rm" or (
- ctx["command"].startswith("python") and any(deletes(p) for p in ctx["paths"])
- ):
- return {"kind": "deny", "reason": "deleting files is disabled"}
- ```
- Register it in a profile, here to run on Monty before every command:
- ```python
- ws = Workspace(
- {"/s3": (S3VFS(S3Config(bucket="my-bucket")), MountMode.WRITE)},
- profiles={
- "analyst": {
- "policy": {
- "pre_command": [{"script": ScriptSource(Path("guard.py").read_text()), "runtime": "monty"}],
- },
- },
- },
- profile="analyst",
- )
- ```
- ```console
- $ cat /s3/clean.py
- import os
- os.remove("/s3/report.txt")
- $ rm /s3/report.txt
- rm: Permission denied
- $ python3 /s3/clean.py
- python3: Permission denied
- ```
- See [policy scripts](https://docs.mirage.strukto.ai/home/policy/scripts) for
- the other stages a script can answer at.
- ## Examples
- - **[In-Process Terminal](https://docs.mirage.strukto.ai/home/examples/in-process-terminal).** A terminal for agents inside your application, even within a FastAPI or Express server, without a fixed machine or sandbox.
- - **[Multi-machine Terminal](https://docs.mirage.strukto.ai/home/examples/multi-machine-terminal).** A unified virtual terminal across different machines that runs each task on the machine that fits it, so AI agents perform tasks more efficiently and at lower cost.
- - **[Secured Terminal](https://docs.mirage.strukto.ai/home/examples/secured-terminal).** Decide which files an agent sees, which commands and CLIs it runs and which credentials its tools use, in one workspace config.
- - **[Infra-agnostic Terminal](https://docs.mirage.strukto.ai/home/examples/infra-agnostic-terminal).** A virtual terminal not tied to any fixed infrastructure, keeping its files, sessions and command logs on whichever backends are already in place.
- ## Contributors
- Thanks to everyone who has contributed to Mirage.
- <a href="https://github.com/strukto-ai/mirage/graphs/contributors">
- <img src="https://contrib.rocks/image?repo=strukto-ai/mirage" alt="Mirage contributors" />
- </a>
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.