What if your AI agents could run locally, work with your own data, use real tools, and operate without sending every interaction to a cloud service?
Local Agentic AI with Ollama is a practical guide to building private, tool-using AI agents with local language models.
Starting with the fundamentals of agent architecture, you'll learn how to turn a local LLM into a system that can reason through tasks, call tools, retrieve information, maintain memory, interact with files and APIs, and execute controlled workflows.
Inside the book, you'll learn how to:
• Run and manage local LLMs with Ollama
• Build the core agent loop and execution state
• Implement tool calling and function execution
• Validate model-generated arguments and control tool permissions
• Build short-term and long-term agent memory
• Create Retrieval-Augmented Generation (RAG) systems
• Give agents controlled access to files, web resources, and APIs
• Connect agents to external capabilities with MCP
• Build multimodal local AI agents
• Design multi-agent systems and specialized agent workflows
• Automate multi-step tasks with bounded autonomy
• Protect agents against prompt injection and unsafe tool execution
• Add testing, logging, observability, and performance monitoring
• Build a complete private local AI workspace
Rather than treating an AI agent as simply a chatbot with a larger prompt, this book approaches agentic AI as a software engineering problem. You'll learn how models, tools, state, memory, retrieval, permissions, and execution controls fit together to create reliable systems.
Whether you are experimenting with local LLMs, building AI-powered applications, or looking for greater control over your AI workloads and data, this book provides a hands-on path from a basic local model to a practical agentic AI system.