AskWP

Everything your
chatbot needs

A complete AI chat solution for WordPress. No frameworks, no build tools, no vendor lock-in. Just a single plugin that gives your site an intelligent, context-aware chatbot.


Agentic
Search

Every time a visitor sends a message, AskWP automatically searches your WordPress content to find relevant information. It queries your pages, posts, and custom post types using WordPress’s built-in search, then ranks results by relevance and assembles them into context for the LLM.

Your chatbot answers from your actual content — not from the LLM’s general training data. When someone asks “What are your business hours?” the bot pulls the answer from your Contact page. No manual training, no vector databases, no embeddings.

The RAG system also matches against FAQ entries you define in the admin panel. Write question-answer pairs in a simple format, and AskWP surfaces the most relevant ones automatically.

>
Visitor message “What are your business hours?”
?
WordPress search Contact page · FAQ #3 · About page
{ }
Context assembly [CONTEXT] Open Mon–Fri, 9am–5pm…
AI response Our business hours are Monday to Friday, 9 am to 5 pm.

Any model.
One plugin.

Switch between providers from the admin panel in seconds. Each one is a first-class implementation — not a wrapper around a generic API client.

OpenAI

  • Responses API with store: false
  • Native tool/function calling
  • Automatic retries — up to 4 rounds
  • Token tracking per request

Anthropic

  • Native system prompt parameter
  • Full tool use support
  • Claude 4 family — Opus, Sonnet, Haiku
  • Auto API version headers

OpenRouter

  • Any model via single API
  • Unified billing across providers
  • Automatic fallback routing
  • OpenAI-compatible format

Ollama

  • OpenAI-compatible endpoint
  • No API key required
  • Zero per-token cost
  • Complete data privacy

Smart
Forms

AskWP includes a contact form system that lives inside the chat widget. Common field types come preconfigured, and you can add custom fields to capture exactly what you need — all from the admin panel.

Form data is sent directly to your email and never touches the AI. Submissions bypass the LLM entirely — no conversation content, no API calls, no third-party processing. Just a clean email to your inbox with Reply-To set automatically.

The AI can open the form at the right moment during a conversation, but it never sees what the visitor submits.

Contact Form
Full name
Email
Subject
General inquiry
Message
I agree to the privacy policy
Send message

Built-in
security

01

Prompt Injection Detection

Pattern matching catches common injection attempts — “ignore previous instructions,” “system prompt override,” etc. — and returns a safe refusal before the message ever reaches the LLM.

02

Origin Validation

API requests are checked against your site’s domain to prevent unauthorized access from other sites.

03

Rate Limiting

Configurable hourly limits for chat messages and daily limits for form submissions. Uses WordPress transients — no external dependencies.

04

Message Sanitization

User messages trimmed to a maximum length, conversation history capped at 12 messages, and all output sanitized before display.

Zero
dependencies

The entire plugin is vanilla PHP on the backend and vanilla JavaScript on the frontend. No npm packages, no Webpack, no React, no build step of any kind.

Every function is prefixed with askwp_. Every option stored as askwp_* in wp_options. Every CSS class uses .askwp-. Fully namespaced — will never conflict with other plugins or themes.

  • 0 npm packages
  • 0 build tools
  • 0 framework deps
  • 1 plugin ZIP
askwp/
askwp.phpPlugin bootstrap, defaults, assets
includes/
rest-chat.phpChat REST endpoint
rag.phpRAG context & ranking
llm-provider.phpAbstract base class
llm-openai.phpOpenAI provider
llm-anthropic.phpAnthropic provider
llm-ollama.phpOllama provider
rest-form.phpForm submissions
admin-settings.php7-tab admin panel
security.phpRate limiting & validation
assets/
widget.jsFrontend chat widget
widget.cssWidget styles