
Agent loops combine action, observation, and evaluation to refine an answer or retry an operation until it meets a criterion. Jesse Liberty demonstrates the pattern in C# with Microsoft Agent Framework: a loop agent, an evaluator, and an iteration limit.
The example contrasts a deterministic marker such as DONE with a model-based judge, then outlines safeguards to add: timeouts, idempotent calls, logging, and cost tracking. Each iteration adds latency and token usage.
Found via C# Digest















