# AI assistant

> Chat with an AI that can search your clipboard history, and choose which provider it uses.

Deck's AI assistant is a chat window that can look through your history, use tools and, with your approval, change things in Deck.

## Choose a provider

Set up a provider in **Settings › AI Assistant**. You can also run `deckclip login` in a terminal.

| Provider | How you sign in |
|---|---|
| **ChatGPT Subscription** | Select **Sign In to ChatGPT**. Your browser opens for authorization. Deck does not store your password. **Sign Out** removes the sign-in. |
| **OpenAI API** | Enter an API key. You can change the **API Base URL** to use an OpenAI-compatible service such as DeepSeek, Groq or Together. |
| **Anthropic API** | Enter an API key. You can change the base URL to use an Anthropic-compatible service. |
| **Local AI** | Choose a **Local client**: Ollama, LM Studio or **Other OpenAI-compatible service**, then enter its **Local API URL**. An API token is optional and only needed if your server requires one. |

For each provider, choose a model. Select **Detect models** to list what the service offers, or type a model ID. **Test model** sends a short message to check the setup. Cloud services may charge a small amount for it.

Changing the local client clears its address, model and token.

API keys are stored in the macOS Keychain, not in Deck's settings.

> [!IMPORTANT]
> With a third-party service, your messages and any clipboard content you attach or let the AI search are sent to that service. Follow its terms of use. With **Local AI**, requests go to the server you named.

## Open the chat

Press **⌥⇧Space**. To change it, open **Settings › AI Assistant** and record a new shortcut under **Shortcuts › AI Chat Window**. In a terminal, `deckclip chat` opens a chat there. A new chat starts blank, and the history sidebar lists earlier conversations. Chat history is stored on your Mac only.

## What the AI can use

- An attached item. Text, links, code and colors are sent as text. An image is sent as the text recognized in it.
- Your clipboard history, searched on demand. The AI can search by keyword, regular expression or meaning, and filter by app, type or tag.
- Memory. With **Cross-window memory** on, the AI can save short facts about you, up to 30 characters each and one per turn. Memories stay until you tidy them with **One-Click Cleanup** in **Settings › AI Assistant**.
- Long session context. With **Long session context** on, the AI can save longer project notes, encrypted on your Mac, and read them back later.
- The web. The AI can search the web and fetch a page.
- Installed script plugins, which it can list, read and run.

You can turn memory and long context off in the AI settings. Nothing is then saved or sent from them.

## What asks for approval

Reading is free. Changes need your approval in the chat before they happen.

| Action | Approval |
|---|---|
| Search history, list or read plugins and rules, search the web, fetch a page | Not needed |
| Save or delete memories and session context | Not needed |
| Run a script plugin | Not needed, except a plugin that uses the network and has not been authorized |
| Write text to your history | Asked |
| Delete a history item | Asked |
| Add, change or delete a script plugin | Asked |
| Add, change or delete a smart rule | Asked |

A plugin or rule is checked before the approval card appears, and the card shows what will be saved.

To let other AI tools use your history, see [MCP](https://deckclip.app/docs/automation/mcp). To run AI on items automatically, see [Smart rules and script plugins](https://deckclip.app/docs/automation/smart-rules).

- Previous: [MCP](https://deckclip.app/docs/automation/mcp.md)
- Next: [Keyboard shortcuts](https://deckclip.app/docs/reference/keyboard-shortcuts.md)

---

- HTML: https://deckclip.app/docs/automation/ai-assistant
- 中文: https://deckclip.app/zh-cn/docs/automation/ai-assistant.md

© 2026 Yuze Pan
