Head to head · Agent frameworks · October 2026 research run
Mastra vs Pydantic AI Harness
Pydantic AI Harness scores 83.5 (A) on agent readiness against Mastra's 78 (A), and leads in 2 of 7 scored categories. Mastra leads on reliability and maintenance & community. Both do agent frameworks.
Best agent frameworks and SDKs · All 276 frameworks comparisons
Which one, for what
Mastra A
Best for TypeScript teams that want agents, workflows, memory, evals and a local Studio in one framework.
Ahead on
- Reliability, 87 against 61
- Maintenance & community, 96 against 87
Watch for
Malicious versions of Mastra npm packages, including @mastra/core 1.42.1, were published on 17 June 2026
Best for Python developers building coding, research or long-running agents on Pydantic AI who want sandboxes, budgets and approvals as parts.
Ahead on
- Security & auth, 85 against 67
- Transparency & trust, 82 against 72
Also in its favour
- No key needed to call it
- No incidents deducted, where Mastra loses 8 points for them
Watch for
0.76.0 and classed Alpha. Minor releases may rename parameters or change defaults
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.
Reliability Mastra +26
Mastra 87
Official npm packages, Node 22.13 or newer (20). Public CI workflows for unit, store, workspace and e2e tests; on 6 November the newest runs on main (Version Packages, Trigger Cloud Integration Tests) succeeded, while the test workflows themselves run on pull requests (22). 436 open issues and 795 open issues and pull requests on 6 November from GitHub's API, with 2,077 issues opened in the 90 days to 3 November; all 50 newest had a comment and 24 were closed, with issue-triage automation (18). A changesets CHANGELOG per package, a CI gate that needs approval for any major bump and migration guides, but no written versioning policy found, and .network() is deprecated without a removal date (12). 1.82.0 (15). 20+22+18+12+15 = 87, up from 74 on 6 October, when GitHub couldn't be read.
Pydantic AI Harness 61
Local-package reading. pydantic-ai-harness on PyPI, Requires-Python 3.11 or newer with classifiers to 3.15 (20). The public CI workflow runs the Harness suite on every install shape, and tests/harness holds about 145 files with some 9,500 test functions, but github.com refused our reader, so whether main is passing is unchecked (15 of 25). 186 open issues labelled pkg:harness on 27 November, 59 of them bugs and 26 of those without a reply, the oldest from 11 June, against 161 closed issues and 362 merged pull requests since 28 October (14 of 25). A written 0.x version policy says patch releases don't intentionally break behaviour, minors may, and every breaking change goes in the release notes with migration guidance, which the shared changelog carries (12 of 15). 0.76.0, classed 3 - Alpha. The docs say 0.x signals API stability, not maturity, and that the capabilities are meant for production, but that isn't a stable declaration (0). 20+15+14+12+0 = 61.
Security & auth Pydantic AI Harness +18
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 Harness 85
Framework reading (telemetry defaults, approval hooks, guardrails, sandboxing). The Harness sends nothing of its own, and tracing goes through core's opt-in instrumentation. FileSystem keeps secrets and .git read-only by default and checks path traversal, and Shell can strip LLM credentials from command environments, which the docs call coarse (27 of 30). Permissions with full, auto and read-only modes, Approval Reviewer, Tool Call Judge and Deny Unanswered, and twelve workspace backends, but full is the default and Coder's shell has no allowlist (17 of 20). A Prompt Injection Defender (report-only unless block_high_risk=True), output guardrails, and workspace authority that keeps files below operator authority out of the instructions (13 of 15). OpenTelemetry spans for every model and tool call through core, plus trajectory and artifact-scanning capabilities (13 of 15). A valid security.txt and GitHub private reporting, a threat model that covers the Harness, and one moderate advisory, GHSA-3589-pxp7-3gj8, published with a fix in 0.59.0 on 21 October 2026 (15 of 20). No bounty found. 27+17+13+13+15 = 85.
Transparency & trust Pydantic AI Harness +10
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 Harness 82
MIT, with third-party notices in the package (30). The docs say where Harness files go (.pydantic-ai-harness/ in the workspace, git-ignored) and which stores sit on the agent's machine, and the threat model says computer use sends screenshots, secrets included, to the model provider. Pydantic's privacy policy covers its hosted services (22 of 30). The 0.x policy promises deprecation warnings where practical and migration guidance in release notes, and sets the rules from 1.0, with no dated notices (14 of 20). No telemetry of its own, and instrumentation is opt-in and documented (18 of 20). 30+22+14+18 = 84.
Maintenance & community Mastra +9
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 Harness 87
0.76.0 on 27 November 2026 (30). 35 releases in the 90 days to 27 November, and about 65 since 0.1.1 on 13 April (20). 362 merged pull requests and 161 closed issues labelled pkg:harness since 28 October, but 26 open bugs have no reply and three open bugs date from June to August. Reply times weren't read (16 of 25). The Python package is current and pinned to the matching pydantic-ai-slim release, Python only (13 of 15). Dependabot is configured and both 0.76.0 release files carry PyPI provenance, with CI state unchecked (8 of 10). 30+20+16+13+8 = 87.
Score by category
| Category | Weight | Mastra | Pydantic AI Harness | Edge |
|---|---|---|---|---|
| Reliability | 16% | 87 | 61 | Mastra +26 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 98 | 98 | even |
| Agent ergonomics | 13% | 92 | 89 | Mastra +3 |
| Security & auth | 14% | 67 | 85 | Pydantic AI Harness +18 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 96 | 87 | Mastra +9 |
| Transparency & trust | 7% | 72 | 82 | Pydantic AI Harness +10 |
| Negative events | ≤15 | -8 | 0 | |
| Total | A 78/100 | A 83.5/100 |
Facts side by side
| Fact | Mastra | Pydantic AI Harness |
|---|---|---|
| Kind | Agent framework | Agent framework |
| Vendor | Kepler Software, Inc. | Pydantic |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | ||
| Auth | API key | None |
| Pricing | Free | Free |
| x402 | no | no |
| 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 |
| llms.txt | yes | yes |
| Last release | 2026-11-04 | 2026-11-27 |
| 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 |
| Arbitration or class-action waiver | yes | yes |
| Popularity | 29k stars, 3.1M npm/wk | none |
How the scores have moved
Pydantic AI Harness
No score change since it was listed.
Verdicts
Mastra
A TypeScript framework with agents, workflows with suspend and resume, memory, an MCP client and server, per-server tool approval and built-in guardrail processors including a prompt-injection detector. On 17 June 2026 malicious versions of its npm packages were published, and the CLI, server and Studio send usage analytics by default, with token counts every 15 minutes.
Pydantic AI Harness
The Harness turns a Pydantic AI agent into a coding or research agent by adding capabilities, with twelve workspace backends, permission modes, spend and tool budgets, loop detection and a documented page for each part. It is 0.x and classed Alpha, minor releases may break APIs, and Coder's shell is unrestricted unless you attach a sandbox or permissions.
Before you call either
Mastra
- Set MASTRA_TELEMETRY_DISABLED=1 in every environment that runs the CLI, the server or Studio
- Pin exact versions with a lockfile, and make sure no 17 June 2026 release such as @mastra/core 1.42.1 is installed
- Set requireToolApproval on MCP servers that write, and allowedHosts when server URLs come from configuration
- Add PromptInjectionDetector as an input processor when tools return web or user content
- Use supervisor agents through generate() or stream().
.network()is deprecated
Pydantic AI Harness
- Attach a workspace capability. Harness capabilities never pick one, and a run without one fails at its start
- Use a sandbox capability instead of
LocalWorkspacefor model-written commands.LocalWorkspaceruns them on your machine as you - Add
Permissionsinautoorread-onlymode, with a deferred-call handler, before lettingCoderrun unattended - Set
PromptInjectionDefender(block_high_risk=True)if tool results should be blocked rather than only flagged - Pin the Harness and Pydantic AI together and read the release notes before a minor upgrade. 0.x minors can break APIs
Questions
Which is better for AI agents, Mastra or Pydantic AI Harness?
Pydantic AI Harness scores 83.5 (A) on agent readiness against Mastra's 78 (A), and leads in 2 of 7 scored categories. Mastra leads on reliability and maintenance & community.
Are Mastra and Pydantic AI Harness open source?
Yes. Mastra is open source (Apache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing). Pydantic AI Harness is open source (MIT).
Other comparisons with Mastra or Pydantic AI Harness
- AgentOS vs Mastra
- AgentOS vs Pydantic AI Harness
- Agno vs Mastra
- Agno vs Pydantic AI Harness
- BoxLang AI vs Mastra
- BoxLang AI vs Pydantic AI Harness
- Claude Agent SDK vs Mastra
- Claude Agent SDK vs Pydantic AI Harness
- CrewAI vs Mastra
- CrewAI vs Pydantic AI Harness
- Cursor Agent SDK vs Mastra
- Cursor Agent SDK vs Pydantic AI Harness
- Docker Agent vs Mastra
- Docker Agent vs Pydantic AI Harness
- DSPy vs Mastra
- DSPy vs Pydantic AI Harness
- Genkit vs Mastra
- Genkit vs Pydantic AI Harness
- Agent Development Kit (ADK) vs Mastra
- Agent Development Kit (ADK) vs Pydantic AI Harness
- guilds.run vs Mastra
- guilds.run vs Pydantic AI Harness
- Haystack vs Mastra
- Haystack vs Pydantic AI Harness
- LangGraph vs Mastra
- LangGraph vs Pydantic AI Harness
- LlamaIndex Framework vs Mastra
- LlamaIndex Framework vs Pydantic AI Harness
- Mastra vs Microsoft Agent Framework
- Mastra vs OpenAI Agents SDK
- Mastra vs Pydantic AI
- Mastra vs smolagents
- Mastra vs Strands Agents
- Mastra vs Terse Durable Actors
- Mastra vs TradingAgents
- Mastra vs AI SDK
- Microsoft Agent Framework vs Pydantic AI Harness
- OpenAI Agents SDK vs Pydantic AI Harness
- Pydantic AI Harness vs smolagents
- Pydantic AI Harness vs Strands Agents
- Pydantic AI Harness vs Terse Durable Actors
- Pydantic AI Harness vs TradingAgents
- Pydantic AI Harness vs AI SDK
- Pydantic AI vs Pydantic AI Harness
Machine-readable
- This page as Markdown
/compare/mastra-vs-pydantic-ai-harness.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/mastra.json·/api/v1/tools/pydantic-ai-harness.json - From a terminal
anchor compare mastra pydantic-ai-harness(the CLI) - Over MCP
compare_tools {"a": "mastra", "b": "pydantic-ai-harness"}at/mcp, no key