Brew, sip, code, repeat

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.

Minimal vs. Controller-Based APIs

When it comes to building APIs in ASP.NET Core, developers often find themselves weighing the benefits of Minimal APIs against the more traditional Controller-based APIs. Both approaches offer unique advantages and challenges, making it vital to choose the right one for your project. This guide provides a concise comparison of each method, highlighting their pros and cons to help you make an informed architectural decision. 🚀 Minimal APIs Introduced in .NET 6, Minimal APIs bring a fresh perspective to building HTTP APIs by reducing boilerplate code and enabling lightweight applications, particularly suited for microservices.