# DSPy vs Mastra (slim)

> Mastra scores 78 (A) to DSPy's 68.3 (B) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Full: https://www.anchorterminal.com/compare/dspy-vs-mastra.md (~4,550 tokens) · this version ~930 tokens · JSON https://www.anchorterminal.com/compare/dspy-vs-mastra.json · canonical https://www.anchorterminal.com/compare/dspy-vs-mastra
- 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-23
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

Mastra scores 78 (A) on agent readiness against DSPy's 68.3 (B), and leads in 6 of 7 scored categories. Both do agent frameworks.

- DSPy: B 68.3, rank #414 of 1654 · https://www.anchorterminal.com/tools/dspy.min.md
- Mastra: A 78, rank #66 of 1654 · https://www.anchorterminal.com/tools/mastra.min.md
- DSPy, good for Python teams who want typed LM programs they can evaluate and optimise against a metric, with ReAct for tool use. Also No key needed to call it; No incidents deducted, where Mastra loses 8 points for them.
- Mastra, good for TypeScript teams that want agents, workflows, memory, evals and a local Studio in one framework. Ahead on Reliability, 87 against 62; Schema & documentation, 98 against 71; Agent ergonomics, 92 against 64; Security & auth, 67 against 60; Maintenance & community, 96 against 87; Transparency & trust, 72 against 52. Also Agent-ready, a grade of BB or better.

| Category | DSPy | Mastra |
| --- | --- | --- |
| Reliability (16%) | 62 | 87 |
| Performance (10%) | pending | pending |
| Schema & documentation (13%) | 71 | 98 |
| Agent ergonomics (13%) | 64 | 92 |
| Security & auth (14%) | 60 | 67 |
| Payments & pricing (10%) | 90 | 90 |
| Task success (10%) | pending | pending |
| Maintenance & community (7%) | 87 | 96 |
| Transparency & trust (7%) | 52 | 72 |

| Fact (where they differ) | DSPy | Mastra |
| --- | --- | --- |
| Vendor | Stanford NLP | Kepler Software, Inc. |
| Auth | None | API key |
| Licence | MIT | Apache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing |
| llms.txt | no | yes |
| Last release | 2026-11-10 | 2026-11-04 |
| Terms last updated | no document linked | 2026-10-26 |
| Privacy policy last updated | no document linked | no date given |
| Customer content may train models | not read yet | yes |
| Terms restrict automated access | not read yet | yes |
| Terms restrict benchmarking | not read yet | not found in the text |
| Terms or service can change without notice | not read yet | yes |
| Arbitration or class-action waiver | not read yet | yes |
| Popularity | 39k stars | 29k stars, 3.1M npm/wk |

Why the edge:
- Agent ergonomics, Mastra +28: DSPy 64 (Framework reading.); 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).)
- Schema & documentation, Mastra +27: DSPy 71 (Framework reading.); Mastra 98 (Typed TypeScript API with a reference section (25).)
- Reliability, Mastra +25: DSPy 62 (Local-package reading.); Mastra 87 (Official npm packages, Node 22.13 or newer (20).)
- Transparency & trust, Mastra +20: DSPy 52 (MIT (30).); Mastra 72 (Apache 2.0 for the core, with ee/ directories source-available under the Mastra Enterprise License (25).)
- Maintenance & community, Mastra +9: DSPy 87 (3.5.0 tagged on 10 November 2026, 13 days before this check (30).); Mastra 96 (@mastra/core 1.82.0 on 2026-11-04 (30).)
- Security & auth, Mastra +7: DSPy 60 (Framework reading (telemetry defaults, approvals, guardrails, sandboxing).); 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 a…)
