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

# AI Assistant

> Chat with the AI Assistant about a single business's data, campaigns, leads, and performance metrics.

The **AI Assistant** is a per-business chat that has live context on the selected business. Use it to ask plain-language questions about ad performance, lead qualification, KPI trends, and pipeline activity without writing SQL or jumping between screens.

Open it from the left sidebar under **AI → AI Assistant**.

## Context

The assistant is always scoped to the business shown in the top-left **Business Space** selector — indicated by the **Context: \<Business name>** chip in the top right of the chat (for example, *Context: BNB Accelerator*). Switch businesses from the selector and the chip updates; existing conversations stay with the business they were created against.

## Chat layout

* **+ New Chat** (top left) — Start a new conversation. Each chat is saved in the left rail under the business it belongs to.
* **Conversation list** — All prior chats for this business. Empty state shows *No conversations yet*.
* **Chat Bot** panel (right) — The active conversation. The empty state prompts *How can I help you today? Ask me anything about your business data, campaigns, leads, and performance metrics.*
* **Message input** (bottom) — Type and send. Conversations stream replies as they generate.

## What you can ask

The AI Assistant is a **marketing analytics assistant** for your agency CRM and ad data. It answers in plain English by querying your database, SOPs, and lead records — not general chat. Scope to **one business** with the header selector, or ask portfolio-wide questions across **all businesses**.

### 1. Performance & metrics (counts and KPIs)

Direct numbers from your CRM and ad accounts.

| Topic                         | Example questions                                                                 |
| ----------------------------- | --------------------------------------------------------------------------------- |
| **Leads**                     | "How many leads did we get last week?" / "Leads this month across all businesses" |
| **Appointments / calls**      | "How many calls were booked last month?" / "Appointment volume this week"         |
| **Closed deals**              | "How many deals closed in February?"                                              |
| **Qualified leads (Q Leads)** | "How many qualified leads last 30 days?" / "Show me Q Leads for business X"       |
| **Marketing KPIs**            | "What's our CPL, CPBC, ROAS for the past 30 days?"                                |
| **Revenue**                   | "What was GHL revenue last month?"                                                |
| **Monthly trends**            | "Show me month-over-month KPI trend for business 12"                              |
| **Threshold alerts**          | "Which businesses are over their KPI targets?"                                    |

<Note>
  "Qualified **calls**" = appointments and bookings. "Qualified **leads**" / "Q Leads" = submission qualification — different data.
</Note>

### 2. Campaigns, ads & funnels

| Topic               | Example questions                                                        |
| ------------------- | ------------------------------------------------------------------------ |
| **Funnels**         | "Funnel report for this month" / "How is the booking funnel performing?" |
| **Campaigns**       | "Campaign performance last 7 days" / "Which campaign spent the most?"    |
| **Creatives / ads** | "Top ads by spend last month" / "Creative performance for business X"    |
| **Ad spend**        | "How much did we spend on ads this month?"                               |
| **Portfolio view**  | "Compare all businesses on spend, leads, and closes"                     |

### 3. Lead profiles & CRM search

Questions about **what leads said** or their characteristics. These use semantic search over conversations and notes, so counts may be shown as **"at least N"**.

* "Which leads said they were full-time agents?"
* "Who answered yes to \[qualification question]?"
* "Find leads with budget over \$500K"
* "Show me details for contact \[ID]"
* "Find leads similar to contact \[ID]"

### 4. Coaching, SOPs & strategy (Knowledge Base)

Process and playbook questions from your uploaded agency docs.

* "What's our pixel reset protocol?"
* "When should I kill an ad at MAX KPI vs Baseline KPI?"
* "What's the launch checklist?"
* "How do we structure a sandbox campaign?"
* "Explain the Sandbox 2.0 testing framework"

### 5. SOP + live data combined (advanced)

The assistant can chain SOP knowledge with your account data.

* "Per our SOP's MAX KPI rule, which campaigns last 7 days are over the line?"
* "What's my cost per booked call last month vs the MAX KPI in the SOP?"
* "The SOP says no more than 5 active ads per adset — which adsets violate that?"
* "Audit my account against the SOP for the past 30 days — give me a prioritized action list"
* "Run a launch readiness check on my newest campaign using the SOP checklist"

### 6. Historical & diagnostic questions

| Topic                  | Example questions                                                                          |
| ---------------------- | ------------------------------------------------------------------------------------------ |
| **Winning periods**    | "When were we crushing it?" / "Best 60-day CPQBC period ever" / "All-time best CAC window" |
| **Automation history** | "What did our automation rules do last week?"                                              |
| **Change logs**        | "What ad/campaign changes happened recently?"                                              |
| **Why / what to do**   | "Why did CPL spike?" / "What should we do about low ROAS on campaign X?"                   |
| **Data freshness**     | "Is my data synced?" / "Which clients have sync errors?"                                   |

### 7. Optimizer & recommendations

* Account analysis and KPI-based suggestions.
* Listing [AI Optimizer](/product/ai-optimizer) recommendations.
* Metric comparisons across periods or businesses.

## What it does not do well

* General knowledge unrelated to your marketing data or SOPs.
* Topics not in your knowledge base (for example, *"What's our refund policy?"* if that policy isn't documented).
* Guessing KPIs without looking up **your** account's actual targets.

## How questions are routed

The system classifies each question by complexity:

1. **Simple** — direct counts and lookups (*"How many leads last week?"*).
2. **Analytical** — comparisons, multi-step queries, lead-trait searches.
3. **Deep** — diagnostic and advisory questions (*"Why did X happen?"*, *"What should we do?"*).

Simpler questions return faster and cost fewer tokens; deep questions take longer and consume more.

## Tips for better answers

* Use natural date phrases: *last week*, *this month*, *past 30 days*.
* Pick a business in the **Business Space** header selector for account-specific questions; leave it broad for portfolio comparisons.
* Be specific when you can — business name, funnel name, campaign name, and a date range produce the cleanest answers.

## Tokens

The assistant uses your agency token balance (shown in the bottom-left of the sidebar). Heavier questions (long ranges, deep diagnosis) cost more tokens than simple lookups. Run a [batch sync](/getting-started/integrations/connect-crm#manual-sync) first if you suspect stale data — the assistant reads from the same tables.

<Tip>
  For broad portfolio questions across every client, switch to the [AI Optimizer](/product/ai-optimizer) — it runs daily across all businesses and surfaces opportunities you wouldn't think to ask about.
</Tip>
