A fully local agent with tools, in about 40 lines: Ollama plus Pydantic AI
A complete walkthrough of building an agent that runs entirely on your own machine — picking a model that fits your VRAM, serving it with Ollama, and wiring tools, a system prompt and a conversation loop together with Pydantic AI.