An AI Agent Is Just a Loop
Claude asked for fourteen tool calls. My code ran every one of them. That gap between asking and doing is the key to understanding agents. An agent is a loop. The model asks for tools and your code decides whether to run them and when to give up.
To see that loop up close, I built a console app that sorts messages from a made-up dead-letter queue into categories based on their content. The app uses Anthropic’s official C# SDK and no agent framework. The full code is on GitHub. There is also a Java version built on Anthropic’s Java SDK. This post walks through the C# version.

