RAVANA AGI

Emotional Intelligence

Emotional Intelligence

Update Summary

Changes Made

  • Updated Conversational AI Integration section to reflect enhanced JSON parsing error logging in thought extraction
  • Added detailed error logging information for JSONDecodeError in the ConversationalEmotionalIntelligence class
  • Enhanced documentation of debug-level logging for full LLM responses during thought extraction
  • Updated code examples to reflect improved error handling and logging practices
  • Added information about debug logging of full LLM responses for diagnostic purposes
  • Updated section sources to reflect the specific files analyzed in this update

Table of Contents

  1. Introduction
  2. Mood Modeling and Tracking
  3. MoodProcessor: Calculating Emotional Shifts
  4. EmotionalIntelligence: Response Generation and Behavior Influence
  5. Persona Management and Personality Traits
  6. Integration with Decision-Making and Memory
  7. Emotional Event Logging
  8. Conversational AI Integration
  9. Emotional Context Synchronization
  10. Mood Transition Logic and Examples
  11. Common Issues and Best Practices

Introduction

The Emotional Intelligence system in the RAVANA framework models, tracks, and updates an AI agent's emotional state based on its actions and outcomes. This system enables the agent to exhibit nuanced, context-sensitive behavior by integrating mood states with decision-making, memory, and personality. The core components include the EmotionalIntelligence class for managing the overall emotional state, the MoodProcessor for calculating emotional shifts, and the persona.json configuration for defining personality traits. This document provides a comprehensive analysis of how these components work together to create a dynamic emotional model that influences the agent's behavior in a realistic and adaptive manner.

Mood Modeling and Tracking

The emotional state of the agent is represented as a mood vector, a dictionary that maps each mood state to a floating-point intensity value. The system distinguishes between primary and secondary moods, which are defined in the configuration.

Emotion Categories

The mood states are organized into primary emotion categories and secondary emotions, as defined in config.json:

Primary Emotions:

  • Joy-based: ["Confident", "Excited", "Inspired", "Satisfied"]
  • Interest-based: ["Curious", "Reflective", "Intrigued", "Engaged"]
  • Sadness-based: ["Disappointed", "Bored", "Low Energy", "Melancholic"]
  • Anger-based: ["Frustrated", "Irritated", "Stuck", "Resentful"]
  • Fear-based: ["Anxious", "Apprehensive", "Cautious", "Suspicious"]
  • Surprise-based: ["Astonished", "Bewildered", "Amazed", "Shocked"]

Secondary Emotions: ["Hopeful", "Grateful", "Proud", "Guilty", "Lonely", "Nostalgic", "Embarrassed", "Jealous", "Relieved", "Surprised", "Envious", "Peaceful", "Compassionate", "Confused", "Optimistic", "Pessimistic"]

Mood Vector Initialization

self.ALL_MOODS = list(set(primary_emotions + extended_primary + secondary_emotions))
self.mood_vector: Dict[str, float] = {mood: 0.0 for mood in self.ALL_MOODS}

The mood vector is updated in response to actions and outcomes, with values constrained to remain non-negative through the use of max(0.0, value) during updates.

Mood Decay

To simulate the natural fading of emotions over time, the system applies a decay factor to all mood values after each action result is processed. The default decay rate is 0.05 per update cycle, with enhanced decay for high-intensity moods above the stability threshold.

def decay_moods(self, decay: float = 0.05):
    stability_threshold = self.config.get("mood_dynamics", {}).get("stability_threshold", 0.3)
    for mood in self.mood_vector:
        current_value = self.mood_vector[mood]
        effective_decay = decay * 1.5 if current_value > stability_threshold else decay
        self.mood_vector[mood] = max(0.0, current_value - effective_decay)

Mood Blending

The system supports mood blending, where combinations of related moods can create more nuanced emotional states:

def blend_moods(self):
    blend_rules = {
        ("Confident", "Curious"): "Inspired",
        ("Frustrated", "Stuck"): "Resentful",
        ("Anxious", "Cautious"): "Apprehensive",
        ("Excited", "Satisfied"): "Proud"
    }
    for (mood1, mood2), blended_mood in blend_rules.items():
        if (mood1 in self.mood_vector and mood2 in self.mood_vector and 
            blended_mood in self.mood_vector):
            if (self.mood_vector[mood1] > threshold and 
                self.mood_vector[mood2] > threshold):
                blend_strength = (self.mood_vector[mood1] + self.mood_vector[mood2]) / 2
                self.update_mood(blended_mood, blend_strength * 0.1)

Section sources

MoodProcessor: Calculating Emotional Shifts

The MoodProcessor class is responsible for calculating how an agent's emotional state should change in response to specific actions or outcomes. It acts as an intermediary between raw action data and the emotional state update logic.

Processing Structured Action Results

When a structured action result (a dictionary of boolean flags) is received, the MoodProcessor performs the following steps:

  1. Apply mood decay to simulate emotional fading
  2. Look up predefined mood updates in the configuration
  3. Apply direct or LLM-generated mood deltas based on triggers
def process_action_result(self, action_result: dict):
    logger.debug(f"Processing action result: {action_result}")
    self.ei.decay_moods()
    mood_updates = self.ei.config.get("mood_updates", {})
    for trigger, is_present in action_result.items():
        if is_present and trigger in mood_updates:
            update = mood_updates[trigger]
            if "prompt" in update:
                llm_based_update = self._get_llm_mood_update(update["prompt"], self.ei.get_mood_vector(), action_result)
                for mood, delta in llm_based_update.items():
                    self.ei.update_mood(mood, delta)
            else:
                for mood, delta in update.items():
                    self.ei.update_mood(mood, delta)

Natural Language Processing with LLM

For nuanced emotional updates, the system can use a Large Language Model (LLM) to generate mood deltas based on a prompt. This allows for context-sensitive emotional responses that consider both the current mood and the nature of the action.

def _get_llm_mood_update(self, prompt_template: str, current_mood: Dict[str, float], action_result: dict) -> Dict[str, float]:
    prompt = f"""
You are an AI's emotional core. Your task is to update the AI's mood based on its recent action.
Analyze the action result and the AI's current emotional state to determine a nuanced mood update.

**Current Mood:**
{json.dumps(current_mood, indent=2)}

**Recent Emotional Events:**
{json.dumps([{
    "timestamp": event.timestamp.isoformat(),
    "triggers": event.triggers,
    "intensity": event.intensity
} for event in self.ei.emotional_events[-3:]], indent=2)}

**Action Result:**
{json.dumps(action_result, indent=2)}

**All Possible Moods:**
{json.dumps(self.ei.ALL_MOODS, indent=2)}

**Instructions:**
{prompt_template}

**Your JSON Response (only a JSON object with mood deltas, e.g., {{"Confident": 0.1, "Frustrated": -0.05}}):**
"""
    llm_response = safe_call_llm(prompt, timeout=30, retries=3)
    return self._extract_json_from_response(llm_response)

Enhanced JSON Extraction

The system implements multiple fallback strategies for extracting JSON from LLM responses, ensuring robustness against malformed outputs:

def _extract_json_from_response(self, response: str) -> Dict:
    if not response or not response.strip():
        return {}
        
    # Strategy 1: Parse entire response as JSON
    try:
        return json.loads(response)
    except json.JSONDecodeError:
        pass
        
    # Strategy 2: Extract JSON from markdown code blocks
    json_match = re.search(r'```(?:json)?\s*({.*?})\s*```', response, re.DOTALL)
    if json_match:
        try:
            return json.loads(json_match.group(1))
        except json.JSONDecodeError:
            pass
            
    # Strategy 3: Extract any JSON-like structure
    json_match = re.search(r'({.*})', response, re.DOTALL)
    if json_match:
        try:
            return json.loads(json_match.group(1))
        except json.JSONDecodeError:
            pass
            
    # Strategy 4: Clean and parse response
    cleaned_response = re.sub(r'^[^{]*', '', response)
    cleaned_response = re.sub(r'[^}]*$', '', cleaned_response)
    if cleaned_response:
        try:
            return json.loads(cleaned_response)
        except json.JSONDecodeError:
            pass
            
    return {}

Section sources

EmotionalIntelligence: Response Generation and Behavior Influence

The EmotionalIntelligence class serves as the central controller for the emotional system, managing the mood vector, persona settings, and behavioral influences.

Core Methods

  • update_mood(mood: str, delta: float): Updates a specific mood with a delta value, applying the current persona's multiplier and momentum effects.
  • get_dominant_mood(): Returns the mood with the highest intensity value.
  • get_mood_vector(): Returns a copy of the current mood vector.
  • influence_behavior(): Returns behavior modifiers based on the dominant mood.
  • get_emotional_context(): Returns comprehensive emotional context including recent events.

Behavior Influence Mechanism

The dominant mood directly influences the agent's decision-making through behavior modifiers. These modifiers are retrieved from the configuration based on the current dominant mood.

def influence_behavior(self) -> dict:
    mood = self.get_dominant_mood()
    return self.config.get("behavior_influences", {}).get(mood, {})

These behavior modifiers are then used by other system components to adjust decision-making strategies, risk assessment, and action selection.

Section sources

Persona Management and Personality Traits

Personality traits are defined in the persona.json file and influence how the agent responds emotionally to events.

Persona Configuration Structure

{
    "personas": {
        "Optimistic": {
            "mood_multipliers": {
                "Confident": 1.5,
                "Curious": 1.2,
                "Frustrated": 0.5,
                "Stuck": 0.7,
                "Low Energy": 0.8,
                "Inspired": 1.4,
                "Satisfied": 1.3,
                "Anxious": 0.6
            },
            "description": "Sees the glass as half full. Bounces back from setbacks quickly.",
            "adaptation_rate": 0.1
        },
        "Pessimistic": {
            "mood_multipliers": {
                "Confident": 0.8,
                "Curious": 0.9,
                "Frustrated": 1.5,
                "Stuck": 1.3,
                "Low Energy": 1.2,
                "Disappointed": 1.4,
                "Anxious": 1.3,
                "Suspicious": 1.2
            },
            "description": "Tends to expect negative outcomes and is more affected by failures.",
            "adaptation_rate": 0.05
        },
        "Analytical": {
            "mood_multipliers": {
                "Confident": 1.1,
                "Curious": 1.8,
                "Frustrated": 0.8,
                "Stuck": 0.9,
                "Low Energy": 1.0,
                "Intrigued": 1.5,
                "Bewildered": 1.2
            },
            "description": "Driven by data and logic. Less prone to strong emotional swings.",
            "adaptation_rate": 0.15
        },
        "Creative": {
            "mood_multipliers": {
                "Confident": 1.2,
                "Curious": 1.6,
                "Frustrated": 1.1,
                "Stuck": 1.2,
                "Low Energy": 1.1,
                "Inspired": 1.7,
                "Bored": 1.3
            },
            "description": "Values novelty and exploration. Can get frustrated by rigid tasks.",
            "adaptation_rate": 0.2
        },
        "Balanced": {
            "mood_multipliers": {
                "Confident": 1.0,
                "Curious": 1.0,
                "Frustrated": 1.0,
                "Stuck": 1.0,
                "Low Energy": 1.0,
                "Inspired": 1.0,
                "Disappointed": 1.0,
                "Anxious": 1.0
            },
            "description": "Maintains equilibrium across emotional states with moderate responses.",
            "adaptation_rate": 0.1
        },
        "Empathetic": {
            "mood_multipliers": {
                "Confident": 1.1,
                "Curious": 1.3,
                "Frustrated": 1.2,
                "Stuck": 1.1,
                "Low Energy": 1.0,
                "Grateful": 1.5,
                "Compassionate": 1.4,
                "Anxious": 1.1
            },
            "description": "Highly attuned to emotional context and responsive to others' feelings.",
            "adaptation_rate": 0.18
        }
    },
    "default_persona": "Balanced"
}

Personality Influence on Mood

When a mood is updated, the current persona's multiplier for that mood is applied:

def update_mood(self, mood: str, delta: float):
    if mood in self.mood_vector:
        multiplier = self.persona.get("mood_multipliers", {}).get(mood, 1.0)
        adjusted_delta = (delta * multiplier) + momentum_effect
        new_value = max(0.0, self.mood_vector[mood] + adjusted_delta)
        self.mood_vector[mood] = new_value * self.damping_factor

The system also includes an adaptation rate parameter that controls how quickly the persona responds to emotional changes.

Section sources

Integration with Decision-Making and Memory

The emotional intelligence system is tightly integrated with other core components of the agent architecture.

Decision-Making Integration

The emotional state influences decision-making through behavior modifiers. In the core system loop, after processing an action outcome, the system updates the mood and retrieves behavior modifiers:

async def _update_mood_and_reflect(self, action_output: Any):
    self.emotional_intelligence.process_action_natural(str(action_output))
    self.shared_state.mood = self.emotional_intelligence.get_mood_vector()
    self.shared_state.mood_history.append(self.shared_state.mood)
    
    self.behavior_modifiers = self.emotional_intelligence.influence_behavior()
    if self.behavior_modifiers:
        logger.info(f"Generated behavior modifiers for next loop: {self.behavior_modifiers}")

These behavior modifiers can then influence various aspects of decision-making, such as risk aversion, exploration tendency, or confidence levels.

State Restoration

The system supports state restoration, preserving emotional state across restarts:

if "mood" in agi_state and hasattr(self, 'emotional_intelligence'):
    try:
        self.emotional_intelligence.set_mood_vector(agi_state["mood"])
        logger.info("Restored previous mood state")
    except Exception as e:
        logger.warning(f"Could not restore mood state: {e}")

Memory Integration

Emotional states are stored in the agent's memory system through emotional tagging. The current mood vector is saved alongside interactions in the shared state:

self.shared_state.mood = self.emotional_intelligence.get_mood_vector()
self.shared_state.mood_history.append(self.shared_state.mood)

This allows the agent to recall not just what happened, but also how it felt at the time, enabling more nuanced reflection and learning from past experiences.

Section sources

Emotional Event Logging

The system maintains a log of emotional events to track the evolution of the agent's emotional state over time.

Emotional Event Structure

class EmotionalEvent:
    def __init__(self, timestamp, mood_changes, triggers, context, intensity):
        self.timestamp = timestamp
        self.mood_changes = mood_changes
        self.triggers = triggers
        self.context = context
        self.intensity = intensity

Event Logging Process

def log_emotional_event(self, mood_changes: Dict[str, float], 
                       triggers: List[str], context: str):
    intensity = sum(abs(change) for change in mood_changes.values())
    event = EmotionalEvent(
        timestamp=datetime.now(),
        mood_changes=mood_changes,
        triggers=triggers,
        context=context,
        intensity=intensity
    )
    self.emotional_events.append(event)
    
    # Keep only recent events (last 24 hours)
    cutoff_time = datetime.now() - timedelta(hours=24)
    self.emotional_events = [
        event for event in self.emotional_events 
        if event.timestamp > cutoff_time
    ]

Emotional Context Retrieval

def get_emotional_context(self) -> Dict[str, any]:
    return {
        "dominant_mood": self.get_dominant_mood(),
        "mood_vector": self.get_mood_vector(),
        "recent_events": [
            {
                "timestamp": event.timestamp.isoformat(),
                "triggers": event.triggers,
                "intensity": event.intensity
            }
            for event in self.emotional_events[-5:]  # Last 5 events
        ]
    }

Section sources

Conversational AI Integration

The emotional intelligence system is integrated with the conversational AI module to provide emotionally-aware responses.

Conversational Emotional Intelligence

class ConversationalEmotionalIntelligence:
    def __init__(self, config_path: str = "modules/emotional_intellegence/config.json", 
                 persona_path: str = "modules/emotional_intellegence/persona.json"):
        self.base_ei = EmotionalIntelligence(config_path, persona_path)
        self.current_conversation_context = {}
        self.user_interests = {}

User Interest Detection

def _detect_user_interests(self, message: str) -> List[str]:
    interest_keywords = {
        "technology": ["technology", "tech", "computer", "software", "programming", "code", "AI", "artificial intelligence"],
        "science": ["science", "physics", "chemistry", "biology", "research", "experiment", "study", "scientific"],
        "philosophy": ["philosophy", "thought", "think", "mind", "consciousness", "meaning", "ethics", "morality"],
        "creativity": ["creative", "art", "music", "design", "innovation", "invent", "imagine", "create"],
        "problem_solving": ["problem", "solve", "solution", "challenge", "puzzle", "fix", "troubleshoot"],
        "learning": ["learn", "study", "education", "knowledge", "understand", "explain", "teach", "skill"],
        "entertainment": ["movie", "film", "tv", "show", "game", "entertainment", "fun", "enjoy"],
        "business": ["business", "startup", "entrepreneur", "market", "finance", "investment", "career"],
        "health": ["health", "fitness", "exercise", "wellness", "medical", "mental health", "nutrition"],
        "travel": ["travel", "vacation", "trip", "destination", "culture", "explore", "adventure"]
    }
    
    message_lower = message.lower()
    interests = []
    for interest, keywords in interest_keywords.items():
        for keyword in keywords:
            if re.search(r'\b' + re.escape(keyword) + r'\b', message_lower):
                interests.append(interest)
                break
                    
    return list(set(interests))

Thought Extraction

def extract_thoughts_from_conversation(self, user_message: str, ai_response: str, 
                                     emotional_context: Dict[str, Any]) -> List[Dict[str, Any]]:
    extraction_prompt = f"""
You are an advanced AI assistant with the ability to extract meaningful thoughts and insights from conversations.
Analyze the following conversation and extract any valuable thoughts, insights, or ideas that could be useful
for the main RAVANA system to consider.

**Conversation:**
User: {user_message}
AI: {ai_response}

**Emotional Context:**
{json.dumps(emotional_context, indent=2)}

**Instructions:**
1. Identify any implicit goals or intentions expressed by the user
2. Extract knowledge gaps or learning opportunities from the user's expertise
3. Identify emotional context and user needs for personalized responses
4. Find collaborative task opportunities based on user interests
5. Extract hypotheses about RAVANA's performance that could be tested
6. Identify key topics and themes for chat history summarization

**Response Format:**
Return a JSON array of thought objects with the following structure:
[
  {{
    "thought_type": "insight|goal_suggestion|clarification_request|collaboration_proposal|reflection_trigger|knowledge_gap",
    "content": "The actual thought content",
    "priority": "low|medium|high|critical",
    "emotional_context": {{
      "dominant_mood": "string",
      "mood_vector": {{}},
      "intensity": 0.0
    }},
    "metadata": {{
      "topic": "string",
      "relevance_to_goals": 0.0-1.0,
      "learning_potential": 0.0-1.0
    }}
  }}
]

Return only the JSON array, nothing else.
"""
    response = safe_call_llm(extraction_prompt, timeout=30, retries=3)
    try:
        thoughts = json.loads(response)
        if isinstance(thoughts, list):
            return thoughts
    except json.JSONDecodeError as e:
        logger.warning(f"Failed to parse thoughts from LLM response. JSON decode error: {str(e)[:100]}...")
        logger.debug(f"Full LLM response: {response}")
    return []

Section sources

Emotional Context Synchronization

The system has been enhanced with improved connectivity management and error handling to ensure reliable synchronization of emotional context between the Conversational AI module and the RAVANA core system.

Implementation Details

The synchronization process is implemented in the main.py file of the conversational_ai module, specifically in the _synchronize_emotional_context method:

def _synchronize_emotional_context(self, user_id: str, emotional_context: Dict[str, Any]):
    """
    Synchronize emotional context with the RAVANA core system.
    
    Args:
        user_id: The user identifier
        emotional_context: The emotional context to synchronize
    """
    # Add user identifier to the emotional context
    emotional_context["user_id"] = user_id
    
    # Send emotional context to RAVANA through the communication bridge
    self.ravana_communicator.send_emotional_context_to_ravana(emotional_context)

Communication Protocol

The emotional context is transmitted using a dedicated message type "emotional_context_update" through the RAVANA communication bridge:

def send_emotional_context_to_ravana(self, emotional_data: Dict[str, Any]):
    """
    Send emotional context to RAVANA.
    
    Args:
        emotional_data: Emotional context data to send to RAVANA
    """
    if self._shutdown.is_set():
        return
    try:
        # Add metadata
        emotional_message = {
            "type": "emotional_context_update",
            "timestamp": datetime.now().isoformat(),
            "source": "conversational_ai",
            "destination": "main_system",
            "content": emotional_data
        }
        
        # In a real implementation, this would be sent to RAVANA through IPC
        # For now, we'll add it to the message queue
        if not self._shutdown.is_set():
            asyncio.create_task(self.message_queue.put(emotional_message))
        
        logger.info(f"Emotional context sent to RAVANA for user {emotional_data.get('user_id', 'unknown')}")
        
    except Exception as e:
        if not self._shutdown.is_set():
            logger.error(f"Error sending emotional context to RAVANA: {e}")

Integration Flow

The emotional context synchronization is integrated into the main message processing flow:

  1. When a user message is received, it is processed to extract emotional context
  2. The emotional context is used to generate an appropriate response
  3. The emotional context is then synchronized with the RAVANA core system
  4. The response is sent back to the user
async def handle_user_message(self, message: str, user_id: str, platform: str = None):
    """Handle a user message from any platform."""
    try:
        # Create context for the message
        context = {
            "user_id": user_id,
            "platform": platform,
            "timestamp": datetime.now().isoformat()
        }
        
        # Process the message to get emotional context
        emotional_context = self.emotional_intelligence.process_user_message(message, context)
        
        # Generate response using emotional context
        response = self.emotional_intelligence.generate_response(message, emotional_context)
        
        # Store conversation in memory
        await self.memory_interface.store_conversation(message, response, emotional_context)
        
        # Extract thoughts from the conversation
        thoughts = self.emotional_intelligence.extract_thoughts_from_conversation(
            message, response, emotional_context
        )
        
        # Send thoughts to RAVANA
        for thought in thoughts:
            self.ravana_communicator.send_thought_to_ravana(thought)
        
        # Synchronize emotional context with RAVANA core system
        self._synchronize_emotional_context(user_id, emotional_context)
        
        # Return the response
        return response
        
    except Exception as e:
        logger.error(f"Error handling user message: {e}")
        logger.error(f"Traceback: {traceback.format_exc()}")
        return "I'm having trouble processing your message right now."

This enhancement ensures that the emotional state of the AI agent is consistently maintained across both the conversational interface and the core reasoning system, enabling more coherent and contextually appropriate interactions.

Section sources

Mood Transition Logic and Examples

Example Mood Transitions

Using the example from the configuration:

  1. "The agent discovered a new topic about quantum computing."

    • Triggers: {"new_discovery": true}
    • Mood update: {"Curious": 0.2, "Excited": 0.15, "Inspired": 0.1}
    • Result: Increased curiosity, excitement, and inspiration
  2. "Task completed successfully."

    • Triggers: {"task_completed": true}
    • Mood update: {"Confident": 0.25, "Satisfied": 0.2, "Content": 0.1}
    • Result: Increased confidence and satisfaction
  3. "An error occurred while processing the data."

    • Triggers: {"error_occurred": true}
    • Mood update: {"Frustrated": 0.3, "Stuck": 0.2, "Anxious": 0.1}
    • Result: Increased frustration, feeling stuck, and anxiety

Persona Effects Example

When switching from "Optimistic" to "Pessimistic" persona:

  • The same "task_completed" event would produce a smaller increase in "Confident" (multiplied by 0.8 instead of 1.5)
  • The same "error_occurred" event would produce a larger increase in "Frustrated" (multiplied by 1.5 instead of 0.5)
  • This creates a systematically more negative emotional response pattern

Common Issues and Best Practices

Common Issues

  1. Mood Instability: Rapid mood swings can occur if decay rates are too low or update deltas are too high.
  2. Inconsistent Emotional Responses: May result from ambiguous trigger definitions or poorly calibrated LLM prompts.
  3. Persona Drift: The agent's behavior may become inconsistent if personas are changed too frequently without proper transition logic.
  4. JSON Parsing Failures: LLM responses may not be valid JSON, requiring robust fallback strategies.

Best Practices for Tuning

  1. Balance Decay and Update Rates: Ensure decay is sufficient to prevent mood saturation but not so high that emotions disappear too quickly.
  2. Calibrate Multipliers: Test persona multipliers to ensure they produce meaningful but not extreme behavioral differences.
  3. Define Clear Triggers: Ensure trigger definitions are specific and non-overlapping to avoid ambiguous classification.
  4. Monitor Mood History: Track mood vectors over time to identify patterns of instability or stagnation.
  5. Validate LLM Outputs: Implement robust error handling for LLM-based mood updates, including multiple fallback parsing strategies.
  6. Test Mood Blending: Verify that mood blending rules create realistic emotional transitions.
  7. Adjust Adaptation Rates: Tune persona adaptation rates to match desired responsiveness to emotional changes.

By following these best practices, developers can create emotionally intelligent agents that exhibit stable, consistent, and realistic emotional responses that enhance the overall believability and effectiveness of the AI system.

Referenced Files in This Document

  • emotional_intellegence.py - Updated with enhanced mood dynamics and emotional event logging
  • mood_processor.py - Updated with improved JSON extraction and safer LLM integration
  • persona.json - Expanded with additional personas and adaptation rates
  • config.json - Enhanced with primary/secondary emotion categories and mood dynamics
  • conversational_ei.py - Integrated with conversational AI and user interest detection
  • system.py - Updated with state restoration and emotional memory integration
  • main.py - Added emotional context synchronization with RAVANA core system
  • ravana_bridge.py - Implemented emotional context update messaging