所有標籤 Pydantic AI 2.38.0 三個重點:(1) 新增型別化 `CustomEvent`/`CapabilityEvent`,應用程式與 capability 都能把自訂事件送進 Agent 的 run event stream,再用 `@on_event` 訂閱,等於補上一層通用的可觀測性與擴充介面;(2) `RunContext` 新增 `context_window_used`,`ModelProfile` 新增 `context_window`,Agent 程式碼第一次能在執行中直接讀到「這個模型的上下文窗口還剩多少」;(3) 補上 `gemini-3.8-flash`、Claude Fable 5.1、Claude Mythos 5.1 等新模型與 `VLLMProvider`。本版無 breaking changes。
Pydantic AI 2.36.0 三個重點:(1) 新增 `@durable_operation` decorator,讓 Agent 的自訂能力(capability)方法直接變成可在 Temporal/Prefect/DBOS 等引擎下 replay-safe 的 durable unit;(2) 為第三方 durable 引擎開出公開 backend API(`BaseDurabilityCapability`、`CallableOperationBackend`、`RegisteredOperationBackend`),官方三個 out-of-tree 引擎驗證零私有 import;(3) 一項相容性緊縮:MCP 工具不再能透過 tool metadata 關閉 durable 執行(DBOS 先前允許),此外 Prefect 的動態工具快取鍵也修正為包含完整 `ToolDefinition`。
七套工具不是同一類產品:LangGraph、MAF 與 Mastra偏耐久工作流,CrewAI 與 AG2 偏多 agent 協作,Pydantic AI 偏型別化 Python agent,DSPy 則用資料與 metric 最佳化整個 AI 程式。先選控制模型,再選框架。
Pydantic AI 把 Agent 寫成 Agent[Deps, Output]:依賴、工具輸入與最終輸出都有型別,模型結果必須通過 Pydantic 驗證。
按 GitHub Stars 排序,盤點 2026 年 15 個主流 AI Agent 框架的定位、特色與適用場景。不是排名,是地圖。