WP AI Assistant
π Free AI chatbot for WordPress using Groq API. Add an intelligent assistant to any WP site in minutes. Customizable appearance, WooCommerce integration, multilingual ready. No coding required. Self-hosted updates included. Built for agencies and site owners who want AI without monthly fees.
by Carlos Llamas Β· github.com/carlosllamax/wp-ai-assistant Β· website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/carlosllamax/wp-ai-assistant/archive/refs/heads/main.zipReadme
WP AI Assistant
π€ Free AI chatbot plugin for WordPress powered by Groq/OpenAI. Add an intelligent assistant to any WordPress site in minutes.
β¨ Features
- π Free to use - BYOK (Bring Your Own Key) model, no monthly fees
- π Groq Support - Use Llama 3.1 70B for free with Groq API
- π€ OpenAI Compatible - Also supports GPT-4 and other OpenAI models
- π WooCommerce Integration - Order lookup with email verification
- π Multilingual Ready - WPML and Polylang compatible
- π¨ Fully Customizable - Colors, icons, avatar, position, and more
- π± Responsive Design - Works perfectly on mobile devices
- π Dark Mode - Automatic dark mode support
- π Privacy First - No data sent to third parties (except AI provider)
- π Auto Updates - Self-hosted update system
πΈ Screenshots
Coming soon
π Quick Start
1. Get a Free API Key
Get a free Groq API key at console.groq.com/keys
2. Install the Plugin
Option A: Download ZIP
- Download the latest release from Releases
- Go to WordPress Admin β Plugins β Add New β Upload Plugin
- Upload the ZIP file and activate
Option B: Manual Installation
- Clone this repository to
/wp-content/plugins/wp-ai-assistant/ - Activate the plugin in WordPress Admin
3. Configure
- Go to WP AI Assistant in the WordPress admin menu
- Paste your Groq API key
- Enable the assistant
- Customize appearance as needed
That's it! The chat widget will appear on your site.
βοΈ Configuration Options
AI Provider Settings
| Setting | Description | Default |
|---|---|---|
| Provider | Groq or OpenAI | Groq |
| API Key | Your API key | - |
| Model | AI model to use | llama-3.1-70b-versatile |
| System Prompt | Custom instructions for the AI | Auto-generated |
Appearance
| Setting | Description | Default |
|---|---|---|
| Widget Position | Bottom-right or bottom-left | Bottom-right |
| Primary Color | Main color for the widget | #0073aa |
| Chat Icon | Icon style (chat, message, help, bot, headset, custom) | Chat |
| Custom Icon | Upload your own icon image | - |
| Header Avatar | Custom avatar for the chat header | - |
| Welcome Message | First message shown to users | "Hello! How can I help you today?" |
Context Sources
| Setting | Description | Default |
|---|---|---|
| Include Pages | AI can reference your pages | β Enabled |
| Include Products | AI knows about WooCommerce products | β Enabled |
| Include FAQs | AI uses FAQ content | β Enabled |
| Custom Context | Add custom knowledge base | - |
| Enable Order Lookup | Allow customers to check orders | β Enabled |
Other Settings
| Setting | Description | Default |
|---|---|---|
| Rate Limit | Max requests per minute per user | 20 |
| Hide Branding | Remove "Powered by" footer | β Disabled |
π WooCommerce Integration
When WooCommerce is active, customers can:
- Click the order icon in the chat
- Enter their order number and email
- Ask questions about their specific order
The AI will have access to:
- Order status
- Items ordered
- Shipping information
- Order total
Security: Orders are verified by matching the email address before revealing any information.
π Multilingual Support
The plugin automatically detects the current language when using:
- WPML - WordPress Multilingual Plugin
- Polylang - Multilingual plugin
The AI will respond in the detected language and only reference content in that language.
π¨ Customization
CSS Customization
The widget uses CSS custom properties that you can override:
#wpaia-chat-widget {
--wpaia-primary: #your-color;
--wpaia-radius: 16px;
--wpaia-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
Hooks & Filters
// Modify the system prompt
add_filter('wpaia_system_prompt', function($prompt, $context) {
return $prompt . "\n\nAdditional instructions here.";
}, 10, 2);
// Add custom context
add_filter('wpaia_context', function($context) {
$context['custom'] = 'Your custom data here';
return $context;
});
// Modify AI response before displaying
add_filter('wpaia_response', function($response) {
return $response;
});
π Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
- SSL certificate (HTTPS) recommended
- Groq or OpenAI API key
π§ Development
File Structure
wp-ai-assistant/
βββ assets/
β βββ css/
β β βββ admin.css
β β βββ chat-widget.css
β βββ js/
β βββ admin.js
β βββ chat-widget.js
βββ includes/
β βββ class-admin.php
β βββ class-chat-widget.php
β βββ class-context-builder.php
β βββ class-conversation.php
β βββ class-rest-api.php
β βββ providers/
β βββ class-provider-interface.php
β βββ class-groq.php
β βββ class-openai.php
βββ integrations/
β βββ class-woocommerce.php
βββ languages/
βββ README.md
βββ readme.txt
βββ wp-ai-assistant.php
Building for Production
# Create distributable ZIP
zip -r wp-ai-assistant.zip wp-ai-assistant -x "*.git*" -x "*.DS_Store"
π Changelog
1.0.0 (2025-01-XX)
- Initial release
- Groq and OpenAI provider support
- WooCommerce order lookup integration
- WPML/Polylang multilingual support
- Customizable chat widget
- Self-hosted update system
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
π License
This project is licensed under the GPL-2.0-or-later License - see the LICENSE file for details.
π¨βπ» Author
Carlos Llamas
- Website: carlosllamax.com
- GitHub: @carlosllamax
π Support
If you find this plugin useful, consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting new features
- π Improving documentation
Made with β€οΈ for the WordPress community