AI Agents Python LLM Ollama MCP Tool Calling

AI Agents: From Fundamentals to Practice - A Hands-On Approach

Two-day intensive training on developing AI agents - from simple rule-based systems to LLM-based agents with MCP integration.

2 Days
Intermediate
Get Started

AI Agents: From Fundamentals to Practice

Course Overview

This intensive 2-day training course systematically introduces you to the development of AI agents. You’ll start with theoretical foundations, initially develop simple rule-based agents without frameworks, and progressively build them into LLM-based systems with tool support. The course concludes with implementing your own Model Context Protocol (MCP) server and its integration into modern AI assistants.

What You Will Learn

Day 1: Fundamentals and Rule-Based Agents

  • Introduction to AI and Agents

    • What is an AI agent? Definitions and distinctions
    • History of AI agents: From ELIZA to ChatGPT
    • Types of agents: Reactive, goal-based, learning agents
    • Agent architectures: BDI, ReAct, ReWOO
    • Components of an AI agent: Perception, Reasoning, Action
  • Understanding Agent Concepts

    • Autonomy and decision-making
    • Tools and actions: Expanding the action spectrum
    • Memory and state management
    • Planning and multi-step reasoning
    • Feedback loops and self-correction
  • Simple Agent Without Frameworks (Python)

    • Development environment setup
    • Architecture of a minimal agent
    • Implementing state management
    • Programming simple decision logic
    • Hands-on Exercise: Your own web crawler agent
  • Tool Support Without Language Model

    • What are tools and why do we need them?
    • Designing tool interface and abstraction
    • Implementing tool registry
    • Executing tools and processing results
    • Hands-on Exercise: Extend web crawler agent with calculator and better search tools
  • Manual Tool Selection

    • Rule-based tool selection
    • Pattern matching for tool recognition
    • Parameter extraction from requests (messages)
    • Error handling during tool execution
    • Hands-on Exercise: Advanced tool logic

Day 2: LLM-Based Agents and MCP

  • Introduction to Ollama

    • What is Ollama and why local?
    • Installation and model management
    • API basics and prompt engineering
    • Temperature, Top-P and other parameters
    • Hands-on Exercise: Extend web crawler agent with Ollama API
  • LLM-Based Tool Selection (Manual)

    • Prompt design for tool selection
    • Parsing structured outputs from LLM
    • Enforcing JSON output format
    • Extracting tool parameters from LLM response
    • Hands-on Exercise: Extend web crawler agent with LLM-driven tool selection
  • Error Handling and Robustness

    • Hallucination detection in tool calls
    • Retry strategies and fallbacks
    • Validation of tool parameters
    • Output parsing with fault tolerance
  • Native Ollama Tool Integration

    • Ollama’s integrated tool-calling function
    • Tool definitions in OpenAI format
    • Receiving structured tool calls
    • Orchestrating multi-tool sequences
    • Hands-on Exercise: Chain web crawler agent tools (dynamic call sequences, sequences, …)
  • Model Context Protocol (MCP) Introduction

    • What is MCP? Architecture and concepts
    • Server, client and transport layer
    • MCP protocol: Resources, Tools, Prompts
    • Use cases and integration possibilities
  • Developing Your Own MCP Server

    • MCP server framework with Python
    • Implementing internet search tool
    • Implementing calculation tool
    • Server testing and debugging
    • Hands-on Exercise: Development of your own MCP server plus local debugging and common development practices
  • MCP Integration

    • Integration in VS Code via settings
    • Integration in Claude Desktop
    • Testing the MCP connection
    • Troubleshooting common problems
    • Hands-on Exercise: Integration of MCP server into existing applications (VS Code or Claude Desktop) and live debugging
  • Agent with MCP Server

    • Implementing MCP client
    • Connecting to your own MCP server
    • Using tools from the MCP server
    • Hands-on Exercise: Complete MCP-based agent
    • Best practices and patterns
    • Hands-on Exercise: Creating a new agent that consumes the previously developed MCP server

Prerequisites

  • Programming Skills: Solid Python knowledge required
  • Basics: Understanding of APIs and JSON
  • Helpful: First experiences with AI/LLMs beneficial
  • System: Laptop with Python 3.10+ and min. 8GB RAM
  • Preparation: Ollama should be installed before course start

Course Format

  • Duration: 2 full days (16 hours)
  • Format: Intensive hands-on sessions with live coding
  • Class Size: Maximum 12 participants for personal support
  • Materials: Complete code, documentation, and cheat sheets included
  • Support: Access to a private Discord channel for follow-up questions

Technology Stack

In the course, we work with:

  • Python 3.10+: Main programming language
  • Ollama: Local LLM inference
  • MCP SDK: Model Context Protocol implementation
  • VS Code: IDE with MCP support
  • Git: Version control for your projects

Hands-on Projects

During the course you will develop:

  1. Simple rule-based agent
  2. Agent with manual tool integration
  3. LLM agent with Ollama (manual tool selection)
  4. Agent with Ollama tool feature
  5. MCP server
  6. MCP-based agent

After the Course You Can

✅ Understand and explain the architecture of AI agents
✅ Develop agents from scratch without frameworks
✅ Effectively integrate LLMs into agent systems
✅ Implement tool calling manually and with Ollama
✅ Develop and deploy your own MCP servers
✅ Use MCP servers in VS Code and Claude Desktop
✅ Orchestrate complex multi-tool agents
✅ Apply best practices for robust agent systems

Who Should Attend

This course is aimed at:

  • Python developers who want to enter AI/LLM development
  • ML engineers who want to build practical agent systems
  • Software architects planning AI integration
  • Tech leads evaluating or leading agent projects
  • Innovators who want to understand cutting-edge AI technologies