Loading...
Loading...
全面的Mastra框架指南。讲解如何查找最新文档、验证API签名,以及构建Agent和工作流。涵盖文档查找策略(嵌入式文档、远程文档)、核心概念(Agent与工作流、工具、记忆、RAG)、TypeScript要求和常见模式。在所有Mastra开发工作中使用本指南,确保你使用的是已安装版本或最新文档中的当前API。
npx skill4agent add mastra-ai/skills mastrals node_modules/@mastra/| 用户问题 | 首先检查 | 操作方法 |
|---|---|---|
| "创建/安装Mastra项目" | | 包含CLI和手动步骤的设置指南 |
| "如何使用Agent/Workflow/Tool?" | | 在 |
| "如何使用X?"(无已安装包) | | 从 |
| "我遇到了错误..." | | 常见错误及解决方案 |
| "从v0.x升级到v1.x" | | 版本升级工作流 |
# 查看可用内容
cat node_modules/@mastra/core/dist/docs/SOURCE_MAP.json | grep '"Agent"'
# 阅读实际的类型定义
cat node_modules/@mastra/core/dist/[path-from-source-map]references/embedded-docs.md# 获取最新文档
# https://mastra.ai/llms.txtreferences/remote-docs.md{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler"
}
}"provider/model-name""openai/gpt-4o""anthropic/claude-3-5-sonnet-20241022""google/gemini-2.5-pro"Property X does not exist on type YCannot find moduleType mismatchreferences/common-errors.mdls node_modules/@mastra/references/embedded-docs.mdreferences/remote-docs.mdnpm run dev # http://localhost:4111references/create-mastra.mdreferences/embedded-docs.mdreferences/remote-docs.mdreferences/common-errors.mdreferences/migration-guide.md