Introduction
Artificial Intelligence is changing how we build modern applications. Traditionally, an application follows predefined business rules to process requests, retrieve data, and return responses. With AI-powered applications, we can go a step further by allowing a Large Language Model (LLM) to understand user intent and choose appropriate actions through controlled application tools.
For example, imagine an e-commerce customer asking:
"Can you tell me where my order is and when it will arrive?"
A traditional application might require the customer to navigate to an order-tracking page, enter an order number, and interpret the result.
An AI-powered customer support agent can understand the question, identify the required information, invoke a C# method to retrieve the order status, and explain the result in natural language.
In this article, we'll explore how to design such an AI agent in .NET using the Microsoft Agent Framework, Clean Architecture, Ollama, and ASP.NET Core Web API.
We'll also…