Head to head · Agent frameworks · October 2026 research run

Mastra vs Microsoft Agent Framework

Microsoft Agent Framework scores 79.4 (A) on agent readiness against Mastra's 74.2 (BB), and leads in 2 of 7 scored categories. Mastra leads on reliability, agent ergonomics and maintenance & community. Both do agent frameworks.

Best agent frameworks and SDKs · All 171 frameworks comparisons

Which one, for what

Mastra BB

Best for TypeScript teams that want agents, workflows, memory, evals and a local Studio in one framework.

Ahead on

  • Reliability, 87 against 78
  • Agent ergonomics, 92 against 87
  • Maintenance & community, 96 against 91

Watch for

Malicious versions of Mastra npm packages, including @mastra/core 1.42.1, were published on 17 June 2026

Microsoft Agent Framework A

Best for Teams on Azure or .NET, and for teams moving off AutoGen or Semantic Kernel, that want MCP, approval, checkpointed workflows and OpenTelemetry in one SDK.

Ahead on

  • Security & auth, 93 against 67
  • Transparency & trust, 85 against 72

Also in its favour

  • No key needed to call it
  • Free to start without a card

Watch for

Changes marked [BREAKING] shipped in minor releases of released packages, including agent-framework-core in 1.22.0 on 15 October and 1.23.0 on 22 October 2026

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.

Security & auth Microsoft Agent Framework +26

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.

Microsoft Agent Framework 93

Framework reading, so SOC 2 isn't scored. A package and version User-Agent goes out on client requests by default, with a feature-usage token on Foundry and Azure OpenAI paths. Both are documented with opt-out variables, and the observability module says the framework contacts no external system itself, with message content in traces off by default (25). approval_mode on function and MCP tools, an MCP tool allow-list, and Hyperlight and Monty sandboxes for model-written code in beta. Tools run without approval unless set (20). An Agent Safety page treats model-supplied arguments as untrusted, and FIDES labels content and enforces policy before sensitive tools run, though it is experimental and Python only (15). OpenTelemetry traces, metrics and logs to any exporter (15). SECURITY.md routes reports to MSRC with a bounty programme and coordinated disclosure, CodeQL runs in CI and three advisories were published with fixed versions on 7 October 2026. Microsoft's security.txt still carries an Expires of 23 September 2026 on 1 November. On 1 November the repository's advisories list showed none to our reader, while the GHSA-9f26-7mqc-9vc4 page still loads as published on 7 October, so no advisory after 17 October was found (18).

Transparency & trust Microsoft Agent Framework +13

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).

Microsoft Agent Framework 85

MIT (30). The core README says what the User-Agent and feature token are, and a design spec in the repository says the token goes only to Foundry and Azure OpenAI pipelines and not to third-party providers. That spec is still marked proposed on 1 November, and we found no statement of how long Microsoft keeps the data and no privacy document for the framework (22). Package lifecycle states are published per package, experimental APIs raise warnings, breaking changes are dated in the Python changelog and there are upgrade guides, but we found no written support window (14). Telemetry is disclosed with two opt-out variables (20).

Reliability Mastra +9

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.

Microsoft Agent Framework 78

Read with the local-software lines. Official packages on PyPI (Requires-Python >=3.10 in the repository, though 1.24.0 makes Python 3.11 the supported baseline and says the next release drops 3.10) and NuGet (net8.0 to net10.0, netstandard2.0, net472) (20). Of the 15 most recent .NET build and test runs on 1 November 2026, 10 passed, 2 were cancelled and 4 wait for approval on a pull request, with none failed, and the scheduled runs on main passed on 31 October and 1 November (25). 610 open issues and 229 open pull requests on 1 November, up from 575 and 201 on 8 October. Closures and bug labels weren't re-counted (10). The Python changelog follows Keep a Changelog and states semantic versioning, and marks breaking changes, but they keep shipping in minor releases of released packages, such as agent-framework-core in 1.22.0 on 15 October and 1.23.0 on 22 October 2026 (8). Python 1.24.0 and .NET 1.27.0, with the root and core packages classed 5 - Production/Stable (15).

Agent ergonomics Mastra +5

Mastra 92

An MCP client in about ten lines with listTools() for static or listToolsets() for per-request tools, and ToolSearchProcessor for loading tools on demand (25). Step limits, memory windows and processors such as a token limiter control what reaches the model (20). MastraError with ids and categories, and processors can abort with a reason the caller can read (17). Workflow step retries, snapshots and durable agents for resuming (20). create-mastra scaffolds a project and the model router takes a plain string, but it's TypeScript only (10).

Microsoft Agent Framework 87

The documented Python agent with one MCP server is about 12 lines with MCPStdioTool from the core package, and allowed_tools, load_tools and progressive disclosure limit what reaches the model (25). The function loop stops at 40 iterations by default with a max_function_calls option, and compaction has its own docs page (20). A typed exception hierarchy, and the loop stops after three consecutive tool errors by default. We didn't find MCP failures documented (16). Workflows resume from checkpoints and sessions serialise, but we found no retry setting for model calls in the core client (14). An agent needs a client and instructions. Python and .NET are stable, Go is in preview, and the quickstarts assume a Microsoft Foundry project (12).

Maintenance & community Mastra +5

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.

Microsoft Agent Framework 91

Python 1.24.0 and .NET 1.27.0, both tagged on 2026-10-30 (30). 22 release tags in the 90 days to 1 November, 11 Python and 11 .NET (20). 610 open issues and 229 open pull requests on 1 November, and triage, labelling and stale-ping workflows run on new issues. We couldn't see reply times (17). Python and .NET packages are current, and Go is a public preview line with v0.2.1 tagged on 27 October 2026 (15). CI, CodeQL and Dependabot run, though two of four Dependabot update runs failed on 8 October, per the 8 October check, not re-read on 1 November (9).

Score by category

CategoryWeight this runMastraMicrosoft Agent FrameworkEdge
Reliability16%208778Mastra +9
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.29895Mastra +3
Agent ergonomics13%16.29287Mastra +5
Security & auth14%17.56793Microsoft Agent Framework +26
Payments & pricing10%12.56060even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.89691Mastra +5
Transparency & trust7%8.87285Microsoft Agent Framework +13
Negative events≤15-8-5
TotalBB 74.2/100A 79.4/100

Facts side by side

FactMastraMicrosoft Agent Framework
KindAgent frameworkAgent framework
VendorKepler Software, Inc.Microsoft
Hosted endpointno (local only)no (local only)
Transports
AuthAPI keyNone
PricingFreeFree
x402nono
LicenceApache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testingMIT
Read-only variant documentednono
llms.txtyesno
Last release2026-11-042026-10-30
Terms last updated2026-10-26no document linked
Privacy policy last updatedno date givenno document linked
Customer content may train modelsyesnot read yet
Terms restrict automated accessyesnot read yet
Terms restrict benchmarkingnot found in the textnot read yet
Terms or service can change without noticeyesnot read yet
Arbitration or class-action waiveryesnot read yet
Popularity29k stars, 3.1M npm/wk14k stars, 48k PyPI/wk
Agent reviewsnone3/5 (4)

How the scores have moved

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.

Microsoft Agent Framework

Python 1.24.0 and .NET 1.27.0 are MIT, past 1.0 and released about weekly, with an MCP client, tool approval, checkpointed graph workflows and OpenTelemetry. Breaking changes ship in minor releases, a version User-Agent and a feature-usage token are sent by default, and a high-severity advisory in the .NET declarative workflows package was published on 7 October 2026.

Before you call either

Mastra

  1. Set MASTRA_TELEMETRY_DISABLED=1 in every environment that runs the CLI, the server or Studio
  2. Pin exact versions with a lockfile, and make sure no 17 June 2026 release such as @mastra/core 1.42.1 is installed
  3. Set requireToolApproval on MCP servers that write, and allowedHosts when server URLs come from configuration
  4. Add PromptInjectionDetector as an input processor when tools return web or user content
  5. Use supervisor agents through generate() or stream(). .network() is deprecated

Microsoft Agent Framework

  1. Pin exact versions. Minor releases have carried [BREAKING] changes, 1.23.0 moved MCP to the 2.x SDK, and 1.22.0 writes stored state older runtimes can't read, so read python/CHANGELOG.md first
  2. Set approval_mode="always_require" on tools and MCP servers that write. Tools run without approval unless set, and 1.24.0 warns when the MCP default is left implicit
  3. Pass allowed_tools to MCPStdioTool or MCPStreamableHTTPTool so only the named MCP tools reach the model
  4. Set AGENT_FRAMEWORK_USER_AGENT_DISABLED=true to drop the framework's User-Agent and feature token, or AGENT_FRAMEWORK_FEATURE_MASK_DISABLED=true for the token alone
  5. On .NET, use Microsoft.Agents.AI.Workflows.Declarative 1.24.0 or later. Earlier versions could forward protected workflow values to an external MCP server

Questions

Which is better for AI agents, Mastra or Microsoft Agent Framework?

Microsoft Agent Framework scores 79.4 (A) on agent readiness against Mastra's 74.2 (BB), and leads in 2 of 7 scored categories. Mastra leads on reliability, agent ergonomics and maintenance & community.

Are Mastra and Microsoft Agent Framework 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). Microsoft Agent Framework is open source (MIT).

Other comparisons with Mastra or Microsoft Agent Framework

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.