Description
Embed AI chat widgets powered by OpenAI Agent Builder on your WordPress site. Connect to workflows you create in OpenAI’s Agent Builder platform, allowing you to add AI-powered chat assistants to any page.
Features:
- Gutenberg block for easy placement
- Shortcode support:
[migkapa_agent_chat] - Optional floating chat widget (site-wide)
- Customizable appearance (colors, size, position)
- Secure server-side API key handling
This plugin creates chat sessions server-side using your OpenAI API key and workflow ID, then returns a client_secret to the browser. Your OpenAI API key is never exposed to visitors.
Requirements
- An OpenAI account with API access
- An Agent Builder workflow (see setup instructions below)
- An OpenAI API key with Agent Builder permissions
- Your website domain added to OpenAI’s domain allowlist (see installation instructions)
External Services
This plugin connects to OpenAI’s servers to provide AI chat functionality.
OpenAI API (https://api.openai.com)
- Purpose: Creates chat sessions and processes chat messages
- Data sent: API key (server-side only), workflow ID, chat messages, session metadata
- Terms of Use
- Privacy Policy
OpenAI CDN (https://cdn.platform.openai.com)
- Purpose: Loads the chat web component script
- Data sent: Standard HTTP request headers
- Terms of Use
- Privacy Policy
You should disclose this external data transmission in your site’s privacy policy.
Shortcode
[migkapa_agent_chat height="600" width="320" workflow="wf_..." classname="my-class"]
workflowis optional; if omitted, the global Workflow ID from settings is used.
Screenshots

Floating chat widget on your website – clean, minimal design that doesn’t distract from your content 
Starter prompts help visitors begin conversations with suggested questions 
Active conversation with the AI assistant showing real-time responses 
Admin settings – Configure floating widget position, size, custom icon, mobile visibility, and auto-open delay 
Admin settings – Customize the start screen greeting, prompts, and theme appearance 
Admin settings – Usage documentation with shortcode examples and live widget preview
Blocks
This plugin provides 1 block.
- Migkapa Agent Chat Embed an OpenAI ChatKit widget connected to an Agent Builder workflow.
Installation
Step 1: Install the Plugin
- Upload the
migkapa-agent-chatfolder to/wp-content/plugins/, or install directly from the WordPress plugin directory - Activate the plugin through the “Plugins” menu
Step 2: Get Your OpenAI Credentials
- Create an OpenAI account at platform.openai.com if you don’t have one
- Set up billing at platform.openai.com/account/billing
- Create an API key at platform.openai.com/api-keys
- Go to Agent Builder and create a workflow (or use an existing one)
- Copy the Workflow ID (starts with
wf_) from your workflow settings
Step 3: Add Your Domain to OpenAI’s Allowlist (Required)
This is a critical step! OpenAI requires you to register your website domain before the chat widget will work. Without this, visitors will see a “Domain verification failed” error.
- Go to platform.openai.com/settings/organization/security/domain-allowlist
- Log in to your OpenAI account if prompted
- Click “Add domain”
- Enter your website domain exactly as it appears in your browser’s address bar (e.g.,
example.com) - Click Save
Important tips:
- Add both
example.comANDwww.example.comif your site is accessible via both - For staging/development sites, add those domains too (e.g.,
staging.example.com) - The domain must match exactly – if you use
www.example.com, add that specific version - Changes take effect immediately – no need to wait
Step 4: Configure the Plugin
- Go to Settings > Migkapa Agent Chat in your WordPress admin
- Enter your OpenAI API key
- Enter your Workflow ID
- Click “Save Settings” – the plugin will validate your credentials
Step 5: Add the Chat Widget to Your Site
- Block Editor: Add the “Migkapa Agent Chat” block to any page or post
- Shortcode: Use
[migkapa_agent_chat]in the classic editor or widgets - Floating Widget: Enable in Settings > Migkapa Agent Chat for a site-wide chat bubble
FAQ
-
What is OpenAI Agent Builder?
-
Agent Builder is OpenAI’s platform for creating custom AI assistants. You can configure your agent’s personality, connect it to knowledge bases (files, websites), and define its capabilities. Visit platform.openai.com and look for “Agent Builder” or “Agents” in the navigation.
-
How do I get an OpenAI API key?
-
- Go to platform.openai.com/api-keys
- Click “Create new secret key”
- Give it a name (e.g., “WordPress Migkapa Agent Chat”)
- Copy the key immediately (it won’t be shown again)
- Ensure your account has billing set up and credits available
-
How do I create a workflow and get the Workflow ID?
-
- Go to platform.openai.com
- Navigate to Agent Builder (or “Agents” in the sidebar)
- Click Create to start a new workflow
- Configure your agent:
- Set a name and instructions
- Optionally add knowledge sources (files, websites)
- Choose a model (GPT-4o recommended)
- Click Deploy or Publish when ready
- Find the Workflow ID in the workflow settings or URL – it starts with
wf_
-
Does this store my OpenAI API key in the database?
-
Yes. The key is stored in WordPress options so the server can create chat sessions. The key is never sent to browsers or exposed to visitors.
-
Can I use multiple workflows on different pages?
-
Yes. Set a default workflow in Settings, then override it per-block or per-shortcode using the
workflowparameter:[migkapa_agent_chat workflow="wf_different_workflow_id"] -
Can I change the chat script URL?
-
Yes. Developers can use the
migkapa_agent_chat_script_srcfilter to override the script URL. -
I see “Domain verification failed” error. How do I fix it?
-
This error means your domain is not on OpenAI’s allowlist. Here’s how to fix it:
- Check your browser’s address bar to see your exact domain (e.g.,
www.example.comorexample.com) - Go to platform.openai.com/settings/organization/security/domain-allowlist
- Log in if prompted
- Click “Add domain”
- Enter your domain exactly as shown in your address bar
- Save the changes
Common issues:
- You added
example.combut your site useswww.example.com(or vice versa) – add both versions - You’re testing on localhost or a staging domain – add those domains too
- Typo in the domain name – double-check the spelling
The fix takes effect immediately – just refresh your page.
- Check your browser’s address bar to see your exact domain (e.g.,
-
The chat widget is not loading. What should I check?
-
- Check domain allowlist first – Go to your browser console (F12) and look for “Domain verification failed” error. If present, add your domain to OpenAI’s allowlist (see FAQ above)
- Verify your API key is correct in Settings > Migkapa Agent Chat
- Confirm your Workflow ID starts with
wf_ - Check that your OpenAI account has available credits
- Look for other errors in your browser’s developer console (F12)
- Ensure the workflow is deployed/published in Agent Builder
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Migkapa Agent Chat” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Migkapa Agent Chat” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.2.1
- Added screenshots to WordPress.org plugin page
0.2.0
- Added live widget preview in admin settings page
- Added custom chat button icon upload
- Added “Hide on mobile” toggle for floating widget
- Added auto-open delay setting (widget opens automatically after X seconds)
- Added custom CSS textarea for advanced styling
- Added click-outside-to-close behavior for floating widget
- Added shortcode documentation and usage guide in settings
- Improved admin UI with two-column layout
0.1.1
- Improved domain allowlist instructions in settings page – now shows your actual domain
- Added helpful tips about www vs non-www domains
- Enhanced FAQ and installation instructions for domain setup
- Fixed deployment workflow
0.1.0
- Initial release.
