cs.AIMar 9, 2026

How Emotion Shapes the Behavior of LLMs and Agents: A Mechanistic Study

Authors: Moran Sun, Tianlin Li, Yuwei Zheng, Zhenhong Zhou, Aishan Liu, Xianglong Liu, Yang Liu

Organizations: School of Computer Science and Engineering, Beihang University, Beijing, China · College of Computing and Data Science, Nanyang Technological University, Singapore

Abstract

Emotion plays an important role in human cognition and performance. Motivated by this, we investigate whether analogous emotional signals can shape the behavior of large language models (LLMs) and agents. Existing emotion-aware studies mainly treat emotion as a surface-level style factor or a perception target, overlooking its mechanistic role in task processing. To address this limitation, we propose E-STEER, an interpretable emotion steering framework that enables direct representation-level intervention in LLMs and agents. It embeds emotion as a structured, controllable variable in hidden states, and with it, we examine the impact of emotion on objective reasoning, subjective generation, safety, and multi-step agent behaviors. The results reveal non-monotonic emotion-behavior relations consistent with established psychological theories, and show that specific emotions not only enhance LLM capability but also improve safety, and systematically shape multi-step agent behaviors.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Can Induced Emotion Bias LLM Behaviors in Sequential Decision Making?

    Jul 14, 2026Minh Khoi Ho, Zihao Zhu, Runchuan Zhu +4Sequential Decision MakingLLM Decision-Making

  2. Psychological Steering in LLMs: An Evaluation of Effectiveness and Trustworthiness

    Oct 6, 2025Amin Banayeeanzade, Ala N. Tak, Fatemeh Bahrani +5Language Model SteeringPersonality Modeling in Language Models

  3. Do Emotions in Prompts Matter? Effects of Emotional Framing on Large Language Models

    Apr 2, 2026Minda Zhao, Yutong Yang, Chufei Peng +5LLM PromptingFraming Effects in Language Models