Repository guide · getting started · v7
pydantic / pydantic-ai · Getting started
An MIT-licensed, Python-dominant repository whose metadata describes AI agent tooling. Dependency records come from five manifests, mostly dev tools in the root pyproject.toml. The 20 listed __main__ entrypoints are scripts and test helpers. How the library itself starts is not established, and install or run commands are not verified.
- Original repository
- pydantic/pydantic-ai
- License
- MIT · open-source license
- Analyzed revision · last verified
- a0022cd089c90121f101f7966fdb492a092d4330 ·
Newer revision observed; parts of this guide may be outdated. The default branch moved to f93bcff0c72c, checked 2026-11-15. The whole guide describes revision a0022cd089c9. A revision diff found changes in 3 code regions it cites (listed below); statements about those regions may not hold at the new revision and have not been rechecked yet.
- tests/ui_roundtrip/package.json (@ag-ui/client) · dependency declaration changed
- pyproject.toml:254 (httpx) · dependency declaration changed
- pyproject.toml:256 (coverage) · dependency declaration changed
Getting started with pydantic/pydantic-ai: manifests and entrypoints
Terms used on this page
- Entrypoint record
- A file the analyzer marks as a place where execution can start. When it carries a __main__ guard excerpt, the file contains an if __name__ == "__main__": block and the excerpt shows what that block calls; without an excerpt, the file was flagged by its name only.
- Bounded static execution path
- A call chain reconstructed from the source code without running it, stopped after a fixed number of steps. It shows how far the code can be followed on paper, not what happens at run time.
- Unresolved boundary
- Where a static path stops because the next call goes into an external library or cannot be resolved without running the code. It marks the edge of this analysis, not a defect in the repository.
- Static relations
- Calls and imports found in the source. "External or unresolved" relations point outside the analyzed files.
- Module role
- The analyzer's label for a file, inferred from how many calls go in and out (for example core, entry/orchestration, leaf). It describes a position in the call graph, not the authors' design.
- Test-like files
- Files whose names or locations look like tests. This analysis counts them; it does not run them.
- Observed · inferred · author-claimed · unresolved
- How each statement is supported: read directly from the analyzed files; derived by the analyzer from them; stated by the repository's authors (metadata, README); or not established by this analysis.
- Verified
- Two uses on these pages. In an analyzer record ("verified provenance", "a verified entrypoint") it means the record was read directly from the analyzed files, which these guides call observed; for an entrypoint, the __main__ guard text is present. Since the analyzer fix of 2026-10-04, a file that only has an entrypoint-like name such as cli.py or main.py is recorded as inferred; guides analyzed before that still call such a file verified, and it is still only a guess about how the file is used. It does not mean the code was run or tested. "Last verified" is the date the guide last passed the lab's checks against the analysis record of the stated revision; it is not a review of the repository itself.
What you are looking at
The platform metadata is the authors' own description. It presents the project as Python tooling for AI: agents, realtime voice, image generation and embeddings, typed end to end, with a homepage on pydantic.dev. Its listed topics include agent-framework, genai, harness, llm and pydantic.
- Language: Python is the primary language and dominates the byte counts, at about 49.9 million bytes. Smaller portions are TypeScript, Shell, PLpgSQL and CSS.
- License: MIT, reported by both the GitHub API and the repository's LICENSE file.
- Latest release: a release named clai2-bleeding, published 2026-10-06. The repository had 20,984 stars on 2026-11-02.
- Size: the analyzer counts 5,620 files, 3,447 test-like files, 10 manifest files and 699 bounded execution paths.
The analyzer's own one-line purpose calls this a web or Node.js application. That label does not match the Python-dominant language data, so treat it with caution.
What it needs
Dependency records come from five manifests. The analyzer counts 10 manifest files, and why the rest produced no records is not established.
pyproject.toml(root): 41 records, all dev scope, with no runtime records. They include pytest, pytest-xdist, coverage, hypothesis, mypy, pyright, ruff and playwright. One record, strict-no-cover, points at a git commit instead of a version range.pydantic_graph/pyproject.toml: runtime anyio >=4.7.0, logfire-api >=3.14.1, pydantic >=2.12 and typing-inspection >=0.4.0.pydantic_evals/pyproject.toml: one optional record, logfire >=3.14.1.src/pydantic_clai2/web-ui/package.json: runtime records are react and react-dom ^19.1.1, marked, highlight.js and dompurify. Dev records are vite ^7.1.2, typescript ~5.9.2, @vitejs/plugin-react and React type packages.tests/ui_roundtrip/package.json: runtime records with exact versions, @ag-ui/client 1.0.3, ai 6.0.309 and rxjs 7.8.1.
Lock files, setup.py, setup.cfg and Pipfile are not parsed, and constraints are recorded as written. Required Python or Node versions are not established.
How it starts
The analyzer counts 76 entrypoint records. The 20 listed in this packet all carry a Python __main__ guard. These listed files sit under scripts/, .github/scripts/, tests/ and .claude/skills/ and look like tooling and test helpers. None of them is in a library package directory.
- Sixteen listed guards call
main(). Some wrap the call insys.exit(...),raise SystemExit(...)orasyncio.run(...). tests/mcp_server.pyandtests/mcp_task_server.pycallmcp.run().scripts/setup_elevenlabs_agents_test_workspace.pyreads its first command-line argument, which defaults tosetup, and dispatches to functions such asorphan()orupdate().scripts/verify_vertex_gcs_tool_result.pyruns a coroutine namedtest_tool_result_with_gcs.
The analyzer reports 699 bounded execution paths; 5 are listed. All five start at .claude/skills/testing-skill/parse_cassette.py. Each goes from the guard into main() and stops at an unresolved boundary: argparse construction, add_argument, parse_args or a cassette.exists check.
How the library itself starts, and any runtime behaviour beyond these records, is not established by this analysis.
Where to look first
The analyzer flags README.md, pyproject.toml and LICENSE as project-level important files. Its other important files are flagged only as likely entrypoints: parse_cassette.py and four scripts under .github/scripts/.
Its learning-path claim suggests a reading order. Start with manifests and important symbols, then trace the bounded execution path and inspect unresolved boundaries before changing code.
Its modify-guide claim points at examples/pydantic_ai_examples/slack_lead_qualifier/app.py and advises checking downstream effects manually. That path sits under examples/, so it looks like example code rather than core library code.
Top-level directories by file count:
tests3,423;src787;pydantic_ai_slim490;docs454;.github255examples63;pydantic_evals34;.agents26;.claude25;pydantic_graph18;scripts15
Tests exist. The analyzer counts 3,447 test-like files, slightly more than the tests directory alone holds.
What this analysis cannot tell you
- Install, run and build commands are not verified, and the analyzer's inference about them is partial.
- Dependency parsing covers requirements files, package.json and pyproject.toml tables. setup.py, setup.cfg, Pipfile and lock files are not parsed.
- README claim extraction is line-based, and every README statement stays author-claimed at best.
- The analysis is static. Reflection, dependency injection, dynamic imports and dynamic dispatch are not resolved.
- Files over 400 kB are inventoried but not parsed. Relation extraction is capped at 150,000 per repository, and the reported 150,000 relation edges suggest the cap was reached.
The packet also contradicts itself in two places:
- One teaching claim says no bounded execution path is available, while 699 paths are reported and 5 are listed. Which of these holds is not established.
- The analyzer's summary names
parse_cassette.pyas the main starting place, but its overview claim namesexamples/pydantic_ai_examples/slack_lead_qualifier/app.py.
What this analysis could not establish
The writing model's own notes on the analysis record. Identifiers such as lim_3, exec_* or claim_… name records of that analysis; the claims table cites the same records.
- Dependency records cover five manifests, but the analyzer counts 10 manifest files; several other pyproject.toml files yielded no records and the reason is not established.
- The root pyproject.toml has only dev-scope records; whether it declares runtime dependencies that were not captured is not established.
- The analyzer's inferred purpose ('web or Node.js application') conflicts with Python being the primary language.
- A teaching claim states no bounded execution path exists, contradicting the reported 699 paths and the 5 listed ones.
- The analyzer names two different starting points (parse_cassette.py and examples/.../slack_lead_qualifier/app.py); neither is shown to be how the library itself is used.
- Only 20 of 76 entrypoint records are listed; the remaining 56, including the filename-heuristic candidates, are not described here.
- The relation cap of 150,000 appears to have been reached, so static relations for some files may be missing.
Claims and evidence — 38 claims, 38 supported by an independent verifier
Every substantive statement above is a claim bound to grounding IDs of the analyzed revision. Global grounding IDs are namespaced by the analysis run.
| Claim | Epistemic status | Verifier | Grounding (global IDs) |
|---|---|---|---|
| c1 Platform metadata describes the project as Python tooling for AI covering agents, realtime voice, image generation and embeddings, typed end to end, with a homepage on pydantic.dev. | author_claimed | supported | analysis_947322335585c32a:meta_description, analysis_947322335585c32a:meta_homepage |
| c2 Repository topics include agent-framework, genai, harness, harness-engineering, llm, pydantic and python. | observed | supported | analysis_947322335585c32a:meta_topics |
| c3 Python is the primary language, with about 49.9 million bytes, far ahead of TypeScript, Shell, PLpgSQL and CSS in the language byte counts. | observed | supported | analysis_947322335585c32a:meta_primary_language, analysis_947322335585c32a:meta_language_bytes |
| c4 The license is MIT, reported via the GitHub API and the repository file, and LICENSE is flagged as a project-level important file. | observed | supported | analysis_947322335585c32a:meta_license, analysis_947322335585c32a:important_3 |
| c5 The latest release is named clai2-bleeding, published 2026-10-06, and the repository had 20,984 stargazers on 2026-11-02. | observed | supported | analysis_947322335585c32a:meta_latest_release, analysis_947322335585c32a:meta_stars |
| c6 The analyzer's summary counts 5,620 analyzed files, 3,447 test-like files, 10 manifest files and 699 bounded execution paths. | inferred | supported | analysis_947322335585c32a:summary_repository |
| c7 The analyzer's inferred purpose calls the repository a web or Node.js application, which conflicts with Python being the primary language. | inferred | supported | analysis_947322335585c32a:summary_repository, analysis_947322335585c32a:meta_primary_language |
| c8 Dependency records come from five manifest paths while the analyzer counts 10 manifest files; why the other manifests yielded no records is not established. | unresolved | supported | analysis_947322335585c32a:summary_repository, analysis_947322335585c32a:lim_3a, analysis_947322335585c32a:dep_1, analysis_947322335585c32a:dep_2, analysis_947322335585c32a:dep_6, analysis_947322335585c32a:dep_47, analysis_947322335585c32a:dep_57 |
| c9 The root pyproject.toml contributes 41 dependency records, all in dev scope; no runtime-scope record is attributed to it. | observed | supported | analysis_947322335585c32a:dep_6, analysis_947322335585c32a:dep_7, analysis_947322335585c32a:dep_8, analysis_947322335585c32a:dep_9, analysis_947322335585c32a:dep_10, analysis_947322335585c32a:dep_11, analysis_947322335585c32a:dep_12, analysis_947322335585c32a:dep_13, analysis_947322335585c32a:dep_14, analysis_947322335585c32a:dep_15, analysis_947322335585c32a:dep_16, analysis_947322335585c32a:dep_17, analysis_947322335585c32a:dep_18, analysis_947322335585c32a:dep_19, analysis_947322335585c32a:dep_20, analysis_947322335585c32a:dep_21, analysis_947322335585c32a:dep_22, analysis_947322335585c32a:dep_23, analysis_947322335585c32a:dep_24, analysis_947322335585c32a:dep_25, analysis_947322335585c32a:dep_26, analysis_947322335585c32a:dep_27, analysis_947322335585c32a:dep_28, analysis_947322335585c32a:dep_29, analysis_947322335585c32a:dep_30, analysis_947322335585c32a:dep_31, analysis_947322335585c32a:dep_32, analysis_947322335585c32a:dep_33, analysis_947322335585c32a:dep_34, analysis_947322335585c32a:dep_35, analysis_947322335585c32a:dep_36, analysis_947322335585c32a:dep_37, analysis_947322335585c32a:dep_38, analysis_947322335585c32a:dep_39, analysis_947322335585c32a:dep_40, analysis_947322335585c32a:dep_41, analysis_947322335585c32a:dep_42, analysis_947322335585c32a:dep_43, analysis_947322335585c32a:dep_44, analysis_947322335585c32a:dep_45, analysis_947322335585c32a:dep_46 |
| c10 Root dev records include pytest, pytest-xdist, coverage, hypothesis, mypy, pyright, ruff and playwright. | observed | supported | analysis_947322335585c32a:dep_19, analysis_947322335585c32a:dep_25, analysis_947322335585c32a:dep_11, analysis_947322335585c32a:dep_41, analysis_947322335585c32a:dep_43, analysis_947322335585c32a:dep_44, analysis_947322335585c32a:dep_45, analysis_947322335585c32a:dep_46 |
| c11 The dev record strict-no-cover is specified as a git commit reference rather than a version range. | observed | supported | analysis_947322335585c32a:dep_42 |
| c12 pydantic_graph/pyproject.toml lists runtime anyio >=4.7.0, logfire-api >=3.14.1, pydantic >=2.12 and typing-inspection >=0.4.0. | observed | supported | analysis_947322335585c32a:dep_2, analysis_947322335585c32a:dep_3, analysis_947322335585c32a:dep_4, analysis_947322335585c32a:dep_5 |
| c13 pydantic_evals/pyproject.toml contributes one optional record, logfire >=3.14.1. | observed | supported | analysis_947322335585c32a:dep_1 |
| c14 src/pydantic_clai2/web-ui/package.json lists runtime react, react-dom ^19.1.1, marked, highlight.js and dompurify, plus dev vite ^7.1.2, typescript ~5.9.2, @vitejs/plugin-react and React type packages. | observed | supported | analysis_947322335585c32a:dep_47, analysis_947322335585c32a:dep_48, analysis_947322335585c32a:dep_49, analysis_947322335585c32a:dep_50, analysis_947322335585c32a:dep_51, analysis_947322335585c32a:dep_52, analysis_947322335585c32a:dep_53, analysis_947322335585c32a:dep_54, analysis_947322335585c32a:dep_55, analysis_947322335585c32a:dep_56 |
| c15 tests/ui_roundtrip/package.json lists runtime records with exact versions: @ag-ui/client 1.0.3, ai 6.0.309 and rxjs 7.8.1. | observed | supported | analysis_947322335585c32a:dep_57, analysis_947322335585c32a:dep_58, analysis_947322335585c32a:dep_59 |
| c16 setup.py, setup.cfg, Pipfile and lock files are not parsed, and version constraints are recorded as written. | observed | supported | analysis_947322335585c32a:lim_3a |
| c17 Which Python or Node versions the project requires is not established by this analysis. | unresolved | supported | analysis_947322335585c32a:lim_2 |
| c18 The analyzer counts 76 entrypoints; the 20 entrypoint records listed in this packet all contain a Python __main__ guard. | inferred | supported | analysis_947322335585c32a:claim_afde2f8b0109, analysis_947322335585c32a:py_entry_e9ef1059e87f, analysis_947322335585c32a:py_entry_711b9329c9af, analysis_947322335585c32a:py_entry_c798a6a48a06, analysis_947322335585c32a:py_entry_536b21d00eab, analysis_947322335585c32a:py_entry_386b3aec8d49, analysis_947322335585c32a:py_entry_c019b89585f7, analysis_947322335585c32a:py_entry_4145baa0e887, analysis_947322335585c32a:py_entry_dc3100121eeb, analysis_947322335585c32a:py_entry_6928137f6e36, analysis_947322335585c32a:py_entry_28117ece2afb, analysis_947322335585c32a:py_entry_31a75fbc0387, analysis_947322335585c32a:py_entry_bea51f9f5f67, analysis_947322335585c32a:py_entry_3d7837eecc2b, analysis_947322335585c32a:py_entry_74efdc9541b6, analysis_947322335585c32a:py_entry_c21b843e12ce, analysis_947322335585c32a:py_entry_396b9db36615, analysis_947322335585c32a:py_entry_479eea5c08d5, analysis_947322335585c32a:py_entry_79e1c97ddf3c, analysis_947322335585c32a:py_entry_f171b7da703d, analysis_947322335585c32a:py_entry_914d31f57de2 |
| c19 All 20 listed guarded files sit under scripts/, .github/scripts/, tests/ or .claude/skills/; none is in a library package directory. | observed | supported | analysis_947322335585c32a:py_entry_e9ef1059e87f, analysis_947322335585c32a:py_entry_711b9329c9af, analysis_947322335585c32a:py_entry_c798a6a48a06, analysis_947322335585c32a:py_entry_536b21d00eab, analysis_947322335585c32a:py_entry_386b3aec8d49, analysis_947322335585c32a:py_entry_c019b89585f7, analysis_947322335585c32a:py_entry_4145baa0e887, analysis_947322335585c32a:py_entry_dc3100121eeb, analysis_947322335585c32a:py_entry_6928137f6e36, analysis_947322335585c32a:py_entry_28117ece2afb, analysis_947322335585c32a:py_entry_31a75fbc0387, analysis_947322335585c32a:py_entry_bea51f9f5f67, analysis_947322335585c32a:py_entry_3d7837eecc2b, analysis_947322335585c32a:py_entry_74efdc9541b6, analysis_947322335585c32a:py_entry_c21b843e12ce, analysis_947322335585c32a:py_entry_396b9db36615, analysis_947322335585c32a:py_entry_479eea5c08d5, analysis_947322335585c32a:py_entry_79e1c97ddf3c, analysis_947322335585c32a:py_entry_f171b7da703d, analysis_947322335585c32a:py_entry_914d31f57de2 |
| c20 Sixteen listed guards call main(), some wrapped in sys.exit, raise SystemExit or asyncio.run. | observed | supported | analysis_947322335585c32a:py_entry_e9ef1059e87f, analysis_947322335585c32a:py_entry_711b9329c9af, analysis_947322335585c32a:py_entry_c798a6a48a06, analysis_947322335585c32a:py_entry_536b21d00eab, analysis_947322335585c32a:py_entry_c019b89585f7, analysis_947322335585c32a:py_entry_4145baa0e887, analysis_947322335585c32a:py_entry_dc3100121eeb, analysis_947322335585c32a:py_entry_6928137f6e36, analysis_947322335585c32a:py_entry_28117ece2afb, analysis_947322335585c32a:py_entry_74efdc9541b6, analysis_947322335585c32a:py_entry_c21b843e12ce, analysis_947322335585c32a:py_entry_396b9db36615, analysis_947322335585c32a:py_entry_479eea5c08d5, analysis_947322335585c32a:py_entry_79e1c97ddf3c, analysis_947322335585c32a:py_entry_f171b7da703d, analysis_947322335585c32a:py_entry_914d31f57de2 |
| c21 The guards in tests/mcp_server.py and tests/mcp_task_server.py call mcp.run(). | observed | supported | analysis_947322335585c32a:py_entry_bea51f9f5f67, analysis_947322335585c32a:py_entry_3d7837eecc2b |
| c22 The guard in scripts/setup_elevenlabs_agents_test_workspace.py reads the first command-line argument, defaulting to 'setup', and dispatches to orphan() or update(). | observed | supported | analysis_947322335585c32a:py_entry_386b3aec8d49 |
| c23 The guard in scripts/verify_vertex_gcs_tool_result.py runs test_tool_result_with_gcs via asyncio.run. | observed | supported | analysis_947322335585c32a:py_entry_31a75fbc0387 |
| c24 The analyzer reports 699 bounded execution paths; 5 are listed, all from parse_cassette.py's guard into main(), each stopping at an unresolved boundary in argparse calls or an args.cassette.exists check. | inferred | supported | analysis_947322335585c32a:exec_bb0400b95179, analysis_947322335585c32a:exec_9bbb24a4ce38, analysis_947322335585c32a:exec_1fdb044ec706, analysis_947322335585c32a:exec_06af0227393f, analysis_947322335585c32a:exec_5f90db10d033, analysis_947322335585c32a:claim_afde2f8b0109 |
| c25 How the library itself starts, and runtime behaviour beyond these static records, is not established because the analysis is static and run inference is partial. | observed | supported | analysis_947322335585c32a:lim_1, analysis_947322335585c32a:lim_2 |
| c26 README.md, pyproject.toml and LICENSE are flagged as project-level important files. | observed | supported | analysis_947322335585c32a:important_1, analysis_947322335585c32a:important_2, analysis_947322335585c32a:important_3 |
| c27 The remaining important files, parse_cassette.py and four .github/scripts files, are flagged only as likely entrypoints. | observed | supported | analysis_947322335585c32a:important_4, analysis_947322335585c32a:important_5, analysis_947322335585c32a:important_6, analysis_947322335585c32a:important_7, analysis_947322335585c32a:important_8 |
| c28 The analyzer's learning-path claim advises starting with manifests and important symbols, then tracing the bounded execution path and inspecting unresolved boundaries before changing code. | inferred | supported | analysis_947322335585c32a:claim_e56db45165bf |
| c29 The modify-guide claim points at examples/pydantic_ai_examples/slack_lead_qualifier/app.py and advises manual checks of downstream effects; its location under examples/ suggests example code rather than core library code. | inferred | supported | analysis_947322335585c32a:claim_067c55f84d85 |
| c30 Top-level directory file counts include tests 3,423, src 787, pydantic_ai_slim 490, docs 454, .github 255, examples 63, pydantic_evals 34, .agents 26, .claude 25, pydantic_graph 18 and scripts 15. | inferred | supported | analysis_947322335585c32a:summary_repository |
| c31 Tests exist: the analyzer counts 3,447 test-like files, slightly more than the 3,423 files in the tests directory. | inferred | supported | analysis_947322335585c32a:summary_repository |
| c32 Install, run and build inference is partial, and installation commands are not verified. | observed | supported | analysis_947322335585c32a:lim_2 |
| c33 Dependency records come from requirements files, package.json and pyproject.toml tables; setup.py, setup.cfg, Pipfile and lock files are not parsed. | observed | supported | analysis_947322335585c32a:lim_3a |
| c34 README claim extraction is line-based, and every README claim remains author_claimed at best. | observed | supported | analysis_947322335585c32a:lim_4a |
| c35 The analysis is static only; reflection, runtime dependency injection, dynamic imports and dynamic dispatch are not resolved. | observed | supported | analysis_947322335585c32a:lim_1 |
| c36 Files over 400 kB are not parsed and relations are capped at 150,000 per repository; the summary's 150,000 relation edges suggest the cap was reached. | inferred | supported | analysis_947322335585c32a:lim_6, analysis_947322335585c32a:summary_repository |
| c37 A teaching claim says no bounded execution path is available, while 699 paths are reported and some are listed; which holds is not established. | unresolved | supported | analysis_947322335585c32a:claim_4d30ade3e21e, analysis_947322335585c32a:claim_afde2f8b0109, analysis_947322335585c32a:exec_bb0400b95179 |
| c38 The analyzer's summary names parse_cassette.py as the main starting place, while its overview teaching claim names examples/pydantic_ai_examples/slack_lead_qualifier/app.py. | inferred | supported | analysis_947322335585c32a:summary_repository, analysis_947322335585c32a:claim_27e99e05a90b |
Sources, rights and disclosure · attribution-license-templates/v0.1
Rights notice. Original repository hosted on GitHub. Repository source code, documentation, names, media, and related project materials remain subject to the rights of their respective authors, contributors, and other rights holders and to applicable repository license terms.
Platform notice. GitHub is the source hosting platform for the linked repository. GitHub and related marks are trademarks of GitHub, Inc. EVEMISS Technology is not affiliated with or endorsed by GitHub unless explicitly stated otherwise.
How this page is produced. This page was produced using revision-aware repository analysis and AI-assisted editorial tooling. Technical claims are tied to the analyzed repository revision and may be revalidated when the source repository changes.
AI-assisted analysis. Reviewed by EVEMISS Technology through human–AI collaborative review. · Report a rights concern · Back to the overview