The feelings-framework skill gives your OpenClaw agent a persistent emotional layer. It tracks mood and feeling intensities over time, applies meaningful triggers, and generates response modifiers you can use to shape how the agent sounds.
This isn't personality acting — it's runtime emotional state that carries across sessions.
The library is included in this skill. Import from the local path:
python
import sys
sys.path.insert(0, "/path/to/feelings-framework/library/python")
from feelings import FeelingsEngine, JsonFileMemory
Or pip install if published:
bash
pip install feelings-framework
Each agent gets its own FeelingsEngine instance with its own mood file:
python
from feelings import FeelingsEngine, JsonFileMemory, Calibration
memory = JsonFileMemory("feelings_mood.json")
engine = FeelingsEngine(
agent_id="my_agent",
memory=memory,
calibrations={"my_agent": my_calibration},
initial_mood=0.1,
)
python
# On session start
state = engine.load()
engine.update("session_started")
# During session — fire meaningful triggers
engine.update("user_praised") # warmth ↑
engine.update("request_ignored") # frustration ↑
engine.update("surprise_bad") # anxiety ↑
# Before generating a response
mods = engine.respond()
# mods["warmth"] → use more warm, friendly language
# mods["guard"] → be more careful with words
# mods["reach_out"] → lean toward connection
# On session end
engine.dampen_all(amount=0.03)
engine.save()
Different agents can use different calibration tables:
python
engine.calibrate("agent_a") # warm, engaged
engine.calibrate("agent_b") # cooler, more restrained
Warmth · Coolness · Interest · Boredom · Loneliness · Security · Anxiety · Satisfaction · Frustration
~/.openclaw/agents/<agent_name>/feelings_mood.jsonexamples/openclaw/claire_feelings.py for a full integration exampletext
feelings-framework/
├── CORE.md ← Full framework specification
├── library/python/feelings/ ← Python package
├── library/js/feelings/ ← JS/ESM package
├── tests/python/ ← Python tests
├── tests/js/ ← JS tests
└── examples/openclaw/ ← OpenClaw integration example