EmergenceAI / Agent-E

Agent driven automation starting with the web. Discord: https://discord.gg/wgNfmFuqJF
MIT License
345 stars 46 forks source link

[BUG] Agents being stuck at Aync Function indefinetly #29

Open krishnashed opened 1 month ago

krishnashed commented 1 month ago

Title

Agent stuck at while performing tasks

Description

Agent gets stuck for long time, without any response in the browser chat and terminal,

image

Steps to Reproduce

  1. Run Agent-E using python -u -m ae.main
  2. Prompt "find total number of job openings at Disney"
  3. Further prompting "I want to know the total number of jobs, not just the number of pages, so please go through each of these pages, and tell me the total number of jobs at Disney"

Expected Behavior

Navigating through each page of Job posting at Disney, and giving in the details one after another, then once scrapping all pages is done, giving the final number

Actual Behavior

Agent is just stuck with image image

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

deepak-akkil commented 1 month ago

It looks like in this case, the agent is waiting for user input (the last message in the chat UI), It asked for user to manually navigate to the next page.

This is ofcourse not ideal and something we have noticed also happens in certain type of tasks. We are working on a newer architecture which we believe would enable the agent to run more autonomously for these type of tasks.

teaxio commented 1 month ago

@krishnashed I tried this a few times. The prompts that you are showing, it is not a loop, rather the agent is asking for your input. The bigger question is why. atm it is not able to do pagination. This is one of the areas we would like to improve the agent in. Ultimately we believe adding a planner will help take care of things like this. What is interesting is that it tried to calculate number of jobs per page times number of pages. I do not know where it got 20 jobs from when the page has 15. It was interesting to see it attempt that computation over going from page to page. There are other times I have seen it call out 15 jobs per page:

The total number of job openings at Disney is 1,215 (15 jobs per page across 81 pages).

I did discover that the text based DOM was including the agent overlay, which meant that the followup questions were seeing that. This will be fixed with a PR soon