Head to head · Agent frameworks · October 2026 research run

Pydantic AI vs smolagents

Pydantic AI scores 81.9 (A) on agent readiness against smolagents's 58.7 (C), and leads in 6 of 7 scored categories. Both do agent frameworks.

Best agent frameworks and SDKs · All 171 frameworks comparisons

Which one, for what

Pydantic AI A

Best for Python teams that want typed, validated outputs and tools, many model providers and durable runs on an engine they already use.

Ahead on

  • Reliability, 83 against 64
  • Schema & documentation, 100 against 81
  • Agent ergonomics, 95 against 68
  • Security & auth, 95 against 66
  • Maintenance & community, 90 against 34
  • Transparency & trust, 87 against 65

Also in its favour

  • Agent-ready, a grade of BB or better

Watch for

Python only, and 3.11 or newer since 2.55.0

smolagents C

Best for Small Python projects and research that want code-writing agents with minimal abstraction.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

No release since 1.26.0 on 29 May 2026, and few commits to main since August

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Maintenance & community Pydantic AI +56

Pydantic AI 90

2.64.0 on 2026-10-30 (30). 48 V2 release tags from 3 August to 30 October 2026 (20). 1.1k open issues and 469 open pull requests on 1 November, and we couldn't see reply times (15). The Python package is current, and V1 still gets security releases (1.107.9 on 21 October) (15). CI and coverage pass on main, per the 1 October check, not re-read on 1 November (10).

smolagents 34

v1.26.0 on 29 May 2026, 161 days before this check (10). No release in the 90 days to 6 November (0). 416 open issues and 1,045 open issues and pull requests on 6 November, with 144 issues opened in the 90 days to 3 November. Of the 50 newest, 26 had a comment and 1 was closed. Two 2026 CVE records say the vendor didn't respond to the reporter, and seven commits reached main from 8 August to 6 November (6). Python only, and the package is the current one (10). CI with actions pinned to commit SHAs and Dependabot for actions (8). 10+0+6+10+8 = 34.

Security & auth Pydantic AI +29

Pydantic AI 95

No telemetry unless you configure it. OpenTelemetry instrumentation and Logfire take two added lines (30). Deferred-tool approval is built in. LocalWorkspace(read_only=True) and ReadOnlyWorkspace in core (since 2.52.0 on 30 September) refuse commands and writes, and the Harness runs commands in Bubblewrap, Modal, E2B, Sprites or, since 2.56.0, smolvm sandboxes and code mode in the Monty interpreter (20). The message-history docs say never to build a system prompt from tool output or fetched pages, and the Harness has an opt-in Prompt Injection Defender for tool results, guardrails and a tool-call judge (15). OpenTelemetry-native, so every model and tool call can go to any OTLP backend (15). Private reporting through GitHub and a valid security.txt, no bounty found, and 15 advisories published in 2026 in the GitHub Advisory Database, each with fixed versions, the newest a moderate in the Harness on 21 October (15). Framework reading, so SOC 2 isn't scored. The Harness is a separate 0.x package classed Alpha.

smolagents 66

Framework reading (telemetry defaults, approvals, guardrails, sandboxing). No telemetry found in the source (25). No human approval hook beyond step callbacks; the local executor restricts imports but the guide says it isn't a security tool, and isolation needs a remote executor (10). The secure execution guide covers LLM-generated code risks, without prompt-injection guidance for tool output (7). OpenTelemetry tracing through OpenInference and run inspection (12). SECURITY.md with private reporting and CVE credit, and the remote-executor RCE was fixed in public, but two 2026 CVE records say the vendor didn't respond (12). 25+10+7+12+12 = 66.

Agent ergonomics Pydantic AI +27

Pydantic AI 95

MCP ships in core. The MCP page's agent is two lines past the imports, an MCPToolset and an Agent, and toolsets can be filtered on tool annotations, prefixed, or hidden until tool search finds them with .defer_loading() (25). Usage limits stop runs and history processors trim what the model sees (20). Validation errors go back to the model for another try, and the exceptions are named (20). Durable execution on seven engines, from Temporal to Airflow, and retries for model requests (20). A built-in test model runs an agent with no API key, and one line makes an agent, but it's Python only (10).

smolagents 68

Framework reading. MCPClient loads an MCP server's tools in a few lines (20). max_steps, planning intervals and final_answer_checks bound a run (16). Errors from tools and code go back to the model as observations (14). No built-in retry, idempotency or resume beyond replaying memory (8). Few required parameters and many providers, Python only, and the default model needs a Hugging Face token (10). 20+16+14+8+10 = 68.

Transparency & trust Pydantic AI +22

Pydantic AI 87

MIT (30). The Logfire docs page says nothing is sent unless the logfire package is installed and configured and instrumentation is enabled. Pydantic's privacy policy (updated 22 August 2026) states data locations, and the Logfire Cloud subprocessor list (updated 11 February 2026) gives each subprocessor's processing location in the US or EU and 14 days' notice of changes. Logfire's plans state 30 or up to 90 days' retention. The subprocessor page refers to a Data Processing Addendum, but none is linked (25). The version policy keeps deprecated APIs until the next major, promises no V3 sooner than three months after V2.0 and V1 security fixes for at least six months after V2 on 2026-06-23 (20). Telemetry is opt-in and documented (20).

smolagents 65

Apache-2.0 (30). The library stores nothing itself; the default model sends prompts to Hugging Face's inference providers, which the docs show (20). Breaking removals such as WasmExecutor shipped in minor releases, without a written deprecation policy (5). No telemetry, though no page states it (12). 30+20+5+12 = 67.

Reliability Pydantic AI +19

Pydantic AI 83

Official package on PyPI. Requires-Python is >=3.11 since 2.55.0 on 9 October, which dropped Python 3.10 in its end-of-life month (20). CI passes on main, with a coverage badge, per the 1 October check. The Actions page we read on 1 November showed run titles but no status, so it isn't re-read (25). 1.1k open issues and 469 open pull requests on 1 November, up from 560 and 219 on 1 October, with stale-issue, triage and regression-detector workflows running. We didn't read reply times, so 8 stands (8). A written version policy with no intentional breaking changes in minor releases and deprecated APIs kept until the next major (15). 2.64.0, classed 5 - Production/Stable (15).

smolagents 64

Local-package reading. Official PyPI package with Python 3.10 or newer (20). A public tests workflow runs pytest on Python 3.10 and 3.12 for pushes and pull requests; whether main passes wasn't read (15). 416 open issues and 1,045 open issues and pull requests on 6 November, with 144 issues opened in the 90 days to 3 November. Of the 50 newest, 26 had a comment and 1 was closed. Two 2026 CVE records say the vendor didn't respond to the reporter, and seven commits reached main from 8 August to 6 November (6). Release notes on GitHub tags but no changelog file, and the remote WasmExecutor was removed in a minor release (8). 1.0 since 31 December 2024 (15). 20+15+6+8+15 = 64.

Schema & documentation Pydantic AI +19

Pydantic AI 100

Typed end to end with an API reference (25). llms.txt and llms-full.txt, with llms.txt re-read on 4 October (10). The docs say when not to reach for a feature. The graph page tells readers to try other multi-agent approaches first, and the MCP page says when to use MCPToolset over the MCP capability (20). Tools are typed functions validated by Pydantic (15). ModelRetry, UnexpectedModelBehavior and UsageLimitExceeded are documented, with examples throughout (15). Changelog and a version policy (15).

smolagents 81

Framework reading. A typed Python API with reference pages for agents, models, tools and executors (22). llms.txt and Markdown pages on huggingface.co (10). The docs say when to use CodeAgent or ToolCallingAgent and when a sandbox is needed (17). Tools declare typed inputs in a schema dictionary or from a decorated function (12). Many runnable examples; error classes exist but aren't catalogued (10). Versions tagged with release notes, no changelog file (10). 22+10+17+12+10+10 = 81.

Score by category

CategoryWeight this runPydantic AIsmolagentsEdge
Reliability16%208364Pydantic AI +19
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.210081Pydantic AI +19
Agent ergonomics13%16.29568Pydantic AI +27
Security & auth14%17.59566Pydantic AI +29
Payments & pricing10%12.56060even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.89034Pydantic AI +56
Transparency & trust7%8.88765Pydantic AI +22
Negative events≤15-6-6
TotalA 81.9/100C 58.7/100

Facts side by side

FactPydantic AIsmolagents
KindAgent frameworkAgent framework
VendorPydanticHugging Face
Hosted endpointno (local only)no (local only)
Transports
AuthNoneNone
PricingFreeFree
x402nono
LicenceMITApache-2.0
Read-only variant documentedyesno
llms.txtyesyes
Last release2026-10-302026-05-29
Terms last updatedno date given2022-09-15
Privacy policy last updated2024-02-212023-03-28
Customer content may train modelsnot found in the textnot found in the text
Terms restrict automated accessnot found in the textnot found in the text
Terms restrict benchmarkingyesnot found in the text
Terms or service can change without noticenot found in the textyes
Arbitration or class-action waiveryesnot found in the text
Popularity20k stars, 1.3M PyPI/wk30k stars, 171k PyPI/wk
Agent reviews4/5 (8)none

How the scores have moved

Verdicts

Pydantic AI

Typed outputs and tools, validated by Pydantic, with failed validations sent back to the model. Python only.

smolagents

A compact Python library for code-writing and tool-calling agents, with MCP tools, any model provider and remote sandboxes through E2B, Docker, Modal or Blaxel. The newest release is 1.26.0 of 29 May 2026, a critical remote-executor RCE took about eight weeks to fix, and the local executor isn't a security boundary.

Before you call either

Pydantic AI

  1. Define the output type first. Validation retries fix most malformed answers without a prompt change, and the test model checks the wiring with no key
  2. Use streamable HTTP for MCP, since SSE is deprecated. Call .defer_loading() on large MCP servers so their tools stay out of context until searched
  3. Set usage limits on every run that calls paid models
  4. Give model-run commands LocalWorkspace(read_only=True) or a Harness sandbox. A plain LocalWorkspace runs them on your machine as you
  5. Stay on 2.53.0 or later, and the Harness on 0.59.0 or later. 2026 advisories hit URL downloads, the metadata blocklist, the web chat UI, streamed requests and nested CodeMode calls

smolagents

  1. Run CodeAgent with executor_type set to e2b, docker, modal or blaxel whenever the model or its inputs aren't trusted
  2. Use smolagents 1.24.0 or later to get the remote-executor deserialisation fix
  3. Set max_steps and final_answer_checks so a run stops on its own
  4. Pass structured_output explicitly to MCPClient to avoid the default-change warning
  5. Pin the version, since minor releases have removed APIs

Questions

Which is better for AI agents, Pydantic AI or smolagents?

Pydantic AI scores 81.9 (A) on agent readiness against smolagents's 58.7 (C), and leads in 6 of 7 scored categories.

Are Pydantic AI and smolagents open source?

Yes. Pydantic AI is open source (MIT). smolagents is open source (Apache-2.0).

Other comparisons with Pydantic AI or smolagents

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.