crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
19.32k stars 2.67k forks source link

AgentExecutor chain loop looks stucked #6

Closed vanetreg closed 8 months ago

vanetreg commented 9 months ago

When running a tweaked version of the sample code it looks the AgentExecutor chain loop stucked, repeating itself ( in Action and Action Input ):

Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile list of IDEs|Please compile a comprehensive list of all Integrated Development Environments (IDEs) that support AI/LLM assisted programming with extensive search capabilities across project code files and console/terminal messages. Include both mainstream and lesser-known options, as well as any relevant plugins or extensions that enhance these functionalities.

repeated multiple times, so it'll break my OpenAI budget :)

The modified sample code is:

from crewai import Agent, Task, Crew, Process
from langchain.llms import OpenAI

from dotenv import load_dotenv

load_result = load_dotenv(override=True)

# Define your agents with roles and goals
researcher = Agent(
    role="Researcher",
    goal="Discover new trends, ideas, insights",
    backstory="You're a world class researcher working in a major LLM based app developer company",
    verbose=True,
    llm=OpenAI(
        temperature=0.7, model_name="gpt-4-1106-preview"
    ),  # It uses langchain.chat_models, default is GPT4
)
writer = Agent(
    role="Writer",
    goal="Create engaging content",
    backstory="You're a famous technical writer, specialized on writing AI, ML and LLM related content",
    verbose=True,
    llm=OpenAI(
        temperature=0.7, model_name="gpt-4-1106-preview"
    ),  # It uses langchain.chat_models, default is GPT4
)

# Create tasks for your agents
task1 = Task(
    description="Investigate which AI / LLM assisted programming IDE assistant can search not only the selected code or the opened file, but all the project code files, the console and terminal messages",
    agent=researcher,
)
task2 = Task(
    description="Write a short summary about the different AI assistant options found",
    agent=writer,
)

# Instantiate your crew with a sequential process
crew = Crew(
    agents=[researcher, writer],
    tasks=[task1, task2],
    verbose=True,  # Crew verbose more will let you know what tasks are being worked on
    process=Process.sequential,  # Sequential process will have tasks executed one after the other and the outcome of the previous one is passed as extra content into this next.
)

# Get your crew to work!
result = crew.kickoff()
joaomdmoura commented 9 months ago

Hey @vanetreg I'm looking into this today to inspect what might be happening, will report back once I know more

Tomas0413 commented 9 months ago

I also tried the example from README.md, but it seems to get stuck:

Working Agent: Researcher
Starting Task: Investigate the latest AI trends ...

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Investigate the latest AI trends and compile a report|This task is crucial for our next project. Please ensure that the report includes the most recent and significant trends in AI, their potential impacts on various industries, and any other relevant details. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research the latest AI trends and their potential impacts on various industries|Please focus on the most recent and significant trends, and provide a detailed analysis of their potential impacts.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research on the latest AI trends and their potential impacts on various industries|Please focus on the most recent and significant trends. Provide a detailed analysis of their potential impacts.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research on the most recent AI trends|Please focus on the most significant trends and provide a brief overview of each.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research on the most recent AI trends|Please focus on the most significant trends and provide a brief overview of each.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research on the most recent AI trends|Please focus on the most significant trends and provide a brief overview of each. Please also include any relevant data or statistics. The report should be concise but informative.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research on the most recent AI trends|Please focus on the most significant trends and provide a brief overview of each. Include any relevant data or statistics as well. The report should be concise but informative.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct research on the most recent AI trends, focusing on the most significant ones and provide a brief overview of each. Include any relevant data or statistics|This is important for our upcoming project.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct a literature review on the most recent AI trends and collect relevant data or statistics|Focus on the most significant ones and provide a brief overview of each. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct an in-depth literature review on the most recent AI trends|Focus on the most significant ones and provide a brief overview of each.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct a literature review on the most recent AI trends|Focus on the most significant ones

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct research on latest AI trends|Focus on the most significant ones

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct preliminary research on latest AI trends|Focus on the most significant ones

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct preliminary research on latest AI trends|Focus on the most significant ones

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct a comprehensive search on the latest AI trends|Focus on the most significant ones, such as advancements in machine learning, deep learning, AI ethics, and AI in healthcare and other industries. Please provide a brief overview of each trend.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research the latest advancements in machine learning|Provide a brief overview

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research the latest advancements in machine learning|Focus on the major breakthroughs in the last 5 years.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of major breakthroughs in machine learning in the last 5 years|Include both theoretical advancements and practical applications.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Conduct research on major breakthroughs in machine learning in the last 5 years|Focus on both theoretical advancements and practical applications.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research on theoretical advancements in machine learning in the last 5 years|Please focus on journal articles and conference proceedings in top-tier venues.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences and journals|I need to identify the best sources to find the latest theoretical advancements in machine learning. Please provide me a list of the most reputable and influential machine learning conferences and journals from the past 5 years.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Research and compile a list of top-tier machine learning conferences and journals from the past 5 years.|This is important for identifying the best sources of the latest theoretical advancements in machine learning.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community. 

> Entering new AgentExecutor chain...
Thought: To compile a list of top-tier machine learning conferences from the past 5 years, I will need to conduct a thorough investigation. Numerous resources, such as academic databases, conference websites, and expert opinions, can help me compile this list. I also need to consider the influence and recognition of these conferences in the machine learning community. This is a task that will require a significant amount of research. 

Do I need to use a tool? Yes

Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with a high impact and recognition in the machine learning community. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years with high impact and recognition in the machine learning community.|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: I can start by researching the top-tier machine learning conferences that have been held in the past 5 years. But, since this task requires accurate and up-to-date information, I will delegate this task to my co-worker who can help me compile the list. 

Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|We need to focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|We need to focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Focus on conferences with high impact and recognition in the machine learning community.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences from the past 5 years|Please consider factors such as the reputation of the conference, the number of attendees, and the impact of the studies presented. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of top-tier machine learning conferences for the past 5 years considering the reputation of the conference, the number of attendees, and the impact of the studies presented.|Please focus on the most reputable conferences and consider the impact of the studies presented there. Also, take into account the number of attendees each year. 

> Entering new AgentExecutor chain...
Thought: To complete this task, I need to research machine learning conferences during the past 5 years. I will need to look at the reputation of the conference, the number of attendees, and the impact of the studies presented. Do I need to use a tool? Yes.

Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on machine learning conferences for the past 5 years|I need to know the reputation of the conference, the number of attendees each year, and the impact of the studies presented. Please focus on the most reputable conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on machine learning conferences for the past 5 years|Please focus on the most reputable conferences and gather information on their reputation, the number of attendees each year, and the impact of the studies presented.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on the most reputable machine learning conferences for the past 5 years|Focus on their reputation, the number of attendees each year, and the impact of the studies presented.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on the most reputable machine learning conferences for the past 5 years focusing on their reputation, the number of attendees each year, and the impact of the studies presented.|Please provide the data in a comprehensive and easy to understand format.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of reputable machine learning conferences from the past 5 years|We need data on their reputation, the number of attendees each year, and the impact of the studies presented.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile a list of machine learning conferences in the last 5 years|We need data on their reputation, the number of attendees each year, and the impact of the studies presented.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on machine learning conferences|We need information on machine learning conferences in the last 5 years. Specifically, data on their reputation, the number of attendees each year, and the impact of the studies presented. Please compile a list with these details.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on machine learning conferences|We need information on machine learning conferences in the last 5 years. Specifically, data on their reputation, the number of attendees each year, and the impact of the studies presented.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on the reputation, attendees, and impact of machine learning conferences over the past 5 years|We need to know the reputation of these conferences, how many people attended each year, and the impact of the studies that were presented. Please gather data on these topics. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on the reputation of machine learning conferences over the past 5 years|We need to know how reputable these conferences are in the machine learning community, please gather data on this topic.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Compile data on the reputation of machine learning conferences over the past 5 years|We need to know how reputable these conferences are in the machine learning community, please gather data on this topic.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data on the reputation of machine learning conferences over the past 5 years|Collect data from reliable sources like Google Scholar, Scopus, Web of Science and other databases. Also, consider the number of citations, acceptance rate, h-index, and the impact factor of the conferences. Make sure the data covers the past 5 years.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data on machine learning conferences|Please gather data on the reputation of machine learning conferences from the past 5 years. The data should be sourced from reliable databases such as Google Scholar, Scopus, Web of Science etc. The metrics to consider are number of citations, acceptance rate, h-index and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from databases|Please collect data on the reputation of machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science etc. The metrics to consider are number of citations, acceptance rate, h-index and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from databases|Please collect data on the reputation of machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science etc. The metrics to consider are number of citations, acceptance rate, h-index and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from databases|Please collect data on the reputation of machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science etc. The metrics to consider are number of citations, acceptance rate, h-index and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data on machine learning conferences|Please collect data on the reputation of machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science etc. The metrics to consider are number of citations, acceptance rate, h-index and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data on machine learning conferences|Please collect data on the reputation of machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science etc. The metrics to consider are number of citations, acceptance rate, h-index and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data on machine learning conferences|Please gather data from the past 5 years on Google Scholar, Scopus, Web of Science, etc. The metrics to consider are number of citations, acceptance rate, h-index, and impact factor of the conferences.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc. with metrics including number of citations, acceptance rate, h-index, and impact factor|This data is necessary for my current task. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc.|This data should include metrics such as number of citations, acceptance rate, h-index, and impact factor. 

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc.|This data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc.|This data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc.|This data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc.|This data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Gather data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science, etc.|This data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data on machine learning conferences from the past 5 years from Google Scholar, Scopus, Web of Science etc.|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from Google Scholar, Scopus, Web of Science etc. regarding machine learning conferences from the past 5 years|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from Google Scholar, Scopus, Web of Science etc. regarding machine learning conferences from the past 5 years|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from Google Scholar, Scopus, Web of Science etc. regarding machine learning conferences from the past 5 years|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from Google Scholar, Scopus, Web of Science etc. regarding machine learning conferences from the past 5 years|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from Google Scholar, Scopus, Web of Science etc. regarding machine learning conferences from the past 5 years|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

> Entering new AgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate Work to Co-Worker
Action Input: Researcher|Collect data from Google Scholar, Scopus, Web of Science etc. regarding machine learning conferences from the past 5 years|The data should include metrics such as number of citations, acceptance rate, h-index, and impact factor.

But in general it looks great! Will play a bit more with it.

joaomdmoura commented 9 months ago

That's a great call out I think I just wrote something too fast for the readme and didn't think too much about the tasks prompts, for now I just updated the readme with delegate=false but will add a better one that I actually test out

joaomdmoura commented 9 months ago

I'm also re-writing the executor to prevent this ;)

shimizust commented 8 months ago

@joaomdmoura Hi, thanks for putting this project together! Is the getting started example listed in the README supposed to work yet? Switching to gpt-3.5-turbo, I get the following output, which doesn't seem to accomplish anything meaningful. The writer agent keeps trying to use tools that are not available to it and then reaches the iteration limit.

Working Agent: Senior Research Analyst
Starting Task: Conduct a comprehensive analysis of the latest advancements in AI in 2024.
  Identify key trends, breakthrough technologies, and potential industry impacts.
  Compile your findings in a detailed report. ...

> Entering new CrewAgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: duckduckgo_search
Action Input: latest advancements in AI in 2024In 2024, generative AI might actually become useful for the regular, non-tech person, and we are going to see more people tinkering with a million little AI models. State-of-the-art AI... published 27 December 2023 While 2023 was the year of AI, 2024 will be the year we use it. Comments (0) (Image credit: Aston Martin/Apple) We have just come to the end of a year where... Here are the top 10 AI and machine learning trends to prepare for in 2024. 1. Multimodal AI. Multimodal AI goes beyond traditional single-mode data processing to encompass multiple input types, such as text, images and sound -- a step toward mimicking the human ability to process diverse sensory information. It's not just about theoretical potential either; both emerging startups and established tech behemoths are channeling significant resources into developing quantum solutions. Law, Regulation, and Policy, Machine Learning What to Expect in AI in 2024 Seven Stanford HAI faculty and fellows predict the biggest stories for next year in artificial intelligence. Dec 8, 2023 | Shana Lynch This past year marked major advances in generative AI as terms like ChatGPT and Bard become household names.Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:

> Finished chain.
Task output: Agent stopped due to iteration limit or time limit.
Working Agent: Tech Content Strategist
Starting Task: Using the insights from the researcher's report, develop an engaging blog
  post that highlights the most significant AI advancements.
  Your post should be informative yet accessible, catering to a tech-savvy audience.
  Aim for a narrative that captures the essence of these breakthroughs and their
  implications for the future. ...

> Entering new CrewAgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Delegate work to co-worker
Action Input: Tech Content Strategist|Develop engaging blog post on significant AI advancements|Insights from the researcher's report

> Entering new CrewAgentExecutor chain...
Thought: Do I need to use a tool? Yes
Action: Open Google Docs
Action Input: N/AOpen Google Docs is not a valid tool, try one of [].Do I need to use a tool? Yes
Action: Open Microsoft Word
Action Input: N/AOpen Microsoft Word is not a valid tool, try one of [].Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? NoInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:

> Finished chain.
Agent stopped due to iteration limit or time limit.Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:Do I need to use a tool? YesInvalid Format: Missing 'Action:' after 'Thought:

> Finished chain.
Task output: Agent stopped due to iteration limit or time limit.
######################
Agent stopped due to iteration limit or time limit.
joaomdmoura commented 8 months ago

hey there @shimizust smaller models do have a harder time with tools and delegation, gpt-4 should work. I also modified the example again to make it better. That said I'm currently working on an improvement that will address that issue with tool execution in the next version.

joaomdmoura commented 8 months ago

@shimizust I have also added improvements on main, that will be live on the next version (going out today) that will force. the LLM to get you an answer once it gets to the max number of iterations.

The readme templates seems to be working better, but haven't tried with 3.5 just yet.

Using the same tools with the same input is now prevents , steering the LLM back into performing a task.

I'm closing this for now but lmk if you still find issues with it.

shimizust commented 8 months ago

Thanks!