Back to projects

Agents / Safety / Middleware

AffectKit

Emotion-state middleware for LLM agents that simulates affective state as a developer-controlled behavior-modulation layer.

Technical Highlights

  • Loads emotion profiles from YAML and maintains bounded state variables such as anger, trust, patience, confidence, and arousal.
  • Updates affective state from deterministic interaction events and applies mood decay across turns.
  • Produces safety-bounded prompt modifiers instead of claiming that AI systems feel emotions.
  • Wraps Python callables, LangChain-style agents, and LangGraph-style nodes.
  • Includes memory snapshots, examples, tests, and profile documentation.

Stack

Python, YAML profiles, pytest, ruff, LangChain adapters, LangGraph adapters, and safety policy tooling.