emoclaw
БесплатноБез исполняемых скриптовНе проверенGive your AI emotions that grow from its own memories. Emoclaw builds a unique emotional state that shifts with every conversation, decays between sessions…
от lxyeternal★ 68 звёзд на GitHubОб этом скилле
Emotion Skill
Emotions for AI agents — built from memories, shaped by relationships, always changing.
Emoclaw trains a lightweight model on your agent's identity and conversation history, producing a persistent emotional state that evolves with every interaction. Emotions decay naturally between sessions, shift based on who's talking and what's being said, and gradually recalibrate as your agent grows. The result is injected into the system prompt as an [EMOTIONAL STATE] block, giving your AI a felt sense of its own inner life.
How it works
- Bootstrap —
extract.pyreads your agent's identity/memory files.label.pyscores each passage via the Claude API (opt-in).trainbuilds a small neural net from those scores. One-time setup. - Encode — Each incoming message is turned into a 384-dim vector by a frozen MiniLM sentence encoder. No fine-tuning, no network call — runs from a local cache.
- Feel — The encoding + context (who's talking, what channel, previous emotion) flows through a GRU and MLP head, outputting an N-dimensional emotion vector (0-1 per dimension). The GRU hidden state persists across sessions — this is the "emotional residue" that carries forward mood.
- Decay — Between sessions, each dimension drifts back toward its baseline at a configurable half-life (fast for arousal, slow for safety/groundedness). Time apart = cooling off.
- Inject — The emotion vector is formatted as an
[EMOTIONAL STATE]block and inserted into the agent's system prompt, giving the AI a felt sense of its own inner state.
Model is ~2MB, runs on CPU, adds <50ms per message. Network access is only used during bootstrap (opt-in).
Quick Reference
| Situation | Action |
|---|---|
| First-time setup | python scripts/setup.py (or manual steps below) |
| Check current state | python -m emotion_model.scripts.status |
| Inject state into prompt | python -m emotion_model.scripts.inject_state |
| Start the daemon | bash scripts/daemon.sh start |
| Send a message to daemon | See Daemon Protocol |
| Retrain after new data | python -m emotion_model.scripts.train |
| Resume interrupted training | python -m emotion_model.scripts.train --resume |
| Add new training data | Add .jsonl entries to emotion_model/data/, re-run prepare + train |
| Upgrade from v0.1 | See references/upgrading.md |
| Change baselines | Edit emoclaw.yaml → dimensions[].baseline |
| Add a new channel | Edit emoclaw.yaml → channels list |
| Add a relationship | Edit emoclaw.yaml → relationships.known |
| Customize summaries | Create a summary-templates.yaml and point config at it |
Setup
Quick Setup
python skills/emoclaw/scripts/setup.py
This copies the bundled emotion_model engine to your project root, creates a venv, installs the package, and copies the config template. Then edit emoclaw.yaml to customize for your agent.
Manual Setup
If you prefer to set up manually:
1. Install the package
cd <project-root>
# Copy engine and pyproject.toml from the skill
cp -r skills/emoclaw/engine/emotion_model ./emotion_model
cp skills/emoclaw/engine/pyproject.toml ./pyproject.toml
# Create venv and install
python3 -m venv emotion_model/.venv
source emotion_model/.venv/bin/activate
pip install -e .
Required: Python 3.10+, PyTorch, sentence-transformers, PyYAML.
2. Copy and customize the config
cp skills/emoclaw/assets/emoclaw.yaml ./emoclaw.yaml
Edit emoclaw.yaml to set:
name— your agent's namedimensions— emotional dimensions with baselines and decay ratesrelationships.known— map of relationship names to embedding indiceschannels— communication channels your agent useslonging— absence-based desire growth (can be disabled)model.device—cpurecommended (MPS has issues with sentence-transformers)
See references/config-reference.md for the full schema.
3. Bootstrap (new agent)
If starting from scratch with identity/memory files:
# Extract passages from your identity files
python scripts/extract.py
# Auto-label passages using Claude API (requires ANTHROPIC_API_KEY)
python scripts/label.py
# Prepare train/val split and train
python -m emotion_model.scripts.prepare_dataset
python -m emotion_model.scripts.train
Or run the full pipeline:
python scripts/bootstrap.py
4. Verify
python -m emotion_model.scripts.status
python -m emotion_model.scripts.diagnose
Usage
Option A: Daemon (Recommended)
The daemon loads the model once and listens on a Unix socket, avoiding the ~2s sentence-transformer load time per message.
# Start
bash scripts/daemon.sh start
# Or directly
python -m emotion_model.daemon
python -m emotion_model.daemon --config path/to/emoclaw.yaml
Option B: Direct Python Import
from emotion_model.inference import EmotionEngine
engine = EmotionEngine(
model_path
Установить emoclaw в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл emoclaw?
Give your AI emotions that grow from its own memories. Emoclaw builds a unique emotional state that shifts with every conversation, decays between sessions, and evolves over time through self-calibration. Train it on your agent's identity files and watch it develop its own emotional fingerprint.
Как установить скилл emoclaw?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл emoclaw запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic