mirageDeepSeek Harness plugin

The World's First Virtual Terminal for AI Agents

Stars
3.6K
Forks
260
License
Apache-2.0
Last commit
Sep 2, 2026
Latest release
v0.0.5

Overview

The World's First Virtual Terminal for AI Agents

Original README

Cached from the project repository on Sep 2, 2026. This is source content, separate from the Agents.md review above.

View source

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:

python
1ws = Workspace(
2    {
3        "/tmp":   (RAMResource(), MountMode.EXEC),
4        "/redis": (RedisResource(url=redis_url), MountMode.WRITE),
5        "/slack": (SlackResource(SlackConfig(token=slack_bot_token)), MountMode.EXEC),
6    },
7    # monty captures python, so scripts run sandboxed inside the workspace
8    runtimes=[MontyRuntime(captures=["python", "python3"]), "vfs"],
9)
10
11# one grep sweeps every source
12await ws.execute("grep -rln session /redis /tmp")
13
14# run a script that lives in Slack, file the report into Redis
15await ws.execute("python3 /slack/channels/general_.../files/example__F....py > /redis/report.txt")
16
17# install a typed CLI under a head word: dispatched by name, not by path,
18# and discoverable through `man`, `type` and `which` like any other program
19ws.register_cli("slack", SLACK, {"token": slack_bot_token})
20await ws.execute('slack send-message --channel general --text "report is up"')

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 runtimes. Python, JavaScript and any other command can be sent to a configured runtime, 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 runtimes into one command line, so pipes, redirection, variables, jobs and history work across all three.
  • 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 "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 StorageAmazon 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 DocumentsGoogle Drive  Google Docs  Google Sheets  Google Slides  OneDrive  SharePoint  Box  Dropbox  Nextcloud
Messaging and WorkSlack  Discord  Gmail  IMAP / SMTP email  GitHub  Linear  Notion  Trello  Google Calendar
Databases and Data PlatformsPostgreSQL  MongoDB  Redis  LanceDB  Qdrant  Chroma  Mem0  Hugging Face Datasets  Hugging Face Models  Hugging Face Spaces  Databricks Volumes  Dify
ObservabilityLangfuse  Jaeger
Local and RemoteRAM  Disk  OPFS  SSH

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 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
Codegit  gh
Communicationslack  discord  himalaya
Work and Datalinear  ntn  gws  hf

Virtual Runtime

Runtimes are virtualized the same way, and not only for coding languages. Any command on the line can be redirected to a configured runtime, so Python might run in-process with Monty while another command, say kubectl, is sent to a remote machine over SSH. Which runtime serves a given line can be decided by a scripted runtime router.

Runtimes
PythonMonty  WASI CPython on wasmtime  Pyodide  sandlock  Host CPython
JavaScriptQuickJS, serving node and js JavaScript TypeScript
SandboxesDocker  E2B  Daytona  smolVM  SSH

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, an ordered stack the workspace consults on every command, VFS op and session write. See the permissions docs.

Authentication

Credentials and authentication integrate with the stores secrets already live in, including AWS Secrets Manager, 1Password, Auth0 and dotenv, so an environment variable in Mirage can resolve straight to a credential held in one of them.

Sources
Built inEnvironment dotenv AWS Secrets Manager
Custom1Password Auth0

Installation

  • Python ≥ 3.11 for the mirage-ai package and the mirage CLI
  • Node.js ≥ 20 for the TypeScript SDK

Python

bash
uv add mirage-ai    # installs the `mirage` library and the `mirage` CLI binary

TypeScript

bash
npm install @struktoai/mirage-node      # Node.js servers and CLIs
npm install @struktoai/mirage-browser   # browser / edge runtimes
npm install @struktoai/mirage-agents    # OpenAI / Vercel AI / LangChain / Mastra adapters

Both runtime packages pull in @struktoai/mirage-core automatically.

CLI

bash
curl -fsSL https://strukto.ai/mirage/install.sh | sh
# or
npm install -g @struktoai/mirage-cli
# or
uvx mirage-ai
# or
npx @struktoai/mirage-cli

Quickstart

Python

python
1from mirage import Workspace
2from mirage.resource.ram import RAMResource
3from mirage.resource.s3 import S3Config, S3Resource
4
5ws = Workspace({
6    "/data": RAMResource(),
7    "/s3":   S3Resource(S3Config(bucket="my-bucket")),
8})
9
10await ws.execute("cp /s3/report.csv /data/report.csv")
11await ws.execute("grep alert /s3/data/log.jsonl | wc -l")
12
13await ws.snapshot("demo.tar")

TypeScript

ts
1import { Workspace, RAMResource, S3Resource } from '@struktoai/mirage-node'
2
3const ws = new Workspace({
4  '/data': new RAMResource(),
5  '/s3':   new S3Resource({ bucket: 'my-bucket' }),
6})
7
8await ws.execute('cp /s3/report.csv /data/report.csv')
9await ws.execute('grep alert /s3/data/log.jsonl | wc -l')
10
11await ws.snapshot('demo.tar')

CLI

bash
mirage workspace create ws.yaml --id demo
mirage execute   --workspace_id demo --command "cp /s3/report.csv /data/report.csv"
mirage provision --workspace_id demo --command "cat /s3/data/large.jsonl"
mirage workspace snapshot demo demo.tar
mirage workspace load demo.tar --id demo-restored

Contributors

Thanks to everyone who has contributed to Mirage.

Mirage contributors