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

# Connect your AI (Claude or ChatGPT)

> Set up Claude or ChatGPT as Onlook's agent, using the plan you already have, and choose how much it can do without asking.

Onlook's agent is Claude or ChatGPT. It runs on your Mac and uses your own account and plan. Onlook doesn't charge for AI use, and you don't need to install anything else.

You connect one the first time you open Onlook, on **Explore more ideas, faster**. You can connect both, and change the default later in **Settings**.

<Tabs>
  <Tab title="Claude">
    1. Choose **Set up Claude**.
    2. Onlook checks whether Claude already answers on this Mac (**Checking it works**). If you already use Claude Code here, that's usually all it takes.
    3. If you're not signed in, choose **Sign in**. Onlook opens claude.com in your browser. Sign in there.
    4. If Claude shows you a code, go back to Onlook, choose **Paste**, then **Done**.

    When you're connected, the dialog shows **Signed in as** your email, and your plan (for example **Pro plan**). If you use an Anthropic API key instead of a plan, it says **API key**. Choose **Done**. The tile says **Connected**.

    If the browser sign-in doesn't finish, Onlook shows **Finish signing in from the Terminal**. Terminal is the Mac's built-in app for typing commands, and this line only signs you in.

    1. Choose **Copy**, then **Open Terminal**.
    2. Click anywhere inside the Terminal window, press **⌘V** to paste, then press Return.
    3. Follow what Claude asks in Terminal, such as signing in in your browser.
    4. When Claude says you're signed in, close Terminal with **⌘Q**. Then go back to Onlook and choose **Check again**.
  </Tab>

  <Tab title="ChatGPT">
    Onlook installs its own copy of the ChatGPT agent. Nothing else on your Mac changes.

    1. Choose **Set up ChatGPT**, then **Set up ChatGPT** again in the dialog.
    2. Onlook downloads the agent. It's about 111 MB and takes about 30 seconds.
    3. Onlook checks that the agent answers (**Checking it works**).
    4. Choose **Sign in**. Onlook opens chatgpt.com in your browser. Sign in there. There's nothing to paste; the dialog moves on when you're done.

    <Warning>
      Signing in replaces any other OpenAI credentials saved on this Mac.
    </Warning>

    When you're connected, the dialog shows your plan (for example **ChatGPT Plus plan**). Choose **Done**. The tile says **Connected**.

    If the browser sign-in doesn't finish, Onlook offers the same Terminal step as Claude: choose **Copy**, then **Open Terminal**, click inside the window, press **⌘V** and Return, and follow the steps. When ChatGPT says you're signed in, close Terminal with **⌘Q** and choose **Check again**.
  </Tab>
</Tabs>

When at least one agent is connected, choose **Continue**. The agent you connected last becomes your default.

## What the tiles mean

| Tile says | What it means | What to do |
| - | - | - |
| Set up Claude / Set up ChatGPT | You haven't set this agent up yet | Choose the tile |
| Not set up | The ChatGPT agent isn't downloaded yet | Choose the tile |
| Downloading… | Onlook is downloading the ChatGPT agent | Wait |
| Checking it works… | Onlook is checking that the agent answers | Wait |
| Not signed in | The agent is ready but not signed in | Choose the tile, then **Sign in** |
| Signing in… / Waiting for code | Onlook is waiting for the browser sign-in | Finish signing in, or paste the code |
| Connected | Ready to use | Choose **Continue** |
| Sign-in failed | The browser sign-in didn't complete | Choose the tile and finish from the Terminal |
| Could not connect | Claude didn't answer Onlook's check | Choose **Check again**, or **Use ChatGPT instead** |
| Setup failed | The download didn't finish | Choose **Try again**. It picks up where it stopped |
| Will not start | The ChatGPT agent downloaded but won't run | Choose **Download again** |
| Out of date | The ChatGPT agent is older than Onlook needs | Choose **Download again** |

## Permission modes

To choose how often the agent stops to ask before it acts, use the **Permissions** menu in the chat box.

With Claude, you can pick one of four modes:

| Mode | What the agent does |
| - | - |
| **Auto** | Works without stopping, and asks when an action needs your OK. Onlook starts in this mode, and we recommend it |
| **Ask** | Asks before it edits files or runs commands |
| **Accept edits** | Edits files without asking, and asks before it runs commands |
| **Plan** | Reads your code and proposes a plan, without changing anything |

In every mode, the agent still asks before it pushes to GitHub, creates or merges a pull request, force-pushes, deletes a branch or does a hard reset.

With ChatGPT, the menu shows **Full access** and can't be changed. The agent works in Onlook's copy of your code without stopping to ask.

## Changing your AI later

To change which AI new sessions use, open the projects screen, choose **Settings** and pick a **Default AI**. You can also set a default model and reasoning effort there. A project that's already running keeps its agent.


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