Welcome to BBAIAgent Documentation
BBAIAgent (Bricks Builder AI Agent) is your all-in-one AI design assistant and workflow toolkit built directly into the Bricks Builder editor. Describe a section in plain English, paste HTML/CSS code, or upload a design screenshot — BBAIAgent turns your ideas into clean, responsive, native Bricks elements that match your site's colors, fonts, and spacing.
Getting Started & License Activation
Learn what BBAIAgent can do for your Bricks workflow, how to install it on WordPress, and how to activate your license key.
1.1 Key Capabilities at a Glance #
Instead of switching back and forth between external AI chat windows, code converters, and browser tabs, BBAIAgent brings every step directly inside Bricks Builder:
AI Section Architect
Generate hero banners, pricing tables, feature grids, FAQ accordions, from plain text — and refine them through natural conversation.
HTML / CSS Compiler
Paste any HTML and CSS snippet (or upload an .html file) and convert it into native Bricks elements with responsive breakpoints — no AI tokens required.
Image-to-Bricks
Upload or paste a screenshot, and let vision-capable AI rebuild the layout using native Bricks containers, blocks, and headings.
Design System Sync
Automatically reads your active Bricks Color Palettes, Global Variables, Global Classes, and Theme Styles so every generated section fits your website's look.
BBAIAgent also includes everyday Bricks & WordPress helpers — Auto BEM & Class Converter, Visual Style Indicators, and Admin Bar Quick Navigator — which you can toggle on or off anytime, and more will be added in future updates.
1.2 Installation #
Before installing BBAIAgent, make sure your site runs WordPress 7.1 or newer, and Bricks Builder 2.4 or newer.
Download the Plugin Package
Download the bbaiagent.zip file from your purchase receipt or customer account.
Upload in WordPress Admin
Log in to your WordPress Dashboard and go to Plugins → Add New → Upload Plugin. Click Choose File, select bbaiagent.zip, and click Install Now.
Activate the Plugin
Click Activate Plugin once installation finishes. You will now see a new BBAIAgent menu item in your WordPress Admin sidebar.
1.3 Activating Your License Key (Personal & Agency Plans) #
To unlock both the in-builder AI Assistant and all Toolkit Modules, activate your Lemon Squeezy license key in WordPress Admin.
Open License & Plan
In WordPress Admin, navigate to BBAIAgent → License & Plan (or click the Activate License button in the red alert banner at the top of the BBAIAgent dashboard).
Enter & Activate Your Key
Paste your license key (for example: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) into the input box and click Activate Key.
Check Your Status Card
Once verified, the badge turns green (License Status: Active) and shows your plan name, masked key, total activations used, and expiration date if applicable.
Personal Plan vs. Agency Plan
| Plan | Website Limit | AI Section Generations | Included Features |
|---|---|---|---|
| Personal Plan | 1 Active Website | Unlimited (Bring Your Own Key) | AI Studio, HTML & Vision Compilers, Design System Sync, All Toolkit Modules |
| Agency Plan | Unlimited Websites | Unlimited (Bring Your Own Key) | AI Studio, HTML & Vision Compilers, Design System Sync, All Toolkit Modules |
Refreshing Status or Migrating Domains
- Refresh Status: Click Refresh Status anytime if you recently renewed or upgraded your plan and want WordPress to sync the latest details right away.
- Deactivate Site: Moving from a staging site to a live domain? Click Deactivate Site on the old site first. This frees up your activation slot so you can reuse the key on your new domain immediately.
Launching BBAIAgent & Configuring AI API Keys
Enable Bricks abilities (required), open BBAIAgent inside Bricks Builder, and connect one or more AI providers with your own API keys.
2.1 Enable Bricks Abilities (Required) #
Before using BBAIAgent inside the editor, there is one mandatory Bricks setting you need to turn on so the plugin can work smoothly and communicate natively with Bricks Builder.
Open Bricks AI Settings
In your WordPress Admin sidebar, go to Bricks → Settings → AI and stay on the Configuration tab.
Turn On "Enable Bricks abilities"
Inside the Bricks abilities card, switch the Enable Bricks abilities toggle to Enabled and save your settings.
Right below the Bricks abilities card, you will see a "Connect AI client to MCP" section. You do NOT need to install any MCP plugin or configure an MCP server. BBAIAgent connects natively inside WordPress — simply turning on Enable Bricks abilities is all that is required.
2.2 Opening BBAIAgent inside Bricks Builder #
Open any page, post, or Bricks template in the Bricks Builder visual editor. Look at the Bricks top toolbar to find the BBAIAgent icon button (hovering shows the "BBAIAgent" tooltip). Click it to open the assistant right over your canvas.
Touring the Workspace
- Left Sidebar: Switch between creation modes (Section, Html To Bricks, Image To Bricks), open the Library, browse History, inspect your Design System, start a New Chat, or open Settings. Click the sidebar toggle icon at the top to collapse or expand it anytime.
- Main Composer: The center area where you type prompts, paste HTML, upload screenshots, enhance prompts, choose AI models, and view your chat thread.
- Top-Right Window Controls:
- Light / Dark Theme Toggle (Sun/Moon icon): Switch between the warm Light studio theme and Dark mode. Your preference is remembered automatically.
- Dock / Expand Window: Switch between a centered Floating Modal and a Docked Side Panel pinned to the right edge of Bricks Builder. In Docked mode, drag the left edge handle to resize the panel anywhere from
460pxup to near full screen so you can watch your Bricks canvas update side-by-side. - Close (X or Esc): Close the assistant at any time without losing your active session.
2.3 Setting Up Your AI Provider API Keys (BYOK) #
BBAIAgent uses a Bring Your Own Key (BYOK) model — meaning you pay zero markup on AI usage and can run the entire plugin without spending a dime on API fees. To add your keys, open BBAIAgent inside Bricks Builder and click Settings → API Keys in the bottom-left sidebar.
You do not need a paid AI subscription to use BBAIAgent. By connecting a free Google Gemini API key from Google AI Studio, you can use all of the latest Gemini models included in BBAIAgent — including Gemini 4 Hydrogen, Gemini 3.8 Flash, Gemini 3.5 Flash Lite, and Gemini 3.1 Flash Lite — completely free of charge with zero API cost. (Note: Google's free tier includes per-minute and daily usage limits — check your live limits anytime at Google AI Studio Rate Limits.)
Every API key you save is encrypted with AES-256-CBC using your WordPress security salts before it is stored in the database. Once saved, the interface masks your key so nobody viewing the screen can copy the raw secret.
Choose a provider tab below to see where to get your credentials and how to connect them:
Google Gemini 100% Free API Tier — Recommended default choice. Use all included Gemini models — Gemini 4 Hydrogen, Gemini 3.8 Flash, Gemini 3.5 Flash Lite, and Gemini 3.1 Flash Lite — completely free with a Google AI Studio key, including full Vision support for screenshots.
- Click Get Google Gemini credentials on the card (or visit
aistudio.google.com/apikey) and create an API key (starts withAIza). - Paste the key into the Google Gemini card under Settings → API Keys.
- Click Test to confirm your Gemini and see how many models are accessible.
- Click Save key.
Tip: Free-tier Gemini keys have request-per-minute and daily quota limits. You can view your current limits on the Google AI Studio Rate Limit dashboard.
Anthropic Claude — Ideal for polished UI copy, clean layout structure, and complex multi-section sections (Claude Sonnet 5.5, Opus 5.5, Haiku 5.5).
- Log in to the Anthropic Console (
console.anthropic.com/settings/keys) and create a new key (starts withsk-ant-). - Paste the key into the Anthropic Claude card.
- Click Test to verify connection, then click Save key.
OpenAI (ChatGPT) — Connects GPT-6 Astra, GPT-6 Luna, and GPT-6.1 Terra for high-precision text and vision generation.
- Go to the OpenAI Platform (
platform.openai.com/api-keys) and generate a secret key (starts withsk-). - Paste the key into the OpenAI (ChatGPT) card.
- Click Test to confirm the key is valid, then click Save key.
OpenRouter — A single universal key that unlocks both Free Models and Paid Models including DeepSeek R1/V3, Meta Llama 3.3 70B, Qwen 2.5 Coder, Claude 3.5 Sonnet, and GPT-4o.
- Create an account at OpenRouter (
openrouter.ai/keys) and generate a key (starts withsk-or-). - Paste it into the OpenRouter card.
- Click Test — BBAIAgent checks your key.
- Click Save key to automatically load the live OpenRouter model list.
Cloudflare Workers AI — Serverless GPU inference with generous free-tier models (Free Tier) such as Llama 3.3 70B Fast, Qwen 2.5 Coder 32B, and Llama 3.2 11B Vision.
- Open your Cloudflare Dashboard (
dash.cloudflare.com). - Copy your 32-character Cloudflare Account ID from the dashboard sidebar/URL and paste it into the first field.
- Create an API Token with Workers AI permissions and paste it into the token field.
- Click Test to verify both your Account ID and Token, then click Save key.
Testing & Managing Saved Keys
You can click Test before saving a new key or anytime after saving to verify your connection. Need to rotate a key? Click Remove key and confirm with Yes, remove, then paste your new key.
2.4 Choosing & Filtering AI Models #
You never have to go back into Settings just to switch models. Click the Model Selector pill (for example, G · Gemini 3.5 Flash Lite) in the bottom-right corner of the prompt composer to open the Model Selector popup:
- Provider Tabs: Filter instantly across All, Gemini, Claude, ChatGPT, OpenRouter, and Cloudflare.
- Free vs. Paid Filter Bar: When browsing providers with mixed tiers, click All, Free Models (green dot), or Paid Models (blue dot) to narrow down your choices.
- Keyword Search: Type model names or capabilities like
Free,Llama,DeepSeek,Vision, orClaudeto find the exact model you want.
Once you click a model, BBAIAgent saves it as your active default across sessions.
Generating & Refining Bricks Sections with AI
Create responsive Bricks Builder sections from simple text prompts, guided questionnaires, reference images, and conversational follow-ups.
3.1 Creating Your First Section from a Text Prompt #
Make sure Section mode is selected at the top of the left sidebar. In the composer box, describe the section you want to build in everyday language — whether it is a Hero banner, Pricing table, Feature grid, FAQ accordion, Contact block.
"Create a high-converting SaaS hero section with a gradient badge, bold headline, two CTA buttons, and a responsive mockup container."
Fast Ways to Start
- Starter Wireframe Idea Cards: On a blank chat, click any card under Start from an idea (such as SaaS Hero Section, 3-Tier Pricing Table, Features Grid, or FAQ Accordion) to fill in a ready-made prompt. Click More ideas to rotate to a second set of templates (Testimonials Carousel, Contact Section, Team Showcase, Newsletter CTA).
- Keyboard Shortcuts: Press Enter to generate right away, or press Shift + Enter to add a new line inside your prompt.
3.2 Using the Multi-Step Prompt Enhancer (✨ Enhance) #
Short prompts like "create a call to action" or "make a blog section" can produce generic results if you don't specify layout or content details. The built-in Prompt Enhancer solves this in seconds.
Write a Short Prompt & Click ✨ Enhance
Type a brief idea (at least 2 characters) in the prompt box and click the ✨ Enhance button in the composer bar.
Answer 2–4 Tailored Multiple-Choice Questions
BBAIAgent reads your site's post types, taxonomies, and page title, then presents clear cards covering Goal, Layout, Elements, or Style. Click any option — or click + Other (Custom) to type your own requirement.
Review, Polish, and Generate
Watch your Live Prompt Brief update automatically at the bottom of the card. You can edit the text directly, click ✨ Polish with AI for cleaner wording, click Apply to Prompt to review it in the composer, or click ✨ Enhance & Generate to build immediately.
3.3 Attaching Reference Images & Using WordPress Media Library Assets #
BBAIAgent makes it effortless to use real images and visual references inside Section mode:
- Attach a Visual Reference Image: Click the Image icon next to the Section badge in the composer bar, drag-and-drop an image onto the composer box, or paste a screenshot directly from your clipboard with Ctrl + V (Cmd + V on Mac). BBAIAgent will use that image as the layout inspiration while following your text instructions.
- Use Real WordPress Media Library Images: Simply mention an uploaded file name or media title in your prompt (for example, "use hero-banner.webp" or "photo named John-Profile"). BBAIAgent automatically searches your WordPress Media Library and attaches the exact verified image ID and URL.
- Automatic
placehold.coFallbacks: If you don't specify a Media Library image, BBAIAgent never uses broken or random stock URLs. Instead, it inserts crisp, properly sizedhttps://placehold.co/placeholders so your layout renders cleanly until you swap in your own photo inside Bricks.
3.4 Conversational Refinement #
You don't have to get everything perfect on the first prompt. After BBAIAgent generates a section, stay in the same chat thread and ask for changes just like talking to a designer:
- Follow-Up Prompts: Type adjustments such as "Change the grid from 3 columns to 4 columns", "Add a money-back guarantee badge under the CTA", or "Make the background dark using our palette". BBAIAgent updates the existing section structure rather than starting from scratch.
- Quick Refinement Chips: Click any suggested chip below the AI reply — Make the headline bolder, Add a second button, or Adjust mobile spacing — to prefill common tweaks instantly.
Converting Code & Design Screenshots to Bricks
Bring existing HTML/CSS components or UI screenshots straight into Bricks Builder with two dedicated conversion modes.
4.1 HTML to Bricks Mode (Code Compiler) #
Already have an HTML & CSS snippet from Tailwind, CodePen, or another template? Click Html To Bricks in the left sidebar to compile it directly into native Bricks elements — with zero AI tokens used.
Add Your HTML & CSS
Paste code directly into the line-numbered editor, click Paste to pull from your clipboard, or click Upload to import an .html / .htm file. You can include <style>...</style> blocks right inside your HTML.
Compile to Native Bricks Hierarchy
Click the Send button (or press Ctrl + Enter). BBAIAgent maps semantic tags (<section>, <h1>–<h6>, <p>, <img>, <svg>, <button>), CSS rules, and responsive @media breakpoints (991px, 767px, 478px) into Bricks' native Section → Container → Block → Div tree.
<style>
.cta-box { display: flex; flex-direction: column; gap: 16px; padding: 48px; border-radius: 16px; }
</style>
<section>
<div class="container cta-box">
<h2>Ready to launch faster?</h2>
<p>Compile any clean HTML & CSS snippet directly into native Bricks elements.</p>
<button href="/get-started">Start Building</button>
</div>
</section>
4.2 Image to Bricks Mode (Vision & Screenshot Reconstruction) #
Have a wireframe sketch, or website screenshot you want to recreate in Bricks? Switch to Image To Bricks in the left sidebar.
- Upload Your Screenshot: Drag-and-drop an image onto the dropzone, click to browse, or press Ctrl + V to paste from your clipboard. Supported formats are PNG, JPG, and WebP (up to 10 MB).
- Add Optional Layout Notes: Use the prompt field below the preview to guide the AI — for example, "Make this a 3-column grid on desktop and stack on mobile, using rounded buttons".
- Pick a Vision-Capable Model: Choose a multimodal model such as Gemini Flash/Hydrogen, Claude Sonnet 5.5 / 3.5, GPT-6 / GPT-4o, or Llama 3.2 11B Vision, then click Send.
Crop screenshots to a single section (like just the Hero or just the Pricing Grid) rather than a 5,000px full-page capture. Focused section screenshots yield cleaner spacing, accurate typography, and better mobile responsiveness.
Inspecting, Previewing & Inserting Results into Bricks
Every generated or compiled section opens in the Result Panel so you can inspect its structure, preview how it looks, and insert it safely into your page.
5.1 Exploring the 3-Tab Result Panel #
Once generation completes, the Result Panel slides open on the right with three inspection tabs:
- Structure Tab: Shows total element count, nesting depth, element-type summary pills (e.g.,
Section 1,Container 1,Block 4,Heading 3), and a full indented hierarchy tree with text snippets and attached Global Class badges. - Visual Tab: Renders an instant, zero-token live desktop preview inside an isolated frame using your site's active Color Palette, CSS variables, and typography scale.
- Code Tab: Displays the full syntax-highlighted
bricks-section.jsonfile with line numbers, file size, and a one-click Copy button.
The Visual tab displays an approximate estimate to give you a quick idea of how the section is structured and styled. When you insert the section into Bricks Builder, there may be slight visual differences because your full Bricks Theme Styles, custom CSS, Global Classes, and dynamic WordPress tags render natively inside the editor — giving you the exact, original design on the live Bricks canvas.
5.2 Inserting into the Page vs. Copying Bricks JSON #
When you are ready to add the section to your page, you have two easy options in the Result Panel header:
- Insert into page (Recommended): Injects all elements and Global Classes straight into the live Bricks Builder editor with zero page reload, smoothly scrolls the canvas to the new section, and saves a native Bricks Revision snapshot in the background.
- Copy Code: Copies the complete
bricksCopiedElementsJSON to your clipboard. You can paste it directly into the Bricks Structure Panel with Ctrl + V — even across different pages or websites.
If you ever change your mind after inserting, press Ctrl + Z or open Bricks' native Revisions history to restore your previous page state.
Design System Synchronization, History & Preferences
Inspect how BBAIAgent syncs with your Bricks Design System, revisit past generations in History, and customize compiler preferences.
6.1 Using the Bricks Design System Inspector #
Click Design System in the left sidebar to see the live tokens BBAIAgent reads from your Bricks Builder setup:
- Color Palettes & Swatches: View all your Bricks Color Palettes and select which Active Color Palette the AI should use for backgrounds, headings, text, and accents. Click any color swatch (including Dark mode previews) to copy its
var(--...)token. - Theme Style Inheritance & Coverage Matrix: Shows exactly which settings are already defined in your active Bricks Theme Style (
✓ Configured in Theme Style — AI Inherits) versus which ones are missing (⚡ Not Set — AI Styles with Variables) across Base & Containers, Typography (Body, H1–H6), Button Variants, Theme Colors, and Theme Style Elements. - Global Variables Explorer: Browse all CSS variables from frameworks like Automatic.css (ACSS), Core Framework, or Bricks' native Variable Manager, filtered by All, Spacing, Typography, and Radius & Layout. Click any card to copy the expression.
- Global CSS Classes Directory: Inspect detected Bricks Global Classes along with their semantic roles (
button,card,layout,heading) and click to copy class names. - Resync Design System: Added new colors or variables in Bricks? Click Resync Design System at the top-right to refresh tokens immediately.
6.2 Managing Saved Chats & Section History #
Every section you generate is saved automatically:
- Browse, Filter & Search: Click History in the left sidebar to filter sessions by All, Section, Html To Bricks, or Image To Bricks, or use the search bar to find a section by title.
- Reopen Anytime: Click any saved card to restore the full chat thread, version history, and Result Panel previews — ideal for continuing refinements or inserting the same section onto a different page.
- Delete Sessions: Hover over a card and click the × button to remove an old chat.
- Configure Retention Limit: Go to Settings → General inside the modal to set your History Retention Limit anywhere from
5to100sessions per user (recommended default:30). Older sessions are pruned automatically to keep your database lean.
6.3 Configuring Compiler & Generation Preferences #
Open Settings → Compiler & Generation inside the BBAIAgent modal to control how code is generated and saved:
- Design Token Synchronization: Automatically injects your active Bricks color palette, global classes, and CSS variables into AI prompts so outputs stay on-brand.
- Global Classes & Variables: Automatically registers newly generated CSS classes as native Bricks Global Classes in your stylesheet.
- Bricks Revisions & Undo: Creates a native WordPress/Bricks revision snapshot before every canvas insertion so you can undo immediately with Ctrl + Z.
Bricks & WordPress Productivity Toolkit
Speed up your daily Bricks Builder & WordPress Admin workflow with independent, lightweight toolkit modules — with more on the way.
7.1 Overview of Toolkit Modules #
To enable or configure Toolkit modules, go to WP Admin → BBAIAgent → Toolkit Modules. You can filter the cards by All, Bricks Builder, or WordPress, toggle on only the tools you want, and click Save Toolkit Settings.
7.2 Auto BEM & Class Converter #
Built a section using ID styles and now want clean, reusable BEM classes? Turn on Auto BEM & Class Converter in Toolkit Modules. Inside Bricks Builder, a compact BEM button now appears next to every element in the Structure Panel.
ID to Class Workflow (Generate BEM Classes)
- Click the BEM button on any parent Container, Block, or Card in the Bricks Structure Panel to open the Class Converter modal.
- Set your Basename (e.g.,
pricing-card) and Delimiter (default__). - Inspect the live Preview tree (
.pricing-card,.pricing-card__heading,.pricing-card__button) and uncheck any child element you want to skip. - If an existing class is detected, choose how to handle it: Rename Classes, Create New & Remove Old, or Create New & Delete Old.
- Choose Yes/No for Copy ID styles to class(es)? and Erase ID styles from elements?, then click Apply Classes.
Class to ID Workflow (Migrate Back to IDs)
Switch to the Class to ID tab inside the Class Converter modal and click Migrate Styles & Detach. BBAIAgent copies every style property from the applied Global Classes back onto each element's ID settings (including converting .class-name in custom CSS back to %root%) and detaches the classes cleanly.
7.3 Visual Style Indicators #
Never accidentally style an element at the ID level when you meant to edit its Global Class. Enable Visual Style Indicators in Toolkit Modules to audit your entire Structure Panel in real time:
Under the Visual Style Indicators card in BBAIAgent → Toolkit Modules, choose your preferred Indicator Layout:
- Status Dots next to element actions (clean colored dot indicator)
- Left accent border on Structure row (vertical color bar)
- Colorize Structure label text (tinted element name)