7 Anti-Lessons from Building a PydanticAI Agent: Mistakes We Made So You Don't Have To

Joshua Görner

Autonomous Systems & AI Agents
Python Skill Intermediate
Domain Expertise Intermediate

The Domain: Where Mistakes Are Expensive

Qualio builds quality management software for life sciences companies — the ones making medical devices, pharmaceuticals, and biotech products. Our customers navigate FDA 21 CFR Part 11, ISO 13485, EU MDR, and SOC 2. In this world, compliance isn't optional. Audit trails are mandatory. Documentation gaps mean warning letters, import bans, or product recalls.

When we decided to build an AI agent to help users manage compliance gaps, create remediation plans, and handle documentation — we knew the stakes. An agent that hallucinates a regulatory requirement or skips an approval step isn't just annoying. It's a liability.

So we built carefully with PydanticAI and Claude. And we still made every mistake possible. Here are 7 anti-lessons from the trenches.

Joshua Görner

Platform Engineer by Day ⚙️
Product Engineer by Night 🌙
Ex-Data Scientist 📊
Online Tutor 📺
Husband to a gorgeous Wife 💍
Father of 1002 kids 🐣