AI applications often require iterative interactions with language models to refine outputs, execute tools, or validate responses. Instead of manually…