Repository navigation
Open
Labels
Needs DesignTo have specific design work doneTo have specific design work done[Type] EnhancementNew feature or requestNew feature or request
Milestone
Description
What problem does this address?
Add an optional experiment that exposes a frontend chat UI capable of answering visitor questions using the site's own public content (and any extra references the site owner provides). Think “chat with my site” using retrieval-augmented responses, integrated with the existing WP AI Client stack.
This experiment will focus outside traditional editor/admin workflows. Looking initially for a simple, extensible example of how WordPress content can power an AI assistant on the public-facing frontend. A frontend chat agent would help visitors quickly find information, showcase how the Abilities API and WP AI Client can serve public UX, and give developers a reference pattern they can build on.
What is your proposed solution?
- Floating chat bubble (likely via block for site editor integration) that triggers a small chat panel
- Site owners pick what content gets indexed (post types, filters, pages only, etc.)
- Optional custom reference text/FAQ entries
- Answers generated through WP AI Client using configured provider/model
- Responses cite or link back to relevant content
Potential items needed to build this out:
- Content indexing + embeddings
- Small indexing pipeline: chunk posts/pages, embed passages, store in DB
- Incremental updates on post changes
- Basic “reindex” control in settings
- Retrieval ability
- New Ability that accepts a user query and returns top-k relevant chunks with metadata (title, excerpt, permalink)
- Reusable by other experiments in the future
- Chat orchestration
- Endpoint for sending messages and returning AI output
- Prompt assembly that combines visitor question + retrieved passages
- Temporary conversation ID stored client side
- Server side controller that routes each turn through WP AI Client
- Frontend UI
- Minimal, accessible block (and/or JS component)
- Sends messages to endpoint
- Basic error handling and “reset conversation”
Recommended out of scope for v1
- Admin-only assistants
- Multi-channel messaging (WhatsApp, Telegram, etc.)
- Advanced bot workflows or custom logic builders
Decisions to work through
- Index only public content in v1 to avoid permissions complexity
- Use a simple local embeddings table first; make storage pluggable later
- Ship one UI pattern (floating bubble); blocks or template placement can follow later
- Analytics can be minimal (count + common questions) or deferred entirely
Questions to consider
- Should embeddings be stored as JSON or a dedicated vector column?
- Any requirements for streaming responses now, or is single-shot OK for v1?
- Should we expose a “developer mode” to override the default prompt?
Metadata
Metadata
Assignees
Labels
Needs DesignTo have specific design work doneTo have specific design work done[Type] EnhancementNew feature or requestNew feature or request
Type
Projects
- StatusShow more project fieldsTo do
Activity
the-hercules commentedon Jul 13, 2026
@jeffpaul
Thoughts on the open items
Storage (JSON vs. Vector column)
Given how much MySQL environments vary across WordPress hosts, a dedicated
VECTORcolumn (available only in newer MySQL versions) doesn't seem like a practical choice if we want broad compatibility. A custom table with aJSONorLONGTEXTcolumn for storing embeddings feels like the safest option for v1. We can always optimize the storage layer later if native vector support becomes more common.Streaming vs. Single-shot
I think single-shot responses are the right choice for v1. True streaming with Server-Sent Events over standard WordPress REST endpoints can get messy because of server buffering, PHP execution limits, and hosting differences. Starting with a simpler request/response flow lets us focus on the overall UX first, and we can introduce streaming later if it's needed.
Developer mode (Prompt overrides)
I don't think we need a dedicated UI for this.
Abstract_Abilityalready exposes thewpai_system_instructionfilter, which feels like the idiomatic WordPress way to let developers customize prompts. Anyone who wants full control over the assistant's behavior can hook into that filter.Analytics
We may already get most of what we need through the existing
AI_Request_Loggingexperiment. As long as the new frontend ability sends requests through the standardAiClient, we could attach metadata such assource: frontend_chatand use that for filtering. That would let us defer any custom analytics work until later.New areas we should align on
Since this introduces a new type of workflow for the plugin, there are a few architectural questions worth answering before implementation.
Experiment categorization: Today,
Experiment_Categoryonly definesEDITORandADMIN. Since this is visitor-facing, should we introduce a new category such asFRONTENDorPUBLIC? If so, how should it appear in the settings UI so site owners understand that enabling it affects public traffic?Embeddings fallback: Not every configured connector will support the
EMBEDDING_GENERATIONcapability. Should the experiment refuse to activate unless an embeddings-capable connector is available, or should a non-embedding fallback, such as basic WordPress search or BM25 retrieval, be part of v1?Data handling and abuse: This will be the first experiment where anonymous visitors can trigger AI API calls. The existing
Connector_Approvalexperiment is designed around admin-approved plugin and theme usage, but a public chat interface exposes API usage to unauthenticated traffic. Should v1 include built-in rate limiting or other abuse protection to prevent malicious users from exhausting a site owner's API quota?priyanshuhaldar007 commentedon Jul 14, 2026
Great breakdown, @the-hercules. I agree with the overall direction and most of the proposed decisions. I have a few additional thoughts, particularly around the architectural considerations.
I also think there are a few areas that have not been discussed yet and are worth considering before implementation.
jeffpaul commentedon Aug 5, 2026
Storage (JSON vs. Vector column)
I think I'd prefer the vector approach (e.g. #683) which is blocked by the PHP AI Client adding embedding support (and ideally that getting into the WP AI client and a WP core release).
However, I'll defer on that and other architectural topics for @dkotter's review which is delayed as he's away on leave for a bit.
ColinM-sys commentedon Nov 9, 2026
Thanks, I'll take frontend chat. I'll start the chat PR after #1252 merges.
For rate limiting, I'd suggest:
I'll implement the rate limiter after this PR merges, and you decide the approach.