A WordPress plugin for creating interactive ukagaka (伺か) characters with AI-powered features.
This plugin is an extensively expanded version based on the original WordPress plugin "MP Ukagaka" released by Ariagle over 10 years ago.
⚠️ Important Notice: Approximately 90% of this plugin's code was developed using AI-assisted development (Vibe Coding). Although it has undergone countless rounds of debugging and improvements, there may still be unknown bugs or imperfect code structures. Please understand this risk before use.
📺 Demo Site: https://www.moelog.com
While this plugin provides the Create New Character Personality feature (see GHOST_CREATE_GUIDE.md), development efforts have primarily focused on the default character "Frieren". Therefore, this feature has not been fully tested. Your understanding is appreciated.
If you simply want to use the default character "Frieren", basic dialogues are built-in and ready to use out of the box. For richer, more interactive conversations, we recommend configuring an AI model API Key. Additionally, the character memory configuration files (personality.md and instructions.md, containing memories from anime Season 1) are also built-in. You can configure your Admin full nickname, Admin short name, and Admin birthday (MM-DD format, e.g., 10-18) directly in Settings → MP Ukagaka → General Settings. The personality files use {{admin_nickname}}, {{admin_name}}, and {{admin_birthday}} as placeholders — these are automatically filled in from your backend settings at runtime, so you no longer need to manually edit the personality files or calendar.json. The character will also celebrate your birthday automatically based on this setting.
This plugin supports multiple AI providers including Gemini, OpenAI, Claude, and Ollama. For OpenAI, we now recommend GPT-6 Luna: it gives better value than GPT-4.1 mini, the previous recommendation.
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| GPT-4.1 mini (previous) | $0.40 | $1.60 |
| GPT-6 Luna (recommended) | $0.10 | $0.50 |
- Input tokens cost 75% less than GPT-4.1 mini, and output tokens about 69% less.
- OpenAI retires GPT-4o, GPT-4o mini, GPT-4.1 and GPT-4.1 mini on 2027-01-14. New installs already default to GPT-6 Luna, but an existing site keeps the model it has, so choose GPT-6 Luna under LLM Settings (and Diary if you use OpenAI there) before that date.
gpt-5.6-lunaalso works if you enter it under "Custom model…".
Frieren character displaying AI-generated dialogue based on article content
💡 More Screenshots:
screenshot02.png- LLM Settings: dialogue and Page Awareness switchesscreenshot03.png- Interactive Chat Modescreenshot04.png- LLM Settings: AI providerscreenshot05.png- Bot detection reactionscreenshot06.png- Abilities: a visitor is refused an admin-only toolscreenshot07.png- Abilities: reporting bot-blocker statisticsscreenshot08.png- Gift / feeding pickerscreenshot09.png- LLM-generated auto talkscreenshot10.png- Page Awareness comment on an articleProject page: https://horlicks-p.github.io/mp-ukagaka/
- Multiple Characters: Create and manage multiple ukagaka characters
- AI Context Awareness: Intelligent responses using Gemini, OpenAI, Claude, or Ollama
- Interactive Chat Mode: Real-time conversations with visitors, including SSE streaming responses
- Gifts & Feeding: Visitors can hand the character food or gifts in Chat Mode, with a message attached
- Sleep & Waking: Night sleep, oversleeping and daytime naps, with a wake-up animation when you talk to her
- Abilities: Ask in chat for popular posts or bot-blocker stats, or have the character ban an IP (admin)
- AI Diary, Weather & Calendar: Occasional diary posts, local weather and seasonal events woven into dialogue
- External Dialog Files: Support for TXT and JSON format dialogues
- Canvas Animation: Single image or multi-frame animation support
- Multi-Language: English, Traditional Chinese, and Japanese
- Security First: API key encryption, CSRF protection, XSS prevention
- Download
mp-ukagaka.zipfrom the latest release (not GitHub's "Source code" archive, whose folder name differs) - In WordPress Admin → Plugins → Add New → Upload Plugin, upload the ZIP and activate it
- Go to Settings → MP Ukagaka
Later versions show up as normal plugin updates in the WordPress admin.
- General Settings: Choose default character and configure display settings
- Create Character: Add character with image URL and dialogues
- Dialog Files: Dialogues are automatically saved to
dialogs/folder
LLM Settings:
- Choose provider: Ollama (free), Gemini, OpenAI, or Claude
- Enter API key (automatically encrypted) or configure Ollama endpoint
- Check "Enable context awareness" to turn on AI comments and the first-visit greeting
- Optionally check "Use LLM to replace built-in dialogues" for AI-generated auto talk
- Check "Enable interactive chat feature" for Chat Mode — the dock's change-character button becomes a chat button
AI Settings:
- Set trigger probability (10-30% recommended for cost control) and trigger pages
- The character's personality comes from its own
personality.md/instructions.md; the System Prompt field here is only a fallback for characters without them
| Provider | Cost | Setup |
|---|---|---|
| Ollama | Free | Install locally or connect to remote server |
| Gemini | Paid API | Get key from Google AI Studio |
| OpenAI | Paid API | Get key from OpenAI Platform |
| Claude | Paid API | Get key from Anthropic Console |
For detailed information, please refer to:
- User Guide - Complete setup and configuration guide
- Developer Guide - Architecture and development info
- API Reference - Function, hook and REST reference
- Ghost Create Guide - Making your own character
- Abilities API - Tools the character can call, and adding new ones
- Changelog - Version history
Gemini 3 and Claude 5.5 support (v2.39.0): New installs default to Gemini 3.5 Flash-Lite and Claude Sonnet 5.5, and Gemini 3.8 Flash, Claude Haiku 5.5 and Claude Opus 5.5 are listed too. Requests now match what each model accepts, so the connection test and short replies no longer time out or fail on the newer models. Asking for something that runs a tool with no arguments, such as /visitor-info, no longer fails on Claude or Gemini. Existing sites keep the models they have. The update screens show Frieren as the plugin icon from the next update on.
A heads-up before GPT-4o and GPT-4.1 retire (v2.38.3): If chat or the diary still uses an OpenAI model that retires on 2027-01-14, the admin screens now show a warning with a link to the setting to change. Expression tags written loosely, such as [ laugh ] or [laugh.], now switch the expression while a reply is streaming. Provider errors no longer write prompts or the Gemini API key to the PHP error log.
Visitors stay visitors (v2.38.2): With GPT-6 Luna, the character sometimes greeted a visitor by the admin's name, as if the admin had come back. The admin's name and birthday, and the lines meant for the admin, are now only used while the admin is logged in.
Earlier releases: fullwidth tags while streaming (v2.38.1), ready for GPT-6 Luna (v2.38.0), retries that know who they are for (v2.37.4), switching without leftovers (v2.37.3), the right character, the right face (v2.37.2), talking again after hello (v2.37.1), expressions in your own dialogue (v2.37.0), a smoother message box without AI (v2.36.2), a tidier IP blocklist (v2.36.1), a grimoire in your colours (v2.36.0), small touches to the grimoire page (v2.35.1), a message box from a traveler's grimoire (v2.35.0), your own characters stay your own (v2.34.1), Frieren redrawn in SVG (v2.34.0), tidier status labels and documentation that matches the plugin (v2.33.3), chat and auto talk stop stepping on each other (v2.33.2), waking her actually wakes her (v2.33.1), vector dock buttons (v2.33.0), mood cues instead of decision trees for gift reactions (v2.32.3), context wins on a tie for gift reactions (v2.32.2), gift fixes (v2.32.1), gift reactions with something to say (v2.32.0), gift reactions that listen to the conversation they happen in (v2.31.0), and frontend CSS modernization (v2.30.0).
Why isn't AI triggering?
- Check API key is valid
- Verify page matches trigger conditions (e.g.,
is_single) - Ensure probability is set (try 100% for testing)
- Check content length (>300 characters required)
How to control API costs?
- Set probability to 10-20%
- Use cheaper models (gemini-3.5-flash-lite, gpt-6-luna, claude-haiku-5-5)
- Limit trigger pages to
is_single
LLM connection failed?
- For Ollama: Ensure service is running on port 11434
- For remote: Check Cloudflare Tunnel or network connection
- Test connection using the test button in settings
- API Key Encryption: AES-256-GCM encryption for all API keys
- CSRF Protection: WordPress nonce verification for all forms
- XSS Prevention: Input/output sanitization using WordPress core functions
- Secure File Operations: Path validation and WordPress Filesystem API
- Visit MOELOG.COM
- Check User Guide and FAQ
- Open an issue on GitHub
- Original Author: Ariagle
- Maintainer: Horlicks (MOELOG.COM)
- Inspired by: Classic MP Ukagaka plugin / 伺か (Ukagaka)
GPLv2 or later (see LICENSE). Based on the original MP Ukagaka plugin by Ariagle.
Made with ❤ for the WordPress community
