Complete documentation for installing, configuring, and extending AskWP.
Installation
AskWP requires WordPress 5.9 or later and PHP 7.4 or later. No other dependencies.
Method 1: Upload ZIP
- Download the
askwp.zipfile - Go to your WordPress admin → Plugins → Add New → Upload Plugin
- Select the ZIP file and click Install Now
- Click Activate
Method 2: Manual Upload
- Extract the ZIP file
- Upload the
askwpfolder to/wp-content/plugins/ - Go to WordPress admin → Plugins and click Activate
Quick Start
- Go to Settings → AskWP
- On the LLM Provider tab, select your provider (OpenAI, Anthropic, OpenRouter, or Ollama)
- Enter your API key (or Ollama endpoint)
- Choose a model
- On the System Prompt tab, write instructions for your chatbot
- Click Save Changes
- Visit your site — the chat widget appears in the bottom-right corner
Admin Panel Tabs
1. General
Enable or disable the widget, set the bot’s display name, choose a default language, and select the widget position (bottom-right or bottom-left).
2. LLM Provider
Select your AI provider (OpenAI, Anthropic, OpenRouter, or Ollama), enter credentials, choose a model, and configure generation parameters like max output tokens and temperature.
3. System Prompt
Write the system instructions that define your chatbot’s personality and behavior. Use {bot_name} as a placeholder that gets replaced with the bot name from the General tab.
This tab also includes a Context Pack field (for static information you want available on every turn) and an FAQ field (question-answer pairs in Q: / A: format).
4. RAG
Configure the retrieval-augmented generation system: enable/disable RAG, set the maximum number of search results and FAQ matches, choose which post types to search, and set the snippet length. When using a provider with tool support (OpenAI, Anthropic, OpenRouter), agentic search is used automatically — the AI browses your site via tools instead of relying on keyword matching alone.
5. Form Builder
Enable the built-in contact form, set the form title and trigger button label, configure the recipient email address, subject line template, and success message. Use the field editor to add, remove, reorder, and configure form fields. The AI can trigger the form inside the chat, but form data is never shared with the AI — submissions go directly to your email.
6. Appearance
Customize colors (primary, secondary, text), choose an icon preset or upload a custom icon, upload a bot avatar, set border radius, font family, widget width, z-index, and add custom CSS.
7. Rate Limits
Set the maximum number of chat messages per hour and form submissions per day. These limits are enforced per IP address using WordPress transients.
REST API
Chat Endpoint
POST /wp-json/askwp/v1/chat
Request body:
messages— Array of message objects withrole(user/assistant) andcontentpage_url— Current page URL (optional, used for context)page_title— Current page title (optional, used for context)
Response:
reply— The assistant’s response textsources— Array of source URLs the AI read to answeraction— Optional action indicator (e.g., form_trigger)usage— Token usage stats (input_tokens, output_tokens)
Form Endpoint
POST /wp-json/askwp/v1/submit_form
Request body: key-value pairs matching the configured form fields.
Response: { success: true } or error details.
Hooks and Filters
AskWP provides several WordPress filters for developers who want to extend or modify behavior:
askwp_system_prompt— Filter the assembled system prompt before it’s sent to the LLMaskwp_rag_context— Filter the RAG context textaskwp_chat_response— Filter the final response before it’s returned to the clientaskwp_form_email_body— Filter the email body before sending