WordPress plugin · Documentation

OGNIVID AI Assistant

AI intake assistant that interviews website visitors and delivers a structured Project Brief by email and PDF

Version 2.0 · November 2026 · For site owners, developers and integration engineers

Open the live mockup → ⬇ Download ZIP

Executive summary

OGNIVID AI Assistant is a WordPress plugin that turns website visitors into well-defined project leads. An AI assistant interviews the visitor like an experienced consultant, summarises the need, asks for confirmation and sends a structured Project Brief to the OGNIVID team as an HTML email with a PDF attached.

It runs on Claude by default, can switch to other AI providers, and falls back to a short form whenever AI is unavailable, so a request is never lost. Every brief is also stored privately in wp-admin.

2modes: AI chat & form
16structured brief fields
9AI providers + form-only mode
2languages (EN / ID)

How it works

1

Visitor opens the chat

A floating “Talk to our AI” button appears on every page, in the language of the page.

2

AI interviews the visitor

One or two focused questions at a time: problem, goals, current systems, constraints, urgency, timeline, budget and contact details.

3

Visitor confirms the summary

The assistant shows a short summary of the brief and only continues after the visitor confirms or corrects it.

4

Brief is submitted

The model calls the submit_project_brief tool with a strict JSON schema; the server validates name and email before accepting it.

5

Brief is stored and sent

Saved under AI Briefs, rendered as a PDF and emailed to OGNIVID (with the transcript) and to the customer (with a WhatsApp link).

6

Form fallback

If AI is off, out of credit, failing or over the daily limit, the same brief is collected with a short form.

Chat widget on ognivid.com
The chat widget on the English site. On the Indonesian site the same widget speaks Indonesian.

Solution architecture

Visitor WordPress · ognivid.com External services Chat widgetwidget.js · EN / IDchat or form Customer inboxcopy + PDF REST API/ognivid-ai/v1/chat/ognivid-ai/v1/form Guardsorigin · rate limitshoneypot · test mode Server-side sessiontransient · 2 hhistory never trusted Provider adapterClaude Messages APIor OpenAI-compatible submit_project_briefstrict JSON schemavalidated on server Brief pipelineAI Briefs (private post type)PDF (built-in, private folder)HTML email via wp_mail Anthropic APIclaude-opus-5-5 (default)refusal fallback on Gemini · Groq · OpenRouteroptional alternatives SMTPWP Mail SMTP → owner inbox
The browser only sends the visitor’s message. Conversation history, limits, the API key and brief validation all stay on the server.

The Project Brief

Every brief, from AI or from the form, uses the same schema, written in the customer’s language.

FieldContent
customerName, email, company, phone/WhatsApp, role
title · summaryShort project title and a 2–3 sentence executive summary
problemThe problem in the customer’s own terms
goals · requirementsWhat success looks like and what the solution must do
current_systemsPlatforms and tools already in use
constraintsDeadline, budget, compliance, security
urgencylow · medium · high · critical (high/critical are flagged in the email subject)
timeline · budgetDesired timeline and budget range
suggested_servicesManaged File Transfer, Integration & AI Agents, Data & Dashboards, Other
initial_recommendationA short, non-binding first idea
open_questionsWhat the team still needs to clarify

Features

Consultative interview

Short replies, focused follow-ups, about 6–10 questions, then a summary to confirm.

Email + PDF

A clean HTML email and an A4 PDF for the team, plus a copy for the customer.

Admin inbox

AI Briefs lists every brief with customer, urgency, source and status, an unread badge in the menu, a status filter, the full transcript, a protected PDF download, internal notes and one-click reply by email or WhatsApp.

Bilingual

Follows the page language (English or Indonesian) and switches with the visitor.

Provider-agnostic

Claude by default; OpenAI (ChatGPT models), Google Gemini, Mistral, DeepSeek, xAI Grok, Groq, OpenRouter or any OpenAI-compatible endpoint as alternatives.

Never loses a lead

Automatic form fallback when AI is unavailable or a limit is reached.

Security & privacy

Key stays on the server

The API key is stored in WordPress options, never sent to the browser and never echoed back in the settings page.

Server-side history

Conversations live in a server transient; visitors cannot inject fake assistant turns. Claude’s thinking blocks are replayed unchanged.

Abuse limits

Same-origin check, messages per conversation, messages per IP per hour, daily site-wide AI cap, honeypot and minimum fill time on the form.

Strict structured output

The brief tool uses a strict schema and is re-validated and sanitised on the server before anything is saved or sent.

Private PDFs

PDFs are written to a denied folder in uploads and downloaded only through a nonce-protected admin link.

Honest with visitors

The widget states that the chat is processed by AI and asks visitors not to share passwords or confidential data.

Installation

Requirements: WordPress 6.x, PHP 7.4+ (tested on PHP 8.2), outbound HTTPS from the server, and working email delivery.

How to use

Visitors

Site owner

Switching AI provider

Settings reference

SettingDefaultPurpose
Show the assistantonMaster switch for the widget
Test modeonOnly logged-in administrators see and can use the assistant
Business namesite titleName the assistant uses for your business, in emails and the PDF
About your businessShort description: what you do, for whom, example work. The assistant uses it to answer questions and suggest services.
Services3 examplesOne per line (max 12). Each brief is tagged with the relevant services.
Extra instructions · GreetingOptional rules for the assistant, and the first chat message in English / Indonesian
AI providerAnthropicAnthropic, OpenAI, Gemini, Mistral, DeepSeek, xAI, Groq, OpenRouter, custom OpenAI-compatible, or Off (form only)
Modelclaude-opus-5-5Any model ID of the selected provider; change it when you switch provider (for example a GPT model for OpenAI). Claude Sonnet 5.5 / Haiku 5.5 cost less than Opus.
Effort (Claude)mediumThinking depth: low, medium or high
Send briefs toadmin emailOwner inbox; optional copy to the customer
Accent colour#7cff3bColour of the chat button, email and PDF header
WhatsApp numberemptyFollow-up link shown to customers
Button positionbottom leftAvoids overlapping a WhatsApp button on the right
Limits25 · 1500 · 40 · 60Messages per conversation · characters per message · messages per IP per hour · AI conversations per day

AI providers

ProviderHow it is calledNotes
Anthropic ClaudeMessages API (/v1/messages, version 2026-10-21) with a strict tool, prompt caching and server-side refusal fallbackRecommended. Pay as you go; set a monthly spend limit in the Console.
OpenAI (ChatGPT)Chat Completions API (api.openai.com/v1/chat/completions) with function callingUse the GPT model IDs from your OpenAI account. Key: platform.openai.com → API keys. A ChatGPT Plus subscription does not include API access.
Google GeminiOpenAI-compatible endpointHas a free tier; check its data-use terms before sending customer data. Key: aistudio.google.com.
Mistral AIOpenAI-compatible endpoint (api.mistral.ai)European provider. Key: console.mistral.ai.
DeepSeekOpenAI-compatible endpoint (api.deepseek.com)Low cost. Key: platform.deepseek.com.
xAI (Grok)OpenAI-compatible endpoint (api.x.ai)Grok models. Key: console.x.ai.
Groq · OpenRouterOpenAI-compatible endpointOpen-source models, free quotas that change often. OpenRouter gives access to hundreds of models (including GPT, Claude, Llama) with one key.
CustomAny OpenAI-compatible /chat/completions URLFor self-hosted models (e.g. Ollama behind a gateway).
OffNo AIForm only, free forever.

REST API

EndpointRequest (JSON)Response
POST /wp-json/ognivid-ai/v1/chat{ sid, message, lang }{ sid, reply, done, mode }, where mode: "form" asks the widget to show the form
POST /wp-json/ognivid-ai/v1/form{ name, email, company, phone, title, problem, systems, service, urgency, timeline, budget, lang, ts, website }{ ok, reply }

Both endpoints accept same-origin requests only. In test mode they also require a logged-in administrator (the widget sends the REST nonce).

Components

FileResponsibility
ognivid-ai-assistant.phpPlugin bootstrap and hooks
includes/class-ognivid-ai-settings.phpSettings page, defaults and sanitising
includes/class-ognivid-ai-provider.phpSystem prompt, brief schema, Claude and OpenAI-compatible adapters
includes/class-ognivid-ai-chat.phpREST endpoints, sessions, limits, widget loading
includes/class-ognivid-ai-brief.phpAI Briefs post type, PDF, HTML email, admin view
assets/widget.js · widget.cssChat and form UI (no dependencies)
includes/class-ognivid-ai-pdf.phpSmall built-in PDF writer (no third-party library)
uninstall.phpRemoves plugin options when the plugin is deleted (briefs are kept)

Troubleshooting

SymptomWhat to check
The button does not appearTest mode is on (log in as admin), the assistant is switched off, or a page cache is serving an older page.
Chat immediately shows the formNo API key, provider set to Off, out of credit, or the daily limit was reached. Errors are written to the PHP error log with the prefix “OGNIVID AI Assistant:”.
Brief saved but no emailSend a test from WP Mail SMTP → Tools. If it succeeds, check spam, forwarders on the recipient mailbox, and how the mailbox is connected to your mail app (IMAP).
PDF missingThe uploads folder must be writable; the email is still sent without an attachment.

Roadmap