
Pydantic AI is a Python agent framework developed by the Pydantic team; the code is written in MIT License. It is suitable for teams that already develop backends in Python and wish to integrate models into work order processing, document processing, or data validation workflows. The code is free to use, though selected model services and deployment resources may be subject to additional charges. The framework supports integration with multiple model services; when switching models, you should still verify that capabilities such as structured output and tool invocation are compatible.
With structured output, how does the business logic integrate with it?
Taking work order routing as an example, define “Category, Urgency, and Missing Information” as a PyDantic data model, and then encapsulate the knowledge articles available for querying as typed Python tools. The framework validates the output and the parameters passed to the tools based on these definitions, allowing the backend to determine the next step directly based on specific fields, rather than having to infer priorities from free-form text. While validation can detect mismatches in types or enumerations, the accuracy of the facts contained in the work order still requires verification using source data, business rules, and test samples.
v2.73.0 Update: Separation of Delegation Tasks and Approval Actions
Released on November 24 v2.73.0 Supports explicit opening Child Agent Call Forwarding: In Harness's SubAgents start using forward_deferred_calls=True Afterward, the child agent’s pending calls can be handed over to the parent caller for processing, with the decision to resume from the original history upon return. For example, allowing an assistant to prepare a customer notification does not automatically approve its sending; the approval interface can present the recipients and the content to be sent separately for human verification.
This option is turned off by default and cannot currently be used with task_control Or run continuously and use as needed. By default, pending confirmation states are saved within the same instance of the same process; cross-process recovery requires configuring shared storage. A pending confirmation state can be restored at most once, and this does not replace the duplicate prevention processing of the external sending interface.
Let's start by testing it with a sample work order.
- In a Python virtual environment, pressInstallation Guidemounting
pydantic-ai, configure a model that supports the required functions. When a subagent is needed, proceed as follows: Harness DocumentationInstall the corresponding package. - Define the work order data model as
output_type, First, implement a read-only function that returns simulated records. Prepare three types of work orders—normal, missing fields, and undeterminable—and verify that both the structure and the fact checks meet expectations. - Add another simulation tool that requires approval. No entries should be written to the simulation outbox before approval or when a request is rejected; one entry should be written after approval. Approval records must at least include the operator, action parameters, and decision time to facilitate verification of which call was actually approved. Before connecting to the live channel, verify the handling of timeouts, duplicate submissions, and situations where an action has been executed but no acknowledgment has been received.
How do I choose among similar tools?
| artifact | More suitable | Key Points to Consider During Onboarding |
|---|---|---|
| Pydantic AI | The Python project already has a data model, and I want to start by connecting the output and tool parameters for validation. | Approval and handover of sub-agents must be explicitly enabled; for cross-process operations, a storage mechanism for the "pending approval" status must be designed. |
| LangGraph | The process has branches and checkpoints, and I want to organize pauses and resumptions by node. | Approval resumption relies on checkpoints and thread IDs; side effects are handled according to the "rerun by node" rule. |
| OpenAI Agents SDK | Prioritize the use of its agent and tool interfaces; top-level or nested tool approvals must be handled uniformly. | Using serializable RunState Handle suspension and resumption, and clarify the respective responsibilities of the call-level and ongoing approval processes |
If your current challenge is that “the model provides an answer, but you can’t trust the business code to handle it,” you can start by using Pydantic AI to standardize the output structure. Once you’ve established a workflow that includes human verification, you can then decide whether you need more complex workflow orchestration and recovery mechanisms.
data statistics
Related Navigation

Device-oriented open-source smart body framework designed to simplify the development of multimodal smart bodies and provide enhancements for various types of hardware devices.

GPT Excel
AI-driven Excel formula and script generator designed to streamline spreadsheet processes and increase productivity, compatible with multiple platforms for data analysts, finance, sales, and educators, among others.

Laminar
An open source AI engineering optimization platform focused on AI engineering from first principles. It helps users collect, understand and use data to improve the quality of LLM (Large Language Model) applications.

DeepL
Machine translation software based on deep learning supports multi-language translation and provides high-quality translation results, which is applicable to a variety of scenarios, such as academic research, business communication, and tourism and travel.

Bilanc
The AI-based engineering management platform accurately measures developer productivity, intelligently analyzes engineering processes and provides optimization recommendations to help teams manage and make decisions efficiently.

Youdao AI Translation
The intelligent translation tool developed by NetEase Yudao, based on advanced neural network technology and speech recognition technology, supports multi-language real-time translation, which is widely used in education, conference, film and television and many other fields, providing users with efficient and accurate cross-lingual communication experience.

soda shop
A full-featured, simple and efficient office platform, providing PDF processing, text recognition, image conversion and other practical tools to help users complete their work efficiently.

Codebuff
A multi-language AI programming assistant that provides intelligent code generation, optimization, debugging and annotation features to significantly improve development efficiency and code quality.
No comments...
