Both are open source framework options with comparable terms, so the choice comes down to which model of the problem you prefer — compare the descriptions below rather than the licence.
TypeScript agent framework with workflows, memory, evals and a local playground.
Streaming-first TypeScript SDK with a unified provider interface and UI hooks.
| Mastra | Vercel AI SDK | |
|---|---|---|
| Licence | Open source | Open source |
| Pricing | open source | open source |
| Self-hostable | Yes | Yes |
| Languages | TypeScript | TypeScript |
| Install | npm install @mastra/core | npm install ai |
| Keys required | None | None |
Both are open source framework options with comparable terms, so the choice comes down to which model of the problem you prefer — compare the descriptions below rather than the licence. Mastra: TypeScript agent framework with workflows, memory, evals and a local playground. Vercel AI SDK: Streaming-first TypeScript SDK with a unified provider interface and UI hooks.
Mastra can run on your own infrastructure. Vercel AI SDK can run on your own infrastructure.
Mastra is open source (open source). Vercel AI SDK is open source (open source).
Every page here answers to Accept: text/markdown and returns the same content at roughly a tenth the tokens. No separate site, no toggle — same URL.
curl -s -H "Accept: text/markdown" https://newagent.build/compare/mastra-vs-vercel-ai-sdk