Comparison

Cloudflare Agents SDK vs Mastra

A like-for-like, spec-level comparison. Both entries are verified against their docs and repo.

Cloudflare Agents SDK

Stateful agents on Cloudflare Workers.

  • + Stateful agents on serverless edge
  • + Durable Objects give durable execution and alarms
  • − Cloudflare-locked runtime
  • − Newer mental model to learn

Mastra

The TypeScript-first agent framework.

  • + Best-in-class DX for TS/JS teams
  • + Includes evals and memory out of the box
  • − Elastic license limits some commercial hosting
  • − Smaller community than Python options
Spec Cloudflare Agents SDK Mastra
Category framework framework
License Apache-2.0 Elastic-2.0
Open source Yes Yes
Self-hostable No Yes
MCP support Yes Yes
Pricing usage free
Starting price Cloudflare Workers free tier BYOK usage cost
Models claude, gpt, gemini, byok claude, gpt, gemini, byok
Languages typescript typescript
GitHub stars 5.2k 25.4k
Last activity 2026-06-25 2026-06-25