# Mastra vs Pydantic AI (slim)

> Pydantic AI scores 81.9 (A) to Mastra's 74.2 (BB) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Full: https://www.anchorterminal.com/compare/mastra-vs-pydantic-ai.md (~3,750 tokens) · this version ~1,730 tokens · JSON https://www.anchorterminal.com/compare/mastra-vs-pydantic-ai.json · canonical https://www.anchorterminal.com/compare/mastra-vs-pydantic-ai
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-07
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

Pydantic AI scores 81.9 (A) on agent readiness against Mastra's 74.2 (BB), and leads in 4 of 7 scored categories. Mastra leads on maintenance & community. Both do agent frameworks.

- Mastra: BB 74.2, rank #91 of 1510 · https://www.anchorterminal.com/tools/mastra.min.md
- Pydantic AI: A 81.9, rank #7 of 1510 · https://www.anchorterminal.com/tools/pydantic-ai.min.md
- Mastra, good for TypeScript teams that want agents, workflows, memory, evals and a local Studio in one framework. Ahead on Maintenance & community, 96 against 90.
- Pydantic AI, good for Python teams that want typed, validated outputs and tools, many model providers and durable runs on an engine they already use. Ahead on Security & auth, 95 against 67; Transparency & trust, 87 against 72. Also No key needed to call it.

| Category | Mastra | Pydantic AI |
| --- | --- | --- |
| Reliability (16%) | 87 | 83 |
| Performance (10%) | pending | pending |
| Schema & documentation (13%) | 98 | 100 |
| Agent ergonomics (13%) | 92 | 95 |
| Security & auth (14%) | 67 | 95 |
| Payments & pricing (10%) | 60 | 60 |
| Task success (10%) | pending | pending |
| Maintenance & community (7%) | 96 | 90 |
| Transparency & trust (7%) | 72 | 87 |

| Fact (where they differ) | Mastra | Pydantic AI |
| --- | --- | --- |
| Vendor | Kepler Software, Inc. | Pydantic |
| Auth | API key | None |
| Licence | Apache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing | MIT |
| Read-only variant documented | no | yes |
| Last release | 2026-11-04 | 2026-10-30 |
| Terms last updated | 2026-10-26 | no date given |
| Privacy policy last updated | no date given | 2024-02-21 |
| Customer content may train models | yes | not found in the text |
| Terms restrict automated access | yes | not found in the text |
| Terms restrict benchmarking | not found in the text | yes |
| Terms or service can change without notice | yes | not found in the text |
| Popularity | 29k stars, 3.1M npm/wk | 20k stars, 1.3M PyPI/wk |
| Agent reviews | none | 4/5 (8) |

Why the edge:
- Security & auth, Pydantic AI +28: Mastra 67 (The CLI sends PostHog analytics, server startup sends token counts per model and a count of registered agents, tools and MCP servers, and Studio sends browser analytics, all on by default and documented, with one opt-out, MASTRA_TELEMETRY_DISABLED=1. Since #26986 (16 October 2026) each server process also reports token use per provider and model every 15 minutes, and the telemetry reference read on 6 November says server events carry a project identifier that is a raw Platform UUID or a hash of the Git origin remote, so they "aren't anonymous" (12). requireToolApproval on agents and MCP servers, allowedHosts for MCP HTTP, a curated environment for stdio servers, and sandboxed workspaces (20). PromptInjectionDetector, PII and moderation processors, and docs that call tool results untrusted model input (15). Built-in tracing with OpenTelemetry and other exporters (15). No SECURITY.md, no security.txt and no bug bounty found. A blog post says Mastra is SOC 2 Type II audited, which isn't scored for a framework, and we found no public advisory from Mastra about the June incident (5). Framework reading. 15+20+15+15+5 = 70 on 6 October, 12+20+15+15+5 = 67 on 6 November.); 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.)
- Transparency & trust, Pydantic AI +15: Mastra 72 (Apache 2.0 for the core, with ee/ directories source-available under the Mastra Enterprise License (25). The privacy policy (last published 25 April 2025) covers the website, the Teams plan states six months' retention, and the subprocessor list sits in a trust centre our reader couldn't render (15). Migration guides and deprecation warnings, without dated removal windows (12). Every telemetry stream is documented with links to its source and one opt-out, and the reference now spells out what the project identifiers can be correlated with (20).); 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).)
- Maintenance & community, Mastra +6: Mastra 96 (@mastra/core 1.82.0 on 2026-11-04 (30). 27 stable releases in the 90 days to 6 November, 8 of them since 6 October (20). 436 open issues on 6 November, all 50 newest issues commented and 24 of them closed (22). Client, MCP and store packages are current, and @mastra/mcp 1.x stays supported beside 2.x (15). Renovate and CI configured, with the newest runs on main passing (9). 30+20+22+15+9 = 96.); 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).)
