mirage README

The project's README from github.com/strukto-ai/mirage. As one markdown file: README.md.

Mirage: A Virtual Terminal for AI Agents

Status: preview
Python docs
TypeScript docs

README in English 简体中文 README 繁體中文 README README en Français README auf Deutsch README Tiếng Việt README 한국어

Mirage is a Virtual Terminal for AI Agents. The virtual filesystem delivers broad data context, virtualized CLIs give an agent more flexibility on tool use, dynamic runtimes save underlying infrastructure cost and are more token efficient, and fine-grained control over an agent's actions and even over what it can see gives the best security. Together these parts form one virtualized terminal, giving the best agent performance, cost efficiency and security.

Mirage architecture: agents and harness reach profiles and the Mirage shell, which resolve Unix-like commands, virtual CLIs and programming languages onto runtimes and the virtual filesystem, with authentication, the policy engine and notifications alongside

Here is an example of launching Mirage inside an application:

ws = Workspace(
    {
        "/tmp":   (RAMResource(), MountMode.EXEC),
        "/redis": (RedisResource(url=redis_url), MountMode.WRITE),
        "/slack": (SlackResource(SlackConfig(token=slack_bot_token)), MountMode.EXEC),
    },
    # monty captures python, so scripts run sandboxed inside the workspace
    runtimes=[MontyRuntime(captures=["python", "python3"]), "vfs"],
)

# one grep sweeps every source
await ws.execute("grep -rln session /redis /tmp")

# run a script that lives in Slack, file the report into Redis
await ws.execute("python3 /slack/channels/general_.../files/example__F....py > /redis/report.txt")

# install a typed CLI under a head word: dispatched by name, not by path,
# and discoverable through `man`, `type` and `which` like any other program
ws.register_cli("slack", SLACK, {"token": slack_bot_token})
await ws.execute('slack send-message --channel general --text "report is up"')

About

Virtual Filesystem

Everything 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.

Resources
Object Storage Amazon S3  Cloudflare R2  Google Cloud Storage  Oracle OCI  Supabase Storage  MinIO  Ceph  SeaweedFS  Wasabi  Backblaze B2  DigitalOcean Spaces  Alibaba Cloud OSS  Tencent Cloud COS  Scaleway  QingStor  Hugging Face Buckets  GridFS
Files and Documents Google Drive  Google Docs  Google Sheets  Google Slides  OneDrive  SharePoint  Box  Dropbox  Nextcloud
Messaging and Work Slack  Discord  Gmail  IMAP / SMTP email  GitHub  Linear  Notion  Trello  <img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard

mirage (strukto-ai/mirage)

agent-sandbox
Searching Database…

3.7K ·GitHub
What is this?Mirage is a virtual terminal for AI agents that mounts services like S3, Google Drive, Slack, Gmail and Redis into one unified virtual filesystem, so agents access everything with familiar unix tools (ls, grep, find, jq), run virtual CLIs, route code to different runtimes, and stay inside a policy-controlled shell.
Is Mirage a framework I embed in my app, or a standalone CLI tool?It is a framework you launch inside your own application rather than a standalone app. It binds the virtual filesystem, virtual CLIs and runtimes into one shell that your agent drives.
How do I start using Mirage with my agent?You launch Mirage inside your application and mount your data sources (object storage, files, messaging tools, etc.) under its single virtual filesystem root; the repo's test suites cover both Python and TypeScript integrations.
Do I need a separate SDK or MCP server for every service my agent should reach?No. Mirage replaces per-service SDKs and MCP servers with one unified virtual terminal interface, so every backend speaks the same filesystem semantics.
Can my agent see files or folders I want hidden from it?No — profiles with hide and show rules remove restricted paths from what the agent can see entirely, not just block reads, and a scriptable policy engine gates every filesystem operation and session write.
Does this work with Claude Code or other agent frameworks?Yes — Mirage ships as a dsh plugin and its repo topics list support for Claude Code and OpenAI Agents SDKs alongside general LLM agent integrations.
What stops an agent from taking a dangerous action, like deleting files?A scriptable policy engine can prohibit any dangerous action before it runs, and the same stack gates every virtual filesystem operation and session write so nothing leaks.
Can the same underlying tool have two different identities with separate credentials?Yes — one real tool can be virtualized into two or more named CLIs, each with its own credentials, so an agent sees them as separate commands.
How does Mirage react to external changes, like a new Slack message?External changes stream as events on the mount — a new Slack reply surfaces as a change to the chat file in the virtual filesystem, so the agent reacts to it instead of rescanning the tree.
What runtimes can agent code execution be routed to?Python, JavaScript and other commands can be sent to a configured runtime — in-process, sandboxed, or remote — decoupling computation from storage.
What are similar projects?capsule-fs, nono, xerj, cynative, computer, coop, DSH-taskboard, agentbox
Creator
strukto-ai
Size
115.7 MB
Stars
3.7K
Age
5mo
Commits · 90 Days