{"embed":false,"podcast":"Latent Space: The AI Engineer Podcast","podcast_slug":"Latent-Space-The-AI-Engineer-Podcast","tags":[],"thumbnail_url":"https://substackcdn.com/feed/podcast/1084089/ca7468da5614a246d2906ee8926f6de7.jpg","episode":"Agent Engineering with Pydantic + Graphs — with Samuel Colvin","episode_slug":"Latent-Space-The-AI-Engineer-Podcast-Agent-Engineering-with-Pydantic-Graphs-with-Samuel-Colvin","description":"Did you know that adding a simple Code Interpreter took o3 from 9.2% to 32% on FrontierMath? The Latent Space crew is hosting a hack night Feb 11th in San Francisco focused on CodeGen use cases, co-hosted with E2B and Edge AGI; watch E2B’s new workshop and RSVP here!We’re happy to announce that today’s guest Samuel Colvin will be teaching his very first Pydantic AI workshop at the newly announced AI Engineer NYC Workshops day on Feb 22! 25 tickets left.If you’re a Python developer, it’s very likely that you’ve heard of Pydantic. Every month, it’s downloaded &gt;300,000,000 times, making it one of the top 25 PyPi packages. OpenAI uses it in its SDK for structured outputs, it’s at the core of FastAPI, and if you’ve followed our AI Engineer Summit conference, Jason Liu of Instructor has given two great talks about it: “Pydantic is all you need” and “Pydantic is STILL all you need”. Now, Samuel Colvin has raised $17M from Sequoia to turn Pydantic from an open source project to a full stack AI engineer platform with Logfire, their observability platform, and PydanticAI, their new agent framework.Logfire: bringing OTEL to AIOpenTelemetry recently merged Semantic Conventions for LLM workloads which provides standard definitions to track performance like gen_ai.server.time_per_output_token. In Sam’s view at least 80% of new apps being built today have some sort of LLM usage in them, and just like web observability platform got replaced by cloud-first ones in the 2010s, Logfire wants to do the same for AI-first apps. If you’re interested in the technical details, Logfire migrated away from Clickhouse to Datafusion for their backend. We spent some time on the importance of picking open source tools you understand and that you can actually contribute to upstream, rather than the more popular ones; listen in ~43:19 for that part.Agents are the killer app for graphsPydantic AI is their attempt at taking a lot of the learnings that LangChain and the other early LLM frameworks had, and putting Python best practices into it. At an API level, it’s very similar to the other libraries: you can call LLMs, create agents, do function calling, do evals, etc.They define an “Agent” as a container with a system prompt, tools, structured result, and an LLM. Under the hood, each Agent is now a graph of function calls that can orchestrate multi-step LLM interactions. You can start simple, then move toward fully dynamic graph-based control flow if needed.“We were compelled enough by graphs once we got them right that our agent implementation [...] is now actually a graph under the hood.”Why Graphs?* More natural for complex or multi-step AI workflows.* Easy to visualize and debug with mermaid diagrams.* Potential for distributed runs, or “waiting days” between steps in certain flows.In parallel, you see folks like Emil Eifrem of Neo4j talk about GraphRAG as another place where graphs fit really well in the AI stack, so it might be time for more people to take them seriously.Full Video EpisodeLike and subscribe!Chapters* 00:00…","release_date":"6 Feb 2025","episode_embed_code":"<iframe src=\"https://api.pastimeapp.com/embed/Latent-Space-The-AI-Engineer-Podcast-Agent-Engineering-with-Pydantic-Graphs-with-Samuel-Colvin\" height=\"170px\" width=\"100%\" style=\"width: 1px; min-width: 100%; border: 1px dashed rgba(0,0,0,0.1); border-radius: 10px\" frameborder=\"0\" scrolling=\"no\" loading=\"lazy\"></iframe>","episode_share_url":"https://api.pastimeapp.com/ep/Latent-Space-The-AI-Engineer-Podcast-Agent-Engineering-with-Pydantic-Graphs-with-Samuel-Colvin","podcast_share_url":"https://api.pastimeapp.com/pod/Latent-Space-The-AI-Engineer-Podcast","audio_url":"https://api.substack.com/feed/podcast/156609115/5dc5e86e5cc60a86b0e7fda726ff8b21.mp3","ads":[],"meta":{"title":"Latent Space: The AI Engineer Podcast: Agent Engineering with Pydantic + Graphs — with Samuel Colvin","description":"From Latent Space: The AI Engineer Podcast. Did you know that adding a simple Code Interpreter took o3 from 9.2% to 32% on FrontierMath? The Latent Space crew is hosting a hack night Feb 11th in San Francisco focused on CodeGen use cases, co-hosted with E2B and Edge AGI; watch E2B’s new workshop and RSVP here!We’re happy to announce that today’s guest Samuel Colvin will be teaching his very first Pydantic AI workshop at the newly announced AI Engineer NYC Workshops day on Feb 22! 25 tickets left.If you’re a Python developer, it’s very likely that you’ve heard of Pydantic. Every month, it’s downloaded &gt;300,000,000 times, making it one of the top 25 PyPi packages. OpenAI uses it in its SDK for structured outputs, it’s at the core of FastAPI, and if you’ve followed our AI Engineer Summit conference, Jason Liu of Instructor has given two great talks about it: “Pydantic is all you need” and “Pydantic is STILL all you need”. Now, Samuel Colvin has raised $17M from Sequoia to turn Pydantic from an open source project to a full stack AI engineer platform with Logfire, their observability platform, and PydanticAI, their new agent framework.Logfire: bringing OTEL to AIOpenTelemetry recently merged Semantic Conventions for LLM workloads which provides standard definitions to track performance like gen_ai.server.time_per_output_token. In Sam’s view at least 80% of new apps being built today have some sort of LLM usage in them, and just like web observability platform got replaced by cloud-first ones in the 2010s, Logfire wants to do the same for AI-first apps. If you’re interested in the technical details, Logfire migrated away from Clickhouse to Datafusion for their backend. We spent some time on the importance of picking open source tools you understand and that you can actually contribute to upstream, rather than the more popular ones; listen in ~43:19 for that part.Agents are the killer app for graphsPydantic AI is their attempt at taking a lot of the learnings that LangChain and the other early LLM frameworks had, and putting Python best practices into it. At an API level, it’s very similar to the other libraries: you can call LLMs, create agents, do function calling, do evals, etc.They define an “Agent” as a container with a system prompt, tools, structured result, and an LLM. Under the hood, each Agent is now a graph of function calls that can orchestrate multi-step LLM interactions. You can start simple, then move toward fully dynamic graph-based control flow if needed.“We were compelled enough by graphs once we got them right that our agent implementation [...] is now actually a graph under the hood.”Why Graphs?* More natural for complex or multi-step AI workflows.* Easy to visualize and debug with mermaid diagrams.* Potential for distributed runs, or “waiting days” between steps in certain flows.In parallel, you see folks like Emil Eifrem of Neo4j talk about GraphRAG as another place where graphs fit really well in the AI stack, so it might be time for more people to take them seriously.Full Video EpisodeLike and subscribe!Chapters* 00:00…","image":"https://substackcdn.com/feed/podcast/1084089/ca7468da5614a246d2906ee8926f6de7.jpg","twitter":{"card_type":"summary"}},"episode_data":{"id":1816537326,"guid":"substack:post:156609115","slug":"Latent-Space-The-AI-Engineer-Podcast-Agent-Engineering-with-Pydantic-Graphs-with-Samuel-Colvin","title":"Agent Engineering with Pydantic + Graphs — with Samuel Colvin","alias":null,"description":"<p><em>Did you know that </em><a target=\"_blank\" href=\"https://x.com/aiDotEngineer/status/1887625183709806767\" rel=\"noreferrer\"><em>adding a simple Code Interpreter took o3 from 9.2% to 32% on FrontierMath</em></a><em>? The Latent Space crew is hosting a hack night Feb 11th in San Francisco focused on CodeGen use cases, co-hosted with </em><a target=\"_blank\" href=\"https://e2b.dev/\" rel=\"noreferrer\"><em>E2B</em></a><em> and </em><a target=\"_blank\" href=\"https://x.com/edgeagi?lang=en\" rel=\"noreferrer\"><em>Edge AGI</em></a><em>; watch </em><a target=\"_blank\" href=\"https://www.youtube.com/watch?v=k0VIgKAUkP4&amp;list=PLcfpQ4tk2k0W2xRgkV4PUnC-oYGjZez8L&amp;index=20\" rel=\"noreferrer\"><em>E2B’s new workshop</em></a><em> and </em><a target=\"_blank\" href=\"https://lu.ma/re2o79hh\" rel=\"noreferrer\"><em>RSVP here!</em></a></p><p><em>We’re happy to announce that today’s guest </em><strong><em>Samuel Colvin</em></strong><em> will be teaching his very first </em><strong><em>Pydantic AI</em></strong><em> workshop at the newly announced </em><a target=\"_blank\" href=\"https://x.com/aiDotEngineer/status/1887627030793232540\" rel=\"noreferrer\"><em>AI Engineer NYC Workshops day</em></a><em> on Feb 22! </em><a target=\"_blank\" href=\"https://ti.to/software-3/aies-2025/discount/AIE\" rel=\"noreferrer\"><em>25 tickets left</em></a><em>.</em></p><p>If you’re a Python developer, it’s very likely that you’ve heard of <a target=\"_blank\" href=\"https://pydantic.dev/\" rel=\"noreferrer\">Pydantic</a>. Every month, it’s downloaded &gt;300,000,000 times, making it one of the top 25 PyPi packages. OpenAI uses it in its SDK for structured outputs, it’s at the core of FastAPI, and if you’ve followed our AI Engineer Summit conference, Jason Liu of <a target=\"_blank\" href=\"https://python.useinstructor.com/\" rel=\"noreferrer\">Instructor</a> has given two great talks about it: <a target=\"_blank\" href=\"https://youtu.be/yj-wSRJwrrc\" rel=\"noreferrer\">“Pydantic is all you need”</a> and <a target=\"_blank\" href=\"https://www.youtube.com/watch?v=pZ4DIH2BVqg\" rel=\"noreferrer\">“Pydantic is STILL all you need”</a>. </p><p>Now, <a target=\"_blank\" href=\"https://x.com/samuel_colvin\" rel=\"noreferrer\">Samuel Colvin</a> has raised $17M from Sequoia to turn Pydantic from an open source project to a full stack AI engineer platform with <a target=\"_blank\" href=\"https://pydantic.dev/logfire\" rel=\"noreferrer\">Logfire</a>, their observability platform, and <a target=\"_blank\" href=\"https://ai.pydantic.dev/\" rel=\"noreferrer\">PydanticAI</a>, their new agent framework.</p><p>Logfire: bringing OTEL to AI</p><p>OpenTelemetry recently merged <a target=\"_blank\" href=\"https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-metrics/\" rel=\"noreferrer\">Semantic Conventions for LLM workloads</a> which provides standard definitions to track performance like gen_ai.server.time_per_output_token. In Sam’s view at least 80% of new apps being built today have some sort of LLM usage in them, and just like web observability platform got replaced by cloud-first ones in the 2010s, Logfire wants to do the same for AI-first apps. </p><p>If you’re interested in the technical details, Logfire migrated away from Clickhouse to Datafusion for their backend. We spent some time on the importance of picking open source tools you understand and that you can actually contribute to upstream, rather than the more popular ones; listen in ~43:19 for that part.</p><p>Agents are the killer app for graphs</p><p><a target=\"_blank\" href=\"https://ai.pydantic.dev/\" rel=\"noreferrer\">Pydantic AI</a> is their attempt at taking a lot of the learnings that LangChain and the other early LLM frameworks had, and putting Python best practices into it. At an API level, it’s very similar to the other libraries: you can call LLMs, create agents, do function calling, do evals, etc.</p><p>They define an <strong>“Agent”</strong> as a container with a system prompt, tools, structured result, and an LLM. Under the hood, each Agent is now a <em>graph</em> of function calls that can orchestrate multi-step LLM interactions. You can start simple, then move toward fully dynamic graph-based control flow if needed.</p><p>“We were compelled enough by graphs once we got them right that our agent implementation [...] is now actually a graph under the hood.”</p><p><strong>Why Graphs?</strong></p><p>* More natural for complex or multi-step AI workflows.</p><p>* Easy to visualize and debug with mermaid diagrams.</p><p>* Potential for distributed runs, or “waiting days” between steps in certain flows.</p><p>In parallel, you see folks like Emil Eifrem of Neo4j <a target=\"_blank\" href=\"https://www.youtube.com/watch?v=knDDGYHnnSI\" rel=\"noreferrer\">talk about GraphRAG</a> as another place where graphs fit really well in the AI stack, so it might be time for more people to take them seriously.</p><p></p><p>Full Video Episode</p><p><a target=\"_blank\" href=\"https://youtu.be/7wwWRph3Jls\" rel=\"noreferrer\">Like and subscribe</a>!</p><p></p><p>Chapters</p><p>* 00:00…</p>","transcript":"","deepgram":null,"categories":"Technology,Science","duration":3844,"episode_number":null,"season":null,"episode_type":null,"release_date":"2025-02-06T22:58:14.000Z","audio_url":"https://api.substack.com/feed/podcast/156609115/5dc5e86e5cc60a86b0e7fda726ff8b21.mp3","image_url":null,"player_url":"/ep/Latent-Space-The-AI-Engineer-Podcast-Agent-Engineering-with-Pydantic-Graphs-with-Samuel-Colvin","valid":true,"accessTier":null,"created":"2026-10-12T06:04:09.239Z","updated":"2026-10-12T06:04:09.239Z","podcastId":1790,"podcast":{"id":1790,"slug":"Latent-Space-The-AI-Engineer-Podcast","name":"Latent Space: The AI Engineer Podcast","alias":null,"network":"","author":"Latent.Space","rss_url":"https://rss.flightcast.com/vgnxzgiwwzwke85ym53fjnzu.xml","description":"The podcast by and for AI Engineers! In 2025, over 10 million readers and listeners came to Latent Space to hear about news, papers and interviews in Software 3.0.\n\nWe cover Foundation Models changing every domain in Code Generation, Multimodality, AI Agents, GPU Infra and more, directly from the founders, builders, and thinkers involved in pushing the cutting edge. Striving to give you both the definitive take on the Current Thing down to the first introduction to the tech you'll be using in the next 3 months! We break news and exclusive interviews from OpenAI, Anthropic, Gemini, Meta (Soumith Chintala), Sierra (Bret Taylor), tiny (George Hotz), Databricks/MosaicML (Jon Frankle), Modular (Chris Lattner), Answer.ai (Jeremy Howard), et al. \n\nFull show notes always on https://latent.space\n\nSponsorship and business inquiries: business@latent.space <br /><br /><a href=\"https://www.latent.space?utm_medium=podcast\" rel=\"noreferrer\" target=\"_blank\">www.latent.space</a>","categories":"Technology,Science","itunes_type":null,"itunesTypeSource":null,"image_url":"https://substackcdn.com/feed/podcast/1084089/ca7468da5614a246d2906ee8926f6de7.jpg","thumbnail_url":"https://substackcdn.com/feed/podcast/1084089/ca7468da5614a246d2906ee8926f6de7.jpg","error":false,"errorSince":null,"errorReason":null,"feedChangedAt":null,"tagsEditedAt":null,"hiddenAt":null,"hiddenReason":null,"endedAt":null,"popularity":0,"language":null,"country":null,"countrySource":null,"created":"2025-05-05T18:03:19.009Z","updated":"2026-10-12T06:04:09.239Z","tags":[]},"captions":[]},"podcast_data":{"id":1790,"slug":"Latent-Space-The-AI-Engineer-Podcast","name":"Latent Space: The AI Engineer Podcast","alias":null,"network":"","author":"Latent.Space","rss_url":"https://rss.flightcast.com/vgnxzgiwwzwke85ym53fjnzu.xml","description":"The podcast by and for AI Engineers! In 2025, over 10 million readers and listeners came to Latent Space to hear about news, papers and interviews in Software 3.0.\n\nWe cover Foundation Models changing every domain in Code Generation, Multimodality, AI Agents, GPU Infra and more, directly from the founders, builders, and thinkers involved in pushing the cutting edge. Striving to give you both the definitive take on the Current Thing down to the first introduction to the tech you'll be using in the next 3 months! We break news and exclusive interviews from OpenAI, Anthropic, Gemini, Meta (Soumith Chintala), Sierra (Bret Taylor), tiny (George Hotz), Databricks/MosaicML (Jon Frankle), Modular (Chris Lattner), Answer.ai (Jeremy Howard), et al. \n\nFull show notes always on https://latent.space\n\nSponsorship and business inquiries: business@latent.space <br /><br /><a href=\"https://www.latent.space?utm_medium=podcast\" rel=\"noreferrer\" target=\"_blank\">www.latent.space</a>","categories":"Technology,Science","itunes_type":null,"itunesTypeSource":null,"image_url":"https://substackcdn.com/feed/podcast/1084089/ca7468da5614a246d2906ee8926f6de7.jpg","thumbnail_url":"https://substackcdn.com/feed/podcast/1084089/ca7468da5614a246d2906ee8926f6de7.jpg","error":false,"errorSince":null,"errorReason":null,"feedChangedAt":null,"tagsEditedAt":null,"hiddenAt":null,"hiddenReason":null,"endedAt":null,"popularity":0,"language":null,"country":null,"countrySource":null,"created":"2025-05-05T18:03:19.009Z","updated":"2026-10-12T06:04:09.239Z","tags":[]}}