@mastra/mcp-docs-server 0.13.1 → 0.13.2-alpha.0
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/%40internal%2Fstorage-test-utils.md +21 -0
- package/.docs/organized/changelogs/%40mastra%2Fagui.md +25 -0
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +59 -59
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +48 -48
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +57 -57
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +53 -53
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +37 -31
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +60 -60
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +57 -57
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +55 -55
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +71 -71
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +68 -29
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Flance.md +47 -0
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +48 -48
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +30 -30
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +60 -60
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +36 -0
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +61 -61
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +89 -89
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Frag.md +28 -28
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +49 -49
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +37 -37
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +63 -63
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +22 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +24 -24
- package/.docs/organized/changelogs/create-mastra.md +29 -29
- package/.docs/organized/changelogs/mastra.md +90 -90
- package/.docs/raw/local-dev/mastra-dev.mdx +103 -105
- package/.docs/raw/workflows/input-data-mapping.mdx +4 -4
- package/package.json +3 -3
- package/.docs/raw/local-dev/add-to-existing-project.mdx +0 -43
- package/.docs/raw/local-dev/creating-a-new-project.mdx +0 -53
|
@@ -1,172 +1,170 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Inspecting
|
|
2
|
+
title: "Inspecting agents and workflows with mastra dev | Mastra Local Dev Docs"
|
|
3
3
|
description: Documentation for the Mastra local development environment for Mastra applications.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import YouTube from "@/components/youtube";
|
|
7
|
+
import { Tabs, Tab } from "@/components/tabs";
|
|
7
8
|
|
|
8
|
-
#
|
|
9
|
+
# Playground
|
|
9
10
|
|
|
10
|
-
Mastra provides a local development environment where you can test your agents, workflows, and tools
|
|
11
|
+
Mastra provides a local development environment where you can test your agents, workflows, and tools during development.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Start the local development server by running:
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
<Tabs items={["npm", "Mastra CLI"]}>
|
|
16
|
+
<Tab>
|
|
17
|
+
```bash copy
|
|
18
|
+
npm run dev
|
|
19
|
+
```
|
|
20
|
+
</Tab>
|
|
21
|
+
<Tab>
|
|
22
|
+
```bash copy
|
|
23
|
+
mastra dev
|
|
24
|
+
```
|
|
25
|
+
</Tab>
|
|
26
|
+
</Tabs>
|
|
15
27
|
|
|
16
|
-
|
|
28
|
+
The local development server provides access to the following interfaces:
|
|
17
29
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
- Playground: [http://localhost:4111/](http://localhost:4111/)
|
|
31
|
+
- Mastra API: [http://localhost:4111/api](http://localhost:4111/api)
|
|
32
|
+
- OpenAPI Spec: [http://localhost:4111/openapi.json](http://localhost:4111/openapi.json)
|
|
33
|
+
- Swagger UI – API explorer: [http://localhost:4111/swagger-ui](http://localhost:4111/swagger-ui)
|
|
21
34
|
|
|
22
|
-
|
|
23
|
-
mastra server config.
|
|
35
|
+
## Local Development Playground
|
|
24
36
|
|
|
25
|
-
|
|
26
|
-
import { Mastra } from "@mastra/core";
|
|
37
|
+
The Playground lets you interact with your agents, workflows, and tools. It provides dedicated interfaces for testing each component of your Mastra application during development and is available at: [http://localhost:4111/](http://localhost:4111/).
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
<YouTube id="spGlcTEjuXY" startTime={126}/>
|
|
40
|
+
|
|
41
|
+
### Agents
|
|
42
|
+
|
|
43
|
+
Quickly test and debug your agents during development using the interactive chat interface in the Agent Playground.
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
Key features:
|
|
48
|
+
|
|
49
|
+
- **Chat Interface**: Talk to your agent and see how it responds in real time.
|
|
50
|
+
- **Model Settings**: Tweak settings like temperature and top-p to see how they affect output.
|
|
51
|
+
- **Agent Endpoints**: See the available REST API routes your agent exposes and how to use them.
|
|
52
|
+
- **Agent Traces**: Step through what the agent did behind the scenes, tool calls, decisions, and more.
|
|
53
|
+
- **Agent Evals**: Run tests against your agent and see how well it performs.
|
|
54
|
+
|
|
55
|
+
### Workflows
|
|
35
56
|
|
|
36
|
-
|
|
57
|
+
Validate workflows by supplying defined inputs and visualizing each step within the Workflow Playground.
|
|
37
58
|
|
|
38
|
-
|
|
59
|
+

|
|
39
60
|
|
|
40
|
-
|
|
61
|
+
Key features:
|
|
41
62
|
|
|
42
|
-
|
|
63
|
+
- **Workflow Visualization**: See your workflow as a visual graph so you can follow the steps and branches at a glance.
|
|
64
|
+
- **Step Inputs & Outputs**: Check the data going into and coming out of each step to see how everything flows.
|
|
65
|
+
- **Run Workflows**: Test your workflow with real inputs to validate the logic and debug any issues.
|
|
66
|
+
- **Execution JSON**: Get the full picture of a run as raw JSON—inputs, outputs, errors, and results included.
|
|
67
|
+
- **Workflow Traces**: Dig into a detailed breakdown of each step, including data flow, tool calls, and any errors along the way.
|
|
43
68
|
|
|
44
|
-
|
|
45
|
-
- **Prompt CMS**: Experiment with different system instructions for your agent:
|
|
46
|
-
- A/B test different prompt versions.
|
|
47
|
-
- Track performance metrics for each variant.
|
|
48
|
-
- Select and deploy the most effective prompt version.
|
|
49
|
-
- **Agent Traces**: View detailed execution traces to understand how your agent processes requests, including:
|
|
50
|
-
- Prompt construction.
|
|
51
|
-
- Tool usage.
|
|
52
|
-
- Decision-making steps.
|
|
53
|
-
- Response generation.
|
|
54
|
-
- **Agent Evals**: When you've set up [Agent evaluation metrics](/docs/evals/overview), you can:
|
|
55
|
-
- Run evaluations directly from the playground.
|
|
56
|
-
- View evaluation results and metrics.
|
|
57
|
-
- Compare agent performance across different test cases.
|
|
69
|
+
### Tools
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
Quickly test and debug custom tools in isolation using the Tools Playground, without running a full agent or workflow.
|
|
60
72
|
|
|
61
|
-
|
|
73
|
+

|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
Key features:
|
|
64
76
|
|
|
65
|
-
- **
|
|
77
|
+
- **Test Tools in Isolation**: Try out individual tools on their own without running a full agent or workflow.
|
|
78
|
+
- **Input & Responses**: Send sample inputs to see how the tool responds.
|
|
79
|
+
- **Tool Usage**: Find out which agents rely on this tool and how they’re using it.
|
|
66
80
|
|
|
67
|
-
- Trigger test workflow runs with custom input data.
|
|
68
|
-
- Debug workflow logic and conditions.
|
|
69
|
-
- Simulate different execution paths.
|
|
70
|
-
- View detailed execution logs for each step.
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
- Step-by-step workflow progression.
|
|
74
|
-
- State transitions and data flow.
|
|
75
|
-
- Tool invocations and their results.
|
|
76
|
-
- Decision points and branching logic.
|
|
77
|
-
- Error handling and recovery paths.
|
|
82
|
+
### MCP Servers
|
|
78
83
|
|
|
79
|
-
|
|
84
|
+
Explore connection details, tool usage, and IDE configuration for local MCP server development.
|
|
80
85
|
|
|
81
|
-
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
Key features:
|
|
89
|
+
|
|
90
|
+
- **Connection Details**: Access the endpoints and config needed to wire up your MCP environment.
|
|
91
|
+
- **Available Tools**: See all tools currently published, including their names, versions, and which agents use them.
|
|
92
|
+
- **IDE Configuration**: Grab ready-to-use config you can drop into your local setup for testing and publishing tools.
|
|
82
93
|
|
|
83
|
-
- Test individual tools without running a full agent or workflow.
|
|
84
|
-
- Input test data and view tool responses.
|
|
85
|
-
- Debug tool implementation and error handling.
|
|
86
|
-
- Verify tool input/output schemas.
|
|
87
|
-
- Monitor tool performance and execution time.
|
|
88
94
|
|
|
89
95
|
## REST API Endpoints
|
|
90
96
|
|
|
91
|
-
|
|
97
|
+
The local development server exposes a set of REST API routes via the [Mastra Server](/docs/deployment/server), allowing you to test and interact with your agents and workflows before deployment.
|
|
92
98
|
|
|
93
|
-
|
|
99
|
+
For a full overview of available API routes, including agents, tools, and workflows, see the [Routes reference](/reference/cli/dev#routes).
|
|
94
100
|
|
|
95
101
|
## OpenAPI Specification
|
|
96
102
|
|
|
97
|
-
|
|
103
|
+
The local development server includes an OpenAPI specification available at: [http://localhost:4111/openapi.json](http://localhost:4111/openapi.json).
|
|
98
104
|
|
|
99
|
-
To
|
|
105
|
+
To include OpenAPI documentation in your production server, enable it in the Mastra instance:
|
|
100
106
|
|
|
101
|
-
```typescript
|
|
102
|
-
import { Mastra } from "@mastra/core";
|
|
107
|
+
```typescript {7} filename="src/mastra/index.ts" showLineNumbers copy
|
|
108
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
103
109
|
|
|
104
110
|
export const mastra = new Mastra({
|
|
111
|
+
// ...
|
|
105
112
|
server: {
|
|
106
113
|
build: {
|
|
107
|
-
openAPIDocs: true
|
|
108
|
-
|
|
109
|
-
},
|
|
114
|
+
openAPIDocs: true
|
|
115
|
+
}
|
|
110
116
|
},
|
|
111
117
|
});
|
|
112
118
|
```
|
|
113
119
|
|
|
114
120
|
## Swagger UI
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
The local development server includes an interactive Swagger UI - API explorer available at: [http://localhost:4111/swagger-ui](http://localhost:4111/swagger-ui).
|
|
123
|
+
|
|
124
|
+
To include Swagger UI in your production server, enable it in the Mastra instance:
|
|
118
125
|
|
|
119
|
-
```typescript
|
|
120
|
-
import { Mastra } from "@mastra/core";
|
|
126
|
+
```typescript {7} filename="src/mastra/index.ts" showLineNumbers copy
|
|
127
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
121
128
|
|
|
122
129
|
export const mastra = new Mastra({
|
|
130
|
+
// ...
|
|
123
131
|
server: {
|
|
124
132
|
build: {
|
|
125
|
-
|
|
126
|
-
swaggerUI: true, // Enable Swagger UI
|
|
127
|
-
// ... other build config options
|
|
133
|
+
swaggerUI: true
|
|
128
134
|
},
|
|
129
135
|
},
|
|
130
136
|
});
|
|
131
137
|
```
|
|
132
138
|
|
|
133
|
-
##
|
|
134
|
-
|
|
135
|
-
The local development server is designed to run without any external dependencies or containerization. This is achieved through:
|
|
136
|
-
|
|
137
|
-
- **Dev Server**: Uses [Hono](https://hono.dev) as the underlying framework to power the [Mastra Server](/docs/deployment/server).
|
|
138
|
-
|
|
139
|
-
- **In-Memory Storage**: Uses [LibSQL](https://libsql.org/) memory adapters for:
|
|
139
|
+
## Architecture
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
- Trace storage.
|
|
143
|
-
- Evals storage.
|
|
144
|
-
- Workflow snapshots.
|
|
141
|
+
The local development server runs fully self-contained without external dependencies or containers. It leverages:
|
|
145
142
|
|
|
146
|
-
- **
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- Semantic search capabilities.
|
|
143
|
+
- **Dev Server** powered by [Hono](https://hono.dev) for the core [Mastra Server](/docs/deployment/server).
|
|
144
|
+
- **In-Memory Storage** via [LibSQL](https://libsql.org/) adapters for agent memory, traces, evals, and workflow snapshots.
|
|
145
|
+
- **Vector Storage** using [FastEmbed](https://github.com/qdrant/fastembed) for embeddings, vector search, and semantic retrieval.
|
|
150
146
|
|
|
151
|
-
This
|
|
147
|
+
This setup lets you start developing immediately with production-like behavior, no database or vector store setup required.
|
|
152
148
|
|
|
153
|
-
|
|
149
|
+
## Configuration
|
|
154
150
|
|
|
155
|
-
|
|
151
|
+
By default, the server runs on port `4111`. You can customize the host and port through the Mastra server configuration.
|
|
156
152
|
|
|
157
|
-
|
|
153
|
+
```typescript {6,7} filename="src/mastra/index.ts" showLineNumbers copy
|
|
154
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
158
155
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
export const mastra = new Mastra({
|
|
157
|
+
// ...
|
|
158
|
+
server: {
|
|
159
|
+
port: 8080,
|
|
160
|
+
host: "0.0.0.0",
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
```
|
|
167
164
|
|
|
168
|
-
## Summary
|
|
169
165
|
|
|
170
|
-
|
|
166
|
+
## Next steps
|
|
171
167
|
|
|
172
|
-
- [Mastra
|
|
168
|
+
- [Mastra Cloud](/docs/mastra-cloud/overview)
|
|
169
|
+
- [Deployment Overview](/docs/deployment/overview)
|
|
170
|
+
- [Mastra Client SDK](/docs/client-js/overview)
|
|
@@ -85,10 +85,10 @@ You can rename step outputs using the object syntax in `.map()`. In the example
|
|
|
85
85
|
```typescript {3} showLineNumbers
|
|
86
86
|
.then(step)
|
|
87
87
|
.map({
|
|
88
|
-
details: {
|
|
88
|
+
details: mapVariable({
|
|
89
89
|
step: step,
|
|
90
90
|
path: "value"
|
|
91
|
-
}
|
|
91
|
+
})
|
|
92
92
|
})
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -111,9 +111,9 @@ export const testWorkflow = createWorkflow({
|
|
|
111
111
|
testWorkflow
|
|
112
112
|
.then(cityCoordinatesStep)
|
|
113
113
|
.map({
|
|
114
|
-
details: {
|
|
114
|
+
details: mapVariable({
|
|
115
115
|
initData: testWorkflow,
|
|
116
116
|
path: "value"
|
|
117
|
-
}
|
|
117
|
+
})
|
|
118
118
|
})
|
|
119
119
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"uuid": "^11.1.0",
|
|
33
33
|
"zod": "^3.25.57",
|
|
34
34
|
"zod-to-json-schema": "^3.24.5",
|
|
35
|
-
"@mastra/mcp": "^0.10.
|
|
35
|
+
"@mastra/mcp": "^0.10.5-alpha.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@hono/node-server": "^1.14.4",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typescript": "^5.8.3",
|
|
49
49
|
"vitest": "^3.2.3",
|
|
50
50
|
"@internal/lint": "0.0.13",
|
|
51
|
-
"@mastra/core": "0.10.
|
|
51
|
+
"@mastra/core": "0.10.7-alpha.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@mastra/core": "^0.10.0-alpha.0"
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Adding to an Existing Project | Mastra Local Development Docs"
|
|
3
|
-
description: "Add Mastra to your existing Node.js applications"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Adding to an Existing Project
|
|
7
|
-
|
|
8
|
-
You can add Mastra to an existing project using the CLI:
|
|
9
|
-
|
|
10
|
-
```bash npm2yarn copy
|
|
11
|
-
npm install -g mastra@latest
|
|
12
|
-
mastra init
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Changes made to project:
|
|
16
|
-
|
|
17
|
-
1. Creates `src/mastra` directory with entry point
|
|
18
|
-
2. Adds required dependencies
|
|
19
|
-
3. Configures TypeScript compiler options
|
|
20
|
-
|
|
21
|
-
## Interactive Setup
|
|
22
|
-
|
|
23
|
-
Running commands without arguments starts a CLI prompt for:
|
|
24
|
-
|
|
25
|
-
1. Component selection
|
|
26
|
-
2. LLM provider configuration
|
|
27
|
-
3. API key setup
|
|
28
|
-
4. Example code inclusion
|
|
29
|
-
|
|
30
|
-
## Non-Interactive Setup
|
|
31
|
-
|
|
32
|
-
To initialize mastra in non-interactive mode use the following command arguments:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
Arguments:
|
|
36
|
-
--components Specify components: agents, tools, workflows
|
|
37
|
-
--llm LLM provider: openai, anthropic, groq, google or cerebras
|
|
38
|
-
--llm-api-key Provider API key
|
|
39
|
-
--example Include example implementation
|
|
40
|
-
--dir Directory for Mastra files (defaults to src/)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
For more details, refer to the [mastra init CLI documentation](../../reference/cli/init).
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Creating a new Project | Mastra Local Development Docs"
|
|
3
|
-
description: "Create new Mastra projects or add Mastra to existing Node.js applications using the CLI"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Creating a new project
|
|
7
|
-
|
|
8
|
-
You can create a new project using the `create-mastra` package:
|
|
9
|
-
|
|
10
|
-
```bash npm2yarn copy
|
|
11
|
-
npm create mastra@latest
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
You can also create a new project by using the `mastra` CLI directly:
|
|
15
|
-
|
|
16
|
-
```bash npm2yarn copy
|
|
17
|
-
npm install -g mastra@latest
|
|
18
|
-
mastra create
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Interactive Setup
|
|
22
|
-
|
|
23
|
-
Running commands without arguments starts a CLI prompt for:
|
|
24
|
-
|
|
25
|
-
1. Project name
|
|
26
|
-
1. Component selection
|
|
27
|
-
1. LLM provider configuration
|
|
28
|
-
1. API key setup
|
|
29
|
-
1. Example code inclusion
|
|
30
|
-
|
|
31
|
-
## Non-Interactive Setup
|
|
32
|
-
|
|
33
|
-
To initialize mastra in non-interactive mode use the following command arguments:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
Arguments:
|
|
37
|
-
--components Specify components: agents, tools, workflows
|
|
38
|
-
--llm-provider LLM provider: openai, anthropic, groq, google, or cerebras
|
|
39
|
-
--add-example Include example implementation
|
|
40
|
-
--llm-api-key Provider API key
|
|
41
|
-
--project-name Project name that will be used in package.json and as the project directory name
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Generated project structure:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
my-project/
|
|
48
|
-
├── src/
|
|
49
|
-
│ └── mastra/
|
|
50
|
-
│ └── index.ts # Mastra entry point
|
|
51
|
-
├── package.json
|
|
52
|
-
└── tsconfig.json
|
|
53
|
-
```
|