Build a Local AI Agent with Semantic Kernel and Ollama
What you will build Microsoft's Semantic Kernel is an open-source SDK for building AI agents in Python, C#, and Java. A kernel holds your model service, plugins wrap ordinary functions as tools the model can call, and an agent runs the loop that ties them together. Pair it with Ollama and the same agent runs entirely on your own machine, on a local model, with no cloud API key and no data leaving your laptop. In this tutorial you will build a small notes agent: it reads a folder of plain-text notes, answers questions about them, and keeps the conversation going across turns. The whole thing is about 60 lines of Python. Every command and code snippet below was tested against semantic-kernel 1.45.0, the latest release at the time of writing. One honest note before you start: Microsoft now positions Microsoft Agent Framework as the successor to Semantic Kernel, and it reached 1.0 in April 2026. Semantic Kernel 1.x is still supported — critical bug fixes and security fixes for a...