PrefectHQ / ControlFlow

🦾 Take control of your AI agents
https://controlflow.ai
Apache License 2.0
593 stars 40 forks source link

Remove max turns from task #274

Closed jlowin closed 4 weeks ago

jlowin commented 4 weeks ago

It's very appealing to limit the number of turns for attempting a task by setting Task(max_turns=...) but unfortunately in practice this isn't straightforward. If a single agent is applied to the task, then it can iterate forever because there is no concept of formally "ending" a turn. On the other hand, we can't use LLM invocations because a turn usually requires two invocations - one to use a tool and another to process it. For the moment, enforcing operational limits at the Task level is too complex. We will leave run() limits in place.