PyCon DE & PyData 2025

Generative AI Monitoring with PydanticAI and Logfire
2025-04-23 โ€“, Platinum3

In this talk, we will explore how the integration of PydanticAI and Logfire creates a powerful foundation for generative AI applications. We'll demonstrate how these tools combine to form sophisticated AI workflows and give you comprehensive monitoring.

The session illustrates how PydanticAI enables more reliable agent responses while Logfire provides real-time insights for efficient troubleshooting.

Through practical examples, you'll learn implementation techniques that will help your team build AI systems with observability, transforming how you develop and maintain generative AI projects. ๐Ÿš€


In this talk, we'll explore the essential techniques for developing generative AI applications that are not only powerful but also reliable and transparent. By leveraging the combined capabilities of PydanticAI
and Logfire, developers can create systems that deliver consistent results while maintaining full visibility into their operations.

We'll begin by examining how to create and configure PydanticAI agents, demonstrating how these structured components can form the backbone of sophisticated AI workflows. This foundation will be enhanced through a detailed exploration of Logfire monitoring implementation using MCP servers, providing a robust observability layer for your applications.

The discussion will then shift to evaluation methodologies, offering practical approaches to assess and validate your AI applications' performance and accuracy. We'll delve into the advantages of structured
outputs, showing how they enable more predictable and testable agent responses across various scenarios.

Finally, we'll investigate how real-time insights can transform your troubleshooting process, allowing teams to quickly identify bottlenecks and resolve issues before they impact users. By the end of this
session, you'll have a comprehensive understanding of how these tools and techniques can elevate your generative AI projects to new levels of reliability and observability.


Expected audience expertise: Domain:

Intermediate

Expected audience expertise: Python:

Intermediate

Marcelo Trylesinski, known as "The FastAPI Expert", is a passionate software engineer from Brazil ๐Ÿ‡ง๐Ÿ‡ท (half ๐Ÿ‡บ๐Ÿ‡พ, half ๐Ÿ‡ฎ๐Ÿ‡น).

Currently based in Utrecht, Netherlands ๐Ÿ‡ณ๐Ÿ‡ฑ, he actively maintains Starlette ๐ŸŒŸ and Uvicorn ๐Ÿฆ„, contributing significantly as a senior engineer at Pydantic ๐Ÿค“. Marcelo also shares insights about Python and FastAPI via his YouTube channel ๐ŸŽฅ.