You can go into the settings and, under the Chatbot section, enable the Discussions feature. This will add a new tab where you can view a history of all the conversations that have taken place in your chatbots, presented in a human-readable format.
All of this data remains entirely on your server—Meow Apps does not process or store any of it. You can read this article to learn more.
You can add a list of the discussions (like ChatGPT) next to your chatbot, by using the mwai_discussions shortcode on your website so each user can see it’s history of conversation.
[mwai_discussions id="default" text_new_chat="+ Start New Discussion"]
Local Memory
If you enable the Local Memory option for your chatbot, the current discussion thread will be saved in the user’s browser local storage—not in your database. This means the conversation will persist even if the user refreshes the page or navigates to a different one, effectively caching the chat locally.
However, since this is browser-based, the conversation will not be preserved if the user clears their local storage, switches devices, or uses a different browser.
Chatbots
MCP (Model Context Protocol)
An MCP server works as a structured API-like interface for AI models: the client (such as the Claude app) connects to the server, which exposes a set of endpoints declaring available tools and functions. This enables the model to perform actions like querying, updating, or managing your WordPress content.
You have two main approaches:
Using your WordPress as the MCP server: Claude connects to your WordPress site and gains capabilities based on what is exposed through AI Engine.
Using Claude inside AI Engine: Here, Claude becomes the internal model in AI Engine, and it can connect to a remote MCP server (another site, for example).
To Use MCP Features
Enable Orchestration Module: Go to your Server Modules and activate the Orchestration module.
After that, in your Settings tab, the orchestration section will appear.
If you want your server to be used as an MCP (Master Control Point), go to the Remote Access section.
Function Calling
Function Calling is the idea of letting the AI model know about a list of functions it can call. The model will then wait for the result of the executed function and do (or not) something with the output, if there is one.
Function Calling (also called Tools) needs some functions to be callable so they can be executed. Note that the AI itself does not run code—it can’t execute functions directly. Instead, it knows that it has access to a list of predefined functions that you’ve created.
When the AI model determines that it wants to execute a function, it sends back a reply with the name of the function and any necessary arguments. Then, your server (in the case of AI Engine) runs the function, generates an output, and sends it back to the AI model so it can finalize its response.
Dynamic and Static
There are two types of functions that can be called: Dynamic and Static.
A dynamic function is used to enrich the AI’s final reply with additional data. Dynamic functions can also be called in a cascade, depending on the functions you’ve defined and the AI’s decisions. For example, if you ask the AI to “send me an email,” it might first call a function to retrieve your email information, then call another function to actually send the email.
It’s recommended to use dynamic functions, as the final answer will be written by the AI and will therefore flow naturally. You can register your functions using Code Engine or manually.
Code Engine
Code Engine was previously called Snippet Vault, which is now deprecated. So make sure you’re using Code Engine to continue receiving updates.
The first step is to download the Code Engine plugin. This plugin is 100% free and can be used similarly to Code Snippet, but with even more features. If you’re familiar with Code Snippet, you can even import all your code from there for an easy switch. You can find the plugin here: Code Engine.
Code Engine allows you to store PHP and/or JS snippet code inside a dashboard and execute them whenever you want, even using a REST API.
You have a special type of snippet in Code Engine called Callable. As the name suggests, this snippet can only contain one unique PHP function. You can declare its arguments and define them in specialized side settings. Once this is done, the AI model can use them easily, and you don’t have to do anything more on your side.
By using Code Engine, you can declare Callable functions that can be used in Function Calling. Code Engine and AI Engine will then work together automatically to handle the entire pipeline—asking to run a function → running the function → returning the result to the AI → continuing the query—without you needing to do anything. This is very powerful and is the only plugin on WordPress that can do this!
Simply navigate to your chatbot settings and locate the new “Functions” section. Then, select the function you want to use for the current chatbot session. From there, function calling is automatically handled, streamlining the process for you.
The Function section is not appearing? This means the model you have selected is not compatible with function calling. Only OpenAI and Claude currently support this feature, but not all of their models can use function calling. So make sure you select a model that supports it.
This can happen if you selected “Default” as the model in your chatbot settings. Even if your default model supports Function Calling, AI Engine doesn’t know which model it is until a request is made, so it can’t display the “Functions” section. To fix this, explicitly select a model that supports Function Calling in the chatbot settings.
Here, we’re running a PHP callable function—so when the AI wants to run the function, it will be executed on your server. This is really useful if you need to access the database, get user information, fetch posts, and so on.
But it’s not limited to that. You can also create a JavaScript callable function to interact with your website. For instance, you could ask Nyao to change the color of the website—and watch it happen live!
Customization
In the Chatbots tab, you can switch the toggle from Chatbots to Themes. There, you can modify the default themes that come with AI Engine using a no-code editor.
If you want more customization, you can create your own theme by clicking the + button. This will open a CSS editor where you can manually use AI Engine’s chatbot class definitions to build your own custom design.
If you have some CSS ready to load, you can also use the following filter to change the CSS of your theme on the server side:
The icon refers to the chatbot pop-up image, which is only visible when your chatbot is configured as a pop-up—either because you’ve enabled that setting or are using the Site Wide Chatbot. The avatar, on the other hand, refers to the image displayed inside the chat itself, serving as the “profile image” of the chatbot and the user.
Settings
Make sure to enable the “Pop-up” option under the Appearance section to make the pop-up settings appear. In there, you’ll be able to choose an icon or enter a custom URL directly.
To change the avatar, simply check the “Avatar” boxes in the Appearance section and upload or select the desired images.
Shortcode
Using the shortcode of the chatbot, you can specify the icon param, with the URL of your icon, like this:
[mwai_chat icon="https://mywebsite.com/icon.png"]
To set the Avatar you can replace the name of the Chatbot by using a link instead of a regular text.
You can get the URL directly from your Media Library by clicking the “Copy URL to clipboard”.
If you keep the user_name empty and an user is connected, it will retrieve the gravatar or the avatar already set in WordPress for this user. Remember that by default, user_name is not empty and set to “User :”.
Displayed Texts
The chatbot displays various text elements inside and around the chat interface: the AI name, the user name, a name for guest users, a compliance text shown below the chatbot, an Icon text above the chatbot when it’s in pop-up mode and a Start Sentence to have a first message in the chat. You can customize all of these values individually in the chatbot settings under the Appearance section.
Settings
Simply change these values in the Appearance settings and check the preview on the right side to see how your modifications look. The Send and Clear settings correspond to the text inside the respective buttons. Depending on your selected theme, this text might not be visible—for example, the Timeless theme uses icons instead of button text.
There are a few placeholders available for you to use in your ai_name parameter. Generally, you would want to use {DISPLAY_NAME}, which is what the user would expect to see.
If you want to change the text that appears above the popup, make sure to go into the Popup settings. You can also change the placeholder text from there if needed.
You can style it by using its class : .mwai-icon-text.
Shortcode
You can change all of these settings through the shortcode as well. Here are an examples. You can refer to the image of the settings above, as the parameter names in the shortcode are the same as those used in the settings, make sure to use snake case for each of them. For instance “Icon Text” will be “icon_text”.
If you haven’t noticed already from the other screenshots, there’s a position setting available in the Popup section.
Settings
Shortcode
[mwai_chat icon_position="bottom-left"]
AI Forms
First step if not already done, enable the feature:
When Should I Use AI Forms?
Got a scenario where you need to whip up a custom response based on user input? Whether it’s a quiz or a decision tree, AI Forms can be your go-to solution. It’s way easier than teaching your chatbot every single step. Trust me!
We’re crafting a travel assistant using AI Forms. It’ll quiz users about their travel vibe, interests, and boom—suggest a destination. Happy with the choice? It’ll roll out a detailed itinerary and, for the grand finale, a price estimate. Sounds tough? Nah, you’ll nail it in under 5 minutes!
Not a block user (Gutenberg Editor)? No sweat! Use a plugin like Reusable Blocks Extended to whip up your form. Then plop that shortcode wherever you fancy, even in Elementor or other page builders. Easy-peasy!
AI Form Blocks
Once you have the AI Forms feature enabled, you will have access to this new blocks:
Time to build our first form with blocks. Kick things off in an “AI Form Container” block. It’s not a must, but let’s play it safe for now. Once you’re an AI Forms ninja, feel free to freestyle without it. 🥷
Populate this Container with “AI Form Fields” to ask questions like “Previous destinations,” “What are your hobbies?” and stuff like that.
Set up all your fields now, and we’ll connect the dots later. Swap out the “LABEL TEXT” for each question and give each a snappy “FIELD NAME” for easy reference later on.
Your setup should look a bit like this now:
We’ve got 3 fields chilling in our container, each rocking a different 1️⃣ field type. Notice the 2️⃣ “select” field type with options for users to pick from. We’ll call back to each field by their 3️⃣ “field name” in our prompts later.
Time for Prompts!
Add a “AI Form Submit” block to craft our prompts based on user input. Here, you can pick your model (you can also use an OpenAI Assisstant !), set the temperature, and craft that prompt. Field names like {LAST_TRIP} will stand in for user values. Got optional fields? Check out this doc for tips.
Almost there! See our prompt referencing the fields? You can also point to webpage elements with query selectors. Got a “#target-element” div? Mention it in your prompt like ${#target-element}. Pros can target just about anything! Plus, you can pull in data from databases, APIs, plugins, and more—learn all about it here.
Output Time!
Our output’s currently non-existent (“N/A”), so let’s fix that. While query selectors can place our output anywhere, let’s keep it simple with an “AI Form Output” block. Link it to our submit block with its ID.
Boom! You’ve just birthed an AI travel advisor! 🌍 Let’s give it a whirl:
But why hit the brakes now? The power of AI Engine and AI Forms means you can get super creative. Use one form’s output as another form’s input! Remember those query selectors? Let’s loop it back into a new prompt.
We’ll set up 3 submit buttons, each with its own prompt, tied to one output. They’ll each take the previous response and offer more detailed travel plans based on the top 3 options.
Here’s our new setup: a fresh container, a friendly message, and 3 columns with submit buttons. Each button (1, 2, 3) points to one output (5) and has its own prompt (4), referencing the earlier response. Button (1) drops “first” in the prompt, and you can guess what buttons (2) and (3) will say. 😉
Let’s test with the same values as before and hit “option 1”:
Cool, right? 🌟 Imagine the possibilities with a sprinkle of imagination! To wrap up, we’ll make one last form for a price estimate using the same tricks.
That’s our final masterpiece. You can layer this with filters, JavaScript, and more for powerful tools and slick user experiences. Just look at what you can build with AI Engine forms! Go wild and have fun!
Note that this tutorial only shows you what can be done with the basic blocks—a few inputs and outputs. You can create more complex behaviors using Conditional Blocks, which allow you to display elements (pretty much whatever you want) based on specific conditions. You can also use the File Upload field to have documents or images read and included in the prompt when the form is submitted.
Voice To Voice (Realtime)
You can set your chatbot mode to Realtime to use OpenAI’s voice-to-voice models, which support both voice input and voice output.
With the regular chatbot, text-to-speech is not supported natively by AI Engine, but some freelancers have developed AI Engine addons that handle this functionality.
File Upload (PDF, PNG…)
If you want your users to be able to upload PDF files, you have two choices:
Use an OpenAI Assistant — Learn how to use Assistants. In AI Engine, you can enable the File Search option in your chatbot settings, which allows the assistant to accept files for discussion threads.
Use a Claude model — Claude models with vision enabled accept PDFs as if they were images, so you’ll be able to upload them and get a response.
For the vision-compatible model, a checkbox will appear—simply check it to enable an upload field in the chatbot, allowing you to upload image documents during chat.
Embeddings
First, make sure you understand what embeddings are and what they’re used for. Please read this documentation to get a clear overview of the concept.
Before going into it, here is a quick visual representation of how embeddings works.
Now let’s see how to set them up in AI Engine.
1. Go to the “Dashboard” of AI Engine:
2. Enable the “Knowledge” option to display the “Knowledge” tab for later :
3(a). Go on Pinecone’s website and access your dashboard by login in. There create a new Project with the free tier starter plan.
3(b). Then head to the “API Keys” tab and you should see a “Default” one there. If not, please create one using the button “Create API Key“. Then use the eye icon “👁️” to display the value and copy it :
3(c). You can now create an index. Choose a name and dimensions. The dimensions should match what you have under ‘Default Environments for AI > Embeddings‘ inside the AI Engine settings. Simply use the ‘Setup by model‘ option and choose the one you want to use.
By default AI Engine uses 1536 (ada-3), so unless you have changed it, make sure it matches.
3(d). You can now get the “Host” value that we will use inside of AI Engine.
4. Go back to AI Engine and in the “Settings” tab, click on the “Knowledge” section and insert the value of your previously copied API Key :
5. Enter you API key and the “Server” should match with your HOST :
In the above settings, you’re able to set the Min Score and Max Results. When a user sends a message in your chatbot, AI Engine transforms this message into an embedding and compares it with your existing embeddings to find the most relevant matches. But you already understand how embeddings work, right?
The “match” score represents the similarity between the query and an existing embedding, typically ranging from 0% to 100%. The Min Score setting allows you to define the minimum relevance required to consider an embedding a valid match. You may have multiple matches, and the system will consider up to the number defined in Max Results (e.g., 10).
Keep in mind that adding embeddings to the context will increase the total token usage. The larger or more numerous the embeddings, the more tokens are consumed. If some embeddings aren’t appearing in the context, it might be because your Max Content Length setting is too low relative to your Max Results setting. Make sure those values are balanced to avoid cutting off relevant matches.
6. Now, access the “Knowledge” tab of AI Engine:
7. On the right of your screen you should see a little window with a dropdown to select your created env. If you don’t select an environment to work with here, the buttons will be disabled.
9. Everything should be setup correctly at this point. You can now add embeddings by clicking the “Add” button on the top left of this display.
Add Embeddings
Embeddings based on Posts
AI Engine includes built-in tools to help you generate embeddings based on your WordPress posts. This includes automatic synchronization when posts are modified and automatic deletion of embeddings when posts are deleted.
You can also choose a specific post type to use for embedding sync. This gives you flexibility—for example, you can create a custom post type (CPT) specifically dedicated to embeddings. This way, you can design advanced behaviors tailored to your content structure, using embeddings that are cleanly separated from your regular content. This setup is especially useful if you’re aiming to create dynamic interactions or content-aware chatbots.
In the Knowledge tab, on the right side of the dashboard, you’ll find the Sync Posts and Auto-Sync Posts sections. Here, you can easily configure the synchronization settings—everything is explained directly within the interface.
To get started, you’ll need to perform an initial manual sync. Just click the Sync All button to start generating embeddings from your selected post types. Once that’s done, the Auto-Sync feature will take care of future updates automatically whenever you modify or delete content, ensuring your embeddings stay up to date.
If Auto-Sync doesn’t seem to be working, it might be because WordPress Cron jobs are not executing properly on your server. This is a common issue on some hosting environments.
Make sure that:
You don’t have a security plugin blocking WP-Cron.
Your hosting provider isn’t disabling or restricting cron execution.
You haven’t manually disabled WP-Cron in your wp-config.php file (look for define(‘DISABLE_WP_CRON’, true); and set it to false if present).
You can also test cron functionality using plugins like WP Crontrol to inspect and run scheduled events.
Embeddings based on PDF
To create embeddings from a PDF file, go to the Import Data section on the right side of the Knowledge tab and click the “From PDF” button. You can then follow the step-by-step process to create embeddings.
Make sure to click the “Select PDF File” button—do not try to drag and drop files directly, as this is not supported.
Create & Edit Images
In the Chatbot
You can choose to set your chatbot to “image” mode and it will generate images for each message you send.
You can also utilize AI Engine filters to generate images through a chatbot in “chat” mode. This way you have the best of both worlds!
add_filter( 'mwai_ai_query', function ( $query ) {
global $mwai; // Use the AI Engine API
$last = $query->get_message();
if ( strpos( $last, "/imagine" ) !== false ) {
$last = trim( str_replace( "/imagine", "", $last ) );
$query = $mwai->simpleImageQuery( $last );
return $query;
}
return $query;
}, 999, 1 );
If you have technical knowledge, you can also use function calling to let the chatbot generate the image by itself, instead of using filters.
AI Forms
If you need to tailor your users’ prompts with predefined choices, using AI Forms might be the best solution. You can learn everything about them in this documentation: Your First Form. Then you just need to select a model that generates images instead of a regular text-based model:
In the Dashboard
First, in the AI Engine dashboard, make sure to enable the Images Generator feature.
This will add a new button that will bring you to the image generation dashboard in the top right corner of the AI Engine dashboard.
Once on the Images Generator, different settings will be available:
1. Number of images: You have the option to generate images in batches. You can also use the Continuous option to add the previously generated images to the current ones.
2. Prompt input: Describe the image you wish to generate.
3. Templates: When you have entered some prompts you don’t want to lose, you can save them and reuse them later as templates. Switch to edit mode to update/add new ones. You already have some ready for you.
4. Images: Once generated, the images will be displayed at the bottom of the page, under the prompt area.
Image Edits
For models that are compatible (right now only the OpenAI GPT Image 1), you can also do image editing. To do this, go to your media library, select an image, and use the “Edit” menu (with the magic wand icon). This will open the image in the AI Engine Image Editor tool.
Image Edits In Chatbot
You can also enable image editing behavior within a discussion thread by taking advantage of OpenAI Tools. If you’re using a vision-enabled model, you can create a workflow where the model first visualizes the image, generates a description of it, and then uses your prompt along with that description to generate a new image that appears as an edit of the original.