translation/translated/documents/course/01-first-agent/03-verifying-installation.md

21 lines
751 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 验证您的 Mastra 安装
在开始构建代理之前,让我们确保您设置了正确的开发环境。让我们检查您是否已安装 Node.js 18.x 或更高版本。
然后,让我们检查 package.json 中是否有 @mastra/core,以及是否存在 src/mastra 目录。如果有,您可以跳过此步骤。
如果您尚未安装 Mastra您可以通过运行以下命令来安装
```bash
npm -y create mastra@beta
```
如果您确实需要安装 mastra请按照屏幕上的提示进行操作并确保
- 选择安装 Agents 和 Workflows
- 同意安装工具
- 为您的模型选择 OpenAI、Anthropic 或 Google
- 同意添加示例
您还需要将您的 OpenAI、Anthropic 或 Google API 密钥添加到项目中。