# AI assistant

> Source: https://docs.clonepartner.com/using/ai-assistant/

<!-- sources: ui/src/components/ai/AiSidebarPanel.vue, ui/src/components/ai/AiComposer.vue, ui/src/components/ai/AiMessageList.vue, ui/src/components/ai/AiApprovalCard.vue, ui/src/components/AppSidebarContent.vue, ui/src/components/MobileTopBar.vue, ui/src/App.vue, ui/src/lib/ai-slash-commands.ts, references/envoy/agent.md -->

# AI assistant

The AI Assistant is a global sidebar panel available on every authenticated screen — it is not a separate page. Operators use it to ask questions about Tasks, Runs, and Connectors, search the app, and perform API actions with inline approval for anything destructive.

## Open the assistant

- Select **AI Assistant** at the bottom of the left navigation.
- Press **⌘/Ctrl-Shift-A** to toggle the panel from anywhere.
- On phones and tablets, tap the brain icon in the top bar (**Open AI assistant**).
- Append `?ai=<conversation_id>` to any authenticated URL to deep-link a specific conversation.

**⌘/Ctrl-K** opens the command palette (app search), which is a separate surface from the assistant.

<!-- screenshot: ai-assistant-panel | AI Assistant sidebar open on the right with the conversation title header, message list, and composer visible -->

## Screen overview

The panel has three areas:

- **Header** — the current conversation title (or **New chat**) acts as a switcher trigger. Next to it sit icon buttons: **Rename**, **New chat**, **Delete conversation** (or **Clear** for an unsaved chat), and **Close**.
- **Message list** — your messages, the assistant's replies, collapsible "Thought for …" reasoning rows, and collapsible tool-activity rows (for example **Read task**, **Searched app**, **API call**). Expanding a tool row shows its **Request** and **Response**. Records the assistant mentions appear as chips that link to the matching page.
- **Composer** — a single rounded input at the bottom.

## The composer

Type a message and press Enter to send (Shift+Enter inserts a newline). The placeholder reads **Ask Envoy AI… · / for commands**.

- **Attach files** — the paperclip button, pasting an image, or dragging files onto the composer uploads attachments. Images (PNG, JPEG, GIF, WebP) and text files such as `.csv`, `.json`, `.yaml`, `.log`, and `.md` are accepted, up to 5 attachments per message.
- **Mention records** — type `@` to search Tasks, Jobs, Connectors, and other records and attach them as context chips.
- **Model picker** — when more than one model is available, a model button next to the paperclip lets you switch; the default is marked **· default**.
- **Send / Stop** — the filled send button becomes a solid square **Stop** button while the assistant is responding.
- **Context meter** — a circular gauge shows how much of the model's context window the conversation uses.

If the panel shows **AI is not configured.**, the server has no AI provider key — see the configuration note below.

<!-- screenshot: ai-assistant-composer | Composer with an attached file chip, an @-mention chip, and the model picker and Send button visible -->

### Slash commands

Type `/` to open the command menu:

| Command | What it does |
|---|---|
| `/summarize` | Recap this conversation — findings, decisions, next steps |
| `/explain` | Explain what I'm currently looking at |
| `/diagnose` | Investigate a failure and suggest a fix |
| `/task` | Scaffold a new task from a description |
| `/find` | Search tasks, jobs, connectors, runs, triggers |
| `/docs` | Explain a step, connector, or concept from the docs |
| `/review` | Review the current task YAML for issues |
| `/new` | Start a fresh conversation |
| `/rename` | Rename this conversation |

## What the assistant can and cannot do

The assistant reads freely but pauses for approval before it changes anything sensitive:

- **Read** — it lists and reads Tasks and reference docs, searches the app, samples Connector data, describes API operations, and navigates you to pages. Connector configurations are redacted before the assistant sees them.
- **Change** — it calls the REST API as you, with your role's permissions. Destructive API calls (including user invites) pause with an approval card.
- **Never** — authentication, API-key management, executor administration, and nested chat endpoints are blocked entirely.

### Approve or reject an action

When a destructive call is proposed, a card labeled **Destructive** / **Approval required** shows a summary plus the exact method and path. Choose:

1. **Approve** — runs this one call.
2. **Approve always** (when offered) — runs the call and skips future prompts for the same action in this chat.
3. **Reject** — tells the assistant no; the conversation continues.

A pending approval is stored server-side and expires after 15 minutes. Sensitive action summaries are audited with secret fields redacted.

<!-- screenshot: ai-assistant-approval | Approval card showing the Destructive badge, action summary, method and path, and the Approve, Approve always, and Reject buttons -->

## Manage conversations

Conversations are saved automatically. Select the title in the header to open the switcher: a **Search chat history…** field on top, a **New chat** entry, and your recent conversations beneath it. **Rename** and **Delete conversation** live in the header; deleting permanently removes the conversation and all its messages.

Long conversations are summarized automatically — an expandable **Earlier conversation summarized** divider marks the compacted history, and the full transcript stays visible. If a response ends abnormally (provider error, stopped stream, or a limit reached), the chat shows the reason with a **Continue** or **Retry** button that resumes without repeating completed work.

## Configuration and knowledge

Enabling the assistant and choosing models is a server-side `ai` configuration concern — see [Server configuration](/deployment/server-configuration/). An admin can also store the provider API key from the Settings screen — see [Users, roles, and settings](/using/users-and-settings/).

The assistant's knowledge base is Envoy's built-in reference corpus. Your deployment can override or extend it with [AI references](/using/ai-references/); enabled references shadow the built-in document with the same name.

## Related

- [AI references](/using/ai-references/) — curate deployment-specific guidance the assistant retrieves
- [Server configuration](/deployment/server-configuration/) — the `ai` config block that enables the assistant
- [Users, roles, and settings](/using/users-and-settings/) — where the provider API key is stored from the UI
- [Tasks and task runs](/using/tasks-and-runs/) — the screens the assistant most often reads and edits
