# Boston Marine — AI Chat Box Setup

**Goal:** a chat box on the site powered by your own OpenAI (ChatGPT), Anthropic (Claude), or Google (Gemini) API key.

## Recommended plugin: AI Engine (by Meow Apps) — free

After comparing the current options, **AI Engine** is the best fit. In one free plugin it connects to **OpenAI, Anthropic Claude, and Google Gemini** (plus Mistral, xAI/Grok, Perplexity, and others), and it drops a customizable chat box onto any page via a **block, shortcode, or site-wide widget**. You bring your own API key and pay the AI provider directly at their rates — the plugin itself costs nothing.

*How it compares:*

- **AI Engine (free)** — one plugin, all three providers, chatbot via block/shortcode/floating widget, conversation memory, GDPR tools. Pro (optional) adds "content-aware" answers that read your own pages/posts so the bot can answer Boston Marine–specific questions.
- **MxChat (free)** — solid, simpler chatbot plugin; supports OpenAI and others and has a training/knowledge-base feature. Good lighter-weight alternative.
- **Official WordPress "AI Provider" plugins (Anthropic / Google / OpenAI)** — free, but these are **developer building blocks** (an SDK), not a ready-made chat box. Skip unless you're writing custom code.

## Which provider to use

All three work. Practical picks: **OpenAI (`gpt-4o-mini`)** or **Google Gemini (`gemini-1.5-flash`)** are the cheapest per message for a support/sales bot; **Anthropic Claude (`claude-haiku`)** is an excellent, low-cost option too. Start with a low-cost model, set a spending limit in the provider dashboard, and upgrade the model only if answers need to be sharper.

## Setup steps

1. **Get an API key** from your chosen provider's dashboard:
   - OpenAI → platform.openai.com → API keys
   - Anthropic → console.anthropic.com → API keys
   - Google → aistudio.google.com → Get API key
   Add a small amount of billing credit and set a monthly usage cap.
2. **Install AI Engine** — *Plugins → Add New → search "AI Engine" (Meow Apps) → Install → Activate.*
3. **Add the key** — *Meow Apps → AI Engine → Settings → AI Environments.* Create an environment, pick the provider, paste the key, and choose a model.
4. **Turn on the chatbot** — in AI Engine's **Chatbots** tab, edit the default chatbot: set the name ("Boston Marine Assistant"), the greeting ("Hi! Ask me about Yamaha outboards, service, or booking a repower."), and a **system/instructions prompt** (see below).
5. **Place it on the site:**
   - **Floating bubble site-wide:** enable "Site-wide chatbot" in the chatbot settings — a chat button appears bottom-right on every page.
   - **Inside a page:** add the **AI Engine → Chatbot block** in Gutenberg, or drop the shortcode `[mwai_chatbot]` into a Custom HTML/shortcode block (e.g. on the Contact page).
6. **Brand it.** This child theme already ships CSS that recolors the AI Engine bubble and window to the Boston Marine palette (red header/launcher, navy window, light text). It applies automatically once the plugin is active — no extra work. Tweak it in `functions.php` (`boston_marine_chatbot_theme_css`) if you want to adjust.

## Suggested system prompt

> You are the Boston Marine virtual assistant. Boston Marine is New England's premier Yamaha outboard dealership, family-owned since 1999, located at 188 Atlantic Ave, Boston, MA. We sell the full Yamaha outboard lineup (F115 through the XTO Offshore 450 and V MAX SHO), and offer factory-certified service, repowers, parts, and financing. Answer questions about Yamaha outboards, service intervals, repower, warranty, financing, and booking. Be friendly, concise, and accurate. For pricing, quotes, sea trials, or emergencies, direct the visitor to call (617) 555-0199 (24/7 emergency (617) 555-0911) or use the Request a Quote form. If you don't know something specific, say so and point them to contact the team.

## Make it answer Boston Marine questions accurately

The free chatbot answers from the model's general knowledge plus your system prompt. To have it answer using *your* actual content (service pricing, policies, inventory), either (a) upgrade to AI Engine Pro's content-aware/embeddings feature, or (b) paste key facts directly into the system prompt. For launch, a well-written system prompt plus a clear "call us for a quote" fallback is plenty.

## Cost & privacy notes

- You pay the AI provider per message; there is no plugin subscription in the free tier. Set provider-side spend limits.
- Add a short line to your privacy policy noting that chat messages are processed by a third-party AI provider.
- Keep the API key only in the plugin settings — never paste it into a page, post, or public file.
