# AI Assistant (Site AI)

> Put AI directly into your published site — a chatbot, smart forms, summaries, translation, image understanding, document Q&A, and image generation — with no API keys and no providers.

Source: https://knowledge.estage.com/ai-assistant/
Part of the ESTAGE knowledge base (https://knowledge.estage.com). Full corpus: https://knowledge.estage.com/llms-full.txt

---
The **AI Assistant** puts real AI **inside your published site** — a chatbot, smart forms,
summaries, translation, image understanding, document Q&A, even image generation — with
**no API keys and no providers** to set up. The AI runs on Genesis and uses your credits.

It's not just a chat widget: under the hood it's a primitive (`window.estageAI`) the builder
can wire into anything.

## Example prompts

Just describe what you want in chat — no special syntax needed. The assistant understands
plain language and wires the feature:

- *"add a support chatbot that answers from our shipping & returns policy"*
- *"on the contact form, sort each message into Sales / Support / Billing"*
- *"auto-generate a short title for each user post from its text"*
- *"add a 'TL;DR' button that summarizes this article"*
- *"let visitors translate this page into Spanish"*
- *"when someone uploads a photo, write its alt text"*
- *"add a widget where visitors drop a PDF and ask questions about it"*
- *"generate an avatar from the user's name on sign-up"*

| The prompt above… | …wires |
| --- | --- |
| support chatbot | A floating chatbot answering from your knowledge text |
| sort each message | A smart form that classifies every submission |
| auto-generate a title | Title generation on submit |
| TL;DR button | One-click summary |
| translate this page | On-demand translation |
| write its alt text | Image understanding (vision) |
| drop a PDF | Document Q&A |
| generate an avatar | Image generation |

Under the hood each is a call to `window.estageAI` — see the real code for every one in
**[What you can build with it](/ai-assistant/examples/)**.

## Add a chatbot — step by step

The most common use. The fast path is **one chat message**:

1. **Ask for it in chat**, describing what it should know and do — for example, *"add a
   friendly support chatbot that answers from our shipping, returns, and hours info"*:

   This does three things at once: turns the assistant **on**, sets a starting **persona**,
   and **wires the floating chat widget** onto your site — no separate steps.

2. **Add your knowledge** so answers are accurate. Open **Settings → AI Assistant → Knowledge
   / context** and paste the facts the bot should use:

   ```text
   Hours: Mon–Fri 9am–6pm EST. Free shipping over $50. Returns within 30 days
   with receipt. Support: help@acme.com.
   ```

3. **Style the widget** in the same tab → **Chatbot widget**: set the **name** ("Acme
   Assistant"), **accent color**, **greeting** ("Hi! 👋 How can I help?"), and a few **starter
   prompts** ("What are your hours?", "Track my order", "Talk to a human").

4. **Pick a model** — **Fast** for everyday support (snappy, cheap), **Smart** when answers
   need more reasoning.

5. **Set a monthly cap** so visitor usage stays within budget (see
   [billing](#how-billing-works)).

6. **[Publish](/workspace/publishing/)** — the chatbot is live for your visitors.

That's it. Want changes later? Edit any field in Settings (saves instantly), or ask in chat:
*"make the chatbot greeting shorter"*, *"move the chat bubble to the bottom-left"*.

### Prefer to start from Settings?

You can also flip **Settings → AI Assistant → Enable AI on this site** first, configure the
widget, then ask the builder *"add the chat widget to my site"*. Same result — the chat
message just does both in one go.

:::tip
The bot only knows what you put in **Persona** + **Knowledge** (and what the visitor types).
It doesn't read your whole site automatically — so paste the FAQs, policies, and details you
want it to answer from.
:::

When the assistant is on, the `window.estageAI` helper is available across your site for all
the other features too. Turn it off and it's a clean uninstall — no leftover code.

## The Settings → AI Assistant tab

| Control | What it does |
| --- | --- |
| **Enable AI on this site** | Master on/off. |
| **Model** | **Fast** — quick and economical, best for chat and most tasks. **Smart** — stronger reasoning, costs more credits per call. |
| **Persona & instructions** | The assistant's system prompt — its role, tone, and rules. *Never shown to visitors.* |
| **Knowledge / context** | Plain text the AI can reference when answering — your hours, shipping policy, product details, FAQs. |
| **Chatbot widget** | The floating chatbot's **name**, **accent color**, **greeting**, and up to a handful of **starter prompts** (suggestion chips). |
| **Image generation** | A separate toggle for `window.estageAI.image()` — off by default because image generation costs more. |
| **Monthly spending limit** | A cap, in credits, on what the assistant can spend per month (default 500; can be unlimited). |
| **Usage** | Credits spent this month, call count, and how close you are to the cap. |

Changes save immediately — no rebuild.

:::tip[A good setup]
Persona: *"You are a friendly support agent for Acme Co. If you don't know something specific,
say so and suggest contacting us."* · Knowledge: paste your hours, shipping policy, and top
FAQs · Greeting: *"Hi! 👋 How can I help?"* · Starters: *"What are your hours?"*, *"Shipping
info"*, *"Talk to a human"*. The persona and knowledge are what make answers accurate and
on-brand.
:::

## How billing works

There are **no API keys** — the AI runs on Genesis's platform key, and each call spends **your
(the project owner's) credits**:

- **Fast** costs less per call than **Smart**; **image generation** costs the most (hence its
  own toggle).
- Anonymous **visitors** trigger calls that spend *your* credits — that's why the guards exist:
  - **Monthly cap** — once the month's credit cap is hit, the assistant stops until next month
    (or until you raise it).
  - **Per-visitor rate limit** — caps how fast any single visitor can fire calls.
  - If your balance can't cover a call, it's declined — you're never charged for a failed call.

The **Usage** panel shows spend, call count, and cap progress so there are no surprises.

## Models

- **Fast** — Claude Haiku. Snappy and cheap; great for chat and routine tasks.
- **Smart** — Claude Sonnet. Stronger reasoning for trickier work; more credits per call.

Vision (image understanding), document Q&A, and image generation are supported on top of the
text models.

## Limits

- Best for **text, classification, vision, document Q&A, and image generation** — see the
  [examples](/ai-assistant/examples/).
- It answers from its **persona + knowledge text + what the visitor sends** — there's no
  automatic indexing of your whole site yet (RAG/embeddings, voice, and a full conversation log
  are on the roadmap).
- Reasonable input caps apply (long text is truncated; very large images/PDFs are rejected).

Next: [What you can build with it →](/ai-assistant/examples/)
