翻篇收录说明
翻篇网页快照

Pydantic AI v1: A Predictable & Robust GenAI Framework

https://pydantic.dev/articles/pydantic-ai-v1

最近抓取:2026-12-05 18:36:57(北京时间)

最近内容变化:2026-12-03 06:34:47(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Built by engineers, for engineers: Explore dependency injection, type safe, structured outputs, retries & observability for production-ready AI agents

正文摘录

/Pydantic AI Pydantic AI v1: A Predictable & Robust GenAI Framework Samuel Colvin 3 mins 2025/09/04 As Markdown Update, September 2026: this post announced V1. Pydantic AI 2.0 shipped on 23 June 2026 and is the current major version: read the V2 announcement for what changed, and the docs for the current release. We're excited to release Pydantic AI V1 today! After nine months of feedback, iteration, and real-world usage (and a stunning 15 million downloads!), we're confident in the framework's API and ready to commit to its stability, so that you can keep building great GenAI applications without having to worry about the foundation shifting under you. #GenAI is Still Just Engineering There are so many agent frameworks, why did you build yet another? Whatever the vibe coding hype may suggest, building GenAI applications is still just engineering. Engineering best practices still apply, developer experience matters, and unlike in some domains, you can't just paper over poor library design or documentation by leaving Claude Code or Cursor to figure it out for you (there simply aren't enough high quality examples of agents in their training data). AI models' inherent unpredictability means that building robust systems that you can put in front of your users still requires careful consideration of every piece of the puzzle, not least of which the foundation you're building on. We built Pydantic AI because no existing agent framework met our bar for developer ergonomics, engineering quality, and production readiness. Here's how Pydantic AI is different: Type safety everywhere – both in our internals and our public API. Ironically, coding agents find type safety even more helpful than humans; if you want to use them in your development flow, the delta between Pydantic AI and other frameworks will be even greater. Open Observability - Pydantic AI works beautifully with our AI Observability platform Pydantic Logfire for tracing, debugging, cost monitoring and evals, but that's just because we're emitting semantic convention compliant OpenTelemetry data. We believe that great tools embrace and advance open standards rather than locking developers into half-baked proprietary standards. 100% test coverage – boring and hard, but invaluable in avoiding breaking changes while moving quickly. Proper dependency injection – tools are virtually useless without access to dependencies, so Pydantic AI has a powerful solution for dependency injection while allowing agents to remain public. Docs examples are unit tested - again, this sounds boring, until you use a library where examples are not unit tested, and you waste time wondering what you're doing wrong until you eventually realize that the example itself was invalid. Built-in support for durable execution - we know you're not just looking to build a quick demo or a viral TikTok post, but real production systems that can handle failures and recover gracefully. Structured outputs with validation – As you might expect from the creators of Pydantic, we take structured outputs very seriously. We support structured output via tool calling, provider managed structured outputs and manual prompting. This isn't revolutionary. It's just good engineering, care for our craft as library authors, and respect for the trust our users place in us when they bring Pydantic AI into their code base. #V1 Means Stability, Not Stagnation V1 means we're committing to API stability: we will not break your code for at least 6 months (if we do, you can shout at us as it's definitely a mistake). Once we release V2, we'll continue to provide security fixes for V1 for another 6 months minimum, so you have time to upgrade your applications. This doesn't mean development is slowing down; quite the opposite - we've got lots of exciting new features in store for upcoming minor versions of Pydantic AI V1, some of which are called out below. #What's New in V1 Besides stability, Pydantic AI V1 brings the following major features that further establish it as the best choice for production-grade GenAI applications: Human-in-the-Loop Tool Approval – Build agents that know when to ask for user input. No more autonomous systems making expensive mistakes. Durable Execution with Temporal – Your agent crashes halfway through a complex workflow? It picks up exactly where it left off. This is out of beta and production-ready. #What's Coming Soon Our team and community are already working on exciting new features for upcoming V1.x releases: Prompt caching - #1041 Handoffs - #1978 Durable execution for graphs - #704 Embeddings support - #58 MCP Resource support - #1783 Context-Free Grammar output support - #2513 If you'd like to see another feature released soon, please comment on an existing issue on GitHub, create a new one, or go straight to submitting a pull request. #Try It If you haven't tried it yet, now is a great time to move to Pydantic AI: uv add pydantic-ai (or pip install pydantic-ai for those afraid of new technology) #Give Us Feedback Our team is very active on GitHub and Slack, so don't hesitate to reach out with any questions or suggestions. See more from Pydantic in Google Search Add Pydantic as a preferred source so our latest articles are easier to find. Choose Pydantic as a preferred source on Google (opens in a new tab) Ready to see what your agents are actually doing? Start free Talk to us Explore our open source packages Related contentView all articles/Pydantic AIIntroducing Pax and the Pydantic AI Harness beta, on the road to 1.0Michael Pfaffenberger2026/11/25/Pydantic AIDurable Pydantic AI agents with Azure Durable TaskLaís Carvalho2026/11/16