> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Connect a coding agent or an agent framework to a Mirage workspace.

## Coding Agents

Claude Code, Codex and Grok Build run as they are, on a workspace the `mirage` CLI creates, whatever language you build in. Their guides are under [Agents](https://docs.mirage.strukto.ai/home/agents.md#coding-agents).

To replace an agent's own file and shell tools instead, load Mirage into it as a plugin:

| Agent | Plugin |
| - | - |
| [Pi Coding Agent](https://docs.mirage.strukto.ai/typescript/agents/pi.md) | `mirageExtension(ws)` |
| [OpenCode](https://docs.mirage.strukto.ai/typescript/agents/opencode.md) | `@struktoai/mirage-opencode` in `opencode.json` |
| [DeepSeek Harness](https://docs.mirage.strukto.ai/typescript/agents/dsh.md) | `@struktoai/mirage-dsh` |

## Agent SDKs

Your program holds the workspace and hands it to the framework.

| Framework | Hand it | The agent gets |
| - | - | - |
| [Vercel AI SDK](https://docs.mirage.strukto.ai/typescript/agents/vercel.md) | `mirageTools(ws)` | Mirage's seven tools |
| [Mastra](https://docs.mirage.strukto.ai/typescript/agents/mastra.md) | `mirageTools(ws)` | Mirage's seven tools |
| [Claude Agent SDK](https://docs.mirage.strukto.ai/typescript/agents/claude-agent-sdk.md) | `MirageServer(ws)` | Mirage's seven tools |
| [OpenAI Agents](https://docs.mirage.strukto.ai/typescript/agents/openai.md) | `mirageTools(ws)`, or `MirageShellExecutor`, `MirageEditor` and `MirageSandboxClient` | Mirage's seven tools, or its shell, patch and sandbox tools run in Mirage |
| [LangChain Deep Agents](https://docs.mirage.strukto.ai/typescript/agents/langchain.md) | `new LangchainWorkspace(ws)` | its file and shell tools, run in Mirage |

Mirage's seven tools are the session's [`session.tools`](https://docs.mirage.strukto.ai/typescript/access/in-app#session-tools): `shell`, `read`, `write`, `edit`, `ls`, `grep` and `glob`. A session gets the ones its [profile](https://docs.mirage.strukto.ai/home/policy/explain.md#which-tools-the-agent-gets) leaves it (`session.tools.names()`), so an agent is never offered a tool every call of which would be refused.

Each framework is its own package: `@struktoai/mirage-vercel`, `@struktoai/mirage-mastra`, `@struktoai/mirage-claude-agent-sdk`, `@struktoai/mirage-openai-agents` or `@struktoai/mirage-langchain`.

```bash theme={null}
pnpm add @struktoai/mirage-vercel @struktoai/mirage-node
```

When the framework supports browsers, use `@struktoai/mirage-browser` in place of `@struktoai/mirage-node`.

## API & Environment

The provider runs the agent, and the workspace is its environment: its own shell and file tools run in Mirage.

| API | Hand it | The agent gets |
| - | - | - |
| [OpenAI Agents API](https://docs.mirage.strukto.ai/typescript/agents/openai-agents-api.md) | a `self_hosted` environment, through [exec-server forward](https://docs.mirage.strukto.ai/home/agents/codex.md#exec-server-forward) | its shell, file and patch tools, run in Mirage |
| [Claude Managed Agents](https://docs.mirage.strukto.ai/typescript/agents/claude-managed-agents.md) | `mirageTools(ws)`, in an `EnvironmentWorker` | its `bash`, `read`, `write`, `edit`, `glob` and `grep`, run in Mirage |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.