invincible-jha commited on
Commit
29e951a
·
1 Parent(s): 6105e8b

Fix agent task execution and response handling

Browse files
agents/conversation_agent.py CHANGED
@@ -3,7 +3,7 @@ from crewai import Agent
3
  import logging
4
  from utils.log_manager import LogManager
5
 
6
- class ConversationAgent:
7
  """Agent specialized in therapeutic conversations"""
8
 
9
  def __init__(self, model_config: Dict, **kwargs):
@@ -12,7 +12,7 @@ class ConversationAgent:
12
  self.logger = self.log_manager.get_agent_logger("conversation")
13
 
14
  # Initialize the CrewAI agent
15
- self.agent = Agent(
16
  role="Therapeutic Conversation Specialist",
17
  goal="Guide therapeutic conversations and provide emotional support",
18
  backstory="""I am an AI agent specialized in therapeutic conversation techniques.
@@ -53,5 +53,5 @@ class ConversationAgent:
53
  return {
54
  "type": "conversation",
55
  "ready": True,
56
- "tools_available": len(self.agent.tools)
57
  }
 
3
  import logging
4
  from utils.log_manager import LogManager
5
 
6
+ class ConversationAgent(Agent):
7
  """Agent specialized in therapeutic conversations"""
8
 
9
  def __init__(self, model_config: Dict, **kwargs):
 
12
  self.logger = self.log_manager.get_agent_logger("conversation")
13
 
14
  # Initialize the CrewAI agent
15
+ super().__init__(
16
  role="Therapeutic Conversation Specialist",
17
  goal="Guide therapeutic conversations and provide emotional support",
18
  backstory="""I am an AI agent specialized in therapeutic conversation techniques.
 
53
  return {
54
  "type": "conversation",
55
  "ready": True,
56
+ "tools_available": len(self.tools)
57
  }
agents/orchestrator.py CHANGED
@@ -57,10 +57,10 @@ class WellnessOrchestrator:
57
  # Create the crew with all agent instances
58
  self.crew = Crew(
59
  agents=[
60
- self.conversation_agent.agent,
61
- self.assessment_agent.agent,
62
- self.mindfulness_agent.agent,
63
- self.crisis_agent.agent
64
  ]
65
  )
66
 
 
57
  # Create the crew with all agent instances
58
  self.crew = Crew(
59
  agents=[
60
+ self.conversation_agent,
61
+ self.assessment_agent,
62
+ self.mindfulness_agent,
63
+ self.crisis_agent
64
  ]
65
  )
66