# How to design a reflection loop in an agentic workflow?

**URL:** <https://community.deeplearning.ai/t/how-to-design-a-reflection-loop-in-an-agentic-workflow/896158>\
**Category:** AI Discussions\
**Tags:** ai-discussions\
**Created:** [November 5, 2026, 2:46am UTC](https://community.deeplearning.ai/t/how-to-design-a-reflection-loop-in-an-agentic-workflow/896158 "2026-11-05T02:46:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanqing1](https://avatars.discourse-cdn.com/v4/letter/y/9dc877/32.png) [@yanqing1](https://community.deeplearning.ai/u/yanqing1)\
**Post date:** [November 5, 2026, 2:46am UTC](https://community.deeplearning.ai/t/how-to-design-a-reflection-loop-in-an-agentic-workflow/896158/1 "2026-11-05T02:46:13Z")

</div>

Hi everyone!  
I’m learning about agentic workflows and I’m confused about how to design a reflection loop. For example, should the same agent critique its own output, or is it better to use a separate agent as the critic? How do you decide when the loop should stop iterating? Any best practices or course recommendations would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [November 5, 2026, 11:24am UTC](https://community.deeplearning.ai/t/how-to-design-a-reflection-loop-in-an-agentic-workflow/896158/2 "2026-11-05T11:24:39Z")

</div>

Hi!

The **Agentic AI course by DeepLearning.AI** is a good resource for understanding agentic workflows and reflection loops. I would recommend checking it out.

Regarding your question, you can certainly use the same model to critique its own output. For example, a general-purpose LLM or a model particularly good at writing and evaluating essays can review its own responses and suggest improvements. You don’t necessarily need a separate critic agent, although using a different model can sometimes provide a more independent perspective.

As for stopping criteria, I was recently going through the Agentic AI course on DeepLearning.AI, and I recall that they use a `max_iterations` variable to limit the number of reflection cycles. This is a practical way to prevent an endless loop. You can also introduce quality-based stopping criteria, where the process terminates once the output meets predefined requirements.

I’d recommend going through the course, as it provides practical examples of these concepts.
