{"slug": "my-ai-agent-s-mood-is-three-numbers-and-a-16-emotion-table-here-s-the-math", "title": "My AI agent's mood is three numbers and a 16-emotion table. Here's the math", "summary": "A developer built PaulusAI, an agent whose persistent mood is modeled as a PAD (Pleasure, Arousal, Dominance) vector in [-1, 1], with events appraised through the OCC model to produce emotions like joy, pride, fear, and gratitude that each nudge the mood toward a PAD signature. The design scales positive emotions by a reactivity factor and negative emotions by 0.7 + 0.6 × neuroticism, and exposes the current vector and last emotion via a /mood endpoint. The developer frames it as a functional, explainable model rather than a claim that the agent feels anything.", "body_md": "[PaulusAI](https://paulus-ai.pavelshlepnev.space) has a persistent mood, and it's not a vibe prompt. It's a PAD vector (Pleasure, Arousal, Dominance), each in [-1, 1]. Events are appraised with the OCC model (Ortony, Clore & Collins), which turns an event into emotions like joy, pride, fear, or gratitude. Each emotion nudges the mood toward its PAD signature.\n\nHere's the loop:\n\n`task_success` is described by appraisal variables: desirability 0.5, praiseworthiness 0.4, caused by the agent itself. That yields `joy` (0.5), `pride` (0.4), and `gratification` (0.45) before scaling.`reactivity` (0.7), so joy ends up at 0.35. Negative emotions are scaled by `0.7 + 0.6 × neuroticism`, which amplifies them only above neuroticism 0.5. A surprise boost of up to 1.5x exists in the formula, but no event currently sets it.`/mood` shows the current vector and the last emotion felt, so you can see why the agent is in a given state.\nI'm not claiming the agent feels anything. It's a functional model: an explainable way to make behavior shift with events and fade back over time.\n\n```\n# Library of appraisal templates for the coarse events the agent emits.\n# This is the bridge from simple agent signals to full OCC processing.\nEVENT_APPRAISALS = {\n    \"owner_thanks\":     Appraisal(desirability=0.7, praiseworthiness=0.6, agency=\"self\"),\n    \"owner_frustrated\": Appraisal(desirability=-0.6, praiseworthiness=-0.5, agency=\"self\"),\n    \"task_success\":     Appraisal(desirability=0.5, praiseworthiness=0.4, agency=\"self\"),\n    \"task_error\":       Appraisal(desirability=-0.5, praiseworthiness=-0.4, agency=\"self\"),\n    \"action_declined\":  Appraisal(desirability=-0.2, agency=\"none\"),\n    \"new_learning\":     Appraisal(desirability=0.4, prospect=\"prospective\", likelihood=0.8),\n}\n```\n\nOpen questions I'd like input on:", "url": "https://wpnews.pro/news/my-ai-agent-s-mood-is-three-numbers-and-a-16-emotion-table-here-s-the-math", "canonical_source": "https://dev.to/pavel6625/my-ai-agents-mood-is-three-numbers-and-a-16-emotion-table-heres-the-math-4n2i", "published_at": "2026-11-01 17:18:47+00:00", "updated_at": "2026-11-01 17:22:12.856593+00:00", "lang": "en", "topics": ["ai-agents", "artificial-intelligence"], "entities": ["PaulusAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/my-ai-agent-s-mood-is-three-numbers-and-a-16-emotion-table-here-s-the-math", "markdown": "https://wpnews.pro/news/my-ai-agent-s-mood-is-three-numbers-and-a-16-emotion-table-here-s-the-math.md", "text": "https://wpnews.pro/news/my-ai-agent-s-mood-is-three-numbers-and-a-16-emotion-table-here-s-the-math.txt", "jsonld": "https://wpnews.pro/news/my-ai-agent-s-mood-is-three-numbers-and-a-16-emotion-table-here-s-the-math.jsonld"}}