Egenverk Babbla · Documentation

Reference

v0.52.0WP 6.2+PHP 7.4+Updated

Babbla is in early development (0.x). The names below may change before 1.0.

Constants in wp-config.php

A constant takes precedence over the field on the settings page and keeps the key out of the database. The field then reads "Set in wp-config.php." and cannot be edited. Older installs may have BBL_ANTHROPIC_KEY or BBL_OPENAI_KEY; they still work, but the EGVB_ name wins when both are defined.

ConstantValue
EGVB_ANTHROPIC_KEYAPI key for Anthropic
EGVB_OPENAI_KEYAPI key for OpenAI
EGVB_GOOGLE_SERVICE_ACCOUNTThe service account's JSON key, or an absolute path to the JSON file. The Google key field is disabled.
define( 'EGVB_ANTHROPIC_KEY', '...' );
define( 'EGVB_OPENAI_KEY', '...' );
define( 'EGVB_GOOGLE_SERVICE_ACCOUNT', '/absolute/path/key.json' );

Capabilities

CapabilityGrants
egvb_chatChat access
egvb_manageBabbla administration: settings, usage and diagnostics

These capabilities are granted on the Access tab. They never grant any WordPress or WooCommerce capability.

Filters

FilterDoesDefault
egvb_capabilityA capability that also gives chat accessegvb_chat
egvb_admin_capabilityA capability that also gives Babbla administrationegvb_manage
egvb_tool_capabilityThe capability the assistant's store tools requiremanage_woocommerce
egvb_rate_limitMessages a user may send per minute30
egvb_upload_rate_limitUploads per ten minutes per user30
egvb_agent_concurrencyAssistant questions answered at the same time, at least 12
egvb_poll_intervalThe minimum seconds a closed chat waits between its scheduled requests, 0–600; a way for a busy site to space out requests0
egvb_files_dirThe folder where attached files are storedSee Data and privacy
egvb_agent_toolsLets another plugin add tools for the assistant
egvb_integrationsLets that plugin declare its integration: name, version, tools and what they read
egvb_redacted_keysMore field names to remove from tool results
egvb_tool_status_labelThe text the chat shows while a tool runs
egvb_anthropic_request, egvb_openai_requestThe body of the request to each provider, just before it is sent

Tools added through egvb_agent_tools are used only once an administrator has switched their integration on under Settings. Tools without a declaration are grouped as tools from an undeclared plugin and can be switched off too.

A tool callback receives the arguments and the asking user's id, fn( array $args, int $user_id ). A tool that reads the user's own data must use that id, since the job runs in the background with no user logged in.

WP-CLI

CommandDoes
wp egvb job listLists the assistant's 20 most recent jobs, optionally filtered with --status
wp egvb job run with a job idRuns a job straight away. The limit on simultaneous questions does not apply here.
wp egvb lean on, off, statusSwitches lean chat reads on, off, or shows their state

REST API

The chat uses the REST namespace babbla/v1 with the WordPress login cookie and nonce. Every route requires chat access and follows the same rules for who sees what as the chat.

Resources