See: https://www.reddit.com/r/AI_Agents/comments/1qnavt9/the_infinite_loop_fear_is_real_how_are_you/ - the challenge is that the inner loop of an agent can be completely unbounded. We should offer some primitives to developers such that if each agent can take up x+1 turns and the data plane should issue a request to summarize and close off the loop if the agent is reaching max-turns for the same x-request-id
Developers should be able to specify max-turns, and a "close the loop" prompt. When the specific x-request-id limit is reached, Plano should retry upstream with the "close the loop" prompt and return the response to the agent so that it doesn't operate without bounds.
See: https://www.reddit.com/r/AI_Agents/comments/1qnavt9/the_infinite_loop_fear_is_real_how_are_you/ - the challenge is that the inner loop of an agent can be completely unbounded. We should offer some primitives to developers such that if each agent can take up x+1 turns and the data plane should issue a request to summarize and close off the loop if the agent is reaching max-turns for the same x-request-id
Developers should be able to specify max-turns, and a "close the loop" prompt. When the specific x-request-id limit is reached, Plano should retry upstream with the "close the loop" prompt and return the response to the agent so that it doesn't operate without bounds.