Mastra:2.5 万 Star 的 TypeScript Agent 框架(Gatsby 团队)

2026-06-17 16:00:00

Mastra 开源项目分析

仓库:github.com/mastra-ai/mastra · 官网:mastra.ai · ⭐ 25k+ · 300k 周下载

项目是什么

MastraTypeScript 原生 AI 应用框架——Agent、Workflow、RAG、Memory、Evals、MCP 一体,由 Gatsby 团队 打造,目标 不离开 TS 栈做 AI 产品

核心模块

  • Agents:工具调用 + 多步推理
  • Workflows:确定性流程编排
  • RAG:Pinecone/Qdrant/Chroma/pgvector
  • Memory:Session 与长期记忆
  • Evals + Observability:Mastra Studio,可导出 LangFuse/LangSmith(OTel)

快速开始

npm create mastra@latest

与 Vercel eve 差异

项目 侧重
Mastra 全栈 TS 应用内嵌 Agent(Next.js/React)
eve 独立 Agent 目录 + Vercel 部署/runtime

黑豹点评

已有 Next.js/Nuxt 产品要加 AI 功能,Mastra 比 Python 框架 集成成本更低——类型共享、同仓部署、与 Vercel AI SDK UI 配合成熟。

项目链接https://github.com/mastra-ai/mastra