---
title: Copilot
description: Your per-workflow AI assistant for building and editing workflows.
---

import { Callout } from 'fumadocs-ui/components/callout'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
import { FAQ } from '@/components/ui/faq'

Copilot is the AI assistant built into every workflow editor. It is scoped to the workflow you have open — it reads the current structure, makes changes directly, and saves checkpoints so you can revert if needed.

For workspace-wide tasks (managing multiple workflows, running research, working with tables, scheduling jobs), use [Mothership](/mothership).

<Callout type="info">
  Copilot is a Sim-managed service. For self-hosted deployments, go to [sim.ai](https://sim.ai) → Settings → Copilot, generate a Copilot API key, then set `COPILOT_API_KEY` in your self-hosted environment.
</Callout>

<Video src="copilot/copilot.mp4" width={700} height={450} />

## What Copilot Can Do

Copilot can read and modify the workflow you are currently editing:

- Add, configure, and connect blocks
- Edit existing block configurations
- Delete blocks and connections
- Debug failures by reading execution logs
- Answer questions about the workflow or how Sim works

## Chat History

Click **History** (clock icon) in the Copilot header to see past conversations for this workflow. Click any chat to resume it, or click **+** to start a new one.

## File Attachments

Click the attachment icon in the input to upload files alongside your message. Copilot can read images, PDFs, and text-based files as context.

## Checkpoints

When Copilot modifies a workflow, it saves a checkpoint of the previous state.

To revert: hover over a Copilot message and click the checkpoints icon, then click **Revert** on the state you want to restore. Reverting cannot be undone.

## Thinking

For complex requests, Copilot may show its reasoning in an expandable thinking block before responding. The block shows how long the thinking took and collapses after the response is complete.

## Usage

Copilot usage is billed per token and counts toward your plan's credit usage. If you reach your limit, enable on-demand billing from Settings → Subscription.

## Copilot MCP

You can use Copilot as an MCP server to build, test, and manage Sim workflows from external editors — Cursor, Claude Code, Claude Desktop, and VS Code.

### Generating a Copilot API Key

1. Go to [sim.ai](https://sim.ai) and sign in
2. Navigate to **Settings** → **Copilot**
3. Click **Generate API Key**
4. Copy the key — it is only shown once

The key will look like `sk-sim-copilot-...`.

### Cursor

Add to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "sim-copilot": {
      "url": "https://www.sim.ai/api/mcp/copilot",
      "headers": {
        "X-API-Key": "YOUR_COPILOT_API_KEY"
      }
    }
  }
}
```

### Claude Code

```bash
claude mcp add sim-copilot \
  --transport http \
  https://www.sim.ai/api/mcp/copilot \
  --header "X-API-Key: YOUR_COPILOT_API_KEY"
```

### Claude Desktop

Claude Desktop requires [`mcp-remote`](https://www.npmjs.com/package/mcp-remote). Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "sim-copilot": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://www.sim.ai/api/mcp/copilot",
        "--header",
        "X-API-Key: YOUR_COPILOT_API_KEY"
      ]
    }
  }
}
```

### VS Code

Add to `settings.json` or `.vscode/settings.json`:

```json
{
  "mcp": {
    "servers": {
      "sim-copilot": {
        "type": "http",
        "url": "https://www.sim.ai/api/mcp/copilot",
        "headers": {
          "X-API-Key": "YOUR_COPILOT_API_KEY"
        }
      }
    }
  }
}
```

<Callout type="info">
  For self-hosted deployments, replace `https://www.sim.ai` with your self-hosted Sim URL.
</Callout>

<FAQ items={[
  { question: "How is Copilot different from Mothership?", answer: "Copilot is scoped to the workflow you have open — it reads and edits that workflow's blocks and connections. Mothership has access to your entire workspace and can build workflows, manage tables, run research, schedule jobs, and take actions across integrations." },
  { question: "Can Copilot access other workflows or workspace data?", answer: "Copilot is scoped to the current workflow. For tasks that span multiple workflows or require workspace-level context, use Mothership." },
  { question: "Can I revert changes Copilot made?", answer: "Yes. Copilot saves a checkpoint before each change. Hover over the message and click the checkpoints icon to see saved states, then click Revert to restore one. Reverting cannot be undone." },
  { question: "How does Copilot billing work?", answer: "Copilot usage is billed per token and counts toward your plan's credit usage. If you reach your limit, enable on-demand billing from Settings → Subscription." },
  { question: "How do I set up Copilot for a self-hosted deployment?", answer: "Go to sim.ai → Settings → Copilot and generate a Copilot API key. Set the COPILOT_API_KEY environment variable in your self-hosted environment. Copilot runs on Sim's infrastructure regardless of where you host the application." },
]} />
