Metadata-Version: 2.4
Name: mirage-ai
Version: 0.1.0a4
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: aiofiles>=24.1.0
Requires-Dist: aiohttp>=3.14.4
Requires-Dist: fastapi>=0.135.1
Requires-Dist: httpx[socks]>=0.28.1
Requires-Dist: python-multipart>=0.0.27
Requires-Dist: orjson>=3.11
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: typer>=0.12.0
Requires-Dist: uvicorn[standard]>=0.41.0
Requires-Dist: pyjwt[crypto]>=2.14.0
Requires-Dist: dulwich>=1.2.9
Requires-Dist: tenacity>=9.1.4
Requires-Dist: mcp>=2.3.0,<3
Requires-Dist: jsonschema>=4.26.0
Requires-Dist: multidict>=6.0
Requires-Dist: limits>=5.8.0
Requires-Dist: opentelemetry-api>=1.45.2
Requires-Dist: onepassword-sdk>=0.4.1 ; extra == '1password'
Requires-Dist: agno>=3.1.10 ; extra == 'agno'
Requires-Dist: mirage-ai[s3] ; extra == 'all'
Requires-Dist: mirage-ai[r2] ; extra == 'all'
Requires-Dist: mirage-ai[gcs] ; extra == 'all'
Requires-Dist: mirage-ai[oci] ; extra == 'all'
Requires-Dist: mirage-ai[ssh] ; extra == 'all'
Requires-Dist: mirage-ai[nextcloud] ; extra == 'all'
Requires-Dist: mirage-ai[hf-buckets] ; extra == 'all'
Requires-Dist: mirage-ai[fuse] ; extra == 'all'
Requires-Dist: mirage-ai[mongodb] ; extra == 'all'
Requires-Dist: mirage-ai[gridfs] ; extra == 'all'
Requires-Dist: mirage-ai[postgres] ; extra == 'all'
Requires-Dist: mirage-ai[redis] ; extra == 'all'
Requires-Dist: mirage-ai[email] ; extra == 'all'
Requires-Dist: mirage-ai[dotenv] ; extra == 'all'
Requires-Dist: mirage-ai[aws-sm] ; extra == 'all'
Requires-Dist: mirage-ai[1password] ; extra == 'all'
Requires-Dist: mirage-ai[langfuse] ; extra == 'all'
Requires-Dist: mirage-ai[mem0] ; extra == 'all'
Requires-Dist: mirage-ai[chroma] ; extra == 'all'
Requires-Dist: mirage-ai[qdrant] ; extra == 'all'
Requires-Dist: mirage-ai[openai] ; extra == 'all'
Requires-Dist: mirage-ai[pydantic-ai] ; extra == 'all'
Requires-Dist: mirage-ai[deepagents] ; extra == 'all'
Requires-Dist: mirage-ai[agno] ; extra == 'all'
Requires-Dist: mirage-ai[claude-agent-sdk] ; extra == 'all'
Requires-Dist: mirage-ai[claude-managed-agents] ; extra == 'all'
Requires-Dist: mirage-ai[boxd] ; extra == 'all'
Requires-Dist: mirage-ai[daytona] ; extra == 'all'
Requires-Dist: mirage-ai[e2b] ; extra == 'all'
Requires-Dist: wasmtime>=46 ; extra == 'ast-grep'
Requires-Dist: aioboto3>=15.5.0 ; extra == 'aws-sm'
Requires-Dist: botocore>=1.40.61 ; extra == 'aws-sm'
Requires-Dist: boxd>=0.3.1 ; extra == 'boxd'
Requires-Dist: chromadb-client>=1.0.0 ; extra == 'chroma'
Requires-Dist: claude-agent-sdk>=0.2.174 ; extra == 'claude-agent-sdk'
Requires-Dist: anthropic>=0.122.0 ; extra == 'claude-managed-agents'
Requires-Dist: daytona>=0.227.0,<1 ; extra == 'daytona'
Requires-Dist: deepagents>=0.7.32 ; extra == 'deepagents'
Requires-Dist: python-dotenv>=1.2.2 ; extra == 'dotenv'
Requires-Dist: e2b>=2.62.0 ; extra == 'e2b'
Requires-Dist: aiosmtplib>=5.1.0 ; extra == 'email'
Requires-Dist: mfusepy>=1.0.0 ; extra == 'fuse'
Requires-Dist: aioboto3>=15.5.0 ; extra == 'gcs'
Requires-Dist: botocore>=1.40.61 ; extra == 'gcs'
Requires-Dist: pymongo>=4.9 ; extra == 'gridfs'
Requires-Dist: opendal>=0.47.1 ; extra == 'hf-buckets'
Requires-Dist: lancedb>=0.33.0 ; extra == 'lancedb'
Requires-Dist: langfuse>=5.0.4 ; extra == 'langfuse'
Requires-Dist: mem0ai>=2.0.18 ; extra == 'mem0'
Requires-Dist: pymongo>=4.9 ; extra == 'mongodb'
Requires-Dist: pydantic-monty==1.6.0 ; extra == 'monty'
Requires-Dist: opendal>=0.47.1 ; extra == 'nextcloud'
Requires-Dist: aioboto3>=15.5.0 ; extra == 'oci'
Requires-Dist: botocore>=1.40.61 ; extra == 'oci'
Requires-Dist: openai>=3.37.0 ; extra == 'openai'
Requires-Dist: openai-agents>=0.24.0 ; extra == 'openai'
Requires-Dist: asyncpg>=0.30.0 ; extra == 'postgres'
Requires-Dist: pydantic-ai-slim>=2.61.0 ; extra == 'pydantic-ai'
Requires-Dist: pydantic-ai-backend[console]>=0.2.37 ; extra == 'pydantic-ai'
Requires-Dist: qdrant-client>=1.18.0 ; extra == 'qdrant'
Requires-Dist: wasmtime>=46 ; extra == 'quickjs'
Requires-Dist: aioboto3>=15.5.0 ; extra == 'r2'
Requires-Dist: botocore>=1.40.61 ; extra == 'r2'
Requires-Dist: redis[hiredis]>=5.0 ; extra == 'redis'
Requires-Dist: aioboto3>=15.5.0 ; extra == 's3'
Requires-Dist: botocore>=1.40.61 ; extra == 's3'
Requires-Dist: mirage-ai[s3] ; extra == 'sandbox'
Requires-Dist: mirage-ai[r2] ; extra == 'sandbox'
Requires-Dist: mirage-ai[gcs] ; extra == 'sandbox'
Requires-Dist: mirage-ai[oci] ; extra == 'sandbox'
Requires-Dist: mirage-ai[ssh] ; extra == 'sandbox'
Requires-Dist: mirage-ai[nextcloud] ; extra == 'sandbox'
Requires-Dist: mirage-ai[hf-buckets] ; extra == 'sandbox'
Requires-Dist: mirage-ai[fuse] ; extra == 'sandbox'
Requires-Dist: mirage-ai[mongodb] ; extra == 'sandbox'
Requires-Dist: mirage-ai[gridfs] ; extra == 'sandbox'
Requires-Dist: mirage-ai[postgres] ; extra == 'sandbox'
Requires-Dist: mirage-ai[redis] ; extra == 'sandbox'
Requires-Dist: mirage-ai[email] ; extra == 'sandbox'
Requires-Dist: mirage-ai[langfuse] ; extra == 'sandbox'
Requires-Dist: mirage-ai[chroma] ; extra == 'sandbox'
Requires-Dist: mirage-ai[qdrant] ; extra == 'sandbox'
Requires-Dist: asyncssh>=2.24.1 ; extra == 'ssh'
Requires-Dist: wasmtime>=46 ; extra == 'wasi'
Provides-Extra: 1password
Provides-Extra: agno
Provides-Extra: all
Provides-Extra: ast-grep
Provides-Extra: aws-sm
Provides-Extra: boxd
Provides-Extra: chroma
Provides-Extra: claude-agent-sdk
Provides-Extra: claude-managed-agents
Provides-Extra: daytona
Provides-Extra: deepagents
Provides-Extra: dotenv
Provides-Extra: e2b
Provides-Extra: email
Provides-Extra: fuse
Provides-Extra: gcs
Provides-Extra: gridfs
Provides-Extra: hf-buckets
Provides-Extra: lancedb
Provides-Extra: langfuse
Provides-Extra: mem0
Provides-Extra: mongodb
Provides-Extra: monty
Provides-Extra: nextcloud
Provides-Extra: oci
Provides-Extra: openai
Provides-Extra: postgres
Provides-Extra: pydantic-ai
Provides-Extra: qdrant
Provides-Extra: quickjs
Provides-Extra: r2
Provides-Extra: redis
Provides-Extra: s3
Provides-Extra: sandbox
Provides-Extra: ssh
Provides-Extra: wasi
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES
Summary: A virtual terminal for AI agents, with a unified virtual filesystem, virtual CLIs and virtual machines behind one shell. S3, Google Drive, Slack, Gmail, GitHub, Notion, Postgres and more appear as files that agents work with the Unix-like commands they already know.
Keywords: ai-agents,virtual-terminal,terminal,filesystem,vfs,fuse,s3,google-drive,slack,agent-tools,shell,rag
Author-email: Zecheng Zhang <zecheng@strukto.ai>
License-Expression: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://docs.mirage.strukto.ai
Project-URL: Homepage, https://www.strukto.ai/
Project-URL: Issues, https://github.com/strukto-ai/mirage/issues
Project-URL: Repository, https://github.com/strukto-ai/mirage

<h1 align="center">
  <a href="https://www.strukto.ai/mirage">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/mirage-header-dark.svg">
      <img src="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/agentvfs-banner-narrow-dark.svg">
      <source media="(max-width: 767px)" srcset="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/agentvfs-banner-narrow-light.svg">
      <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/agentvfs-banner-dark.svg">
      <img src="https://raw.githubusercontent.com/strukto-ai/mirage/main/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-experimental-0C0C0C?labelColor=F0ECE2" alt="Status: experimental" /></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>
    <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="https://github.com/strukto-ai/mirage/blob/main/README.md"><img alt="README in English" src="https://img.shields.io/badge/English-F0ECE2"></a>
  <a href="https://github.com/strukto-ai/mirage/blob/main/readme/README.zh-CN.md"><img alt="简体中文 README" src="https://img.shields.io/badge/简体中文-F0ECE2"></a>
  <a href="https://github.com/strukto-ai/mirage/blob/main/readme/README.zh-TW.md"><img alt="繁體中文 README" src="https://img.shields.io/badge/繁體中文-F0ECE2"></a>
  <a href="https://github.com/strukto-ai/mirage/blob/main/readme/README.fr.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-F0ECE2"></a>
  <a href="https://github.com/strukto-ai/mirage/blob/main/readme/README.de.md"><img alt="README auf Deutsch" src="https://img.shields.io/badge/Deutsch-F0ECE2"></a>
  <a href="https://github.com/strukto-ai/mirage/blob/main/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="https://github.com/strukto-ai/mirage/blob/main/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>

LLMs are post-trained in terminal environments, so AI agents are most familiar with the terminal interface. But a terminal today is bound to a single machine and its operating system kernel, with its files and its computation on that same machine.

Mirage is **a virtual terminal for AI agents** that separates the terminal interface from the data storage and the computing machines. It virtualizes the shell, the filesystem, the CLIs and the machines. Each virtual terminal starts with only KBs of memory, so AI agents can use terminal environments everywhere, inside an application, a mobile app, a browser tab, a FastAPI or Express server, and even an edge device such as a Raspberry Pi.

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/mirage-terminal-dark.svg">
    <img src="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/mirage-terminal-light.svg" alt="Mirage over three virtual filesystems (S3, Slack, Google Drive), three virtual CLIs (gh, linear, deepwiki-mcp), three VMs (Monty, an E2B sandbox, an EC2 GPU) and a policy layer: one grep searches all three filesystems, the three CLIs feed one grep, one pipeline runs a stage on each VM, and policy refuses one line that reads a hidden .pem key, deletes from the read-only /s3 mount and merges a PR" width="100%">
  </picture>
</p>

- **Controllable.** Each agent gets only the files, commands, credentials and machines its profile allows.
- **Scriptable.** The whole terminal is defined in code or one config file, from its filesystems, CLIs and machines to its rules.
- **Managed.** State lives on infrastructure that already runs, such as RAM, disk, Redis or S3, and every command is recorded and can be exported as an OpenTelemetry trace.
- **Lightweight.** Each workspace takes only KBs of memory and Mirage is async from the shell down to each service call, so one process serves many agents at once. It can be deployed almost everywhere, to a Python or TypeScript server, a browser tab, a Cloudflare Worker or a Raspberry Pi.

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/strukto-ai/mirage/main/assets/mirage-arch-dark.svg">
    <img src="https://raw.githubusercontent.com/strukto-ai/mirage/main/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.

## Unified 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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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 CLIs

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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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 Machines

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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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="https://raw.githubusercontent.com/strukto-ai/mirage/main/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>

