Skip to content

productAgent stuck in endless loop #30

Description

@ibabbar

when I tried team of agents demo, and asked a question to product agent

"write me a ticket" - I got this endless loop and think the message is stuck in the queue?

📨 Received message for agent: ProductAgent: "write me a ticket"
🤖 Available Agents:
  ▪ MarketingAgent: Marketing agent
  ▪ SalesAgent: Sales agent
System prompts: ('You are a product manager in our company,you are responsible for the product roadmap and feature requests.',)
Function tools: {'analyze_feature_request': Tool(function=<function analyze_feature_request at 0x10a43f600>, takes_ctx=True, max_retries=1, name='analyze_feature_request', description='Analyze viability and impact of requested features', prepare=None, _is_async=True, _single_arg_name=None, _positional_fields=[], _var_positional_field=None, _parameters_json_schema={'properties': {'feature': {'title': 'Feature', 'type': 'string'}}, 'required': ['feature'], 'type': 'object', 'additionalProperties': False}, current_retry=0), 'get_product_roadmap': Tool(function=<function get_product_roadmap at 0x10a43fec0>, takes_ctx=True, max_retries=1, name='get_product_roadmap', description='Get current product roadmap and timeline', prepare=None, _is_async=True, _single_arg_name=None, _positional_fields=[], _var_positional_field=None, _parameters_json_schema={'properties': {}, 'type': 'object', 'additionalProperties': False}, current_retry=0), 'analyze_usage_patterns': Tool(function=<function analyze_usage_patterns at 0x10a43ff60>, takes_ctx=True, max_retries=1, name='analyze_usage_patterns', description='Analyze how customers are using specific features', prepare=None, _is_async=True, _single_arg_name=None, _positional_fields=[], _var_positional_field=None, _parameters_json_schema={'properties': {'feature': {'title': 'Feature', 'type': 'string'}}, 'required': ['feature'], 'type': 'object', 'additionalProperties': False}, current_retry=0), 'chat_with_agent_tool_pydanticai': Tool(function=<function chat_with_agent_tool_pydanticai at 0x109a63560>, takes_ctx=True, max_retries=1, name='chat_with_agent_tool_pydanticai', description='Chat with an agent by their name.\n\nThis is a tool that can be used in a PydanticAI agent to chat with another agent.', prepare=None, _is_async=False, _single_arg_name=None, _positional_fields=[], _var_positional_field=None, _parameters_json_schema={'properties': {'agent_name': {'description': 'The name of the agent to chat with.', 'title': 'Agent Name', 'type': 'string'}, 'your_name': {'description': 'The name of the PydanticAI agent.', 'title': 'Your Name', 'type': 'string'}, 'question': {'description': 'The question/message to ask the agent.', 'title': 'Question', 'type': 'string'}}, 'required': ['agent_name', 'your_name', 'question'], 'type': 'object', 'additionalProperties': False}, current_retry=0)}
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_0eMmJggR6UxCl2TNBayj00rR', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I have a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_64QUwXy8ZcGPtTNyDRKtDZbR', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What communication channels do you prefer for follow-ups on tickets?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_K1QMk8WfkNHEypc7iNVCXBCK', function=Function(arguments='{"message":"The Product Agent is asking what communication channels you prefer for follow-ups on tickets. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what communication channels you prefer for follow-ups on tickets. Can you 
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human regarding preferred communication channels for follow-ups on tickets, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_g29NmT0YZPtXKhU5loogY74T', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human regarding the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_1tybEHvFaud6sc5WP5BVtu7A', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_kZ69aMEzdtKVrRrdlav4HiA7', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_HMgt3Kv1UfupT2z6yzbfmPBV', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_zFaENB2F0UBmsmyZG46JuQMp', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_MjP2WoXuFfAvfarKp3G7kxAc', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_WOTzOk9GWMh8Jd3gpKGXJMrM', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to determine what information is needed from the Product Agent to assist in writing the ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_Fm60JFdY35BLhrK3QQf8pe2g', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_JbGXGhocHwXkMNcz3fWpUmXA', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_PXvK1o6bn8hU0pMFQBQ0nzPR', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_ulO17VIKjr2VxZVS5ujhalfE', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: Could you assist me in writing a ticket? What information do you need from me?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
⛔  Error in websocket: The next request would exceed the request_limit of 
50
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_uC0YbPWPQAjywiLDgW5HuHlv', function=Function(arguments='{"message":"The Product Agent is asking what information is needed from them to assist in writing a ticket. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
what information is needed from them to assist in writing a ticket. Can you
provide that information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human to find out what information is needed from the Product Agent to assist in writing a ticket. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)
Queue message for sales_agent: Pending messages: ProductAgent: What are the main criteria for ticket evaluation?
🤖 Available Agents:
  ▪ ProductAgent: Product agent
  ▪ MarketingAgent: Marketing agent
In queue fn: ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_6FS6WUJ46umDirhC7yKH9qlR', function=Function(arguments='{"message":"The Product Agent is asking about the main criteria for ticket evaluation. Can you provide that information?"}', name='contact_human'), type='function')])
 🛠️  Function called: contact_human
 Function response: Sent text message to human: The Product Agent is asking
about the main criteria for ticket evaluation. Can you provide that 
information?
In queue fn: ChatCompletionMessage(content="I've reached out to the human regarding the main criteria for ticket evaluation, as requested by the Product Agent. I'll keep you updated once I receive a response.", refusal=None, role='assistant', annotations=[], audio=None, function_call=None, tool_calls=None)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions