**SPEAKER_1** (0:00)
Hello, AI engineers. In 2023, we heard that Pydantic is all you need at the first AI engineer summit. In 2024, we heard again that Pydantic is still all you need at the World's Fair. Since then, that opinion has become consensus, with OpenAI and others officially recommending Pydantic in their SDK and docs, as we covered on our Michelle Parkrus episode on OpenAI's structured output. Now, in 2025, we're back to complete the epic trilogy with Samuel Colvin, creator of Pydantic and Logfire, who has just launched his Pydantic AI framework that will extend the principles and sublime developer experience of Pydantic to your building of agents. We are very proud to also announce the new workshops track for the second AI Engineer Summit in New York City on February 22nd. This is a brand new day added to the schedule because we had so many great workshop signups and is available at no extra charge to everyone who already bought tickets. We are honored that Samuel will be teaching his first ever workshop on Pydantic AI there, alongside other luminaries from OpenAI, Anthropic, DeepMind, Vercel, AWS, Neo4j, Letter, Solana Foundation and more. 25 tickets remain for the workshop day. Full schedules have now been released. Our new website now lists our speakers and talks from DeepMind, Anthropic, OpenAI, Meta, Jane Street, Bloomberg, BlackRock, LinkedIn and more. Sponsorships have sold out, but you can still apply for a late ticket at apply.ai.engineer.
See you in two weeks. Watch out and take care.
**Alessio** (1:53)
Hey everyone, welcome to the Latent Space Podcast. This is Alessio, partner and CTO at Decibel Partners, and I'm joined by my co-host Swyx, founder of SmolAI.
**Swyx** (2:02)
Good morning. And today we're very excited to have Sam Colvin join us from Pydantic AI. Welcome.
**Samuel Colvin** (2:09)
Thank you so much for having me. Yeah, it's great to be here.
**Swyx** (2:11)
Sam, I heard that Pydantic is all we need. Is that true?
**Samuel Colvin** (2:15)
I would say you might need Pydantic AI and Logfire as well, but it gets you a long way, that's for sure.
**Swyx** (2:20)
Pydantic almost basically needs no introduction. It's almost 300 million downloads in December. And obviously, in the previous podcasts and discussions we've had with Jason Liu, he's been a big fan and promoter of Pydantic and AI.
**Samuel Colvin** (2:35)
Yeah, it's weird because obviously I didn't create Pydantic originally for uses in AI, obviously it predates LLMs. But it's like we've been lucky that it's been picked up by that community and used so widely.
**Swyx** (2:48)
Actually, maybe we'll hear it right from you. What is Pydantic and maybe a little bit of the origin story?
**Samuel Colvin** (2:54)
The best name for it, which is not quite right, is a validation library. And we get some tension around that name because it doesn't just do validation, it will do coercion by default. We now have strict mode, so you can disable that coercion. But by default, if you say you want an integer field and you get in a string of 1, 2, 3, it will convert it to 123 and a bunch of other sensible conversions. And as you can imagine, the semantics around exactly when you convert and when you don't is complicated. But because of that, it's more than just validation. Back in 2017, when I first started it, the different thing it was doing was using type hints to define your schema. That was controversial at the time. It was genuinely disapproved of by some people. I think the success of Pydantic and libraries like FastAPI that build on top of it means that today that's no longer controversial in Python. And indeed, lots of other people have copied that route. But yeah, it's a data validation library that uses type hints for the most part. And obviously, it does all the other stuff you want, like serialization on top of that. But yeah, that's the core.
**Alessio** (3:57)
Do you have any fun stories on how Jason's schemas ended up being the structure output standard for LLMs? And were you involved in any of these discussions? Because I know OpenAI was one of the early adopters. Did they reach out to you? Was there kind of like a structure output console in open source that people were talking about? Or was it just random?
**Samuel Colvin** (4:17)
No, very much not. So I originally didn't implement Jason's schema inside Pydantic. And then Sebastian Ramirez, FastAPI, came along. And the first I ever heard of him was over a weekend. I got like 50 emails from him, or 50 emails as he was committing to Pydantic, adding Jason's schema long pre-Version 1 So the reason it was added was for OpenAPI, which is obviously closely akin to Jason's schema. And then, yeah, I don't know why it was Jason's, that got picked up and used by OpenAI. It was obviously very convenient for us because it meant that not only can you do the validation, but because Pydantic will generate you the Jason's schema, it will, it kind of can be one source of truth for structured outputs and tools.
62 more minutes of transcript below
Try it now — copy, paste, done:
curl -H "x-api-key: pt_demo" \
https://spoken.md/transcripts/1000651996090
Works with Claude, ChatGPT, Cursor, and any agent that makes HTTP calls.
From $0.10 per transcript. No subscription. Credits never expire.
Using your own key:
curl -H "x-api-key: YOUR_KEY" \
https://spoken.md/transcripts/1000689781288