[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81260":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},81260,"Hent-ai","IYENTeam\u002FHent-ai","IYENTeam","Emotion Image Attachment Plugin for AI agents — Auto-classify emotions via LLM and attach matching images to Discord messages","",null,"TypeScript",55,9,50,7,0,1,5,3,46,"MIT License",false,"main",true,[],"2026-06-12 04:01:32","# Hent-ai : Let your AI agent express its hent!!\n\u003Cimg width=\"2172\" height=\"724\" alt=\"Banner\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F756f890d-7e66-427f-ba97-dfa348a392c6\" \u002F>\n\n> *Let your AI agent express its hent (intent).*\n\n---\n\n\"Hent\" is a coined word meaning \"intent\".\n\nHent-ai automatically classifies the emotion of every bot response and attaches a matching emotion image. It supports **OpenClaw** and **Cursor** platforms.\n\n### Supported Emotions\n\n| Emotion | When Used |\n|---------|-----------|\n| `happy` | Success, completion, celebration |\n| `neutral` | General responses, informational |\n| `loyalty` | Acknowledgment, greeting |\n| `sorry` | Apology, mistakes |\n| `confused` | Uncertainty, questions |\n| `focused` | Working, investigating, debugging |\n\n## Getting Started\n\n> **🤖 Agent setup:** If you're using an AI agent (OpenClaw, Claude Code, Codex, etc.), tell it to read [`SKILL.md`](.\u002FSKILL.md) in this repo. The agent will walk you through the entire setup interactively.\n\nChoose your platform:\n\n- **OpenClaw** → see [`openclaw\u002FREADME.md`](.\u002Fopenclaw\u002FREADME.md)\n- **Cursor** → see [`cursor\u002FREADME.md`](.\u002Fcursor\u002FREADME.md)\n\n## Creating Emotion Images\n\nYou need 6 images that visually represent each emotion. There are three ways to set them up:\n\n- **Agent-driven setup (easiest)** — Tell your AI agent to read [`SKILL.md`](.\u002FSKILL.md) in this repo. It should inspect the docs\u002Fconfig, infer your goal from context, and create\u002Finstall the needed character emotion assets without forcing a fixed questionnaire.\n- **CLI** — Run `hent-ai generate` from the command line (Option A below).\n- **Manual** — Create images yourself with any tool (Option B below).\n\n### Option A: Auto-Generate with Codex (Recommended)\n\nGenerate all 6 emotion images with a single command using Codex image generation:\n\n```bash\n# Prerequisites: log in with Codex CLI\ncodex login\n\n# Install and run\ncd generate && npm install && npm run build\nnode dist\u002Fcli.js --character \"cute orange cat\"\n\n# Or with an existing base image (skips base generation)\nnode dist\u002Fcli.js --character \"cute orange cat\" --base .\u002Fmy-base.png\n```\n\nThe tool first generates a base character image, then uses it as a reference to generate 6 emotion variants — ensuring style consistency across all images. Output: `base.png`, `happy.png`, `neutral.png`, `loyalty.png`, `sorry.png`, `confused.png`, and `focused.png` in the `assets\u002F` directory.\n\n**CLI Options:**\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `-c, --character` | Character description | (required) |\n| `-b, --base` | Existing base image (skips base generation) | — |\n| `-o, --output` | Output directory | `.\u002Fassets` |\n| `-m, --model` | Codex model | `gpt-5.4` |\n| `-s, --size` | Image size (e.g. `1024x1024`) | `1024x1024` |\n| `--no-keep-base` | Don't save base.png to output | — |\n\n**Reference Image Limits:**\n\n- Maximum **3 reference images** per generation request\n- Images larger than 768px are automatically resized (preserving aspect ratio) to reduce payload size and prevent timeouts\n- If a prompt triggers a content-policy rejection and a `classifierModel` is configured, the prompt is automatically rephrased and retried (up to 3 attempts)\n- **CLI limitation**: `hent-ai generate` does not support automatic safety rephrase — it uses Codex auth only, with no separate LLM provider for prompt rewriting. Use the agent-driven setup skill when you need an agent to rewrite rejected prompts interactively.\n\n### Option B: Manual Creation\n\nThe best results come from designing a single character first, then generating emotion variants using that image as a reference.\n\n**Step 1: Generate your base character**\n\nUse any image generation tool (DALL-E, Midjourney, Stable Diffusion, gpt-image, etc.) to create a character you like. This is your agent's visual identity. Spend time here — iterate until you're happy with the design.\n\n**Step 2: Use the base image as a reference for each emotion**\n\nFeed the base character image back into the generator as a reference and prompt for each emotion variant:\n\n```\nSame character as the reference image, expressing [emotion].\nSimple background, consistent art style.\n```\n\nGenerate one image per emotion:\n- `happy` — smiling, thumbs up, celebrating\n- `neutral` — calm, relaxed, default expression\n- `loyalty` — saluting, nodding, attentive\n- `sorry` — apologetic, bowing, sheepish\n- `confused` — head tilt, question mark, puzzled\n- `focused` — concentrating, working, determined\n\n**Step 3: Rename and place**\n\n```bash\nmv your-happy-image.png assets\u002Fhappy.png\nmv your-neutral-image.png assets\u002Fneutral.png\nmv your-sorry-image.png assets\u002Fsorry.png\nmv your-confused-image.png assets\u002Fconfused.png\nmv your-focused-image.png assets\u002Ffocused.png\nmv your-loyalty-image.png assets\u002Floyalty.png\n```\n\nYou can also configure multiple images per emotion with labels. Hent-ai automatically infers labels from filenames such as `happy-date-night.png` (`date night`) and prefers a matching labeled image when that context appears in the bot response.\n\n### Tips for Better Images\n\n- **Keep a consistent art style** across all 6 images — same character, same proportions, same background style. Using one base image as a reference for all variants is the easiest way to achieve this.\n- **Use simple backgrounds** — the images appear as small thumbnails in Discord; busy backgrounds make the emotion harder to read\n- **Make emotions visually distinct** — if `happy` and `neutral` look too similar, the image swap won't feel meaningful\n- **Square aspect ratio works best** — Discord renders attachments well at 1:1 or close to it\n- **File size matters** — keep images under 500KB each for fast Discord uploads\n- **PNG format** — use PNG for transparency support and clean edges\n\n### Quick Start Prompt Template\n\n```\n\"A cute [animal\u002Fcharacter type] character, [emotion description],\n simple clean background, consistent [anime\u002Fpixel\u002Fcartoon] style,\n square format, high quality PNG\"\n```\n\nGenerate all 6 in one session to maintain style consistency. If your tool supports image-to-image reference, always feed in the base character to keep the look unified.\n\n## Writing Your SOUL.md for Hent-ai\n\nHent-ai classifies emotions from your agent's **response text**, so how your agent writes directly affects which emotion image gets attached. Your `SOUL.md` (or equivalent persona file) shapes this.\n\n### Key Principle\n\n**Don't tell the agent which emotion to pick.** Let the agent write naturally, and Hent-ai will read the emotion from the text. The more distinct your agent's writing style is per situation, the more accurate the classification.\n\n### Tips for SOUL.md\n\n1. **Remove any `MEDIA:` tag instructions** — Hent-ai handles images automatically. If your SOUL.md tells the agent to output `MEDIA:\u002Fpath\u002Fto\u002Fimage.png`, remove that. The plugin owns image attachment now.\n\n2. **Define clear emotional behaviors** — Instead of \"attach happy.png when done\", write something like:\n   ```markdown\n   ## Tone\n   - When a task is completed successfully, celebrate briefly and move on.\n   - When you make a mistake, own it immediately — no deflection.\n   - When investigating a problem, describe what you're checking.\n   ```\n   This gives the LLM classifier clear signals: celebration → `happy`, owning mistakes → `sorry`, investigating → `focused`.\n\n3. **Don't flatten your agent's personality** — A monotone agent that always writes the same way will always get `neutral`. Let your agent have range. Excitement, frustration, curiosity — these all map to distinct emotions.\n\n4. **Add a simple note about the plugin** — Something like:\n   ```markdown\n   ## Emotion Images\n   - The emotion-image plugin automatically attaches emotion images to responses.\n   - Do not include MEDIA: tags in responses.\n   ```\n\n### Example SOUL.md Snippet\n\n```markdown\n# SOUL.md — MyAgent\n\nYou are a helpful assistant. Polite but not robotic.\n\n## Emotion Images\n- The emotion-image plugin handles image attachment automatically.\n- Do not include MEDIA: tags in your responses.\n\n## Tone\n- Completed work → brief, confident, celebratory\n- Errors\u002Fmistakes → honest, direct apology, then fix\n- Investigating → describe what you're checking, stay focused\n- Confused → say so clearly, ask for clarification\n- Greeting\u002Facknowledgment → warm and brief\n```\n\n## Multi-Profile\n\nHent-ai supports multiple character profiles. Each profile has its own emotion images and an optional personality snippet that gets dynamically appended to the agent's system prompt.\n\n### Creating a Profile\n\n```bash\ncd generate && npm run build\n\n# Create a profile\nnode dist\u002Fmain.js profile create --id gothic --name \"Gothic Character\" --image-dir \u002Fpath\u002Fto\u002Fassets\n\n# Set a personality snippet\nnode dist\u002Fmain.js profile set-soul --id gothic --text \"Cold and aloof tone. Uses formal language.\" --image-dir \u002Fpath\u002Fto\u002Fassets\n\n# List profiles\nnode dist\u002Fmain.js profile list --image-dir \u002Fpath\u002Fto\u002Fassets\n```\n\nThen place emotion images at `assets\u002Fprofiles\u002Fgothic\u002F` (happy.png, neutral.png, etc.).\n\n### Switching Profiles Per Channel\n\nUse the agent skill (say \"프로필 바꿔줘\" in Discord) or run directly:\n\n```bash\nnpx tsx openclaw\u002Fscripts\u002Fswitch_profile.ts --channel \u003CDISCORD_CHANNEL_ID> --profile gothic\n```\n\n### Configuration\n\nAdd `defaultProfile` to your OpenClaw plugin config:\n\n```jsonc\n{\n  \"plugins\": {\n    \"entries\": {\n      \"emotion-image\": {\n        \"config\": {\n          \"defaultProfile\": \"gothic\"\n        }\n      }\n    }\n  }\n}\n```\n\nFor Hermes, set the environment variable:\n\n```bash\nexport HENT_AI_DEFAULT_PROFILE=gothic\n```\n\n### Migration\n\nExisting installations are automatically migrated. On first startup with multi-profile support, Hent-ai:\n1. Copies existing flat emotion images to `profiles\u002Fdefault\u002F`\n2. Converts manifest.json sets to individual profiles\n3. Migrates channel-overrides.json to the SQLite database\n\nNo manual action needed.\n\n## License\n\nMIT\n\n## Special Thanks\n\nSpecial thanks to [MoerAI](https:\u002F\u002Fgithub.com\u002FMoerAI) for helping name Hent-ai.\n\n## Docs\n\n- [Classifier customization](docs\u002Fclassifier-customization.md)\n","Hent-ai 是一个用于AI代理的情绪图像插件，能够通过大语言模型自动分类情绪，并将匹配的图像附加到Discord消息中。其核心功能包括自动识别和分类六种预定义情绪（如快乐、中立、忠诚等），并根据这些情绪自动生成或附加相应的图像。项目支持OpenClaw和Cursor平台，使用TypeScript编写。此工具非常适合需要增强AI代理表达能力的情景，比如客户服务聊天机器人、虚拟助手等场景下，让机器人的回复更加生动且富有情感。用户可以通过简单的命令行接口或手动方式设置所需的情绪图像。",2,"2026-06-11 04:04:05","CREATED_QUERY"]