Egenverk Babbla · Documentation
The assistant
The assistant answers questions about the store, such as "How much did we sell yesterday?" or "Which product sold best in September?". It uses a fixed set of tools that only read, never runs free-form SQL and cannot change anything.
Where the assistant answers
- In your assistant conversation it answers every message. The conversation is yours alone.
- In a room it answers once when someone mentions it with
@, either from the list, where it comes first with "Answers once in this room", or by typing@followed by the assistant's name. The answer is visible to everyone in the room and may include store data the asker can access. The chat shows a warning about this. - In direct messages it never answers.
The assistant answers in the site's language and writes Markdown, which the chat shows as headings, lists and bold text. While it works, the chat shows what it is doing, for example "Searching the chat…".
In your assistant conversation it sees the images in your newest message, at most three, scaled down to 1,568 px. Older images and other files reach it only as a line with the file name.
The tools
The tools run with the asker's own rights. The tools for the chat and the store's pages require chat access; the other tools require that the user may manage WooCommerce.
| Tool | Reads |
|---|---|
shop_info | Basic facts about the store |
sales_summary | Sales for a period |
top_products | Best-selling products |
analytics_report | Sales and refunds by day, week, month, product, category, country, payment method or customer, and the number of customers, new and returning |
order_lookup | One order at a time, with up to ten refunds, the ten latest notes and the order fields you allow |
calculate | Works out numbers with its own safe expression tool |
list_conversations, search_chat, read_conversation | Chat conversations the asker can already open; a search covers the last 90 days unless told otherwise |
list_documents, read_document | The store's terms, privacy policy and pages you choose |
ga4_report, search_console_report, merchant_product_issues | The Google sources, if you have switched them on |
The sales tools read WooCommerce Analytics and count paid orders only. A period may be at most 400 days. The assistant is instructed to calculate with calculate rather than work numbers out itself; that is an instruction, not something the code enforces.
A question may use tools in at most eight rounds and should be done within a minute and a half. At most two questions are answered at the same time across the whole site; a third waits in the queue and the chat shows the assistant as busy.
Settings
The Settings tab under Settings → Babbla is one page with the cards Overview, Provider, Behaviour, Google, Limits and cost and Data. The Help panel at the top right has the tabs API keys, Models, Cost and limits and What is sent.
Overview
Shows whether a key exists and where it comes from, which model is entered, and the daily budget. Under Getting started are four steps from an empty install to a working assistant; they are expanded for as long as no key is stored.
Provider
| Setting | Default | What it does |
|---|---|---|
| Provider | Anthropic | Anthropic or OpenAI. Only the chosen provider's fields show. |
| Anthropic API key / OpenAI API key | Empty | Your own key. After saving, only the last four characters show, such as "Saved (…abcd).". Tick Remove key to remove it. A constant in wp-config.php takes precedence over the field, which then reads "Set in wp-config.php." and cannot be edited. |
| Anthropic model | Sonnet 5 | Any model id the provider documents, so a model released later works too. |
| OpenAI model | gpt-5.6-terra | The same for OpenAI. |
Save everything and test the connection saves the form and asks the provider one test question without tools. You see which model answered and how long it took, or the provider's error verbatim. Testing a provider does not switch the assistant over to it.
Behaviour
| Setting | Default | What it does |
|---|---|---|
| Agent name | Agent | At most 40 characters. Shown in the chat and used when someone types @ and the name. Left empty, Agent is used. |
| System prompt | Shipped text | At most 4,000 characters. The shipped text asks the assistant to answer in the site's language. If you clear the field and save, it goes back to the default text. A prompt you have edited is never touched by updates. |
| Agent capability | Empty | Who may talk to the agent. Empty means the same as chat access. Enter the name of a WordPress capability, in lower case letters and underscores. |
| Floating bubble | On | The site's default for the bubble, see The chat. |
| Bubble size | Normal | Small, Normal or Large. |
| Readable pages | None | Published pages the assistant may quote, such as shipping, returns and warranty. The terms and privacy pages are always readable. Hold Ctrl (Cmd on Mac) to pick several; at most 20 are saved. |
| Readable order fields | None | One metadata key per line, at most 30. See below. |
| Integrations | All off | One switch per plugin that offers the assistant its own tools. |
Readable pages: a page that is unpublished or password-protected stops being readable at once. Shortcodes and dynamic blocks are not run, so text that lives only in a dynamic block is not seen by the assistant.
Readable order fields: only those keys are read, and only for the order the question is about. A key may contain letters, digits and the characters _ . : -, up to 64 characters; other lines are dropped on save. E-mail addresses and phone numbers are masked. The lookup also includes the latest order notes and refund reasons, which are free text and may contain customer names or addresses; they are sent to the AI provider. Leave the field empty to share no metadata.
Integrations: each integration shows what it adds, which tools it has and what it sends. A new integration is off until an administrator switches it on. Tools a plugin added without declaring itself are grouped under "Tools from an undeclared plugin".
Limits and cost
| Setting | Default | What it does |
|---|---|---|
| Rate limit (questions/min/user) | 10 | 1–60 questions to the assistant per user per minute. A user who reaches it gets "Too many questions to the agent. Wait a minute." |
| Daily token budget (0 = no budget) | 500,000 | Input and output tokens together, for the whole site. Once it is passed, the assistant answers "The daily budget for the agent has been reached." for the rest of the UTC day. 0 means no budget. At most 10,000,000. |
| Tool cache TTL (seconds) | 300 | 0–3,600 seconds a tool result is reused before the store is queried again. Higher is cheaper and staler. Order lookups, calculations and reads of the chat and pages are never cached. |
| Input price per 1M tokens | 0 | What your provider charges per million tokens, in the store's currency (the label carries the currency code). Up to four decimals; a comma works as the decimal separator. |
| Output price per 1M tokens | 0 | The same for output tokens. With both at 0, no cost figure is shown anywhere. Providers usually quote prices in US dollars; convert them before saving. |
Data
| Setting | Default | What it does |
|---|---|---|
| Diagnostic log | Errors only | Off, Errors only, Errors and warnings, Everything the agent does, or Debug (verbose). See Troubleshooting. |
| Purge data on uninstall | Off | Deletes Babbla's data when the plugin is deleted. See Data and privacy. |
Saving
When something has changed, the bar Unsaved changes shows at the bottom with the button Save changes, and "Settings saved." confirms. Pressing Enter in a text field also saves, without running the connection test.
The Google card lets the assistant answer questions about traffic in Google Analytics 4, searches in Search Console and product problems in Merchant Center.
- Create a service account in Google Cloud and download its JSON key.
- Enable the Analytics Data API, the Search Console API and the Merchant API for the project.
- Add the service account's e-mail address as a Viewer in GA4 (Admin, Property access), as a user in Search Console (Settings, Users and permissions) and as a user in Merchant Center (Settings, People and access).
- Paste the whole key file into Service account key and fill in the sources you want to use:
- GA4 property id: digits only, not the measurement id that starts with G-.
- Search Console property:
sc-domain:example.comfor a domain property, or the URL with a trailing/for a URL-prefix property. - Merchant Center account id: digits only.
- Save, then click Test connection. The test uses the saved settings, fetches a token and makes one small call per source. You see OK or Google's error for each.
- Switch on the integration Google (Analytics, Search Console, Merchant Center) under Integrations in the Behaviour card. Until then the tools are not used.
The assistant gets tools only for the sources you filled in. Google results are cached for five minutes.
The key is write-only: after saving, only "Key saved for" and the service account's e-mail address show. To replace the key, paste a new one; Remove key removes it. On a production site the key can live in wp-config.php instead, see Reference.
Usage
The Usage tab shows how the assistant is used. Choose a Period: Last day, Last 7 days or Last 30 days, and click Show.
- Questions, Failed, Tokens in and Tokens out, and an estimated Cost when prices are set.
- Per user: questions, failed, tokens in and out, average answer time in seconds and cost.
- Tokens per day (last 30 days): a chart against the daily budget. A day over the budget is red.
- Recent jobs: the 50 most recent questions with time, user, status, tokens and error.
The tab shows facts about the questions only, never message text or channel names.