@mastra/mcp-docs-server 1.1.25-alpha.4 → 1.1.25-alpha.6
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/docs/agents/adding-voice.md +4 -4
- package/.docs/docs/deployment/mastra-server.md +4 -4
- package/.docs/docs/deployment/monorepo.md +3 -3
- package/.docs/docs/evals/custom-scorers.md +2 -2
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/memory/memory-processors.md +3 -3
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +1 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/overview.md +1 -1
- package/.docs/docs/observability/tracing/bridges/otel.md +2 -2
- package/.docs/docs/observability/tracing/exporters/cloud.md +7 -7
- package/.docs/docs/observability/tracing/exporters/default.md +2 -2
- package/.docs/docs/observability/tracing/overview.md +21 -21
- package/.docs/docs/server/custom-adapters.md +5 -5
- package/.docs/docs/server/custom-api-routes.md +3 -3
- package/.docs/docs/server/middleware.md +0 -24
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/voice/speech-to-text.md +7 -7
- package/.docs/docs/voice/text-to-speech.md +10 -10
- package/.docs/docs/workspace/filesystem.md +4 -4
- package/.docs/docs/workspace/skills.md +3 -3
- package/.docs/guides/agent-frameworks/ai-sdk.md +4 -4
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +4 -4
- package/.docs/guides/deployment/mastra-platform.md +122 -3
- package/.docs/guides/migrations/mastra-cloud.md +3 -7
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +1 -1
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/gateways/openrouter.md +2 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/kilo.md +25 -27
- package/.docs/reference/agents/channels.md +3 -3
- package/.docs/reference/client-js/observability.md +2 -2
- package/.docs/reference/core/addGateway.md +5 -5
- package/.docs/reference/core/getGateway.md +5 -5
- package/.docs/reference/core/getGatewayById.md +5 -5
- package/.docs/reference/core/getMCPServer.md +2 -2
- package/.docs/reference/core/getMCPServerById.md +2 -2
- package/.docs/reference/core/getScorer.md +3 -3
- package/.docs/reference/core/getScorerById.md +3 -3
- package/.docs/reference/core/listGateways.md +5 -5
- package/.docs/reference/core/listMCPServers.md +2 -2
- package/.docs/reference/core/listScorers.md +3 -3
- package/.docs/reference/core/mastra-model-gateway.md +5 -5
- package/.docs/reference/evals/context-precision.md +3 -3
- package/.docs/reference/evals/context-relevance.md +3 -3
- package/.docs/reference/evals/mastra-scorer.md +4 -4
- package/.docs/reference/evals/noise-sensitivity.md +6 -6
- package/.docs/reference/evals/prompt-alignment.md +12 -12
- package/.docs/reference/evals/run-evals.md +6 -6
- package/.docs/reference/evals/scorer-utils.md +3 -3
- package/.docs/reference/evals/trajectory-accuracy.md +3 -3
- package/.docs/reference/observability/tracing/bridges/otel.md +3 -3
- package/.docs/reference/observability/tracing/configuration.md +12 -12
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +10 -10
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +8 -8
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +8 -8
- package/.docs/reference/observability/tracing/exporters/otel.md +3 -3
- package/.docs/reference/observability/tracing/instances.md +7 -7
- package/.docs/reference/observability/tracing/interfaces.md +6 -6
- package/.docs/reference/observability/tracing/spans.md +6 -6
- package/.docs/reference/processors/processor-interface.md +3 -3
- package/.docs/reference/server/create-route.md +3 -3
- package/.docs/reference/server/express-adapter.md +4 -4
- package/.docs/reference/server/fastify-adapter.md +4 -4
- package/.docs/reference/server/hono-adapter.md +4 -4
- package/.docs/reference/server/koa-adapter.md +4 -4
- package/.docs/reference/server/mastra-server.md +3 -3
- package/.docs/reference/server/register-api-route.md +4 -4
- package/.docs/reference/server/routes.md +2 -2
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/MastraModelOutput.md +2 -2
- package/.docs/reference/voice/cloudflare.md +3 -3
- package/.docs/reference/voice/voice.connect.md +4 -4
- package/.docs/reference/voice/voice.listen.md +3 -3
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workspace/vercel.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +1 -1
- package/CHANGELOG.md +8 -0
- package/package.json +4 -4
|
@@ -343,7 +343,7 @@ Mastra supports multiple voice providers for text-to-speech (TTS) and speech-to-
|
|
|
343
343
|
|
|
344
344
|
## Next steps
|
|
345
345
|
|
|
346
|
-
- [Voice API Reference](https://mastra.ai/reference/voice/mastra-voice)
|
|
347
|
-
- [Text to Speech Examples](https://github.com/mastra-ai/voice-examples/tree/main/text-to-speech)
|
|
348
|
-
- [Speech to Text Examples](https://github.com/mastra-ai/voice-examples/tree/main/speech-to-text)
|
|
349
|
-
- [Speech to Speech Examples](https://github.com/mastra-ai/voice-examples/tree/main/speech-to-speech)
|
|
346
|
+
- [Voice API Reference](https://mastra.ai/reference/voice/mastra-voice): Detailed API documentation for voice capabilities
|
|
347
|
+
- [Text to Speech Examples](https://github.com/mastra-ai/voice-examples/tree/main/text-to-speech): Interactive story generator and other TTS implementations
|
|
348
|
+
- [Speech to Text Examples](https://github.com/mastra-ai/voice-examples/tree/main/speech-to-text): Voice memo app and other STT implementations
|
|
349
|
+
- [Speech to Speech Examples](https://github.com/mastra-ai/voice-examples/tree/main/speech-to-speech): Real-time voice conversation with call analysis
|
|
@@ -116,7 +116,7 @@ NODE_OPTIONS="--max-old-space-size=4096" mastra build
|
|
|
116
116
|
|
|
117
117
|
## Related
|
|
118
118
|
|
|
119
|
-
- [Server Overview](https://mastra.ai/docs/server/mastra-server)
|
|
120
|
-
- [Server Adapters](https://mastra.ai/docs/server/server-adapters)
|
|
121
|
-
- [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes)
|
|
122
|
-
- [Configuration Reference](https://mastra.ai/reference/configuration)
|
|
119
|
+
- [Server Overview](https://mastra.ai/docs/server/mastra-server): Configure server behavior, middleware, and authentication
|
|
120
|
+
- [Server Adapters](https://mastra.ai/docs/server/server-adapters): Use Express or Hono instead of `mastra build`
|
|
121
|
+
- [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes): Add custom HTTP endpoints
|
|
122
|
+
- [Configuration Reference](https://mastra.ai/reference/configuration): Full configuration options
|
|
@@ -131,6 +131,6 @@ If you see type errors from uncompiled workspace packages, either:
|
|
|
131
131
|
|
|
132
132
|
## Related
|
|
133
133
|
|
|
134
|
-
- [Deploy a Mastra Server](https://mastra.ai/docs/deployment/mastra-server)
|
|
135
|
-
- [Configuration Reference](https://mastra.ai/reference/configuration)
|
|
136
|
-
- [CLI Reference](https://mastra.ai/reference/cli/mastra)
|
|
134
|
+
- [Deploy a Mastra Server](https://mastra.ai/docs/deployment/mastra-server): Core build and deployment guide
|
|
135
|
+
- [Configuration Reference](https://mastra.ai/reference/configuration): `bundler.transpilePackages` and other options
|
|
136
|
+
- [CLI Reference](https://mastra.ai/reference/cli/mastra): Build command flags
|
|
@@ -515,5 +515,5 @@ console.log('Reason:', result.reason)
|
|
|
515
515
|
|
|
516
516
|
**Examples and Resources:**
|
|
517
517
|
|
|
518
|
-
- [createScorer API Reference](https://mastra.ai/reference/evals/create-scorer)
|
|
519
|
-
- [Built-in Scorers Source Code](https://github.com/mastra-ai/mastra/tree/main/packages/evals/src/scorers)
|
|
518
|
+
- [createScorer API Reference](https://mastra.ai/reference/evals/create-scorer): Complete technical documentation
|
|
519
|
+
- [Built-in Scorers Source Code](https://github.com/mastra-ai/mastra/tree/main/packages/evals/src/scorers): Real implementations for reference
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mastra platform
|
|
2
2
|
|
|
3
|
-
The Mastra platform provides two products for deploying and managing AI applications built with the Mastra framework:
|
|
3
|
+
The [Mastra platform](https://projects.mastra.ai) provides two products for deploying and managing AI applications built with the Mastra framework:
|
|
4
4
|
|
|
5
5
|
- **Studio**: A hosted visual environment for testing agents, running workflows, and inspecting traces
|
|
6
6
|
- **Server**: A production deployment target that runs your Mastra application as an API server
|
|
@@ -307,8 +307,8 @@ Both scenarios are safe - guardrails prevent inappropriate content from being pe
|
|
|
307
307
|
|
|
308
308
|
## Related documentation
|
|
309
309
|
|
|
310
|
-
- [Processors](https://mastra.ai/docs/agents/processors)
|
|
311
|
-
- [Guardrails](https://mastra.ai/docs/agents/guardrails)
|
|
312
|
-
- [Memory Overview](https://mastra.ai/docs/memory/overview)
|
|
310
|
+
- [Processors](https://mastra.ai/docs/agents/processors): General processor concepts and custom processor creation
|
|
311
|
+
- [Guardrails](https://mastra.ai/docs/agents/guardrails): Security and validation processors
|
|
312
|
+
- [Memory Overview](https://mastra.ai/docs/memory/overview): Memory types and configuration
|
|
313
313
|
|
|
314
314
|
When creating custom processors avoid mutating the input `messages` array or its objects directly.
|
|
@@ -100,8 +100,8 @@ await agent.stream('Hello', {
|
|
|
100
100
|
|
|
101
101
|
You can use this history in two ways:
|
|
102
102
|
|
|
103
|
-
- **Automatic inclusion
|
|
104
|
-
- [**Manual querying**](#querying)
|
|
103
|
+
- **Automatic inclusion**: Mastra automatically fetches and includes recent messages in the context window. By default, it includes the last 10 messages, keeping agents grounded in the conversation. You can adjust this number with `lastMessages`, but in most cases you don't need to think about it.
|
|
104
|
+
- [**Manual querying**](#querying): For more control, use the `recall()` function to query threads and messages directly. This lets you choose exactly which memories are included in the context window, or fetch messages to render conversation history in your UI.
|
|
105
105
|
|
|
106
106
|
> **Tip:** When memory is enabled, [Studio](https://mastra.ai/docs/studio/overview) uses message history to display past conversations in the chat sidebar.
|
|
107
107
|
|
|
@@ -157,7 +157,7 @@ With retrieval mode enabled, OM:
|
|
|
157
157
|
- Registers a `recall` tool the agent can call to:
|
|
158
158
|
|
|
159
159
|
- Page through the raw messages behind any observation group range
|
|
160
|
-
- Search by semantic similarity (`mode: "search"` with a `query` string)
|
|
160
|
+
- Search by semantic similarity (`mode: "search"` with a `query` string); requires `vector: true`
|
|
161
161
|
- List all threads (`mode: "threads"`), browse other threads (`threadId`), and search across all threads (default `scope: 'resource'`)
|
|
162
162
|
- When `scope: 'thread'`: restrict browsing and search to the current thread only
|
|
163
163
|
|
|
@@ -397,4 +397,4 @@ const response = await agent.generate('What do you know about me?', {
|
|
|
397
397
|
|
|
398
398
|
- [Working memory with template](https://github.com/mastra-ai/mastra/tree/main/examples/memory-with-template)
|
|
399
399
|
- [Working memory with schema](https://github.com/mastra-ai/mastra/tree/main/examples/memory-with-schema)
|
|
400
|
-
- [Per-resource working memory](https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example)
|
|
400
|
+
- [Per-resource working memory](https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example): Complete example showing resource-scoped memory persistence
|
|
@@ -83,7 +83,7 @@ export const mastra = new Mastra({
|
|
|
83
83
|
serviceName: 'mastra',
|
|
84
84
|
exporters: [
|
|
85
85
|
new DefaultExporter(), // Persists traces to storage for Mastra Studio
|
|
86
|
-
new CloudExporter(), // Sends observability data to Mastra
|
|
86
|
+
new CloudExporter(), // Sends observability data to hosted Mastra Studio (if MASTRA_CLOUD_ACCESS_TOKEN is set)
|
|
87
87
|
],
|
|
88
88
|
spanOutputProcessors: [
|
|
89
89
|
new SensitiveDataFilter(), // Redacts sensitive data like passwords, tokens, keys
|
|
@@ -205,5 +205,5 @@ If traces aren't displaying or connecting as expected:
|
|
|
205
205
|
## Related
|
|
206
206
|
|
|
207
207
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview)
|
|
208
|
-
- [OpenTelemetry Exporter](https://mastra.ai/docs/observability/tracing/exporters/otel)
|
|
209
|
-
- [OtelBridge Reference](https://mastra.ai/reference/observability/tracing/bridges/otel)
|
|
208
|
+
- [OpenTelemetry Exporter](https://mastra.ai/docs/observability/tracing/exporters/otel): For sending traces to OTEL backends
|
|
209
|
+
- [OtelBridge Reference](https://mastra.ai/reference/observability/tracing/bridges/otel): API documentation
|
|
@@ -16,7 +16,7 @@ mastra auth tokens create exporter-token
|
|
|
16
16
|
|
|
17
17
|
This command prints a token secret that you can use as `MASTRA_CLOUD_ACCESS_TOKEN`.
|
|
18
18
|
|
|
19
|
-
If you already have
|
|
19
|
+
If you already have an access token, copy the **Observability** value from the Mastra platform instead. You can find it in either of these places:
|
|
20
20
|
|
|
21
21
|
- On the **Projects** page, open the project list and find the **Observability** row on the project card.
|
|
22
22
|
- On the project **Overview** page, find the **Observability** row directly below the deployment URL.
|
|
@@ -59,7 +59,7 @@ MASTRA_PROJECT_ID=<your-project-id>
|
|
|
59
59
|
|
|
60
60
|
Tokens created with `mastra auth tokens create` are organization-scoped, so `MASTRA_PROJECT_ID` is required.
|
|
61
61
|
|
|
62
|
-
If you use a project-scoped token from Mastra
|
|
62
|
+
If you use a project-scoped token from the Mastra platform instead, `CloudExporter` can route without `projectId`, but setting it explicitly is still supported.
|
|
63
63
|
|
|
64
64
|
Add both values to your environment:
|
|
65
65
|
|
|
@@ -130,7 +130,7 @@ If you prefer, rely entirely on environment variables:
|
|
|
130
130
|
new CloudExporter()
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
With `MASTRA_CLOUD_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `CloudExporter` automatically sends data to the correct Mastra
|
|
133
|
+
With `MASTRA_CLOUD_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `CloudExporter` automatically sends data to the correct Mastra platform project.
|
|
134
134
|
|
|
135
135
|
> **Note:** Visit [CloudExporter reference](https://mastra.ai/reference/observability/tracing/exporters/cloud-exporter) for the full list of configuration options.
|
|
136
136
|
|
|
@@ -175,9 +175,9 @@ new CloudExporter({
|
|
|
175
175
|
})
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
## Viewing data in Mastra
|
|
178
|
+
## Viewing data in Mastra Studio
|
|
179
179
|
|
|
180
|
-
After you enable `CloudExporter`, open your project in [Mastra
|
|
180
|
+
After you enable `CloudExporter`, open your project in [Mastra Studio](https://projects.mastra.ai) to inspect the exported data.
|
|
181
181
|
|
|
182
182
|
- Open your project and select **Open Studio**.
|
|
183
183
|
- In Studio, go to **Traces** to inspect agent and workflow traces.
|
|
@@ -187,7 +187,7 @@ After you enable `CloudExporter`, open your project in [Mastra Cloud](https://cl
|
|
|
187
187
|
|
|
188
188
|
> **Note:** If you use a project-scoped token, open the project that issued the token. If you use an organization-scoped token, open the project named by `MASTRA_PROJECT_ID`.
|
|
189
189
|
|
|
190
|
-
When you deploy with Mastra
|
|
190
|
+
When you deploy with Mastra Studio, set **Deployment → Service Name** to a stable value and keep it aligned with the `serviceName` in your observability config. This makes traces easier to filter in Studio through **Deployments → Service Name** when multiple services or deployments send data to the same project.
|
|
191
191
|
|
|
192
192
|
## Performance
|
|
193
193
|
|
|
@@ -198,7 +198,7 @@ When you deploy with Mastra Cloud, set **Deployment → Service Name** to a stab
|
|
|
198
198
|
- Events are batched up to `maxBatchSize` (default: 1000).
|
|
199
199
|
- Batches are sent when full or after `maxBatchWaitMs` (default: 5 seconds).
|
|
200
200
|
- Failed batches are retried with exponential backoff.
|
|
201
|
-
- The exporter degrades gracefully if Mastra
|
|
201
|
+
- The exporter degrades gracefully if Mastra Studio is unreachable.
|
|
202
202
|
|
|
203
203
|
## Related
|
|
204
204
|
|
|
@@ -59,7 +59,7 @@ export const mastra = new Mastra({
|
|
|
59
59
|
serviceName: 'mastra',
|
|
60
60
|
exporters: [
|
|
61
61
|
new DefaultExporter(), // Persists traces to storage for Studio
|
|
62
|
-
new CloudExporter(), // Sends observability data to Mastra
|
|
62
|
+
new CloudExporter(), // Sends observability data to hosted Mastra Studio (requires MASTRA_CLOUD_ACCESS_TOKEN)
|
|
63
63
|
],
|
|
64
64
|
spanOutputProcessors: [new SensitiveDataFilter()],
|
|
65
65
|
},
|
|
@@ -203,5 +203,5 @@ new DefaultExporter({
|
|
|
203
203
|
|
|
204
204
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview)
|
|
205
205
|
- [CloudExporter](https://mastra.ai/docs/observability/tracing/exporters/cloud)
|
|
206
|
-
- [Composite Storage](https://mastra.ai/reference/storage/composite)
|
|
206
|
+
- [Composite Storage](https://mastra.ai/reference/storage/composite): Combine multiple storage providers
|
|
207
207
|
- [Storage Configuration](https://mastra.ai/docs/memory/storage)
|
|
@@ -32,7 +32,7 @@ export const mastra = new Mastra({
|
|
|
32
32
|
serviceName: 'mastra',
|
|
33
33
|
exporters: [
|
|
34
34
|
new DefaultExporter(), // Persists traces to storage for Studio
|
|
35
|
-
new CloudExporter(), // Sends observability data to Mastra
|
|
35
|
+
new CloudExporter(), // Sends observability data to hosted Mastra Studio (if MASTRA_CLOUD_ACCESS_TOKEN is set)
|
|
36
36
|
],
|
|
37
37
|
spanOutputProcessors: [
|
|
38
38
|
new SensitiveDataFilter(), // Redacts sensitive data like passwords, tokens, keys
|
|
@@ -56,7 +56,7 @@ This configuration includes:
|
|
|
56
56
|
- **Exporters**:
|
|
57
57
|
|
|
58
58
|
- `DefaultExporter` - Persists traces to your configured storage for Studio
|
|
59
|
-
- `CloudExporter` - Sends observability data to Mastra
|
|
59
|
+
- `CloudExporter` - Sends observability data to hosted Mastra Studio (requires `MASTRA_CLOUD_ACCESS_TOKEN`)
|
|
60
60
|
|
|
61
61
|
- **Span Output Processors**: `SensitiveDataFilter` - Redacts sensitive fields
|
|
62
62
|
|
|
@@ -69,7 +69,7 @@ Exporters determine where your trace data is sent and how it's stored. They inte
|
|
|
69
69
|
Mastra provides two built-in exporters:
|
|
70
70
|
|
|
71
71
|
- **[Default](https://mastra.ai/docs/observability/tracing/exporters/default)** - Persists traces to local storage for viewing in Studio
|
|
72
|
-
- **[Cloud](https://mastra.ai/docs/observability/tracing/exporters/cloud)** - Sends observability data to Mastra
|
|
72
|
+
- **[Cloud](https://mastra.ai/docs/observability/tracing/exporters/cloud)** - Sends observability data to hosted Mastra Studio for production monitoring and collaboration
|
|
73
73
|
|
|
74
74
|
### External Exporters
|
|
75
75
|
|
|
@@ -272,9 +272,9 @@ export const mastra = new Mastra({
|
|
|
272
272
|
|
|
273
273
|
### Common Configuration Patterns & Troubleshooting
|
|
274
274
|
|
|
275
|
-
#### Maintaining Studio
|
|
275
|
+
#### Maintaining Studio access
|
|
276
276
|
|
|
277
|
-
When adding external exporters, include `DefaultExporter` and `CloudExporter` to maintain access to Studio
|
|
277
|
+
When adding external exporters, include `DefaultExporter` and `CloudExporter` to maintain access to Studio:
|
|
278
278
|
|
|
279
279
|
```ts
|
|
280
280
|
import {
|
|
@@ -309,7 +309,7 @@ This configuration sends traces to all three destinations simultaneously:
|
|
|
309
309
|
|
|
310
310
|
- **Arize Phoenix/AX** for external observability
|
|
311
311
|
- **DefaultExporter** for Studio
|
|
312
|
-
- **CloudExporter** for
|
|
312
|
+
- **CloudExporter** for hosted Studio dashboard
|
|
313
313
|
|
|
314
314
|
> **Info:** Remember: A single trace can be sent to multiple exporters. You don't need separate configs for each exporter unless you want different sampling rates or processors.
|
|
315
315
|
|
|
@@ -1131,27 +1131,27 @@ Mastra automatically creates spans for:
|
|
|
1131
1131
|
|
|
1132
1132
|
### Reference Documentation
|
|
1133
1133
|
|
|
1134
|
-
- [Configuration API](https://mastra.ai/reference/observability/tracing/configuration)
|
|
1135
|
-
- [Tracing Classes](https://mastra.ai/reference/observability/tracing/instances)
|
|
1136
|
-
- [Span Interfaces](https://mastra.ai/reference/observability/tracing/spans)
|
|
1137
|
-
- [Type Definitions](https://mastra.ai/reference/observability/tracing/interfaces)
|
|
1138
|
-
- [Span filtering](https://mastra.ai/reference/observability/tracing/span-filtering)
|
|
1134
|
+
- [Configuration API](https://mastra.ai/reference/observability/tracing/configuration): ObservabilityConfig details
|
|
1135
|
+
- [Tracing Classes](https://mastra.ai/reference/observability/tracing/instances): Core classes and methods
|
|
1136
|
+
- [Span Interfaces](https://mastra.ai/reference/observability/tracing/spans): Span types and lifecycle
|
|
1137
|
+
- [Type Definitions](https://mastra.ai/reference/observability/tracing/interfaces): Complete interface reference
|
|
1138
|
+
- [Span filtering](https://mastra.ai/reference/observability/tracing/span-filtering): Filtering behavior, span types, and examples
|
|
1139
1139
|
|
|
1140
1140
|
### Exporters
|
|
1141
1141
|
|
|
1142
|
-
- [DefaultExporter](https://mastra.ai/reference/observability/tracing/exporters/default-exporter)
|
|
1143
|
-
- [CloudExporter](https://mastra.ai/reference/observability/tracing/exporters/cloud-exporter)
|
|
1144
|
-
- [ConsoleExporter](https://mastra.ai/reference/observability/tracing/exporters/console-exporter)
|
|
1145
|
-
- [Arize](https://mastra.ai/reference/observability/tracing/exporters/arize)
|
|
1146
|
-
- [Braintrust](https://mastra.ai/reference/observability/tracing/exporters/braintrust)
|
|
1147
|
-
- [Langfuse](https://mastra.ai/reference/observability/tracing/exporters/langfuse)
|
|
1148
|
-
- [MLflow](https://mastra.ai/docs/observability/tracing/exporters/otel)
|
|
1149
|
-
- [OpenTelemetry](https://mastra.ai/reference/observability/tracing/exporters/otel)
|
|
1142
|
+
- [DefaultExporter](https://mastra.ai/reference/observability/tracing/exporters/default-exporter): Storage persistence
|
|
1143
|
+
- [CloudExporter](https://mastra.ai/reference/observability/tracing/exporters/cloud-exporter): Mastra platform integration
|
|
1144
|
+
- [ConsoleExporter](https://mastra.ai/reference/observability/tracing/exporters/console-exporter): Debug output
|
|
1145
|
+
- [Arize](https://mastra.ai/reference/observability/tracing/exporters/arize): Arize Phoenix and Arize AX integration
|
|
1146
|
+
- [Braintrust](https://mastra.ai/reference/observability/tracing/exporters/braintrust): Braintrust integration
|
|
1147
|
+
- [Langfuse](https://mastra.ai/reference/observability/tracing/exporters/langfuse): Langfuse integration
|
|
1148
|
+
- [MLflow](https://mastra.ai/docs/observability/tracing/exporters/otel): MLflow OTLP endpoint setup
|
|
1149
|
+
- [OpenTelemetry](https://mastra.ai/reference/observability/tracing/exporters/otel): OTEL-compatible platforms
|
|
1150
1150
|
|
|
1151
1151
|
### Bridges
|
|
1152
1152
|
|
|
1153
|
-
- [OpenTelemetry Bridge](https://mastra.ai/reference/observability/tracing/bridges/otel)
|
|
1153
|
+
- [OpenTelemetry Bridge](https://mastra.ai/reference/observability/tracing/bridges/otel): OTEL context integration
|
|
1154
1154
|
|
|
1155
1155
|
### Processors
|
|
1156
1156
|
|
|
1157
|
-
- [Sensitive Data Filter](https://mastra.ai/docs/observability/tracing/processors/sensitive-data-filter)
|
|
1157
|
+
- [Sensitive Data Filter](https://mastra.ai/docs/observability/tracing/processors/sensitive-data-filter): Data redaction
|
|
@@ -373,8 +373,8 @@ app.listen(4111)
|
|
|
373
373
|
|
|
374
374
|
## Related
|
|
375
375
|
|
|
376
|
-
- [Server Adapters](https://mastra.ai/docs/server/server-adapters)
|
|
377
|
-
- [Hono Adapter](https://mastra.ai/reference/server/hono-adapter)
|
|
378
|
-
- [Express Adapter](https://mastra.ai/reference/server/express-adapter)
|
|
379
|
-
- [MastraServer Reference](https://mastra.ai/reference/server/mastra-server)
|
|
380
|
-
- [createRoute() Reference](https://mastra.ai/reference/server/create-route)
|
|
376
|
+
- [Server Adapters](https://mastra.ai/docs/server/server-adapters): Overview and shared concepts
|
|
377
|
+
- [Hono Adapter](https://mastra.ai/reference/server/hono-adapter): Reference implementation
|
|
378
|
+
- [Express Adapter](https://mastra.ai/reference/server/express-adapter): Reference implementation
|
|
379
|
+
- [MastraServer Reference](https://mastra.ai/reference/server/mastra-server): Full API reference
|
|
380
|
+
- [createRoute() Reference](https://mastra.ai/reference/server/create-route): Creating type-safe custom routes
|
|
@@ -318,6 +318,6 @@ export const mastra = new Mastra({
|
|
|
318
318
|
|
|
319
319
|
## Related
|
|
320
320
|
|
|
321
|
-
- [registerApiRoute() Reference](https://mastra.ai/reference/server/register-api-route)
|
|
322
|
-
- [Server Middleware](https://mastra.ai/docs/server/middleware)
|
|
323
|
-
- [Mastra Server](https://mastra.ai/docs/server/mastra-server)
|
|
321
|
+
- [registerApiRoute() Reference](https://mastra.ai/reference/server/register-api-route): Full API reference
|
|
322
|
+
- [Server Middleware](https://mastra.ai/docs/server/middleware): Global middleware configuration
|
|
323
|
+
- [Mastra Server](https://mastra.ai/docs/server/mastra-server): Server configuration options
|
|
@@ -235,30 +235,6 @@ This is useful when you want to restrict operations to a specific thread that yo
|
|
|
235
235
|
}
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
-
### Special Mastra headers
|
|
239
|
-
|
|
240
|
-
When integrating with Mastra Cloud or custom clients the following headers can be inspected by middleware to tailor behavior:
|
|
241
|
-
|
|
242
|
-
```typescript
|
|
243
|
-
{
|
|
244
|
-
handler: async (c, next) => {
|
|
245
|
-
const isFromMastraCloud = c.req.header('x-mastra-cloud') === 'true';
|
|
246
|
-
const clientType = c.req.header('x-mastra-client-type');
|
|
247
|
-
const isStudio =
|
|
248
|
-
c.req.header('x-studio') === 'true';
|
|
249
|
-
|
|
250
|
-
if (isFromMastraCloud) {
|
|
251
|
-
// Special handling
|
|
252
|
-
}
|
|
253
|
-
await next();
|
|
254
|
-
},
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
- `x-mastra-cloud`: request originates from Mastra Cloud
|
|
259
|
-
- `x-mastra-client-type`: identifies the client SDK, e.g. `js` or `python`
|
|
260
|
-
- `x-studio`: request triggered from Studio
|
|
261
|
-
|
|
262
238
|
# Related
|
|
263
239
|
|
|
264
240
|
- [Request Context](https://mastra.ai/docs/server/request-context)
|
|
@@ -87,7 +87,7 @@ export const mastra = new Mastra({
|
|
|
87
87
|
serviceName: 'mastra',
|
|
88
88
|
exporters: [
|
|
89
89
|
new DefaultExporter(), // Persists traces to storage for Mastra Studio
|
|
90
|
-
new CloudExporter(), // Sends observability data to Mastra
|
|
90
|
+
new CloudExporter(), // Sends observability data to hosted Mastra Studio (if MASTRA_CLOUD_ACCESS_TOKEN is set)
|
|
91
91
|
],
|
|
92
92
|
spanOutputProcessors: [
|
|
93
93
|
new SensitiveDataFilter(), // Redacts sensitive data like passwords, tokens, keys
|
|
@@ -28,13 +28,13 @@ const voice = new OpenAIVoice()
|
|
|
28
28
|
|
|
29
29
|
Mastra supports several Speech-to-Text providers, each with their own capabilities and strengths:
|
|
30
30
|
|
|
31
|
-
- [**OpenAI**](https://mastra.ai/reference/voice/openai)
|
|
32
|
-
- [**Azure**](https://mastra.ai/reference/voice/azure)
|
|
33
|
-
- [**ElevenLabs**](https://mastra.ai/reference/voice/elevenlabs)
|
|
34
|
-
- [**Google**](https://mastra.ai/reference/voice/google)
|
|
35
|
-
- [**Cloudflare**](https://mastra.ai/reference/voice/cloudflare)
|
|
36
|
-
- [**Deepgram**](https://mastra.ai/reference/voice/deepgram)
|
|
37
|
-
- [**Sarvam**](https://mastra.ai/reference/voice/sarvam)
|
|
31
|
+
- [**OpenAI**](https://mastra.ai/reference/voice/openai): High-accuracy transcription with Whisper models
|
|
32
|
+
- [**Azure**](https://mastra.ai/reference/voice/azure): Microsoft's speech recognition with enterprise-grade reliability
|
|
33
|
+
- [**ElevenLabs**](https://mastra.ai/reference/voice/elevenlabs): Advanced speech recognition with support for multiple languages
|
|
34
|
+
- [**Google**](https://mastra.ai/reference/voice/google): Google's speech recognition with extensive language support
|
|
35
|
+
- [**Cloudflare**](https://mastra.ai/reference/voice/cloudflare): Edge-optimized speech recognition for low-latency applications
|
|
36
|
+
- [**Deepgram**](https://mastra.ai/reference/voice/deepgram): AI-powered speech recognition with high accuracy for various accents
|
|
37
|
+
- [**Sarvam**](https://mastra.ai/reference/voice/sarvam): Specialized in Indic languages and accents
|
|
38
38
|
|
|
39
39
|
Each provider is implemented as a separate package that you can install as needed:
|
|
40
40
|
|
|
@@ -33,16 +33,16 @@ const voice = new OpenAIVoice()
|
|
|
33
33
|
|
|
34
34
|
Mastra supports a wide range of Text-to-Speech providers, each with their own unique capabilities and voice options. You can choose the provider that best suits your application's needs:
|
|
35
35
|
|
|
36
|
-
- [**OpenAI**](https://mastra.ai/reference/voice/openai)
|
|
37
|
-
- [**Azure**](https://mastra.ai/reference/voice/azure)
|
|
38
|
-
- [**ElevenLabs**](https://mastra.ai/reference/voice/elevenlabs)
|
|
39
|
-
- [**PlayAI**](https://mastra.ai/reference/voice/playai)
|
|
40
|
-
- [**Google**](https://mastra.ai/reference/voice/google)
|
|
41
|
-
- [**Cloudflare**](https://mastra.ai/reference/voice/cloudflare)
|
|
42
|
-
- [**Deepgram**](https://mastra.ai/reference/voice/deepgram)
|
|
43
|
-
- [**Speechify**](https://mastra.ai/reference/voice/speechify)
|
|
44
|
-
- [**Sarvam**](https://mastra.ai/reference/voice/sarvam)
|
|
45
|
-
- [**Murf**](https://mastra.ai/reference/voice/murf)
|
|
36
|
+
- [**OpenAI**](https://mastra.ai/reference/voice/openai): High-quality voices with natural intonation and expression
|
|
37
|
+
- [**Azure**](https://mastra.ai/reference/voice/azure): Microsoft's speech service with a wide range of voices and languages
|
|
38
|
+
- [**ElevenLabs**](https://mastra.ai/reference/voice/elevenlabs): Ultra-realistic voices with emotion and fine-grained control
|
|
39
|
+
- [**PlayAI**](https://mastra.ai/reference/voice/playai): Specialized in natural-sounding voices with various styles
|
|
40
|
+
- [**Google**](https://mastra.ai/reference/voice/google): Google's speech synthesis with multilingual support
|
|
41
|
+
- [**Cloudflare**](https://mastra.ai/reference/voice/cloudflare): Edge-optimized speech synthesis for low-latency applications
|
|
42
|
+
- [**Deepgram**](https://mastra.ai/reference/voice/deepgram): AI-powered speech technology with high accuracy
|
|
43
|
+
- [**Speechify**](https://mastra.ai/reference/voice/speechify): Text-to-speech optimized for readability and accessibility
|
|
44
|
+
- [**Sarvam**](https://mastra.ai/reference/voice/sarvam): Specialized in Indic languages and accents
|
|
45
|
+
- [**Murf**](https://mastra.ai/reference/voice/murf): Studio-quality voice overs with customizable parameters
|
|
46
46
|
|
|
47
47
|
Each provider is implemented as a separate package that you can install as needed:
|
|
48
48
|
|
|
@@ -18,10 +18,10 @@ A filesystem provider handles all file operations for a workspace:
|
|
|
18
18
|
|
|
19
19
|
Available providers:
|
|
20
20
|
|
|
21
|
-
- [`LocalFilesystem`](https://mastra.ai/reference/workspace/local-filesystem)
|
|
22
|
-
- [`S3Filesystem`](https://mastra.ai/reference/workspace/s3-filesystem)
|
|
23
|
-
- [`GCSFilesystem`](https://mastra.ai/reference/workspace/gcs-filesystem)
|
|
24
|
-
- [`AgentFSFilesystem`](https://mastra.ai/reference/workspace/agentfs-filesystem)
|
|
21
|
+
- [`LocalFilesystem`](https://mastra.ai/reference/workspace/local-filesystem): Stores files in a directory on disk
|
|
22
|
+
- [`S3Filesystem`](https://mastra.ai/reference/workspace/s3-filesystem): Stores files in Amazon S3 or S3-compatible storage (R2, MinIO)
|
|
23
|
+
- [`GCSFilesystem`](https://mastra.ai/reference/workspace/gcs-filesystem): Stores files in Google Cloud Storage
|
|
24
|
+
- [`AgentFSFilesystem`](https://mastra.ai/reference/workspace/agentfs-filesystem): Stores files in a Turso/SQLite database via AgentFS
|
|
25
25
|
|
|
26
26
|
> **Tip:** `LocalFilesystem` is the simplest way to get started as it requires no external services. For cloud storage, use `S3Filesystem` or `GCSFilesystem`. For database-backed storage without external services, use `AgentFSFilesystem`.
|
|
27
27
|
|
|
@@ -181,9 +181,9 @@ const workspace = new Workspace({
|
|
|
181
181
|
|
|
182
182
|
`VersionedSkillSource` accepts three parameters:
|
|
183
183
|
|
|
184
|
-
- **`versionTree`** (`SkillVersionTree`)
|
|
185
|
-
- **`blobStore`** (`BlobStore`)
|
|
186
|
-
- **`versionCreatedAt`** (`Date`)
|
|
184
|
+
- **`versionTree`** (`SkillVersionTree`): A manifest mapping relative file paths to blob entries (`{ entries: Record<string, { blobHash, size, mimeType?, encoding? }> }`).
|
|
185
|
+
- **`blobStore`** (`BlobStore`): A content-addressable blob store instance that holds the actual file contents referenced by hash.
|
|
186
|
+
- **`versionCreatedAt`** (`Date`): The timestamp when this skill version was published. Used as the modification time for all files in the version.
|
|
187
187
|
|
|
188
188
|
When `skillSource` is provided, it's used instead of the workspace filesystem for skill discovery.
|
|
189
189
|
|
|
@@ -134,7 +134,7 @@ const { text } = await generateText({
|
|
|
134
134
|
|
|
135
135
|
## Related
|
|
136
136
|
|
|
137
|
-
- [`withMastra()`](https://mastra.ai/reference/ai-sdk/with-mastra)
|
|
138
|
-
- [Processors](https://mastra.ai/docs/agents/processors)
|
|
139
|
-
- [Memory](https://mastra.ai/docs/memory/overview)
|
|
140
|
-
- [AI SDK UI](https://mastra.ai/guides/build-your-ui/ai-sdk-ui)
|
|
137
|
+
- [`withMastra()`](https://mastra.ai/reference/ai-sdk/with-mastra): API reference for `withMastra()`
|
|
138
|
+
- [Processors](https://mastra.ai/docs/agents/processors): Learn about input and output processors
|
|
139
|
+
- [Memory](https://mastra.ai/docs/memory/overview): Overview of Mastra's memory system
|
|
140
|
+
- [AI SDK UI](https://mastra.ai/guides/build-your-ui/ai-sdk-ui): Using AI SDK UI hooks with Mastra agents, workflows, and networks
|
|
@@ -865,10 +865,10 @@ Tools can also stream data using `context.writer.write()` for lower-level contro
|
|
|
865
865
|
|
|
866
866
|
For live examples of Custom UI patterns, visit [Mastra's UI Dojo](https://ui-dojo.mastra.ai/). The repository includes implementations for:
|
|
867
867
|
|
|
868
|
-
- [Generative UIs](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/generative-user-interfaces.tsx)
|
|
869
|
-
- [Workflows](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/workflow.tsx)
|
|
870
|
-
- [Agent Networks](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/network.tsx)
|
|
871
|
-
- [Custom Events](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/generative-user-interfaces-with-custom-events.tsx)
|
|
868
|
+
- [Generative UIs](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/generative-user-interfaces.tsx): Custom components for tool outputs
|
|
869
|
+
- [Workflows](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/workflow.tsx): Workflow step visualization
|
|
870
|
+
- [Agent Networks](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/network.tsx): Network execution display
|
|
871
|
+
- [Custom Events](https://github.com/mastra-ai/ui-dojo/blob/main/src/pages/ai-sdk/generative-user-interfaces-with-custom-events.tsx): Progress indicators with custom events
|
|
872
872
|
|
|
873
873
|
## Recipes
|
|
874
874
|
|
|
@@ -46,13 +46,13 @@ bun add --global mastra
|
|
|
46
46
|
mastra server deploy
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
If you're not already authenticated, the CLI
|
|
49
|
+
If you're not already authenticated, the CLI prompts you to log in. It stores your credentials locally and any subsequent CLI commands use these credentials.
|
|
50
50
|
|
|
51
51
|
The command runs `mastra build`, uploads the artifact, builds a Docker image, and deploys it to Railway. On first deploy, the CLI creates a `.mastra-project.json` file linking your local project to the platform. Commit this file so subsequent deploys and CI/CD target the same project.
|
|
52
52
|
|
|
53
53
|
> **Note:** Environment variables from `.env`, `.env.local`, and `.env.production` are included automatically. On the first deploy, these seed the project if no env vars are set yet. After that, manage env vars through the web dashboard. Review and sanitize these files before first deploy to avoid uploading development-only or personal secrets.
|
|
54
54
|
|
|
55
|
-
See the [CLI reference](https://mastra.ai/reference/cli/mastra) for the full list of flags
|
|
55
|
+
See the [CLI reference](https://mastra.ai/reference/cli/mastra) for the full list of flags.
|
|
56
56
|
|
|
57
57
|
2. Verify your deployment at the URL printed by the CLI. Append `/api/agents` to confirm it returns a JSON list of your agents.
|
|
58
58
|
|
|
@@ -62,9 +62,128 @@ bun add --global mastra
|
|
|
62
62
|
|
|
63
63
|
A deploy transitions through **queued → uploading → building → deploying → running** (or **failed**, **cancelled**, **crashed**, or **stopped**). Only one build runs per project at a time. If multiple deploys queue up, only the latest proceeds and the rest are cancelled. Builds running longer than 15 minutes are automatically failed. The first deploy provisions Railway infrastructure and seeds environment variables from your local `.env`. Your server URL remains stable across deploys.
|
|
64
64
|
|
|
65
|
+
## CI/CD
|
|
66
|
+
|
|
67
|
+
Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After your first interactive deploy, CI/CD needs just two things: an API token and the `.mastra-project.json` file committed to your repository.
|
|
68
|
+
|
|
69
|
+
### Create an API token
|
|
70
|
+
|
|
71
|
+
1. Run the following command locally:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
mastra auth tokens create ci-deploy
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The CLI prints the token once. Copy it immediately — it cannot be retrieved again.
|
|
78
|
+
|
|
79
|
+
2. Add the token as a secret in your CI provider. In GitHub Actions, go to **Settings → Secrets and variables → Actions** and create a secret named `MASTRA_API_TOKEN`.
|
|
80
|
+
|
|
81
|
+
3. Ensure your `.mastra-project.json` file is committed to the repository. The CLI reads the `organizationId` and `projectId` from this file to target the correct project during CI deploys.
|
|
82
|
+
|
|
83
|
+
### The `--yes` flag
|
|
84
|
+
|
|
85
|
+
Pass `--yes` (or `-y`) to skip all confirmation prompts. Without it, the CLI waits for interactive input and your CI job hangs.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mastra server deploy --yes
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### GitHub Actions
|
|
92
|
+
|
|
93
|
+
The following workflow deploys on every push to `main`:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
name: Deploy to Mastra platform
|
|
97
|
+
|
|
98
|
+
on:
|
|
99
|
+
push:
|
|
100
|
+
branches: [main]
|
|
101
|
+
paths: ['src/mastra/**']
|
|
102
|
+
|
|
103
|
+
jobs:
|
|
104
|
+
deploy:
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
- uses: actions/setup-node@v4
|
|
109
|
+
with:
|
|
110
|
+
node-version: '22'
|
|
111
|
+
cache: 'npm'
|
|
112
|
+
- name: Install dependencies
|
|
113
|
+
run: npm install
|
|
114
|
+
- name: Deploy to Mastra platform
|
|
115
|
+
run: npx mastra server deploy --yes
|
|
116
|
+
env:
|
|
117
|
+
MASTRA_API_TOKEN: ${{ secrets.MASTRA_API_TOKEN }}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Adjust the `paths` filter and `working-directory` if your Mastra project is in a subdirectory (e.g. a monorepo).
|
|
121
|
+
|
|
122
|
+
> **Note:** For Studio deploys, replace `mastra server deploy` with `mastra studio deploy`. The flags and environment variables are the same.
|
|
123
|
+
|
|
124
|
+
### GitLab CI
|
|
125
|
+
|
|
126
|
+
The following pipeline deploys on pushes to `main`:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
deploy:
|
|
130
|
+
image: node:22
|
|
131
|
+
stage: deploy
|
|
132
|
+
only:
|
|
133
|
+
- main
|
|
134
|
+
before_script:
|
|
135
|
+
- npm install
|
|
136
|
+
script:
|
|
137
|
+
- npx mastra server deploy --yes
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Add `MASTRA_API_TOKEN` as a CI/CD variable in **Settings → CI/CD → Variables**.
|
|
141
|
+
|
|
142
|
+
### Other CI providers
|
|
143
|
+
|
|
144
|
+
Any CI system that runs Node.js and shell commands works with Mastra:
|
|
145
|
+
|
|
146
|
+
1. Install dependencies.
|
|
147
|
+
2. Set `MASTRA_API_TOKEN` as an environment variable.
|
|
148
|
+
3. Run `mastra server deploy --yes` (or `mastra studio deploy --yes`).
|
|
149
|
+
|
|
150
|
+
### Verify the deploy
|
|
151
|
+
|
|
152
|
+
After the workflow completes, verify the deployment by hitting the health endpoint:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
curl -f https://<your-project>.server.mastra.cloud/health
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Or check the agents endpoint, which returns a JSON list of your agents:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
curl -f https://<your-project>.server.mastra.cloud/api/agents
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The following example adds a verification step to a GitHub Actions workflow:
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
- name: Verify deployment
|
|
168
|
+
run: |
|
|
169
|
+
sleep 30
|
|
170
|
+
curl -f https://<your-project>.server.mastra.cloud/health
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Override project config with environment variables
|
|
174
|
+
|
|
175
|
+
The CLI reads `organizationId` and `projectId` from `.mastra-project.json` by default. To override these values (e.g. deploying to a different project from the same repository), set the following environment variables:
|
|
176
|
+
|
|
177
|
+
| Variable | Description |
|
|
178
|
+
| ------------------- | ---------------------------------------------------------- |
|
|
179
|
+
| `MASTRA_ORG_ID` | Overrides the organization ID from `.mastra-project.json`. |
|
|
180
|
+
| `MASTRA_PROJECT_ID` | Overrides the project ID from `.mastra-project.json`. |
|
|
181
|
+
|
|
65
182
|
## Related
|
|
66
183
|
|
|
67
|
-
- [CLI reference](https://mastra.ai/reference/cli/mastra)
|
|
184
|
+
- [CLI reference: `mastra server deploy`](https://mastra.ai/reference/cli/mastra)
|
|
185
|
+
- [CLI reference: `mastra studio deploy`](https://mastra.ai/reference/cli/mastra)
|
|
186
|
+
- [CLI reference: `mastra auth tokens`](https://mastra.ai/reference/cli/mastra)
|
|
68
187
|
- [Mastra platform overview](https://mastra.ai/docs/mastra-platform/overview)
|
|
69
188
|
- [Studio deployment](https://mastra.ai/docs/studio/deployment)
|
|
70
189
|
- [Deployment overview](https://mastra.ai/docs/deployment/overview)
|