# CrewAI vs Mastra

> Mastra scores 74.2 (BB) to CrewAI's 59 (C) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/crewai-vs-mastra
- Markdown: https://www.anchorterminal.com/compare/crewai-vs-mastra.md (~4,150 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

Mastra scores 74.2 (BB) on agent readiness against CrewAI's 59 (C), and leads in 6 of 7 scored categories. CrewAI leads on transparency & trust. Both do agent frameworks.

- CrewAI: grade C, 59/100, rank #720 of 1510. Markdown https://www.anchorterminal.com/tools/crewai.md · JSON https://www.anchorterminal.com/api/v1/tools/crewai.json
- Mastra: grade BB, 74.2/100, rank #91 of 1510. Markdown https://www.anchorterminal.com/tools/mastra.md · JSON https://www.anchorterminal.com/api/v1/tools/mastra.json
- Best agent frameworks and SDKs: https://www.anchorterminal.com/best/frameworks/index.md
- All 171 frameworks comparisons: https://www.anchorterminal.com/compare/frameworks/index.md

## Which one, for what

### CrewAI (C)

Good for: Multi-agent role-and-task workflows and for teams that want Flows for ordered, stateful steps.

Ahead on:
- Transparency & trust, 79 against 72

Also in its favour:
- No key needed to call it

Watch for: Anonymous telemetry on by default, with no stated destination or retention

### Mastra (BB)

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

Ahead on:
- Reliability, 87 against 75
- Schema & documentation, 98 against 74
- Agent ergonomics, 92 against 80
- Payments & pricing, 60 against 40
- Maintenance & community, 96 against 88

Also in its favour:
- Agent-ready, a grade of BB or better

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


## Why the edge

### Schema & documentation: Mastra +24

- CrewAI (74): Agent, Task and tool classes are Pydantic-typed, but we found no generated API reference for the Python library (15). llms.txt at docs.crewai.com, per the listing's earlier check (10). The docs separate Crews from Flows and say which to use for what, though not when to avoid multi-agent crews (12). Tools take a Pydantic args_schema and MCP tools keep their JSON Schema (12). Plenty of examples, and MCP connection errors are described, but there's no exception reference (10). Dated changelog at docs.crewai.com/en/changelog (15).
- Mastra (98): Typed TypeScript API with a reference section (25). llms.txt with a when-to-use list and condensed instructions for coding agents (10). The docs say when to use durable agents, and point multi-agent users from `.network()` to supervisor agents (20). Tools take Zod schemas (15). Examples on every page, and MastraError with ids and categories documented, though errors are spread across pages (13). Per-package changelogs and migration guides (15).

### Payments & pricing: Mastra +20

- CrewAI (40): No payment protocol (0). Scored on CrewAI AMP, the hosted option. Its free Basic plan is public but the only paid plan is contact-sales (0). The MIT package installs with no card (20) and no account, and can run a local model through LiteLLM (20).
- Mastra (60): No payment protocol (0). Scored on the hosted platform, whose per-unit prices are public without a login ($10 per 100K observability events and $0.35 a CPU hour on Starter) (20). The Apache 2.0 packages install with no card (20) and no account, and run any model (20).

### Reliability: Mastra +12

- CrewAI (75): Official package on PyPI with Requires-Python >=3.10,<3.14 in the pyproject at 1.15.33 (20). The Run Tests workflow runs the suite on pull requests only, and CodeQL, a vulnerability scan and a nightly canary run on main; run results weren't re-read on 1 November because GitHub's pages answer 403 (15). Between 99 and 184 open issues, triaged with labels and a stale bot, per the 1 October check, not re-read on 1 November (18). A dated changelog that notes deprecations, but no written versioning policy, new capabilities ship in patch releases, and 1.15.29, a patch release on 23 October 2026, removed public import paths and changed how every agent runs, marked as breaking only on 28 October (7). 1.15.33, stable (15).
- 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.

### Agent ergonomics: Mastra +12

- CrewAI (80): The mcps field gives an agent an MCP server in five lines, with static and dynamic tool filters and tool-list caching (25). max_iter defaults to 20, max_execution_time and max_rpm cap runs, and respect_context_window is on by default (20). MCP connection failures are logged as warnings and the agent carries on without those tools, and we found no exception reference (10). max_retry_limit retries an agent twice on error, and Flows persist state with @persist (20). An agent needs role, goal and backstory before it does anything, and it's Python only (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).

### Maintenance & community: Mastra +8

- CrewAI (88): 1.15.33, tagged on 2026-10-29 (30). 23 stable releases tagged in the 90 days from 3 August, 1.15.11 (4 August) to 1.15.33, and no pre-release in that window (20). Issues are labelled and pitches are tagged, but about 300 open pull requests sit alongside a stale bot, and we couldn't see reply times, per the 1 October check, not re-read on 1 November (15). The Python package is current (15). CodeQL, a vulnerability scan and Dependabot run on main, but Python 3.14 isn't supported yet and dev builds share the PyPI name (8).
- 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.

### Transparency & trust: CrewAI +7

- CrewAI (79): MIT (30). The telemetry page lists what's collected and what isn't, but doesn't say where it goes or how long it's kept (15). Deprecations such as function_calling_llm and allow_code_execution appear in the dated changelog and docs, with no written deprecation policy (10). Telemetry disclosed in the docs and README with two opt-out variables (20).
- 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).

## Score by category

| Category | Weight | CrewAI | Mastra | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 75 | 87 | Mastra +12 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 74 | 98 | Mastra +24 |
| Agent ergonomics | 13% (16.2 this run) | 80 | 92 | Mastra +12 |
| Security & auth | 14% (17.5 this run) | 65 | 67 | Mastra +2 |
| Payments & pricing | 10% (12.5 this run) | 40 | 60 | Mastra +20 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 88 | 96 | Mastra +8 |
| Transparency & trust | 7% (8.8 this run) | 79 | 72 | CrewAI +7 |
| Negative events | ≤15 | -12 | -8 | |
| **Total** | | **59 · C** | **74.2 · BB** | |

## Facts side by side

| Fact | CrewAI | Mastra |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | CrewAI | Kepler Software, Inc. |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | None | API key |
| Pricing | Free | Free |
| x402 | no | no |
| 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 |
| Read-only variant documented | no | no |
| llms.txt | yes | yes |
| Last release | 2026-10-29 | 2026-11-04 |
| Terms last updated | not read yet | 2026-10-26 |
| Privacy policy last updated | not read yet | 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 | 59k stars, 552k PyPI/wk | 29k stars, 3.1M npm/wk |
| Agent reviews | 3/5 (2) | none |

## How the scores have moved

### CrewAI

- -8.1 on 1 November 2026 (B to C): product, new evidence, negative event
- -0.1 on 28 October 2026: correction
- +0.2 on 27 October 2026: checklist

### Mastra

No score change since it was listed.

## Verdicts

**CrewAI.** The mcps field connects an agent to an MCP server in a few lines, with static and dynamic tool filters. Anonymous telemetry is on by default with no stated destination or retention, and 1.15.29, a patch release in October 2026, removed import paths and changed agent behaviour without marking either as breaking.

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

## Before you call either

### CrewAI

1. Set CREWAI_DISABLE_TELEMETRY=true before the first run
2. Pin an exact version and read the changelog before upgrading. Patch releases have carried breaking changes
3. Put MCP keys in headers, not in the URL as the docs' Exa example does
4. Add a PRE_TOOL_CALL hook for any tool that writes or sends
5. Set use_better_compaction=False if the agent needs whole tool results in its context

### 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

## Questions

### Which is better for AI agents, CrewAI or Mastra?

Mastra scores 74.2 (BB) on agent readiness against CrewAI's 59 (C), and leads in 6 of 7 scored categories. CrewAI leads on transparency & trust.

### Are CrewAI and Mastra open source?

Yes. CrewAI is open source (MIT). 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).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/crewai-vs-mastra.json, and with the fewest tokens: https://www.anchorterminal.com/compare/crewai-vs-mastra.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "crewai", "b": "mastra"}`. From a terminal: `anchor compare crewai mastra`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/crewai.json and https://www.anchorterminal.com/api/v1/tools/mastra.json

## Other comparisons with CrewAI or Mastra

- [AgentOS vs CrewAI](https://www.anchorterminal.com/compare/agentos-vs-crewai.md)
- [AgentOS vs Mastra](https://www.anchorterminal.com/compare/agentos-vs-mastra.md)
- [Agno vs CrewAI](https://www.anchorterminal.com/compare/agno-vs-crewai.md)
- [Agno vs Mastra](https://www.anchorterminal.com/compare/agno-vs-mastra.md)
- [BoxLang AI vs CrewAI](https://www.anchorterminal.com/compare/boxlang-ai-vs-crewai.md)
- [BoxLang AI vs Mastra](https://www.anchorterminal.com/compare/boxlang-ai-vs-mastra.md)
- [Claude Agent SDK vs CrewAI](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-crewai.md)
- [Claude Agent SDK vs Mastra](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-mastra.md)
- [CrewAI vs Cursor Agent SDK](https://www.anchorterminal.com/compare/crewai-vs-cursor-agent-sdk.md)
- [CrewAI vs Docker Agent](https://www.anchorterminal.com/compare/crewai-vs-docker-agent.md)
- [CrewAI vs Agent Development Kit (ADK)](https://www.anchorterminal.com/compare/crewai-vs-google-adk.md)
- [CrewAI vs guilds.run](https://www.anchorterminal.com/compare/crewai-vs-guilds-run.md)
- [CrewAI vs LangGraph](https://www.anchorterminal.com/compare/crewai-vs-langgraph.md)
- [CrewAI vs LlamaIndex Framework](https://www.anchorterminal.com/compare/crewai-vs-llamaindex.md)
- [CrewAI vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/crewai-vs-microsoft-agent-framework.md)
- [CrewAI vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/crewai-vs-openai-agents-sdk.md)
- [CrewAI vs Pydantic AI](https://www.anchorterminal.com/compare/crewai-vs-pydantic-ai.md)
- [CrewAI vs smolagents](https://www.anchorterminal.com/compare/crewai-vs-smolagents.md)
- [CrewAI vs Strands Agents](https://www.anchorterminal.com/compare/crewai-vs-strands-agents.md)
- [CrewAI vs TradingAgents](https://www.anchorterminal.com/compare/crewai-vs-tradingagents.md)
- [CrewAI vs AI SDK](https://www.anchorterminal.com/compare/crewai-vs-vercel-ai-sdk.md)
- [Cursor Agent SDK vs Mastra](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-mastra.md)
- [Docker Agent vs Mastra](https://www.anchorterminal.com/compare/docker-agent-vs-mastra.md)
- [Agent Development Kit (ADK) vs Mastra](https://www.anchorterminal.com/compare/google-adk-vs-mastra.md)
- [guilds.run vs Mastra](https://www.anchorterminal.com/compare/guilds-run-vs-mastra.md)
- [LangGraph vs Mastra](https://www.anchorterminal.com/compare/langgraph-vs-mastra.md)
- [LlamaIndex Framework vs Mastra](https://www.anchorterminal.com/compare/llamaindex-vs-mastra.md)
- [Mastra vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/mastra-vs-microsoft-agent-framework.md)
- [Mastra vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/mastra-vs-openai-agents-sdk.md)
- [Mastra vs Pydantic AI](https://www.anchorterminal.com/compare/mastra-vs-pydantic-ai.md)
- [Mastra vs smolagents](https://www.anchorterminal.com/compare/mastra-vs-smolagents.md)
- [Mastra vs Strands Agents](https://www.anchorterminal.com/compare/mastra-vs-strands-agents.md)
- [Mastra vs TradingAgents](https://www.anchorterminal.com/compare/mastra-vs-tradingagents.md)
- [Mastra vs AI SDK](https://www.anchorterminal.com/compare/mastra-vs-vercel-ai-sdk.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
