medium severityBabyAGI (original and LangChain implementations)
The agent runs continuously without stopping, generating and reprioritizing tasks endlessly, consuming API tokens/costs rapidly, often repeating similar tasks or getting stuck in repetitive cycles (e.g., endless research/testing loops), with no natural termination even after achieving the objective.
Root cause
BabyAGI's core design uses an infinite `while True` loop that pulls a task, executes it, creates new tasks via LLM, reprioritizes the list via LLM, and repeats without an exit condition other than an empty task list—which rarely occurs due to LLM's tendency to generate similar or overlapping new tasks indefinitely.
BabyAGIinfinite-looptask-prioritizationLLM-agentLangChain