@mastra/mcp-docs-server 1.0.0-beta.0 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +8 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +32 -32
- package/.docs/organized/changelogs/%40mastra%2Freact.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +15 -15
- package/.docs/organized/changelogs/create-mastra.md +7 -7
- package/.docs/organized/changelogs/mastra.md +13 -13
- package/.docs/raw/agents/agent-memory.mdx +1 -1
- package/.docs/raw/agents/overview.mdx +2 -2
- package/.docs/raw/auth/auth0.mdx +1 -1
- package/.docs/raw/auth/clerk.mdx +1 -1
- package/.docs/raw/auth/firebase.mdx +1 -1
- package/.docs/raw/auth/jwt.mdx +1 -1
- package/.docs/raw/auth/supabase.mdx +1 -1
- package/.docs/raw/auth/workos.mdx +1 -1
- package/.docs/raw/course/01-first-agent/03-verifying-installation.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/02-installing-mcp.md +1 -1
- package/.docs/raw/course/03-agent-memory/03-installing-memory.md +1 -1
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +2 -2
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +1 -1
- package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +1 -1
- package/.docs/raw/deployment/serverless-platforms/netlify-deployer.mdx +1 -1
- package/.docs/raw/deployment/serverless-platforms/vercel-deployer.mdx +1 -1
- package/.docs/raw/evals/overview.mdx +1 -1
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +8 -4
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +1 -1
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +9 -9
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +1 -1
- package/.docs/raw/frameworks/servers/express.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +12 -12
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +4 -4
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +12 -12
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +5 -5
- package/.docs/raw/getting-started/installation.mdx +13 -13
- package/.docs/raw/getting-started/templates.mdx +5 -5
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +1 -1
- package/.docs/raw/guides/guide/research-assistant.mdx +1 -10
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +16 -6
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +28 -4
- package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +3 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +50 -36
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +2 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +13 -13
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/voice.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +32 -2
- package/.docs/raw/guides/quickstarts/nextjs.mdx +275 -0
- package/.docs/raw/index.mdx +1 -1
- package/.docs/raw/logging.mdx +3 -3
- package/.docs/raw/mastra-cloud/observability.mdx +6 -6
- package/.docs/raw/memory/overview.mdx +2 -2
- package/.docs/raw/memory/semantic-recall.mdx +2 -2
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +2 -2
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +152 -0
- package/.docs/raw/memory/storage/memory-with-pg.mdx +2 -2
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +2 -2
- package/.docs/raw/observability/overview.mdx +5 -5
- package/.docs/raw/observability/tracing/exporters/arize.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/default.mdx +5 -5
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/otel.mdx +5 -5
- package/.docs/raw/observability/tracing/overview.mdx +21 -21
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +2 -2
- package/.docs/raw/rag/overview.mdx +1 -1
- package/.docs/raw/reference/agents/agent.mdx +2 -2
- package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
- package/.docs/raw/reference/cli/mastra.mdx +7 -7
- package/.docs/raw/reference/core/getLogger.mdx +2 -2
- package/.docs/raw/reference/core/getMCPServer.mdx +2 -2
- package/.docs/raw/reference/core/getMCPServerById.mdx +4 -4
- package/.docs/raw/reference/core/getTelemetry.mdx +2 -2
- package/.docs/raw/reference/core/listLogs.mdx +2 -2
- package/.docs/raw/reference/core/listLogsByRunId.mdx +2 -2
- package/.docs/raw/reference/core/listMCPServers.mdx +4 -4
- package/.docs/raw/reference/core/setLogger.mdx +2 -2
- package/.docs/raw/reference/core/setTelemetry.mdx +2 -2
- package/.docs/raw/reference/evals/create-scorer.mdx +58 -49
- package/.docs/raw/reference/evals/mastra-scorer.mdx +2 -0
- package/.docs/raw/reference/observability/tracing/configuration.mdx +12 -12
- package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +8 -8
- package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +8 -8
- package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +8 -8
- package/.docs/raw/reference/observability/tracing/instances.mdx +8 -8
- package/.docs/raw/reference/observability/tracing/interfaces.mdx +7 -7
- package/.docs/raw/reference/observability/tracing/spans.mdx +7 -7
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +8 -2
- package/.docs/raw/reference/processors/language-detector.mdx +8 -2
- package/.docs/raw/reference/processors/moderation-processor.mdx +8 -2
- package/.docs/raw/reference/processors/pii-detector.mdx +8 -2
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +8 -2
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +8 -2
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +8 -2
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +8 -2
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +1 -1
- package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
- package/.docs/raw/reference/storage/dynamodb.mdx +3 -3
- package/.docs/raw/reference/storage/lance.mdx +1 -1
- package/.docs/raw/reference/storage/libsql.mdx +1 -1
- package/.docs/raw/reference/storage/mongodb.mdx +1 -1
- package/.docs/raw/reference/storage/mssql.mdx +1 -1
- package/.docs/raw/reference/storage/postgresql.mdx +1 -1
- package/.docs/raw/reference/storage/upstash.mdx +1 -1
- package/.docs/raw/reference/templates/overview.mdx +1 -1
- package/.docs/raw/reference/tools/mcp-server.mdx +49 -0
- package/.docs/raw/reference/vectors/couchbase.mdx +8 -2
- package/.docs/raw/reference/vectors/libsql.mdx +1 -1
- package/.docs/raw/reference/vectors/mongodb.mdx +7 -1
- package/.docs/raw/reference/vectors/s3vectors.mdx +1 -1
- package/.docs/raw/server-db/mastra-client.mdx +4 -4
- package/.docs/raw/tools-mcp/mcp-overview.mdx +1 -1
- package/.docs/raw/voice/speech-to-text.mdx +1 -1
- package/.docs/raw/voice/text-to-speech.mdx +1 -1
- package/.docs/raw/workflows/inngest-workflow.mdx +1 -1
- package/CHANGELOG.md +17 -0
- package/dist/stdio.js +11 -15
- package/package.json +4 -4
|
@@ -33,7 +33,7 @@ FIRESTORE_DATABASE_ID=(default)
|
|
|
33
33
|
Before you can use the `MastraAuthFirebase` class you have to install the `@mastra/auth-firebase` package.
|
|
34
34
|
|
|
35
35
|
```bash copy
|
|
36
|
-
npm install @mastra/auth-firebase@
|
|
36
|
+
npm install @mastra/auth-firebase@beta
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Usage examples
|
package/.docs/raw/auth/jwt.mdx
CHANGED
|
@@ -15,7 +15,7 @@ The `MastraJwtAuth` class provides a lightweight authentication mechanism for Ma
|
|
|
15
15
|
Before you can use the `MastraJwtAuth` class you have to install the `@mastra/auth` package.
|
|
16
16
|
|
|
17
17
|
```bash copy
|
|
18
|
-
npm install @mastra/auth@
|
|
18
|
+
npm install @mastra/auth@beta
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage example
|
|
@@ -26,7 +26,7 @@ SUPABASE_ANON_KEY=your-anon-key
|
|
|
26
26
|
Before you can use the `MastraAuthSupabase` class you have to install the `@mastra/auth-supabase` package.
|
|
27
27
|
|
|
28
28
|
```bash copy
|
|
29
|
-
npm install @mastra/auth-supabase@
|
|
29
|
+
npm install @mastra/auth-supabase@beta
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Usage example
|
|
@@ -33,7 +33,7 @@ WORKOS_CLIENT_ID=client_...
|
|
|
33
33
|
Before you can use the `MastraAuthWorkos` class you have to install the `@mastra/auth-workos` package.
|
|
34
34
|
|
|
35
35
|
```bash copy
|
|
36
|
-
npm install @mastra/auth-workos@
|
|
36
|
+
npm install @mastra/auth-workos@beta
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Usage examples
|
|
@@ -7,7 +7,7 @@ Then, let's check if @mastra/core is in the package.json and there is a src/mast
|
|
|
7
7
|
If you haven't installed Mastra yet, you can do so by running:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm -y create mastra@
|
|
10
|
+
npm -y create mastra@beta
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
If you do need to install mastra, follow the on-screen prompts and make sure to:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
First, let's install the Mastra MCP package:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @mastra/mcp@
|
|
6
|
+
npm install @mastra/mcp@beta
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
The `@mastra/mcp` package provides the necessary infrastructure to connect your Mastra agent to various MCP servers. This package handles the communication between your agent and the MCP servers, allowing your agent to access the tools and services provided by those servers.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Let's start by installing the Mastra memory package:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @mastra/memory @mastra/libsql
|
|
6
|
+
npm install @mastra/memory@beta @mastra/libsql@beta
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
The `@mastra/memory` package provides all the functionality you need to add memory capabilities to your Mastra agents. It includes support for conversation history, semantic recall, and working memory.
|
|
@@ -14,7 +14,7 @@ Deploy your Mastra applications to Amazon EC2 (Elastic Cloud Compute).
|
|
|
14
14
|
|
|
15
15
|
:::note
|
|
16
16
|
This guide assumes your Mastra application has been created using the default
|
|
17
|
-
`npx create-mastra@
|
|
17
|
+
`npx create-mastra@beta` command.
|
|
18
18
|
For more information on how to create a new Mastra application,
|
|
19
19
|
refer to our [getting started guide](/docs/v1/getting-started/installation)
|
|
20
20
|
:::
|
|
@@ -13,7 +13,7 @@ This approach allows you to run your Mastra server as a containerized Lambda fun
|
|
|
13
13
|
|
|
14
14
|
:::note
|
|
15
15
|
This guide assumes your Mastra application has been created using the default
|
|
16
|
-
`npx create-mastra@
|
|
16
|
+
`npx create-mastra@beta` command.
|
|
17
17
|
For more information on how to create a new Mastra application,
|
|
18
18
|
refer to our [getting started guide](/docs/v1/getting-started/installation)
|
|
19
19
|
:::
|
|
@@ -12,7 +12,7 @@ Deploy your Mastra applications to Azure App Services.
|
|
|
12
12
|
|
|
13
13
|
:::note
|
|
14
14
|
This guide assumes your Mastra application has been created using the default
|
|
15
|
-
`npx create-mastra@
|
|
15
|
+
`npx create-mastra@beta` command.
|
|
16
16
|
For more information on how to create a new Mastra application,
|
|
17
17
|
refer to our [getting started guide](/docs/v1/getting-started/installation)
|
|
18
18
|
:::
|
|
@@ -21,7 +21,7 @@ refer to our [getting started guide](/docs/v1/getting-started/installation)
|
|
|
21
21
|
|
|
22
22
|
- An [Azure account](https://azure.microsoft.com/) with an active subscription
|
|
23
23
|
- A [GitHub repository](https://github.com/) containing your Mastra application
|
|
24
|
-
- Your Mastra application should be created using `npx create-mastra@
|
|
24
|
+
- Your Mastra application should be created using `npx create-mastra@beta`
|
|
25
25
|
|
|
26
26
|
## Deployment Steps
|
|
27
27
|
|
|
@@ -14,7 +14,7 @@ Deploy your Mastra applications to Digital Ocean's App Platform and Droplets.
|
|
|
14
14
|
|
|
15
15
|
:::note
|
|
16
16
|
This guide assumes your Mastra application has been created using the default
|
|
17
|
-
`npx create-mastra@
|
|
17
|
+
`npx create-mastra@beta` command.
|
|
18
18
|
For more information on how to create a new Mastra application,
|
|
19
19
|
refer to our [getting started guide](./../../getting-started/installation)
|
|
20
20
|
:::
|
|
@@ -24,7 +24,7 @@ There are different kinds of scorers, each serving a specific purpose. Here are
|
|
|
24
24
|
To access Mastra's scorers feature install the `@mastra/evals` package.
|
|
25
25
|
|
|
26
26
|
```bash copy
|
|
27
|
-
npm install @mastra/evals@
|
|
27
|
+
npm install @mastra/evals@beta
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Live evaluations
|
|
@@ -34,22 +34,22 @@ The recommended way of using Mastra and AI SDK together is by installing the `@m
|
|
|
34
34
|
<Tabs>
|
|
35
35
|
<TabItem value="npm" label="npm">
|
|
36
36
|
```bash copy
|
|
37
|
-
npm install @mastra/ai-sdk
|
|
37
|
+
npm install @mastra/ai-sdk@beta
|
|
38
38
|
```
|
|
39
39
|
</TabItem>
|
|
40
40
|
<TabItem value="pnpm" label="pnpm">
|
|
41
41
|
```bash copy
|
|
42
|
-
pnpm add @mastra/ai-sdk
|
|
42
|
+
pnpm add @mastra/ai-sdk@beta
|
|
43
43
|
```
|
|
44
44
|
</TabItem>
|
|
45
45
|
<TabItem value="yarn" label="yarn">
|
|
46
46
|
```bash copy
|
|
47
|
-
yarn add @mastra/ai-sdk
|
|
47
|
+
yarn add @mastra/ai-sdk@beta
|
|
48
48
|
```
|
|
49
49
|
</TabItem>
|
|
50
50
|
<TabItem value="bun" label="bun">
|
|
51
51
|
```bash copy
|
|
52
|
-
bun add @mastra/ai-sdk
|
|
52
|
+
bun add @mastra/ai-sdk@beta
|
|
53
53
|
```
|
|
54
54
|
</TabItem>
|
|
55
55
|
</Tabs>
|
|
@@ -138,6 +138,10 @@ const { error, status, sendMessage, messages, regenerate, stop } = useChat({
|
|
|
138
138
|
inputData: {
|
|
139
139
|
city: messages[messages.length - 1].parts[0].text,
|
|
140
140
|
},
|
|
141
|
+
//Or resumeData for resuming a suspended workflow
|
|
142
|
+
resumeData: {
|
|
143
|
+
confirmation: messages[messages.length - 1].parts[0].text
|
|
144
|
+
}
|
|
141
145
|
},
|
|
142
146
|
};
|
|
143
147
|
},
|
|
@@ -40,7 +40,7 @@ project-root
|
|
|
40
40
|
Bootstrap your Mastra server:
|
|
41
41
|
|
|
42
42
|
```bash copy
|
|
43
|
-
npx create-mastra@
|
|
43
|
+
npx create-mastra@beta
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
This command will launch an interactive wizard to help you scaffold a new Mastra project, including prompting you for a project name and setting up basic configurations.
|
|
@@ -89,21 +89,21 @@ In your Mastra server, install additional packages for CopilotKit integration:
|
|
|
89
89
|
<TabItem value="npm" label="npm">
|
|
90
90
|
|
|
91
91
|
```bash copy
|
|
92
|
-
npm install @copilotkit/runtime @ag-ui/mastra
|
|
92
|
+
npm install @copilotkit/runtime @ag-ui/mastra@beta
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
</TabItem>
|
|
96
96
|
<TabItem value="yarn" label="yarn">
|
|
97
97
|
|
|
98
98
|
```bash copy
|
|
99
|
-
yarn add @copilotkit/runtime @ag-ui/mastra
|
|
99
|
+
yarn add @copilotkit/runtime @ag-ui/mastra@beta
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
</TabItem>
|
|
103
103
|
<TabItem value="pnpm" label="pnpm">
|
|
104
104
|
|
|
105
105
|
```bash copy
|
|
106
|
-
pnpm add @copilotkit/runtime @ag-ui/mastra
|
|
106
|
+
pnpm add @copilotkit/runtime @ag-ui/mastra@beta
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
</TabItem>
|
|
@@ -185,21 +185,21 @@ In your Next.js app, install the required packages:
|
|
|
185
185
|
<TabItem value="npm" label="npm">
|
|
186
186
|
|
|
187
187
|
```bash copy
|
|
188
|
-
npm install @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra
|
|
188
|
+
npm install @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra@beta
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
</TabItem>
|
|
192
192
|
<TabItem value="yarn" label="yarn">
|
|
193
193
|
|
|
194
194
|
```bash copy
|
|
195
|
-
yarn add @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra
|
|
195
|
+
yarn add @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra@beta
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
</TabItem>
|
|
199
199
|
<TabItem value="pnpm" label="pnpm">
|
|
200
200
|
|
|
201
201
|
```bash copy
|
|
202
|
-
pnpm add @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra
|
|
202
|
+
pnpm add @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra@beta
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
</TabItem>
|
|
@@ -287,21 +287,21 @@ Install the Mastra Client SDK.
|
|
|
287
287
|
<TabItem value="npm" label="npm">
|
|
288
288
|
|
|
289
289
|
```bash copy
|
|
290
|
-
npm install @mastra/client-js
|
|
290
|
+
npm install @mastra/client-js@beta
|
|
291
291
|
```
|
|
292
292
|
|
|
293
293
|
</TabItem>
|
|
294
294
|
<TabItem value="yarn" label="yarn">
|
|
295
295
|
|
|
296
296
|
```bash copy
|
|
297
|
-
yarn add @mastra/client-js
|
|
297
|
+
yarn add @mastra/client-js@beta
|
|
298
298
|
```
|
|
299
299
|
|
|
300
300
|
</TabItem>
|
|
301
301
|
<TabItem value="pnpm" label="pnpm">
|
|
302
302
|
|
|
303
303
|
```bash copy
|
|
304
|
-
pnpm add @mastra/client-js
|
|
304
|
+
pnpm add @mastra/client-js@beta
|
|
305
305
|
```
|
|
306
306
|
|
|
307
307
|
</TabItem>
|
|
@@ -17,7 +17,7 @@ Integrate OpenRouter with Mastra to leverage the numerous models available on Op
|
|
|
17
17
|
The simplest way to get started with Mastra is to use the `mastra` CLI to initialize a new project:
|
|
18
18
|
|
|
19
19
|
```bash copy
|
|
20
|
-
npx create-mastra@
|
|
20
|
+
npx create-mastra@beta
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
You'll be guided through prompts to set up your project. For this example, select:
|
|
@@ -26,7 +26,7 @@ In this guide you'll learn how to install the necessary Mastra dependencies, cre
|
|
|
26
26
|
First, install the necessary Mastra dependencies to run an Agent. This guide uses OpenAI as its model but you can use any supported [model provider](/models/v1).
|
|
27
27
|
|
|
28
28
|
```bash copy
|
|
29
|
-
npm install mastra@
|
|
29
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta zod@^3.0.0 @ai-sdk/openai@^1.0.0
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
If not existent yet, create an `.env` file and add your OpenAI API key:
|
|
@@ -37,28 +37,28 @@ Install the required Mastra packages:
|
|
|
37
37
|
<TabItem value="npm" label="npm">
|
|
38
38
|
|
|
39
39
|
```bash copy
|
|
40
|
-
npm install mastra@
|
|
40
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
</TabItem>
|
|
44
44
|
<TabItem value="yarn" label="yarn">
|
|
45
45
|
|
|
46
46
|
```bash copy
|
|
47
|
-
yarn add mastra@
|
|
47
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
</TabItem>
|
|
51
51
|
<TabItem value="pnpm" label="pnpm">
|
|
52
52
|
|
|
53
53
|
```bash copy
|
|
54
|
-
pnpm add mastra@
|
|
54
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
</TabItem>
|
|
58
58
|
<TabItem value="bun" label="bun">
|
|
59
59
|
|
|
60
60
|
```bash copy
|
|
61
|
-
bun add mastra@
|
|
61
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
</TabItem>
|
|
@@ -75,7 +75,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
75
75
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
76
76
|
|
|
77
77
|
```bash copy
|
|
78
|
-
npx mastra@
|
|
78
|
+
npx mastra@beta init --default
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -85,7 +85,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
85
85
|
If you prefer to customize the setup, run the `init` command and choose from the options when prompted:
|
|
86
86
|
|
|
87
87
|
```bash copy
|
|
88
|
-
npx mastra@
|
|
88
|
+
npx mastra@beta init
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Add the `dev` and `build` scripts to `package.json`:
|
|
@@ -330,28 +330,28 @@ Install the required Mastra packages:
|
|
|
330
330
|
<TabItem value="npm" label="npm">
|
|
331
331
|
|
|
332
332
|
```bash copy
|
|
333
|
-
npm install mastra@
|
|
333
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
334
334
|
```
|
|
335
335
|
|
|
336
336
|
</TabItem>
|
|
337
337
|
<TabItem value="yarn" label="yarn">
|
|
338
338
|
|
|
339
339
|
```bash copy
|
|
340
|
-
yarn add mastra@
|
|
340
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
341
341
|
```
|
|
342
342
|
|
|
343
343
|
</TabItem>
|
|
344
344
|
<TabItem value="pnpm" label="pnpm">
|
|
345
345
|
|
|
346
346
|
```bash copy
|
|
347
|
-
pnpm add mastra@
|
|
347
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
348
348
|
```
|
|
349
349
|
|
|
350
350
|
</TabItem>
|
|
351
351
|
<TabItem value="bun" label="bun">
|
|
352
352
|
|
|
353
353
|
```bash copy
|
|
354
|
-
bun add mastra@
|
|
354
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
355
355
|
```
|
|
356
356
|
|
|
357
357
|
</TabItem>
|
|
@@ -368,7 +368,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
368
368
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
369
369
|
|
|
370
370
|
```bash copy
|
|
371
|
-
npx mastra@
|
|
371
|
+
npx mastra@beta init --default
|
|
372
372
|
```
|
|
373
373
|
|
|
374
374
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -378,7 +378,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
378
378
|
If you prefer to customize the setup, run the `init` command and choose from the options when prompted:
|
|
379
379
|
|
|
380
380
|
```bash copy
|
|
381
|
-
npx mastra@
|
|
381
|
+
npx mastra@beta init
|
|
382
382
|
```
|
|
383
383
|
|
|
384
384
|
Add the `dev` and `build` scripts to `package.json`:
|
|
@@ -38,7 +38,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
38
38
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
39
39
|
|
|
40
40
|
```bash copy
|
|
41
|
-
npx mastra@
|
|
41
|
+
npx mastra@beta init --dir . --components agents,tools --example --llm openai
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -48,7 +48,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
48
48
|
If you prefer to customize the setup, run the `init` command and choose from the options when prompted:
|
|
49
49
|
|
|
50
50
|
```bash copy
|
|
51
|
-
npx mastra@
|
|
51
|
+
npx mastra@beta init
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
:::warning
|
|
@@ -225,7 +225,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
225
225
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
226
226
|
|
|
227
227
|
```bash copy
|
|
228
|
-
npx mastra@
|
|
228
|
+
npx mastra@beta init --dir . --components agents,tools --example --llm openai
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -235,7 +235,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
235
235
|
If you prefer to customize the setup, run the `init` command and choose from the options when prompted:
|
|
236
236
|
|
|
237
237
|
```bash copy
|
|
238
|
-
npx mastra@
|
|
238
|
+
npx mastra@beta init
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
:::warning
|
|
@@ -32,22 +32,22 @@ Install the required Mastra packages:
|
|
|
32
32
|
<Tabs>
|
|
33
33
|
<TabItem value="npm" label="npm">
|
|
34
34
|
```bash copy
|
|
35
|
-
npm install mastra@
|
|
35
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
36
36
|
```
|
|
37
37
|
</TabItem>
|
|
38
38
|
<TabItem value="yarn" label="yarn">
|
|
39
39
|
```bash copy
|
|
40
|
-
yarn add mastra@
|
|
40
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
41
41
|
```
|
|
42
42
|
</TabItem>
|
|
43
43
|
<TabItem value="pnpm" label="pnpm">
|
|
44
44
|
```bash copy
|
|
45
|
-
pnpm add mastra@
|
|
45
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
46
46
|
```
|
|
47
47
|
</TabItem>
|
|
48
48
|
<TabItem value="bun" label="bun">
|
|
49
49
|
```bash copy
|
|
50
|
-
bun add mastra@
|
|
50
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
51
51
|
```
|
|
52
52
|
</TabItem>
|
|
53
53
|
</Tabs>
|
|
@@ -63,7 +63,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
63
63
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
64
64
|
|
|
65
65
|
```bash copy
|
|
66
|
-
npx mastra@
|
|
66
|
+
npx mastra@beta init --default
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -73,7 +73,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
73
73
|
If you prefer to customize the setup, run the `init` command and choose from the options when prompted:
|
|
74
74
|
|
|
75
75
|
```bash copy
|
|
76
|
-
npx mastra@
|
|
76
|
+
npx mastra@beta init
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Add the `dev` and `build` scripts to `package.json`:
|
|
@@ -263,22 +263,22 @@ Install the required Mastra packages:
|
|
|
263
263
|
<Tabs>
|
|
264
264
|
<TabItem value="npm" label="npm">
|
|
265
265
|
```bash copy
|
|
266
|
-
npm install mastra@
|
|
266
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
267
267
|
```
|
|
268
268
|
</TabItem>
|
|
269
269
|
<TabItem value="yarn" label="yarn">
|
|
270
270
|
```bash copy
|
|
271
|
-
yarn add mastra@
|
|
271
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
272
272
|
```
|
|
273
273
|
</TabItem>
|
|
274
274
|
<TabItem value="pnpm" label="pnpm">
|
|
275
275
|
```bash copy
|
|
276
|
-
pnpm add mastra@
|
|
276
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
277
277
|
```
|
|
278
278
|
</TabItem>
|
|
279
279
|
<TabItem value="bun" label="bun">
|
|
280
280
|
```bash copy
|
|
281
|
-
bun add mastra@
|
|
281
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
282
282
|
```
|
|
283
283
|
</TabItem>
|
|
284
284
|
</Tabs>
|
|
@@ -294,7 +294,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
294
294
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
295
295
|
|
|
296
296
|
```bash copy
|
|
297
|
-
npx mastra@
|
|
297
|
+
npx mastra@beta init --default
|
|
298
298
|
```
|
|
299
299
|
|
|
300
300
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -304,7 +304,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
304
304
|
If you prefer to customize the setup, run the `init` command and choose from the options when prompted:
|
|
305
305
|
|
|
306
306
|
```bash copy
|
|
307
|
-
npx mastra@
|
|
307
|
+
npx mastra@beta init
|
|
308
308
|
```
|
|
309
309
|
|
|
310
310
|
Add the `dev` and `build` scripts to `package.json`:
|
|
@@ -30,28 +30,28 @@ Install the required Mastra packages:
|
|
|
30
30
|
<TabItem value="npm" label="npm">
|
|
31
31
|
|
|
32
32
|
```bash copy
|
|
33
|
-
npm install mastra@
|
|
33
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta @mastra/client-js@beta
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
</TabItem>
|
|
37
37
|
<TabItem value="yarn" label="yarn">
|
|
38
38
|
|
|
39
39
|
```bash copy
|
|
40
|
-
yarn add mastra@
|
|
40
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta @mastra/client-js@beta
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
</TabItem>
|
|
44
44
|
<TabItem value="pnpm" label="pnpm">
|
|
45
45
|
|
|
46
46
|
```bash copy
|
|
47
|
-
pnpm add mastra@
|
|
47
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta @mastra/client-js@beta
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
</TabItem>
|
|
51
51
|
<TabItem value="bun" label="bun">
|
|
52
52
|
|
|
53
53
|
```bash copy
|
|
54
|
-
bun add mastra@
|
|
54
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta @mastra/client-js@beta
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
</TabItem>
|
|
@@ -66,7 +66,7 @@ To integrate Mastra into your project, you have two options:
|
|
|
66
66
|
Run the following command to quickly scaffold the default Weather agent with sensible defaults:
|
|
67
67
|
|
|
68
68
|
```bash copy
|
|
69
|
-
npx mastra@
|
|
69
|
+
npx mastra@beta init --dir . --components agents,tools --example --llm openai
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
> See [mastra init](/reference/v1/cli/create-mastra) for more information.
|
|
@@ -30,28 +30,28 @@ The wizard will guide you through setup, create a new directory for your project
|
|
|
30
30
|
<TabItem value="npm" label="npm">
|
|
31
31
|
|
|
32
32
|
```bash copy
|
|
33
|
-
npm create mastra@
|
|
33
|
+
npm create mastra@beta
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
</TabItem>
|
|
37
37
|
<TabItem value="pnpm" label="pnpm">
|
|
38
38
|
|
|
39
39
|
```bash copy
|
|
40
|
-
pnpm create mastra@
|
|
40
|
+
pnpm create mastra@beta
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
</TabItem>
|
|
44
44
|
<TabItem value="yarn" label="yarn">
|
|
45
45
|
|
|
46
46
|
```bash copy
|
|
47
|
-
yarn create mastra@
|
|
47
|
+
yarn create mastra@beta
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
</TabItem>
|
|
51
51
|
<TabItem value="bun" label="bun">
|
|
52
52
|
|
|
53
53
|
```bash copy
|
|
54
|
-
bun create mastra@
|
|
54
|
+
bun create mastra@beta
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
</TabItem>
|
|
@@ -107,17 +107,17 @@ Initialize a TypeScript project and install the following dependencies:
|
|
|
107
107
|
|
|
108
108
|
```bash copy
|
|
109
109
|
npm init -y
|
|
110
|
-
npm install -D typescript @types/node mastra@
|
|
111
|
-
npm install @mastra/core@
|
|
110
|
+
npm install -D typescript @types/node mastra@beta
|
|
111
|
+
npm install @mastra/core@beta zod@^4
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
</TabItem>
|
|
115
115
|
<TabItem value="pnpm" label="pnpm">
|
|
116
116
|
|
|
117
117
|
```bash copy
|
|
118
|
-
pnpm init
|
|
119
|
-
pnpm add -D typescript @types/node mastra@
|
|
120
|
-
pnpm add @mastra/core@
|
|
118
|
+
pnpm init
|
|
119
|
+
pnpm add -D typescript @types/node mastra@beta
|
|
120
|
+
pnpm add @mastra/core@beta zod@^4
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
</TabItem>
|
|
@@ -125,8 +125,8 @@ pnpm add @mastra/core@latest zod@^4
|
|
|
125
125
|
|
|
126
126
|
```bash copy
|
|
127
127
|
yarn init -y
|
|
128
|
-
yarn add -D typescript @types/node mastra@
|
|
129
|
-
yarn add @mastra/core@
|
|
128
|
+
yarn add -D typescript @types/node mastra@beta
|
|
129
|
+
yarn add @mastra/core@beta zod@^4
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
</TabItem>
|
|
@@ -134,8 +134,8 @@ yarn add @mastra/core@latest zod@^4
|
|
|
134
134
|
|
|
135
135
|
```bash copy
|
|
136
136
|
bun init -y
|
|
137
|
-
bun add -d typescript @types/node mastra@
|
|
138
|
-
bun add @mastra/core@
|
|
137
|
+
bun add -d typescript @types/node mastra@beta
|
|
138
|
+
bun add @mastra/core@beta zod@^4
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
</TabItem>
|