# Genkit vs Mastra

> Genkit and Mastra score within a point of each other for agent frameworks, 78.1 and 78 out of 100. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/genkit-vs-mastra
- Markdown: https://www.anchorterminal.com/compare/genkit-vs-mastra.md (~3,900 tokens)
- Slim: https://www.anchorterminal.com/compare/genkit-vs-mastra.min.md (~830 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/compare/genkit-vs-mastra.json (this page as data, same URL with Accept: application/json)
- 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-23

Genkit and Mastra score within a point of each other on agent readiness, 78.1 (A) and 78 (A). Mastra leads on reliability, schema & documentation, agent ergonomics and maintenance & community. Both do agent frameworks.

- Genkit: grade A, 78.1/100, rank #63 of 1654. Markdown https://www.anchorterminal.com/tools/genkit.md · JSON https://www.anchorterminal.com/api/v1/tools/genkit.json
- Mastra: grade A, 78/100, rank #66 of 1654. 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 253 frameworks comparisons: https://www.anchorterminal.com/compare/frameworks/index.md

## Which one, for what

### Genkit (A)

Good for: Teams adding agents to full-stack apps in TypeScript, Go, Python or Dart, especially on Firebase or Google Cloud.

Also in its favour:
- No incidents deducted, where Mastra loses 8 points for them

Watch for: The Genkit CLI and Developer UI send Google Analytics events after a first-run notice, until `genkit config set analyticsOptOut true`

### Mastra (A)

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

Ahead on:
- Reliability, 87 against 69
- Schema & documentation, 98 against 83
- Agent ergonomics, 92 against 85
- Maintenance & community, 96 against 85

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


## Why the edge

### Reliability: Mastra +18

- Genkit (69): Official packages on npm, PyPI, the Go module proxy and pub.dev, with Python 3.10 to 3.14 stated (20). A tests workflow runs on pull requests for JS, Go and Python, plus e2e and sample workflows, but GitHub's pages refused us so we couldn't see whether main passes (15). 707 open issues and pull requests per GitHub's search API on 23 November; reply times unread (12). Semver tags with release candidates, and blog release notes that list deprecations, but no changelog file (10). JS 1.44, Go 1.14 and Dart 1.0 are stable while Python is 0.14.0 and Beta (12). 20+15+12+10+12 = 69.
- 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.

### Schema & documentation: Mastra +15

- Genkit (83): Typed TypeScript, Go and Python interfaces documented per language, with typed option interfaces on the MCP page; no separate API reference was read (22). llms.txt with per-language bundles, Markdown for every page and API rules for coding agents (10). The interrupts page says when to pause for approval and when to use restartable tools (14). Tools and flows take Zod, Pydantic or Go struct schemas (15). Examples on every page read, and Go 1.14 documents recoverable tool errors, but no error reference was found (10). Dated release posts and a Python migration guide, without a changelog file (12). 22+10+14+15+10+12 = 83.
- 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).

### Maintenance & community: Mastra +11

- Genkit (85): genkit 0.14.0 on PyPI on 19 November 2026 (30). In the 90 days to 23 November, JS 1.42.0, 1.43.0 and 1.44.0, Go 1.13.0, 1.13.1 and 1.14.0, and Python 0.11.0 to 0.14.0 (20). 707 open issues and pull requests, with 165 commits from 20 October to 20 November 2026 in the clone; reply times unread (12). Current official SDKs in four languages (15). Dependabot and CI workflows present, pass state unread (8). 30+20+12+15+8 = 85.
- 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.

### Agent ergonomics: Mastra +7

- Genkit (85): An MCP host with two servers is about 15 lines, each server's tools namespaced and loaded with getActiveTools (20). Context compression and retry middleware in JS, and usage budgets in Go 1.14 (20). tool.Fail and SoftToolErrors send errors back to the model in Go, with less shown for JS (12). Retry middleware, resumable loops and restartable interrupts (18). Few required settings and SDKs in four languages (15). 20+20+12+18+15 = 85.
- 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).

## Score by category

| Category | Weight | Genkit | Mastra | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% | 69 | 87 | Mastra +18 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 83 | 98 | Mastra +15 |
| Agent ergonomics | 13% | 85 | 92 | Mastra +7 |
| Security & auth | 14% | 70 | 67 | Genkit +3 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 85 | 96 | Mastra +11 |
| Transparency & trust | 7% | 69 | 72 | Mastra +3 |
| Negative events | ≤15 | 0 | -8 | |
| **Total** | | **78.1 · A** | **78 · A** | |

## Facts side by side

| Fact | Genkit | Mastra |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | Google | Kepler Software, Inc. |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | API key | API key |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | Apache-2.0 | 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-11-19 | 2026-11-04 |
| Terms last updated | 2026-07-30 | 2026-10-26 |
| Privacy policy last updated | 2026-10-01 | no date given |
| Customer content may train models | yes | yes |
| Terms restrict automated access | yes | yes |
| Terms restrict benchmarking | not found in the text | not found in the text |
| Terms or service can change without notice | not found in the text | yes |
| Arbitration or class-action waiver | not found in the text | yes |
| Popularity | 6.6k stars, 264k npm/wk | 29k stars, 3.1M npm/wk |

## How the scores have moved

### Genkit

No score change since it was listed.

### Mastra

- +3.8 on 13 November 2026 (BB to A): checklist

## Verdicts

**Genkit.** An open-source framework in TypeScript, Go, Python and Dart with tool calling, interrupts for human approval, a ToolApproval middleware, an MCP host, client and server, and llms.txt docs per language. The Python SDK is still 0.x and marked Beta, and the CLI and Developer UI send Google Analytics usage data unless opted out.

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

### Genkit

1. Run `genkit config set analyticsOptOut true` on every machine and CI runner that uses the Genkit CLI or Developer UI
2. Pass `--non-interactive` to `genkit start` in scripts so the analytics notice does not block the run
3. Define tools that move money, send email or delete data as interrupts or behind ToolApproval, so a person or judge approves each call
4. Fetch the per-language bundle from llms.txt (llms-js.txt, llms-go.txt, llms-python.txt) instead of the full documentation file
5. Import the Go module from github.com/firebase/genkit/go, which still carries the old path after the move to genkit-ai

### 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, Genkit or Mastra?

Genkit and Mastra score within a point of each other on agent readiness, 78.1 (A) and 78 (A). Mastra leads on reliability, schema & documentation, agent ergonomics and maintenance & community.

### Are Genkit and Mastra open source?

Yes. Genkit is open source (Apache-2.0). 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/genkit-vs-mastra.json, and with the fewest tokens: https://www.anchorterminal.com/compare/genkit-vs-mastra.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "genkit", "b": "mastra"}`. From a terminal: `anchor compare genkit mastra`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/genkit.json and https://www.anchorterminal.com/api/v1/tools/mastra.json

## Other comparisons with Genkit or Mastra

- [AgentOS vs Genkit](https://www.anchorterminal.com/compare/agentos-vs-genkit.md)
- [AgentOS vs Mastra](https://www.anchorterminal.com/compare/agentos-vs-mastra.md)
- [Agno vs Genkit](https://www.anchorterminal.com/compare/agno-vs-genkit.md)
- [Agno vs Mastra](https://www.anchorterminal.com/compare/agno-vs-mastra.md)
- [BoxLang AI vs Genkit](https://www.anchorterminal.com/compare/boxlang-ai-vs-genkit.md)
- [BoxLang AI vs Mastra](https://www.anchorterminal.com/compare/boxlang-ai-vs-mastra.md)
- [Claude Agent SDK vs Genkit](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-genkit.md)
- [Claude Agent SDK vs Mastra](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-mastra.md)
- [CrewAI vs Genkit](https://www.anchorterminal.com/compare/crewai-vs-genkit.md)
- [CrewAI vs Mastra](https://www.anchorterminal.com/compare/crewai-vs-mastra.md)
- [Cursor Agent SDK vs Genkit](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-genkit.md)
- [Cursor Agent SDK vs Mastra](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-mastra.md)
- [Docker Agent vs Genkit](https://www.anchorterminal.com/compare/docker-agent-vs-genkit.md)
- [Docker Agent vs Mastra](https://www.anchorterminal.com/compare/docker-agent-vs-mastra.md)
- [DSPy vs Genkit](https://www.anchorterminal.com/compare/dspy-vs-genkit.md)
- [DSPy vs Mastra](https://www.anchorterminal.com/compare/dspy-vs-mastra.md)
- [Genkit vs Agent Development Kit (ADK)](https://www.anchorterminal.com/compare/genkit-vs-google-adk.md)
- [Genkit vs guilds.run](https://www.anchorterminal.com/compare/genkit-vs-guilds-run.md)
- [Genkit vs Haystack](https://www.anchorterminal.com/compare/genkit-vs-haystack.md)
- [Genkit vs LangGraph](https://www.anchorterminal.com/compare/genkit-vs-langgraph.md)
- [Genkit vs LlamaIndex Framework](https://www.anchorterminal.com/compare/genkit-vs-llamaindex.md)
- [Genkit vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/genkit-vs-microsoft-agent-framework.md)
- [Genkit vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/genkit-vs-openai-agents-sdk.md)
- [Genkit vs Pydantic AI](https://www.anchorterminal.com/compare/genkit-vs-pydantic-ai.md)
- [Genkit vs smolagents](https://www.anchorterminal.com/compare/genkit-vs-smolagents.md)
- [Genkit vs Strands Agents](https://www.anchorterminal.com/compare/genkit-vs-strands-agents.md)
- [Genkit vs Terse Durable Actors](https://www.anchorterminal.com/compare/genkit-vs-terse-durable-actors.md)
- [Genkit vs TradingAgents](https://www.anchorterminal.com/compare/genkit-vs-tradingagents.md)
- [Genkit vs AI SDK](https://www.anchorterminal.com/compare/genkit-vs-vercel-ai-sdk.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)
- [Haystack vs Mastra](https://www.anchorterminal.com/compare/haystack-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 Terse Durable Actors](https://www.anchorterminal.com/compare/mastra-vs-terse-durable-actors.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
