Skip to main content

Posts

Showing posts from September, 2026

Building a Local AI Agent with .NET and Ollama — Getting Started

AI is everywhere these days, but most of the examples we see involve sending our data to a cloud-based AI service. I wanted to try something a little different: Can we build an AI agent that runs locally and can be integrated with a .NET application? The answer is yes. In this series, I’ll walk through how I’m building a local AI agent using .NET, C# and Ollama , and gradually give the agent more capabilities. The goal isn’t just to create another chatbot. We will eventually make the agent capable of working with files, databases, APIs and other tools . What Are We Building? The basic idea is fairly simple. We will have a .NET application that communicates with a locally running AI model. User Request ↓ AI Agent ↓ Agent Decision & Execution 1 Decide what needs to be done 2 Call a tool ...