2025 PyDay Bcn workshop on building agents with Pydantic AI

A nice way to spend a Saturday
The PyDay BCN 2025 conference took place yesterday, November 29th. As usual, it was a very nice event filled with workshops centered around Python, and a great opportunity to meet old and new friends from the Python community.
I would like to take the chance to express my gratitude to the organisers for all the hard work they did putting together this event, which turned out excellent.
This year I delivered a workshop
The topic, like many of the other proposals, was focused on the interaction between LLMs and Python: Building Multi-agent systems with Pydantic AI.
I had a great time preparing it and I also had a great time live coding some of the examples during the presentation. I went for a TDD red-green-refactor approach where at the beginning of each exercise we started on a new git branch with a collection of failing tests that acted both as documentation (because tests are documentation!) and as a method to validate that the solution was correct.
The workshop revolved around parsing PDF documents from the arXiv and using Pydantic AI agents in order to extract structured information from them. I feel that writing model-agnostic code is important nowadays, so we highlighted this by working with two different LLMs controlled by changing an env var: Llama 3.2 3b, executed locally via Ollama, and Gemini 2.5 Flash via API.
Links
Picture with a funny slide and a pigeon sticker on the wall courtesy of Alberto Huélamo.