Skip to main content
    Back to Courses
    Intermediate

    PydanticAI – Building LLM Agents in Python

    PydanticAI is the fastest-growing Python agent framework, combining the ergonomic design philosophy of FastAPI with the power of Pydantic validation for LLM interactions. In this intensive 1-day course, you will learn how to build, test, and deploy intelligent agents that use tools, maintain structured state, and produce type-safe outputs. You will work with multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama), implement dependency injection for clean architecture, and leverage Pydantic Logfire for real-time observability. By the end of the day, you will have built a fully functional multi-tool agent ready for production.

    4 Modules
    16 Lessons
    1 Tag
    PydanticAI – Building LLM Agents in Python – 1 Tag Machine Learning course at apigenio

    Skills You'll Learn

    PydanticAI Agent Framework
    Structured LLM Outputs
    Tool-Use Agents
    Dependency Injection
    Multi-Provider LLM Support
    Pydantic Logfire Observability
    Agent Testing Patterns
    FastAPI Agent Deployment

    Course Modules & Lessons

    1

    PydanticAI Fundamentals

    Agent architecture, the Agent class, system prompts, structured results with Pydantic models, model-agnostic design (OpenAI, Anthropic, Gemini, Ollama).

    2h
    Agent-Architektur

    Verstehe den Aufbau von LLM-Agenten, um sie effektiv zu konstruieren.

    30min
    System-Prompts

    Erkunde, wie System-Prompts das Verhalten deiner KI-Agenten steuern.

    30min
    Strukturierte Ergebnisse

    Erfahre, wie du strukturierte Ergebnisse von deinen LLM-Agenten erhältst.

    30min
    Modell-agnostisches Design

    Entdecke die Vorteile eines modell-agnostischen Designs für deine Agenten.

    30min
    2

    Tools & Dependencies

    Defining agent tools, tool parameters and return types, dependency injection with RunContext, accessing databases and APIs from agents.

    2h
    Tools definieren

    Lerne, wie du nützliche Tools für deine LLM-Agenten definierst.

    30min
    Parameter & Rückgabetypen

    Verstehe, wie Parameter und Rückgabetypen deine Tools robust machen.

    30min
    Dependency Injection

    Setze Dependency Injection ein, um Tools flexible in deinen Agenten zu verwalten.

    30min
    DB- & API-Zugriff

    Erforsche den Zugriff auf Datenbanken und APIs mittels PydanticAI-Tools.

    30min
    3

    Advanced Agent Patterns

    Multi-step agent workflows, agent delegation, structured conversation history, streaming responses, retry and error handling strategies.

    2h
    Mehrstufige Workflows

    Erfahre, wie Du komplexe Aufgaben in mehrere Agentenschritte aufteilen kannst.

    30min
    Agent-Delegation

    Lerne, wie Agenten Aufgaben an andere Agenten delegieren können, um effizienter zu sein.

    30min
    Streaming Responses

    Entdecke, wie Du Echtzeit-Antworten von Deinen Agenten erhältst, um die User Experience zu verbessern.

    30min
    Retry & Error Handling

    Optimiere Deine Agenten mit Strategien für Fehlerbehandlung und automatische Wiederholungen.

    30min
    4

    Testing, Observability & Deployment

    Unit testing agents with TestModel and FunctionModel, Pydantic Logfire integration, monitoring costs and latency, deploying agents as FastAPI endpoints.

    2h
    TestModel & FunctionModel

    Teste und validiere Deine Modelle und Funktionen, um robuste Agenten zu entwickeln.

    30min
    Logfire-Integration

    Integriere Logfire, um Deine Agentenaktivitäten transparent zu überwachen.

    30min
    Kosten- & Latenz-Monitoring

    Überwache Kosten und Latenzzeiten Deiner Agenten, um Performance und Budget im Blick zu behalten.

    30min
    FastAPI-Deployment

    Sieh, wie Du Deine Agenten mit FastAPI deployen kannst, um sie produktiv zu nutzen.

    30min

    Prerequisites

    • Solid Python knowledge
    • Basic understanding of LLMs and APIs
    • Familiarity with Pydantic is helpful but not required
    • Laptop with Python 3.10+ installed

    Ready to start?

    Join thousands of students already learning.

    Your Trainer

    David Pinezich

    David Pinezich

    Experienced IT architect and trainer specializing in Python, Cloud Architecture, and Enterprise Solutions. Certified TOGAF, CISSP, and AWS professional with years of hands-on training experience.

    We use analytics cookies to improve our website. Learn more