登录 注册
AI 应用与 AI Agent
29,477
Stars
3,097
Forks
102
Watchers
745
Open Issues
NOASSERTION
许可证
TypeScript
语言
2024-08-06
创建时间
2026-11-12
最近更新

项目能做什么

专为 AI 驱动的应用和 Agent 打造的现代化 TypeScript 框架。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Mastra

[![npm version](https://badge.fury.io/js/@mastra%2Fcore.svg)](https://www.npmjs.com/package/@mastra/core)
[![CodeQl](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql)
[![GitHub Repo stars](https://img.shields.io/github/stars/mastra-ai/mastra)](https://github.com/mastra-ai/mastra/stargazers)
[![Discord](https://img.shields.io/discord/1309558646228779139?logo=discord&label=Discord&labelColor=white&color=7289DA)](https://discord.gg/mastra-ai)
[![Twitter Follow](https://img.shields.io/twitter/follow/mastra?style=social)](https://x.com/mastra)
[![NPM Downloads](https://img.shields.io/npm/dm/%40mastra%252Fcore)](https://www.npmjs.com/package/@mastra/core)
[![Static Badge](https://img.shields.io/badge/Y%20Combinator-W25-orange)](https://www.ycombinator.com/companies?batch=W25)

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

It includes everything you need to go from early prototypes to production-ready applications. Mastra integrates with frontend and backend frameworks like React, Next.js, and Node, or you can deploy it anywhere as a standalone server. It's the easiest way to build, tune, and scale reliable AI products.

## Why Mastra?

Purpose-built for TypeScript and designed around established AI patterns, Mastra gives you everything you need to build great AI applications out-of-the-box.

Some highlights include:

- [**Model routing**](https://mastra.ai/models): Connect to 40+ providers through one standard interface. Use models from OpenAI, Anthropic, Gemini, and more.

- [**Agents**](https://mastra.ai/docs/agents/overview): Build autonomous agents that use LLMs and tools to solve open-ended tasks. Agents reason about goals, decide which tools to use, and iterate internally until the model emits a final answer or an optional stopping condition is met.

- [**Workflows**](https://mastra.ai/docs/workflows/overview): When you need explicit control over execution, use Mastra's graph-based workflow engine to orchestrate complex multi-step processes. Mastra workflows use an intuitive syntax for control flow (`.then()`, `.branch()`, `.parallel()`).

- [**Human-in-the-loop**](https://mastra.ai/docs/workflows/suspend-and-resume): Suspend an agent or workflow and await user input or approval before resuming. Mastra uses [storage](https://mastra.ai/docs/server-db/storage) to remember execution state, so you can pause indefinitely and resume where you left off.

- **Context management**: Give your agents the right context at the right time. Provide [conversation history](https://mastra.ai/docs/memory/conversation-history), [retrieve](https://mastra.ai/docs/rag/overview) data from your sources (APIs, databases, files), and add human-like memory with [Observational Memory](https://mastra.ai/docs/memory/observational-memory) so your agents behave coherently.

- **Integratio
阅读完整原文

项目深度分析 AI 生成

Mastra 生产级 Agent SaaS 商业起步套件(Starter Kit)

产品构想基于 Mastra + Next.js 构建包含用户鉴权、Token 额度计费、MCP 工具挂载及多 Agent 协作界面的商业模板,面向希望快速上线 AI 产品的独立开发者或小团队销售。
核心功能Mastra Agent 运行时封装、Stripe/LemonSqueezy 计费集成、预置 MCP 工具链、响应式聊天/工作流交互界面、Docker 一键部署配置
目标用户独立开发者、独立黑客、中小团队 AI 业务快速验证负责人
难度/周期中等 · 3 - 5 周 · 成本:开发机器 + 域名与基础测试服务器,约 $50 - $100/月
收费模式一次性源码买断授权($99 - $299/份)+ 持续更新订阅/私有支持
竞争风险官方未来可能推出官方 Starter,同质化开源脚手架竞争
依据 数据支持的判断

Mastra 专用的工作流可视化与 Evals 监控面板 (SaaS / 自托管)

产品构想提供 Mastra Workflows 与 Agent 运行轨迹的可视化追踪、延迟与成本分析、Prompt 评测对比平台,解决生产环境中黑盒不可控的问题。
核心功能实时执行步骤可视化、LLM 耗时/Token 监控、Evals 测试集自动化跑分、错误回放与调试、Webhook 告警
目标用户中小型团队技术负责人、生产环境部署 Agent 的全栈工程师
难度/周期较高 · 6 - 8 周 · 成本:高吞吐量时序数据库/日志服务成本,约 $150 - $300/月
收费模式免费额度 + 按上报事件量或 Agent 运行次数订阅(Freemium 模式,每月 $29 - $199)
竞争风险Langfuse 等通用 Tracing 工具的兼容竞争,用户数据敏感度导致的私有化要求
依据 AI推测

企业级 Mastra MCP 插件与预构建连接器市场

产品构想针对 Mastra 的 Model Context Protocol (MCP) 机制,提供经过测试和安全加固的企业工具库(如 Salesforce、Jira、Notion、SAP 等系统双向操作中间件)。
核心功能开箱即用的 Mastra MCP Server 包、OAuth 凭证管理代理、速率限制与审计日志、数据清洗适配层
目标用户需要将 Agent 接入复杂企业业务系统的系统集成商、B2B SaaS 开发者
难度/周期中等 · 4 - 6 周 · 成本:API 测试账号成本与测试基础设施,约 $100/月
收费模式高级连接器包单次售卖或按接入系统数量月费订阅
竞争风险MCP 协议仍在快速迭代演进中,维护升级成本较高
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建于 2024-08-06,近 30 天仍在推送,发布过 100 个 Release
社区活跃Star 29,477 / Fork 3,097 / Issue 745(数据支持,可自行核实)
许可证NOASSERTION
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。