Documentation

Learn PressBot

Everything you need to set up, configure, and get the most out of your AI WordPress assistant.

Getting Started

Installation

Free Version:

  1. Download the free version from pressbot.io
  2. Go to Plugins → Add New → Upload Plugin
  3. Upload the zip and click Activate

Pro Version:

  1. Purchase a Pro license from the Pro page
  2. Download the zip from your purchase confirmation email
  3. Go to Plugins → Add New → Upload Plugin
  4. Upload the zip and activate
  5. Enter your license key when prompted

API Key Setup

PressBot uses a BYOK (Bring Your Own Key) model. You'll need at least one API key:

Anthropic Claude

  1. Visit platform.claude.com
  2. Create an account and add billing
  3. Go to API Keys and create a new key
  4. Copy the key (starts with sk-ant-)

Google Gemini

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the key (starts with AIza)

Paste your key(s) in PressBot → Settings → API Keys. Keys are encrypted with AES-256-CBC and stored securely in your database.

Quick Configuration

After setting up your API key, configure these basics:

  • System Prompt — Tell the AI about your business, tone, and what topics to focus on
  • Welcome Message — The first message visitors see when the chatbot opens
  • Appearance — Colors and position (left/right)
  • Knowledge Base — Add business-specific information the AI should know

That's it! Your chatbot is live. For Pro users, the admin agent is available immediately in the WordPress dashboard.

Visitor Chatbot

Configuration

Customize your chatbot in PressBot → Settings:

  • Bot Name — Give your assistant a custom name (e.g. "Luna", "Support Bot")
  • Colors — Primary color, text color, and background. Match your brand.
  • Theme — Light, dark, or auto (follows the visitor's system preference)
  • Position — Bottom-left or bottom-right of the screen
  • Welcome Message — The greeting visitors see when the widget opens
  • Placeholder Text — Hint text in the input field
  • Focus Mode — Restrict the chatbot to only answer questions relevant to your site. Prevents off-topic conversations and keeps the AI on-brand.

Knowledge Base

The knowledge base lets you provide business-specific information to the AI. Content you add here is included in every conversation's system prompt, so the chatbot can answer questions about:

  • Your products, services, and pricing
  • Business hours and contact information
  • Return policies, FAQs, and common questions
  • Any topic unique to your business

Go to PressBot → Knowledge Base to add or edit your content. Plain text works best — keep it concise and factual.

Rate Limiting

Protect your API budget with built-in rate limiting:

  • Messages per session — Limit how many messages a single visitor can send
  • Cooldown period — Time between allowed sessions

Configure in PressBot → Settings → Rate Limiting.

Conversation Logs

Every conversation is logged in your WordPress database. View them in PressBot → Conversations:

  • Browse all visitor conversations
  • See full message history for each session
  • Export conversations as CSV
  • Delete individual conversations or bulk clear

Logs stay on your server — nothing is sent to external services.

Explain CTAs

Overview

Explain CTAs are “Ask PressBot” buttons that appear on page sections, giving visitors AI-powered explanations of your content on demand. Instead of reading through dense pricing tables, technical specs, or policy pages, visitors click the button and get a clear, conversational explanation powered by your knowledge base.

Explain CTAs work alongside the chatbot — they open the chat widget with a pre-filled question about the section the visitor clicked. The AI uses the section’s content (plus any knowledge base context you provide) to generate a helpful, on-topic response.

Setup

Enable Explain CTAs in PressBot → Settings → Explain CTAs. Once enabled, any HTML element with the appropriate data attributes will display an “Ask PressBot” button.

No additional JavaScript or CSS is required — the chatbot frontend handles everything automatically.

Data Attributes

Mark any HTML element as an explainable section using data attributes:

Attribute Reference

data-pressbot-explain
Required
Section title shown in the CTA and used as the conversation topic. Example: "Pricing Plans"
data-pressbot-context
Optional
Explicit context override. If omitted, PressBot extracts the section’s textContent automatically.
data-pressbot-kb
Optional
Filename of a knowledge base file to include for additional context (e.g. "pricing-details")

Example

HTML

<section
  data-pressbot-explain="Pricing Plans"
  data-pressbot-context="We offer three tiers: Starter $29/mo, Pro $99/yr, Agency $399/yr"
  data-pressbot-kb="pricing-details"
>
  <h2>Pricing Plans</h2>
  <!-- your pricing table markup -->
</section>

Shortcode

Use the [pressbot_explain] shortcode to render an inline CTA pill anywhere in your content — posts, pages, or widgets.

Shortcode

[pressbot_explain title="Money-Back Guarantee" context="We offer a 30-day money-back guarantee on all plans" kb="refund-policy" class="my-custom-class"]

Shortcode Parameters

title
Required
Section title for the explanation topic
context
Optional
Explicit context to send to the AI
kb
Optional
Knowledge base filename for additional context
class
Optional
Additional CSS class(es) for the CTA pill element

JavaScript API

Trigger explanations programmatically using the global window.PressBot object:

JavaScript

// Trigger an explanation programmatically
window.PressBot.explain({
  title: 'Pricing Plans',
  context: 'We offer three tiers with annual billing...',
  kb: 'pricing-details'
});

// Widget control methods
PressBot.open();    // Open the chat widget
PressBot.close();   // Close the chat widget
PressBot.toggle();  // Toggle open/closed

Method Reference

PressBot.explain(opts)
Opens the widget and sends an explain request with the given title, context, and kb
Returns void
PressBot.open()
Opens the chat widget without sending a message
Returns void
PressBot.close()
Closes the chat widget
Returns void
PressBot.toggle()
Toggles the chat widget open or closed
Returns void

Admin Agent Pro

Pro users can manage Explain CTAs through the admin agent using the manage_explain_section tool. Just describe what you want in natural language:

Example Prompts

“Add an explanation to the pricing section on /pro/ about our money-back guarantee”

“Remove the Explain CTA from the FAQ section on the homepage”

“Update the explain context for the features section to mention our new integrations”

The agent handles adding data attributes to the appropriate elements, setting context, and linking knowledge base files.

White-Labeling Pro

Customize the Explain CTA appearance to match your brand:

  • Hide PressBot Logo — Remove the PressBot branding from Explain CTA buttons
  • Custom Icon URL — Replace the default icon with your own image or SVG

Configure in PressBot → Settings → White Label.

Security

Explain CTAs are designed with security in mind:

  • textContent Extraction — Section content is extracted via textContent, not innerHTML. No HTML or scripts are passed to the AI.
  • Character Truncation — Extracted content is truncated to 2,000 characters to prevent abuse and manage token costs.
  • Prompt Delimiters — Section context is wrapped in <section-context> delimiters within the prompt, preventing injection attacks from page content leaking into system instructions.

Admin Agent Pro

Overview

The Admin Agent is an AI assistant that lives in your WordPress dashboard. Instead of clicking through menus, you describe what you want in natural language and the agent executes it using 77 built-in tools.

Access it from PressBot → Admin Agent in your WordPress admin sidebar.

The agent respects WordPress user capabilities — it can only do what your user role allows. Destructive actions (deleting posts, bulk updates) require confirmation before executing.

Tool Reference

The 77 tools are organized into 20 categories:

Content Management

Create, update, delete, and bulk update posts and pages. Schedule publishing, manage featured images, and search content.

Content Audit

Find posts missing featured images, check SEO gaps, review drafts, and audit content quality.

Media Management

Upload files, search the media library, and organize attachments.

AI Image Tools

Generate images from text prompts, or use AI vision to auto-generate alt text, captions, and descriptions for existing images. Requires a Gemini API key.

Plugin Management

Search WordPress.org, install, activate, deactivate, update, and delete plugins.

Menus & Navigation

Create and modify navigation menus, add/remove menu items.

Taxonomies

Manage categories, tags, and custom taxonomies.

Users & Comments

List users, manage comments (approve, moderate, delete).

Themes & Options

View theme info, activate themes, read and update whitelisted site settings.

SEO & Analytics

Per-post SEO analysis, site-wide content stats, and overview dashboards.

Revisions

Browse revision history, compare versions, and restore previous content.

Cron Management

View and schedule WordPress cron events (pressbot-prefixed hooks only).

Security

12-point security audit covering SSL, PHP version, debug mode, file editing, admin usernames, plugin updates, and more.

Bulk AI Operations

Generate featured images and auto-describe media in bulk using AI. Real-time progress reporting.

WooCommerce (10 tools)

Orders, products, coupons, customers, and sales analytics. See the WooCommerce section below.

AI Image Generation

The agent can generate and describe images using Google's Gemini vision models. Requires a Gemini API key.

Generate Images

Create images from text descriptions. Generated images are saved to your media library and can be set as featured images.

"Generate a featured image for this post"

Describe Images

Use AI vision to auto-generate alt text, captions, and descriptions for existing images. Improves accessibility and SEO.

"Describe all images missing alt text"

Bulk operations — Generate featured images or describe media for multiple items at once. The agent reports real-time progress as it processes each item.

Usage Tips

The agent works best with clear, specific instructions. Examples:

"Create a blog post about our Black Friday sale, schedule it for next Friday"

"Find all posts without featured images"

"Install and activate Contact Form 7"

"Update all posts in the News category to add a disclaimer at the bottom"

"Show me this week's sales and top products"

The Admin Agent is available in all Pro plans with 77 tools across 20 categories.

Get Pro

Content Pipeline Pro

Overview

The Content Pipeline is a multi-agent system that creates complete, publish-ready blog posts from a single prompt. Instead of one AI call, it orchestrates up to 7 specialized agents that each handle one step of the content creation process.

Trigger it by asking the admin agent to write content:

"Write a blog post about migrating from shared hosting to VPS"

The agent detects this is a content creation request and automatically runs the full pipeline, reporting progress at each stage via real-time status updates.

Pipeline Stages

Each stage runs a dedicated AI agent with a focused system prompt. Optional stages can be toggled in settings.

1

Researcher

Analyzes your site's existing content, audience, and style. Identifies what's already been written to avoid duplication and find opportunities for internal linking.

2

Strategist

Optional

Searches the web for trending angles, competitor content, and current data relevant to the topic. Uses AI web search to ground the article in up-to-date information.

3

Writer

Creates the full post — title, excerpt, and body content — using research from previous stages. Writes in your site's voice and optimizes for readability and SEO.

4

Critic

Optional

Reviews the draft for quality, accuracy, and engagement. Rewrites weak sections, improves flow, and tightens the prose. Acts as an AI editor.

5

Image Generator

Optional

Generates a contextual featured image based on the post content using Gemini's image generation. The image is saved to your media library and automatically attached to the post.

6

Categorizer

Picks the best existing category for the post, or creates a new one if none fit. Keeps your content organized without manual sorting.

7

Executor

Creates the WordPress post as a draft with the title, content, excerpt, featured image, and category. You review and publish when ready.

Per-Stage Model Selection

Each pipeline stage can use a different AI model, letting you balance cost and quality. Configure in PressBot → Settings → Pipeline Models.

Stage
Default Model
Recommendation
Researcher
Claude Haiku 4.5
Fast model — just analyzing your site
Strategist
Claude Haiku 4.5
Fast model — web research summary
Writer
Claude Sonnet 4.5
Quality model — this writes the post
Critic
Claude Sonnet 4.5
Quality model — editorial review
Categorizer
Claude Haiku 4.5
Fast model — just picks a category
Image Generator
Gemini 2.5 Flash
Gemini required for image generation

Cost tip: Use cheaper models (Haiku, Gemini Flash) for research and categorization stages. Save quality models (Sonnet) for the writer and critic where output quality matters most.

Configuration

Configure the pipeline in PressBot → Settings:

  • Strategist — Toggle web research stage on/off. Disable to skip web search and reduce API cost.
  • Critic — Toggle editorial review on/off. Disable for faster, cheaper content at the cost of a second-pass quality check.
  • Image Generation — Toggle automatic featured image generation. Requires a Gemini API key.
  • Post Author — Which WordPress user is credited as the post author.

The Content Pipeline is available in all Pro plans. Create publish-ready posts with a single prompt.

Get Pro

WooCommerce Integration Pro

Setup

WooCommerce integration is automatic. When WooCommerce is active on your site, PressBot detects it and adds 10 dedicated store tools to the admin agent. No extra configuration needed.

The integration works with both legacy storage and HPOS (High-Performance Order Storage).

Sales & Analytics

Ask the agent about your store performance:

"How are sales this week?"

"What are my top 5 products by revenue?"

The agent returns real-time data: revenue totals, order counts, average order value, and top-selling products.

Product Management

Create and manage products through conversation:

  • List and search products
  • Create new products with title, price, description, and stock
  • Update existing product details
  • View product details and inventory status

Order Management

Manage your order workflow:

  • List recent orders with status and totals
  • View order details (items, customer, shipping)
  • Update order status (processing, completed, on-hold)

"Mark order #1234 as completed"

Coupons

Create discount codes on the fly:

"Create a 20% off coupon code WEEKEND20 that expires Sunday, limit 100 uses"

The agent handles discount type, amount, usage limits, expiry dates, and minimum spend requirements.

WooCommerce integration with 10 store tools is included in all Pro plans.

Get Pro

Lead Capture Pro

Pro includes built-in lead capture that collects visitor information before or during conversations.

How It Works

  1. Enable the pre-chat form in PressBot → Settings → Lead Capture
  2. Choose which fields to collect: name, email, phone
  3. Visitors fill out the form before starting a conversation
  4. Leads are stored in your WordPress database

Viewing Leads

Go to PressBot → Leads to view all captured leads. Each entry includes:

  • Contact information (name, email, phone)
  • Source page (which page they were on)
  • Linked conversation
  • Date and time

Exporting

Export all leads as CSV from the Leads dashboard. Use the data in your CRM, email marketing tool, or spreadsheet.

Email Notifications

Get notified when new leads come in. Configure the notification email address in PressBot → Settings → Notifications.

Lead capture with CSV export and email notifications is included in all Pro plans.

Get Pro

Telegram Bot Pro

Overview

The Telegram bot lets you manage your WordPress site from your phone. All 77 admin tools work via text messages — content management, plugins, WooCommerce, security audits, and more. No browser needed.

Beyond tools, you can upload photos directly to your media library, create and publish content through conversation, and receive security alerts for critical events.

Setup

Setting up the Telegram bot takes about 2 minutes:

  1. Create your bot — Open Telegram and message @BotFather. Send /newbot and follow the prompts to name your bot.
  2. Copy the bot token — BotFather will give you an API token. Copy it.
  3. Paste in PressBot — Go to PressBot → Settings → Telegram and paste the bot token.
  4. Add your Telegram user ID — Enter your numeric Telegram user ID (message @userinfobot on Telegram to find it). Only whitelisted IDs can use the bot.
  5. Register the webhook — Click "Register Webhook" to connect your bot to your site. Done!

All 77 Tools via Text

Everything the admin agent can do in the browser works in Telegram too. Just text your bot:

"Are any plugins outdated?"

"Run a security audit"

"How are sales this week?"

The bot uses the same multi-agent pipeline as the browser admin agent, with full tool selection and execution.

Photo Uploads

Send a photo from your camera roll and it goes straight to your WordPress media library. Add a caption to give the bot instructions:

[photo] "Use this as the featured image for my latest post"

[photo] "Add to the media library as team-photo.jpg"

Photos are uploaded at full resolution. The bot confirms the upload with a link to the file in your media library.

Content Creation

Create and publish full blog posts through conversation. The same 8-stage content pipeline runs via Telegram:

"Write a blog post about our holiday hours and publish it"

The bot runs the full pipeline — research, strategy, writing, criticism, image generation, categorization, and publishing — then sends you the live URL.

Note: Content created via Telegram publishes immediately (no preview step). Review the post on your site after publishing.

Security Alerts

The bot sends you 7 types of security and monitoring alerts:

Real-time Alerts

  • Brute force detection — Alerts when multiple failed login attempts are detected within a short window
  • New user registration — Immediate notification when a new user account is created

Daily Digest

  • Plugin updates — Summary of available plugin updates
  • Failed logins — Count and details of failed login attempts
  • Security audit changes — Changes in security posture since last check
  • New users — Summary of users registered that day
  • PHP errors — Critical errors from the WordPress debug log

Configure which alerts you receive in PressBot → Settings → Telegram → Alerts.

Security

The Telegram integration uses multiple security layers:

  • User ID whitelist — Only your whitelisted Telegram user IDs can interact with the bot
  • Webhook secret — Requests are verified with a secret token to prevent spoofing
  • Encrypted bot token — Stored with AES-256-CBC encryption, same as your API keys
  • Rate limiting — Built-in rate limiting prevents abuse (10 messages/minute)

Telegram bot with all 77 tools and security alerts is included in all Pro plans.

Get Pro

PressBot Shield Pro

Overview

PressBot Shield is an AI-powered login protection system. It monitors every login attempt, automatically locks out IPs that exceed configurable failure thresholds, and sends AI-analyzed threat alerts to Telegram with one-tap remediation buttons.

All login data is stored in a dedicated database table with 30-day auto-cleanup. IP detection is Cloudflare-aware, correctly identifying attackers even behind proxy services.

How It Works

  1. Login attempt recorded — Every failed and successful login is stored in the database with IP address, username, user agent, and timestamp.
  2. Threshold check — When failures from a single IP exceed your configured threshold (default: 5 in 15 minutes), the IP is automatically locked out.
  3. Lockout enforced — Locked IPs receive a “Too many failed attempts” error on the WordPress login page. The lockout expires after your configured duration (default: 30 minutes).
  4. AI analysis — When a burst is detected, PressBot uses the cheapest available AI model to analyze the attack pattern, threat level, and what the attacker likely knows.
  5. Telegram alert — You receive the AI analysis in Telegram with inline action buttons: Block IP (30 min), Block IP (24 hrs), View Details, or Dismiss.

Settings

Configure PressBot Shield in PressBot → Settings → PressBot Shield:

Setting Default Description
Enable PressBot Shield On Master toggle for login tracking and IP lockouts
Max Failures 5 Failed attempts before an IP is locked out
Time Window 15 min Period in which failures are counted
Lockout Duration 30 min How long an IP stays locked out
AI Analysis Level Security only “All reports” / “Security alerts only” / “None (data only)”

AI Threat Analysis

When enabled, PressBot Shield uses the cheapest available AI model to analyze security events:

  • Brute force alerts — AI evaluates attack pattern, threat level, what the attacker knows, and recommends action
  • Daily digest — AI summarizes 24h of login data with overall security posture and recommendations

You control the AI level:

  • All reports — AI enhances all digest sections
  • Security alerts only — AI only analyzes brute force and login data (default)
  • None — Pure data, no AI. You still get alerts and lockouts, just without the analysis

Cost: AI analysis uses your existing API key with the cheapest model (Gemini Flash or Haiku). Typical usage is less than $0.01 per day — each analysis is ~500 input tokens + ~200 output tokens.

Telegram Integration

PressBot Shield sends alerts to your Telegram bot with inline action buttons. When a brute force attack is detected, you’ll receive:

Security Alert — Your Site

5 failed login attempts for “admin” from 104.28.208.84 in the last 10 minutes.

AI: High threat. Automated credential-stuffing via Cloudflare tunnel. The username “admin” doesn’t match any real accounts. Recommend blocking.

Block IP (30 min) Block IP (24 hrs) View Details Dismiss

Tapping a button instantly executes the action — no browser needed. Requires Telegram Bot to be configured and webhook registered.

IP Detection

PressBot Shield uses a Cloudflare-aware detection chain to identify the real attacker IP:

  1. CF-Connecting-IP — Set by Cloudflare with the true client IP
  2. X-Forwarded-For — First IP in the chain (used by most reverse proxies)
  3. REMOTE_ADDR — Direct connection IP (fallback)

IPv6 addresses are fully supported.

Google Analytics 4 Pro

Overview

PressBot can connect to your Google Analytics 4 property and surface real traffic data directly in the Analytics dashboard — and make it queryable through the admin agent. Ask “How’s the site doing?” and get a composite report with sessions, top pages, traffic sources, Shield security events, and chatbot usage in one reply.

The integration uses the GA4 Data API with a service account — no OAuth redirect flow, no browser pop-ups. Credentials are encrypted with AES-256-CBC before being stored. All data is fetched server-to-server and never passes through PressBot’s infrastructure.

Setup

  1. Create a Google Cloud project — Go to console.cloud.google.com and create a new project (or use an existing one).
  2. Enable the GA4 Data API — In your project, navigate to APIs & Services → Library and enable the Google Analytics Data API.
  3. Create a service account — Go to APIs & Services → Credentials → Create Credentials → Service Account. Give it a name, then create a JSON key and download it.
  4. Grant access in GA4 — In your Google Analytics property, go to Admin → Account Access Management (or Property Access Management) and add the service account email with Viewer role.
  5. Connect in PressBot — Go to PressBot → Settings → Google Analytics 4. Enter your GA4 Property ID (format: 123456789) and paste the full JSON key contents into the service account field. Click Save & Connect.

Site Kit auto-detect: If you have Google Site Kit installed, PressBot will automatically detect your GA4 Property ID. You only need to provide the service account credentials.

Analytics Dashboard

Once connected, the PressBot → Analytics page gains a Google Analytics panel showing:

Metric Description
Sessions Total sessions in the selected date range
Users Unique users who visited your site
Pageviews Total page views across all sessions
Avg. Session Duration Mean time visitors spend per session
Top Pages Most-visited pages ranked by sessions
Traffic Sources Breakdown by organic, direct, referral, and social with visual bars

Dashboard data is cached for 30 minutes per date range to avoid hitting GA4 API limits. Date range options: 7, 14, 28, and 90 days.

Agent Tools

Two tools are available to the admin agent when GA4 is connected:

get_analytics_report

Returns raw GA4 traffic data for a configurable number of days: total sessions, users, pageviews, average session duration, top pages by sessions, and traffic sources by channel. If GA4 is not connected, returns a graceful message without error.

Example: “Show me traffic for the last 14 days”

get_site_report

A composite site health report combining: site statistics (posts, comments, users), AI chatbot usage (messages, sessions, estimated cost), PressBot Shield events (attacks, blocked IPs), GA4 traffic overview, and recent visitor feedback. Designed to answer broad questions about site performance in a single call.

Example: “How’s the site doing?”“Give me a full site report”

Security & Privacy

  • Service account JSON is encrypted with AES-256-CBC before being stored in the WordPress database.
  • The credentials are decrypted in memory only when making a GA4 API request — never exposed in the admin UI or REST API responses.
  • All requests go directly from your server to Google’s APIs. PressBot’s infrastructure is never involved.
  • Access tokens are cached as WordPress transients with a 1-hour TTL and automatically refreshed.
  • To disconnect, go to PressBot → Settings → Google Analytics 4 and click Disconnect. This clears the stored credentials and invalidates the cached token.

MCP Server Free + Pro

Overview

The MCP Server exposes all 77 admin tools to external AI clients via the Model Context Protocol. Connect Claude Code, Cursor, Windsurf, or any MCP-compatible client to your WordPress site and manage it from your IDE.

PressBot uses Streamable HTTP transport (JSON-RPC 2.0) with WordPress Application Password authentication. No SSH tunnels, no custom API keys — just standard WordPress auth over HTTPS.

Free users get 8 read-only tools (get_site_info, get_posts, get_plugins, get_comments, get_conversations, search_knowledge, and booking availability). Pro unlocks all 77 tools.

Setup

  1. Enable MCP — Go to PressBot → Settings → MCP Server and toggle it on.
  2. Generate an Application Password — Go to Users → Profile, scroll to Application Passwords, and create one named "MCP". Copy the password.
  3. Copy your config — The MCP settings panel shows a pre-generated JSON config with your site URL. Copy it.
  4. Paste into your client — Add the config to your AI client's MCP settings file (e.g., ~/.claude/mcp_servers.json for Claude Code).
  5. Test — Click the "Test Connection" button in PressBot settings, or run tools/list from your client.

Protocol

The MCP endpoint is POST /wp-json/pressbot/v1/mcp. All requests use JSON-RPC 2.0:

{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "id": 1
}

Available JSON-RPC methods:

Method Description
initialize Server name, version, and capabilities
tools/list All available tools with JSON Schema parameters
tools/call Execute a tool by name with arguments
resources/list Knowledge base entries available as context
resources/read Read a knowledge base entry by URI

Tools with destructive actions include annotations.destructiveHint: true so clients can prompt for confirmation.

Resources

Knowledge base entries are exposed as MCP resources with URIs like pressbot://kb/{slug}. AI clients can read these before taking action, giving them context about your site, policies, and workflows.

Resources are read-only and automatically reflect your current knowledge base content.

JavaScript Lifecycle Events

Overview

PressBot dispatches CustomEvent events on the document object throughout the chatbot lifecycle. Use these to integrate analytics, trigger custom UI, or build workflows around visitor interactions.

Events are always active — no configuration needed. They fire on both free and Pro versions.

Available Events

Event Reference

pressbot:open
Chat widget opened
firstOpen, timestamp
pressbot:close
Chat widget closed
messageCount, timestamp
pressbot:message
AI response completed
messageNumber, messageLength, responseLength
pressbot:error
Error during streaming
type, message

Every event includes a timestamp property in its detail object (Date.now() value).

Usage Examples

Google Analytics 4

Theme JavaScript or Custom Snippet

// Track chatbot opens in GA4
document.addEventListener('pressbot:open', (e) => {
  gtag('event', 'chatbot_open', {
    first_open: e.detail.firstOpen
  });
});

// Track completed conversations
document.addEventListener('pressbot:close', (e) => {
  if (e.detail.messageCount > 0) {
    gtag('event', 'chatbot_conversation', {
      message_count: e.detail.messageCount
    });
  }
});

Custom Integration

Theme JavaScript or Custom Snippet

// Log every message exchange
document.addEventListener('pressbot:message', (e) => {
  console.log(
    `Message #${e.detail.messageNumber}:`,
    `sent ${e.detail.messageLength} chars,`,
    `received ${e.detail.responseLength} chars`
  );
});

// Monitor errors
document.addEventListener('pressbot:error', (e) => {
  console.error('PressBot error:', e.detail.type, e.detail.message);
});

Event Detail Properties

Event
Property
Type
Description
pressbot:open
firstOpen
boolean
True if this is the first time the chat was opened this page load
pressbot:close
messageCount
number
Total messages exchanged during this session
pressbot:message
messageNumber
number
Sequential message count (1, 2, 3…)
messageLength
number
Character count of the user's message
responseLength
number
Character count of the AI response
pressbot:error
type
string
Error category (e.g. stream_error)
message
string
Human-readable error description

JavaScript API

PressBot exposes a global window.PressBot object for programmatic control of the visitor chatbot.

API Reference

PressBot.open()
Opens the chat widget
PressBot.close()
Closes the chat widget
PressBot.toggle()
Toggles the chat widget open/closed
PressBot.send(msg, opts)
Opens the widget and sends a message. Pass { hidden: true } to hide the user message and only show the AI response.
PressBot.explain(opts)
Opens the widget with a section context. Accepts { title, context?, kb? }.

Example: Demo CTA Button

Theme JavaScript

// Open chatbot with a hidden prompt — visitor only sees the AI response
PressBot.send('Give the visitor a quick demo greeting.', { hidden: true });

// Open chatbot with a visible message
PressBot.send('What can PressBot do?');

// Programmatic open
PressBot.open();

Advanced

Models & Providers

PressBot supports 7 models across two providers. You can use different models for the chatbot and admin agent.

Anthropic Claude

Claude Haiku 4.5
Fast & affordable
Chatbot, research stages
Claude Sonnet 4.5
Balanced quality
Agent, writing, editing
Claude Opus 4.6
Most capable
Agent only — complex tasks

Google Gemini

Gemini 2.0 Flash
Budget
Chatbot, simple tasks
Gemini 2.5 Flash Lite
Fast & affordable
Chatbot, research stages
Gemini 2.5 Flash
Balanced quality
Agent, writing, image generation
Gemini 2.5 Pro
Most capable
Agent only — complex tasks

Pro users can select different models per agent — for example, use Haiku for the visitor chatbot (fast, cheap) and Sonnet for the admin agent (higher quality). The content pipeline also lets you choose a model for each stage individually.

Security

PressBot takes security seriously:

  • API Key Encryption — Keys are encrypted with AES-256-CBC before storage. Never stored in plaintext.
  • Direct API Calls — Your server talks directly to AI providers. Nothing passes through our servers.
  • Capability Checks — Every tool execution verifies WordPress user capabilities.
  • Self-Protection — The agent cannot deactivate or delete PressBot itself.
  • Option Whitelist — Only safe settings can be read/updated. Critical options (site URL, admin email, user registration) are blocked.
  • Cron Safety — Only pressbot_-prefixed hooks can be scheduled.
  • Confirmation Dialogs — Destructive actions require explicit user approval.
  • Security Audit — Ask “Is my site secure?” to run a 12-point check: WordPress/PHP versions, SSL, debug mode, file editing, table prefix, admin usernames, XML-RPC, outdated plugins, spam, admin accounts, and auto-update settings. Each finding is rated critical, warning, or good.

Troubleshooting

Chatbot doesn't appear on the frontend

  • Check that the plugin is activated
  • Verify an API key is configured in PressBot → Settings
  • Clear any page caches
  • Check for JavaScript errors in the browser console

API key errors

  • Anthropic keys start with sk-ant- — make sure you copied the full key
  • Gemini keys start with AIza
  • Check that your API account has billing enabled
  • Verify your key hasn't been revoked or expired

Admin agent tools not working

  • Ensure you have an active Pro license
  • Check that your WordPress user has admin capabilities
  • For WooCommerce tools, verify WooCommerce is active

Slow responses

  • Try a faster model (Haiku or Gemini Flash)
  • Check your server's connection to the AI provider
  • Ensure your PHP execution time limit is sufficient (60s recommended)

Still stuck? Contact us and we'll help you out.

Need More Help?

Can’t find what you’re looking for? We’re here to help.