OAssist v1.0.0
Contextual AI assistant layer for WordPress: floating chat interface, page-aware suggestions, shortcode embedding, and a configurable knowledge base backed by your own content. Bring your own API key, zero inference markup, no usage caps.
What OAssist does
OAssist drops a contextual AI assistant onto any WordPress site. It indexes your posts, products, and documentation, answers visitor questions inline with the page they are reading, and dispatches tool calls (order lookups, account actions, subscription changes) against WooCommerce. You bring the API key.
oa_documents. Re-indexing is incremental and runs on save.[oassist] inside any post to embed the inline chat. Configure mode, theme, and starter prompts via attributes.Getting installed
Requirements
- WordPress 6.0 or newer
- PHP 8.0 or newer
- An API key from one of: OpenAI, Anthropic (Claude), Google (Gemini), Groq
- WooCommerce is optional. With it: order, product, and subscription tools become available.
- At least one Orravo Core install if you want license-managed updates (optional).
From WordPress admin
oassist.zip, click Install Now, then Activate.Manual (FTP / SFTP)
oassist.zip.oassist/ folder to /wp-content/plugins/.oa_documents, oa_conversations, oa_messages, oa_tool_calls, oa_budget_log, and oa_escalations. Schema version is tracked in oassist_db_version.Up and running in minutes
Connect a provider, index your content, drop the widget. Three steps; expect about ten minutes including the first index pass.
Want the chat inline in a single page instead of floating? Use [oassist mode="inline"]. The widget falls back to the floating mode on all other pages.
The six engines
OAssist is built around six independent subsystems, each in its own PHP class. You can disable individual engines if you don't need them.
Engine map
| Engine | Class | Responsibility |
|---|---|---|
| Indexer | OA_Indexer | Chunks posts and products, generates embeddings, writes rows into oa_documents. Subscribes to save_post and woocommerce_update_product. |
| Conversation | OA_Conversation | Owns the chat loop. Composes system prompt, retrieves top-k chunks, calls the provider, streams the reply over SSE. |
| Tools | OA_Tools | Registers tool schemas, validates LLM-emitted arguments, dispatches to WooCommerce or custom callbacks, returns structured results. |
| Channels | OA_Channels | Bridges the conversation engine to the website widget, WhatsApp (Cloud API), inbound email, and SMS (Twilio). |
| Escalation | OA_Escalation | Sensitive-intent detection, transcript packaging, admin inbox routing, email digest. |
| Budget | OA_Budget | Per-provider spend tracking, semantic cache (cosine similarity), rate limiter, daily / weekly / monthly caps. |
Engine toggles
Each engine is gated by a setting in oassist_engines. The Indexer is required; the others fail open. Disable the Tools engine if you only want a documentation chatbot; disable Channels if you only need the website widget.
PHP// Programmatic toggle
$engines = get_option( 'oassist_engines', [] );
$engines['tools'] = false; // disable WooCommerce tool dispatch
$engines['channels'] = true; // enable WhatsApp / email / SMS bridging
$engines['budget'] = true; // recommended
update_option( 'oassist_engines', $engines );
Providers & BYOK
OAssist talks to four providers out of the box. API keys are stored encrypted in wp_options using SECURE_AUTH_KEY as the salt. They are never sent to Orravo servers.
Supported providers
| Provider | Chat models | Embedding models |
|---|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, gpt-4-turbo | text-embedding-3-small, text-embedding-3-large |
| Anthropic | claude-opus-4-7, claude-sonnet-4-7, claude-haiku-4-6 | (falls back to OpenAI embeddings, or to local hash embeddings) |
| Google Gemini | gemini-2.5-pro, gemini-2.5-flash | text-embedding-004 |
| Groq | llama-3.3-70b-versatile, mixtral-8x7b-32768 | (falls back to OpenAI embeddings) |
Configure a provider
PHP// PHP API
OA_Providers::configure( 'openai', [
'api_key' => 'sk-...',
'chat_model' => 'gpt-4o-mini',
'embedding_model' => 'text-embedding-3-small',
'temperature' => 0.4,
'max_tokens' => 1024,
] );
// Read current config (api_key returned masked: sk-***...XYZ)
$cfg = OA_Providers::get( 'openai' );
Multi-provider routing
Set a primary and a fallback provider under Providers → Routing. If the primary returns a 429 or 5xx, OAssist retries the same prompt on the fallback. Useful when the primary is rate-limited (Groq) and the fallback is a paid tier (OpenAI).
Widget & shortcode
OAssist ships a launcher bubble that opens into a 400 by 600 panel anchored to a screen corner, plus an inline shortcode for embedding the conversation directly in post content.
Floating widget
Shortcode
HTML[oassist]
[oassist mode="inline" theme="light"]
[oassist mode="inline" greeting="Ask anything about WP-Tuner" starters="Pricing|Refunds|API docs"]
[oassist hide_floating="1"]
| Attribute | Values | Default |
|---|---|---|
mode | floating, inline | floating |
theme | auto, light, dark | auto |
position | bottom-right, bottom-left, top-right, top-left | bottom-right |
greeting | any string | (from settings) |
starters | pipe-separated list | (from settings) |
hide_floating | 0, 1 | 0 |
knowledge | category slugs, comma-separated | (all indexed) |
Setting knowledge="docs,pricing" restricts retrieval to documents tagged with those KB categories. Useful for product-specific embeds (one shortcode per product page, each scoped to its own docs subset).
JS init
JS// Boot OAssist programmatically (e.g. inside a SPA route change)
window.OAssist?.boot({
mode: 'floating',
theme: 'dark',
greeting: 'Hi! Ask me anything about your subscription.',
context: { user_id: 142, plan: 'pro' }, // merged into the system prompt
onOpen: () => { console.log('widget opened'); },
onMessage:(m)=> { console.log('message', m); },
});
REST API
All endpoints live under /wp-json/oassist/v1/. Public chat endpoints accept anonymous requests and rely on a per-session nonce; admin endpoints require manage_options.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /chat/start | Create a conversation, return conversation_id + nonce. |
| POST | /chat/message | Send a user turn, streams an SSE reply. |
| GET | /chat/history | Return messages for a conversation (requires the session nonce). |
| POST | /chat/feedback | Thumbs up / down on a message; logged in oa_messages.feedback. |
| POST | /index/rebuild | Queue a full index rebuild (admin only). |
| POST | /index/document | Insert or update a single document (admin only). |
| GET | /budget | Daily / weekly / monthly spend for each provider. |
| GET | /conversations | Admin inbox listing with status filter. |
| POST | /escalations/{id}/resolve | Mark an escalation resolved; logs the admin user. |
Send a message
cURLcurl -N -X POST https://example.com/wp-json/oassist/v1/chat/message \
-H 'Content-Type: application/json' \
-H 'X-OA-Nonce: <session-nonce>' \
-d '{
"conversation_id": "c_2u9pE...",
"message": "Where is my order #1043?",
"page_url": "https://example.com/my-account/",
"context": { "user_id": 142 }
}'
The response is a Server-Sent Events stream. Each event is either a delta (token chunk), a tool_call (engine dispatched a WooCommerce tool), a tool_result (tool returned), an escalation (sensitive intent detected), or a terminal done event with usage and cost.
Register a custom tool
PHPadd_action( 'oassist_register_tools', function( OA_Tools $tools ) {
$tools->register([
'name' => 'check_inventory',
'description' => 'Return stock quantity for a product SKU.',
'parameters' => [
'type' => 'object',
'properties' => [
'sku' => [ 'type' => 'string', 'description' => 'Product SKU' ],
],
'required' => [ 'sku' ],
],
'callback' => function( array $args ): array {
$product = wc_get_product( wc_get_product_id_by_sku( $args['sku'] ) );
if ( ! $product ) {
return [ 'ok' => false, 'error' => 'unknown_sku' ];
}
return [
'ok' => true,
'stock' => (int) $product->get_stock_quantity(),
];
},
]);
} );
Frequently asked questions
oa_conversations stores the metadata, oa_messages stores each turn (user, assistant, tool, system), and oa_tool_calls stores tool dispatch details. Nothing is sent to Orravo servers.cache:false to /chat/message.need_human tool call. Triggered conversations are moved to the admin inbox and emailed as a transcript.uninstall.php, which drops the six custom tables and removes plugin options. Encrypted API keys are deleted with the options. Deactivating alone leaves the data in place.What's changed
- NewSix engines: Indexer, Conversation, Tools, Channels, Escalation, Budget
- NewFour providers: OpenAI, Anthropic, Google Gemini, Groq
- NewMulti-provider routing with automatic fallback on 429 / 5xx
- NewBYOK: encrypted API key storage, no Orravo round-trip
- NewVector indexing of Posts, Pages, Products, and OKnowledgebase articles
- NewSemantic cache with configurable similarity threshold and TTL
- NewSix WooCommerce tools: order status, recent orders, cancel subscription, reset password, refund, product lookup
- NewCustom tool registration via
oassist_register_tools - NewSensitive-intent escalation with admin inbox + email digest
- NewDaily / weekly / monthly spend caps per provider
- NewFloating widget with page, user, device targeting
- New
[oassist]shortcode with inline mode and knowledge scoping - NewSSE streaming chat endpoint at
/wp-json/oassist/v1/chat/message - NewWhatsApp Cloud API, inbound email, and Twilio SMS channels
- NewAnalytics dashboard: tokens, cost, deflection rate, top intents
- NewSix custom DB tables with
uninstall.phpcleanup
Got a question about OAssist?
Reach out directly. Kenneth replies within 24 hours.

