@mastra/mcp-docs-server 1.2.13-alpha.1 → 1.2.13-alpha.12
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/agent-approval.md +2 -2
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +2 -2
- package/.docs/docs/agents/using-tools.md +29 -0
- package/.docs/docs/capabilities/channels/imessage.md +181 -0
- package/.docs/docs/capabilities/channels/overview.md +1 -0
- package/.docs/docs/{evals/datasets → datasets}/overview.md +3 -3
- package/.docs/docs/{evals/datasets → datasets}/running-experiments.md +60 -3
- package/.docs/docs/deployment/workers.md +14 -14
- package/.docs/docs/editor/overview.md +201 -206
- package/.docs/docs/evals/evals-with-memory.md +1 -1
- package/.docs/docs/getting-started/develop.md +196 -0
- package/.docs/docs/index.md +78 -1
- package/.docs/docs/long-running-agents/durable-agents.md +2 -2
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/workspaces.md +152 -0
- package/.docs/docs/memory/observational-memory.md +53 -13
- package/.docs/docs/memory/overview.md +14 -0
- package/.docs/docs/server/auth/workers.md +7 -5
- package/.docs/docs/server/mastra-client.md +60 -0
- package/.docs/docs/server/pubsub.md +2 -2
- package/.docs/docs/studio/observability.md +4 -0
- package/.docs/docs/studio/overview.md +2 -2
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -0
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/deployment/kubernetes.md +2 -0
- package/.docs/guides/deployment/mastra-workers.md +350 -6
- package/.docs/guides/deployment/vercel.md +2 -0
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/{docs → guides}/rag/chunking-and-embedding.md +1 -1
- package/.docs/{docs → guides}/rag/graph-rag.md +1 -1
- package/.docs/{docs → guides}/rag/overview.md +2 -2
- package/.docs/{docs → guides}/rag/retrieval.md +1 -1
- package/.docs/{docs → guides}/voice/overview.md +4 -4
- package/.docs/{docs → guides}/voice/realtime-voice.md +2 -2
- package/.docs/{docs → guides}/voice/speech-to-speech.md +1 -1
- package/.docs/{docs → guides}/voice/speech-to-text.md +1 -1
- package/.docs/{docs → guides}/voice/text-to-speech.md +2 -2
- package/.docs/models/embeddings.md +63 -65
- package/.docs/models/environment-variables.md +6 -2
- package/.docs/models/gateways/netlify.md +1 -2
- package/.docs/models/gateways/openrouter.md +5 -6
- package/.docs/models/gateways/vercel.md +9 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +3 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +27 -25
- package/.docs/models/providers/alibaba-token-plan.md +27 -25
- package/.docs/models/providers/alibaba.md +2 -1
- package/.docs/models/providers/ambient.md +13 -12
- package/.docs/models/providers/baseten.md +3 -1
- package/.docs/models/providers/chutes.md +6 -8
- package/.docs/models/providers/crof.md +3 -1
- package/.docs/models/providers/crossmodel.md +7 -3
- package/.docs/models/providers/deepinfra.md +9 -2
- package/.docs/models/providers/digitalocean.md +34 -27
- package/.docs/models/providers/empiriolabs.md +5 -1
- package/.docs/models/providers/fireworks-ai.md +20 -19
- package/.docs/models/providers/greenpt.md +17 -8
- package/.docs/models/providers/groq.md +20 -20
- package/.docs/models/providers/huggingface.md +5 -1
- package/.docs/models/providers/hyper.md +13 -8
- package/.docs/models/providers/impossibl.md +148 -0
- package/.docs/models/providers/infomaniak.md +83 -0
- package/.docs/models/providers/kilo.md +349 -350
- package/.docs/models/providers/llmgateway.md +7 -4
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mistral.md +5 -2
- package/.docs/models/providers/modal.md +5 -4
- package/.docs/models/providers/modelis.md +81 -0
- package/.docs/models/providers/nano-gpt.md +146 -148
- package/.docs/models/providers/neuralwatt.md +4 -1
- package/.docs/models/providers/ofox.md +2 -2
- package/.docs/models/providers/ollama-cloud.md +23 -22
- package/.docs/models/providers/openai.md +2 -2
- package/.docs/models/providers/opencode-go.md +4 -2
- package/.docs/models/providers/opencode.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +3 -1
- package/.docs/models/providers/requesty.md +54 -45
- package/.docs/models/providers/scaleway.md +1 -3
- package/.docs/models/providers/scx.md +74 -0
- package/.docs/models/providers/tensorx.md +97 -0
- package/.docs/models/providers/the-grid-ai.md +3 -3
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +11 -9
- package/.docs/models/providers/umans-ai.md +11 -9
- package/.docs/models/providers/wandb.md +2 -2
- package/.docs/models/providers/zai-coding-plan.md +11 -13
- package/.docs/models/providers/zhipuai-coding-plan.md +12 -12
- package/.docs/models/providers.md +5 -1
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/durable-agent.md +12 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/{docs/getting-started → reference}/build-with-ai.md +5 -110
- package/.docs/reference/cli/create-mastra.md +2 -0
- package/.docs/reference/cli/mastra.md +36 -16
- package/.docs/reference/client-js/agents.md +1 -1
- package/.docs/reference/configuration.md +2 -2
- package/.docs/reference/core/getEditor.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/mastra-class.md +2 -2
- package/.docs/reference/datasets/startExperiment.md +6 -0
- package/.docs/reference/datasets/startExperimentAsync.md +4 -0
- package/.docs/reference/editor/browser-provider.md +2 -2
- package/.docs/reference/editor/filesystem-provider.md +1 -1
- package/.docs/reference/editor/mastra-editor.md +31 -18
- package/.docs/reference/editor/prompt-blocks.md +137 -0
- package/.docs/reference/editor/sandbox-provider.md +1 -1
- package/.docs/reference/editor/storage-browser-ref.md +3 -3
- package/.docs/reference/editor/storage-workspace-ref.md +3 -3
- package/.docs/reference/editor/tool-provider.md +44 -10
- package/.docs/reference/editor/tools.md +100 -0
- package/.docs/reference/editor/versioning.md +130 -0
- package/.docs/reference/evals/mastra-scorer.md +68 -8
- package/.docs/reference/evals/summarization.md +203 -0
- package/.docs/reference/file-based-agents/config.md +39 -1
- package/.docs/reference/index.md +4 -4
- package/.docs/reference/memory/observational-memory.md +76 -24
- package/.docs/reference/memory/serialized-memory-config.md +3 -3
- package/.docs/reference/observability/tracing/interfaces.md +6 -1
- package/.docs/reference/processors/processor-interface.md +14 -2
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +15 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/reference/storage/composite.md +2 -0
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/vectors/mongodb.md +13 -13
- package/.docs/reference/voice/livekit.md +3 -3
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workspace/platform-filesystem.md +8 -5
- package/.docs/reference/workspace/platform-sandbox.md +83 -7
- package/CHANGELOG.md +51 -0
- package/README.md +1 -1
- package/package.json +5 -5
- package/.docs/docs/agent-builder/access-control.md +0 -99
- package/.docs/docs/agent-builder/browser.md +0 -63
- package/.docs/docs/agent-builder/channels.md +0 -78
- package/.docs/docs/agent-builder/configuration.md +0 -132
- package/.docs/docs/agent-builder/deploying.md +0 -124
- package/.docs/docs/agent-builder/integrations.md +0 -115
- package/.docs/docs/agent-builder/memory.md +0 -69
- package/.docs/docs/agent-builder/model-policy.md +0 -50
- package/.docs/docs/agent-builder/overview.md +0 -114
- package/.docs/docs/agent-builder/skill-registries.md +0 -31
- package/.docs/docs/agent-builder/workspace.md +0 -62
- package/.docs/docs/editor/prompts.md +0 -140
- package/.docs/docs/editor/tools.md +0 -148
- package/.docs/docs/getting-started/file-based-agents.md +0 -121
- package/.docs/docs/mastra-platform/workspace.md +0 -111
- package/.docs/docs/what-is-mastra.md +0 -161
- package/.docs/reference/client-js/agent-builder.md +0 -163
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +0 -76
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +0 -79
- package/.docs/reference/editor/agent-builder/builder-models.md +0 -66
- /package/.docs/{docs → guides}/getting-started/manual-install.md +0 -0
- /package/.docs/{docs → guides}/rag/vector-databases.md +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Umans AI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 7 Umans AI models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Umans AI documentation](https://app.umans.ai/offers/code/docs/orgs).
|
|
8
8
|
|
|
@@ -34,13 +34,15 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `umans-ai/umans-coder`
|
|
40
|
-
| `umans-ai/umans-flash`
|
|
41
|
-
| `umans-ai/umans-
|
|
42
|
-
| `umans-ai/umans-glm-5.
|
|
43
|
-
| `umans-ai/umans-
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `umans-ai/umans-coder` | 262K | | | | | | $0.95 | $4 |
|
|
40
|
+
| `umans-ai/umans-deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
41
|
+
| `umans-ai/umans-flash` | 262K | | | | | | $0.15 | $1 |
|
|
42
|
+
| `umans-ai/umans-glm-5.1` | 205K | | | | | | $1 | $4 |
|
|
43
|
+
| `umans-ai/umans-glm-5.2` | 406K | | | | | | $1 | $4 |
|
|
44
|
+
| `umans-ai/umans-kimi-k2.7` | 262K | | | | | | $0.95 | $4 |
|
|
45
|
+
| `umans-ai/umans-kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
44
46
|
|
|
45
47
|
## Advanced configuration
|
|
46
48
|
|
|
@@ -70,7 +72,7 @@ const agent = new Agent({
|
|
|
70
72
|
model: ({ requestContext }) => {
|
|
71
73
|
const useAdvanced = requestContext.task === "complex";
|
|
72
74
|
return useAdvanced
|
|
73
|
-
? "umans-ai/umans-kimi-
|
|
75
|
+
? "umans-ai/umans-kimi-k3"
|
|
74
76
|
: "umans-ai/umans-coder";
|
|
75
77
|
}
|
|
76
78
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Weights & Biases
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 27 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
|
|
8
8
|
|
|
@@ -38,6 +38,7 @@ for await (const chunk of stream) {
|
|
|
38
38
|
| ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `wandb/deepseek-ai/DeepSeek-V3.1` | 161K | | | | | | $0.55 | $2 |
|
|
40
40
|
| `wandb/deepseek-ai/DeepSeek-V4-Flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
41
|
+
| `wandb/deepseek-ai/DeepSeek-V4-Flash-0731` | 262K | | | | | | $0.13 | $0.28 |
|
|
41
42
|
| `wandb/deepseek-ai/DeepSeek-V4-Pro` | 1.0M | | | | | | $2 | $3 |
|
|
42
43
|
| `wandb/google/gemma-4-31B-it` | 262K | | | | | | $0.10 | $0.34 |
|
|
43
44
|
| `wandb/ibm-granite/granite-4.1-8b` | 131K | | | | | | $0.05 | $0.10 |
|
|
@@ -47,7 +48,6 @@ for await (const chunk of stream) {
|
|
|
47
48
|
| `wandb/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.71 | $0.71 |
|
|
48
49
|
| `wandb/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.30 | $1 |
|
|
49
50
|
| `wandb/MiniMaxAI/MiniMax-M3` | 262K | | | | | | $0.23 | $0.96 |
|
|
50
|
-
| `wandb/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
|
|
51
51
|
| `wandb/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.65 | $3 |
|
|
52
52
|
| `wandb/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.71 | $4 |
|
|
53
53
|
| `wandb/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Z.AI Coding Plan
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 4 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Z.AI Coding Plan documentation](https://docs.z.ai/devpack/overview).
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "zai-coding-plan/glm-4.
|
|
20
|
+
model: "zai-coding-plan/glm-4.7"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -34,14 +34,12 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `zai-coding-plan/glm-4.
|
|
40
|
-
| `zai-coding-plan/glm-
|
|
41
|
-
| `zai-coding-plan/glm-5
|
|
42
|
-
| `zai-coding-plan/glm-5.
|
|
43
|
-
| `zai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
|
|
44
|
-
| `zai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| ----------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `zai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
|
|
40
|
+
| `zai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
|
|
41
|
+
| `zai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
|
|
42
|
+
| `zai-coding-plan/glm-5.2-highspeed` | 1.0M | | | | | | — | — |
|
|
45
43
|
|
|
46
44
|
## Advanced configuration
|
|
47
45
|
|
|
@@ -53,7 +51,7 @@ const agent = new Agent({
|
|
|
53
51
|
name: "custom-agent",
|
|
54
52
|
model: {
|
|
55
53
|
url: "https://api.z.ai/api/coding/paas/v4",
|
|
56
|
-
id: "zai-coding-plan/glm-4.
|
|
54
|
+
id: "zai-coding-plan/glm-4.7",
|
|
57
55
|
apiKey: process.env.ZHIPU_API_KEY,
|
|
58
56
|
headers: {
|
|
59
57
|
"X-Custom-Header": "value"
|
|
@@ -71,8 +69,8 @@ const agent = new Agent({
|
|
|
71
69
|
model: ({ requestContext }) => {
|
|
72
70
|
const useAdvanced = requestContext.task === "complex";
|
|
73
71
|
return useAdvanced
|
|
74
|
-
? "zai-coding-plan/glm-
|
|
75
|
-
: "zai-coding-plan/glm-4.
|
|
72
|
+
? "zai-coding-plan/glm-5.2-highspeed"
|
|
73
|
+
: "zai-coding-plan/glm-4.7";
|
|
76
74
|
}
|
|
77
75
|
});
|
|
78
76
|
```
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "zhipuai-coding-plan/glm-4.
|
|
20
|
+
model: "zhipuai-coding-plan/glm-4.6v"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -34,15 +34,15 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `zhipuai-coding-plan/glm-4.
|
|
40
|
-
| `zhipuai-coding-plan/glm-4.
|
|
41
|
-
| `zhipuai-coding-plan/glm-
|
|
42
|
-
| `zhipuai-coding-plan/glm-5
|
|
43
|
-
| `zhipuai-coding-plan/glm-5.
|
|
44
|
-
| `zhipuai-coding-plan/glm-5.2`
|
|
45
|
-
| `zhipuai-coding-plan/glm-5v-turbo`
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `zhipuai-coding-plan/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
|
|
40
|
+
| `zhipuai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
|
|
41
|
+
| `zhipuai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
|
|
42
|
+
| `zhipuai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
|
|
43
|
+
| `zhipuai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
|
|
44
|
+
| `zhipuai-coding-plan/glm-5.2-highspeed` | 1.0M | | | | | | — | — |
|
|
45
|
+
| `zhipuai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
|
|
46
46
|
|
|
47
47
|
## Advanced configuration
|
|
48
48
|
|
|
@@ -54,7 +54,7 @@ const agent = new Agent({
|
|
|
54
54
|
name: "custom-agent",
|
|
55
55
|
model: {
|
|
56
56
|
url: "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
57
|
-
id: "zhipuai-coding-plan/glm-4.
|
|
57
|
+
id: "zhipuai-coding-plan/glm-4.6v",
|
|
58
58
|
apiKey: process.env.ZHIPU_API_KEY,
|
|
59
59
|
headers: {
|
|
60
60
|
"X-Custom-Header": "value"
|
|
@@ -73,7 +73,7 @@ const agent = new Agent({
|
|
|
73
73
|
const useAdvanced = requestContext.task === "complex";
|
|
74
74
|
return useAdvanced
|
|
75
75
|
? "zhipuai-coding-plan/glm-5v-turbo"
|
|
76
|
-
: "zhipuai-coding-plan/glm-4.
|
|
76
|
+
: "zhipuai-coding-plan/glm-4.6v";
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
```
|
|
@@ -56,7 +56,6 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
56
56
|
- [FreeModel](https://mastra.ai/models/providers/freemodel)
|
|
57
57
|
- [Friendli](https://mastra.ai/models/providers/friendli)
|
|
58
58
|
- [FrogBot](https://mastra.ai/models/providers/frogbot)
|
|
59
|
-
- [GitHub Models](https://mastra.ai/models/providers/github-models)
|
|
60
59
|
- [GMI Cloud](https://mastra.ai/models/providers/gmicloud)
|
|
61
60
|
- [GreenPT](https://mastra.ai/models/providers/greenpt)
|
|
62
61
|
- [Helicone](https://mastra.ai/models/providers/helicone)
|
|
@@ -64,10 +63,12 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
64
63
|
- [HPC-AI](https://mastra.ai/models/providers/hpc-ai)
|
|
65
64
|
- [Hugging Face](https://mastra.ai/models/providers/huggingface)
|
|
66
65
|
- [iFlow](https://mastra.ai/models/providers/iflowcn)
|
|
66
|
+
- [Impossibl](https://mastra.ai/models/providers/impossibl)
|
|
67
67
|
- [Inception](https://mastra.ai/models/providers/inception)
|
|
68
68
|
- [Inceptron](https://mastra.ai/models/providers/inceptron)
|
|
69
69
|
- [Inference](https://mastra.ai/models/providers/inference)
|
|
70
70
|
- [InferX](https://mastra.ai/models/providers/inferx)
|
|
71
|
+
- [Infomaniak](https://mastra.ai/models/providers/infomaniak)
|
|
71
72
|
- [IO.NET](https://mastra.ai/models/providers/io-net)
|
|
72
73
|
- [Jiekou.AI](https://mastra.ai/models/providers/jiekou)
|
|
73
74
|
- [Kenari](https://mastra.ai/models/providers/kenari)
|
|
@@ -92,6 +93,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
92
93
|
- [Moark](https://mastra.ai/models/providers/moark)
|
|
93
94
|
- [Modal](https://mastra.ai/models/providers/modal)
|
|
94
95
|
- [Model Oracle AI](https://mastra.ai/models/providers/model-oracle-ai)
|
|
96
|
+
- [Modelis](https://mastra.ai/models/providers/modelis)
|
|
95
97
|
- [ModelScope](https://mastra.ai/models/providers/modelscope)
|
|
96
98
|
- [Moonshot AI](https://mastra.ai/models/providers/moonshotai)
|
|
97
99
|
- [Moonshot AI (China)](https://mastra.ai/models/providers/moonshotai-cn)
|
|
@@ -124,6 +126,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
124
126
|
- [Sakana AI](https://mastra.ai/models/providers/sakana)
|
|
125
127
|
- [Sarvam AI](https://mastra.ai/models/providers/sarvam)
|
|
126
128
|
- [Scaleway](https://mastra.ai/models/providers/scaleway)
|
|
129
|
+
- [SCX.ai](https://mastra.ai/models/providers/scx)
|
|
127
130
|
- [SiliconFlow](https://mastra.ai/models/providers/siliconflow)
|
|
128
131
|
- [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn)
|
|
129
132
|
- [Snowflake Cortex](https://mastra.ai/models/providers/snowflake-cortex)
|
|
@@ -138,6 +141,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
138
141
|
- [Tencent Coding Plan (China)](https://mastra.ai/models/providers/tencent-coding-plan)
|
|
139
142
|
- [Tencent Token Plan](https://mastra.ai/models/providers/tencent-token-plan)
|
|
140
143
|
- [Tencent TokenHub](https://mastra.ai/models/providers/tencent-tokenhub)
|
|
144
|
+
- [TensorX](https://mastra.ai/models/providers/tensorx)
|
|
141
145
|
- [The Grid AI](https://mastra.ai/models/providers/the-grid-ai)
|
|
142
146
|
- [Thinking Machines](https://mastra.ai/models/providers/thinkingmachines)
|
|
143
147
|
- [Tinfoil](https://mastra.ai/models/providers/tinfoil)
|
|
@@ -564,7 +564,7 @@ When you register the [`MastraEditor`](https://mastra.ai/reference/editor/mastra
|
|
|
564
564
|
|
|
565
565
|
**editor** (`false | { instructions?: boolean; tools?: boolean | { description?: boolean } }`): Omit to allow editing instructions and tools. Set to false to lock the agent. Set instructions: true to allow instruction edits. Set tools: true to allow tool membership and description edits, or tools: { description: true } to allow only description edits.
|
|
566
566
|
|
|
567
|
-
The agent's `id`, `name`, and `model` always come from code and can't be overridden through
|
|
567
|
+
The agent's `id`, `name`, and `model` always come from code and can't be overridden through Editor. See [Editor](https://mastra.ai/docs/editor/overview) for usage.
|
|
568
568
|
|
|
569
569
|
## Returns
|
|
570
570
|
|
|
@@ -174,6 +174,17 @@ const { output, cleanup } = await durableAgent.observe(runId, {
|
|
|
174
174
|
await output.text
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
+
By default `observe()` waits indefinitely for events. If the process running the run stops unexpectedly, the run stops producing events but never emits a completion event, so the observed stream would wait forever. Pass `idleTimeoutMs` to bound that wait: after that many milliseconds of silence the stream ends. An optional `isAlive` check is consulted first. Return `true` while the run is still being worked on (for example a long-running tool call, or a run paused waiting for human input) to keep waiting. Returning `false`, or omitting `isAlive`, ends the stream with an error. A transient throw from `isAlive` is treated as "still alive", so a momentary check failure never ends a live stream.
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
const { output } = await durableAgent.observe(runId, {
|
|
181
|
+
idleTimeoutMs: 30_000,
|
|
182
|
+
isAlive: () => runHeartbeat.isFresh(runId),
|
|
183
|
+
})
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Ending a run on idle timeout runs the same cleanup as a run that errors (see the warning below), so its cached state is released rather than retained. Both options are opt-in. Omit them for the previous wait-indefinitely behavior.
|
|
187
|
+
|
|
177
188
|
Returns: `Promise<DurableAgentStreamResult>`
|
|
178
189
|
|
|
179
190
|
> **Warning:** The `cleanup()` returned by `observe()` destroys the run's registry entries and cached events. Only call it when you are done with the run. If the run is suspended and you intend to resume later, don't call `cleanup()`. Let the auto-cleanup timer handle it after the run finishes or errors. Auto-cleanup doesn't fire on suspended events.
|
|
@@ -333,7 +344,7 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
|
|
|
333
344
|
|
|
334
345
|
## DurableAgentStreamResult
|
|
335
346
|
|
|
336
|
-
The object returned by `stream()`, `resume()`, and `
|
|
347
|
+
The object returned by `stream()`, `resume()`, `observe()`, and `recover()`.
|
|
337
348
|
|
|
338
349
|
```typescript
|
|
339
350
|
interface DurableAgentStreamResult<OUTPUT = undefined> {
|
|
@@ -214,7 +214,7 @@ const result = await agent.generate('message for agent')
|
|
|
214
214
|
|
|
215
215
|
**options.tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
|
|
216
216
|
|
|
217
|
-
**options.versions** (`VersionOverrides`): Per-invocation version overrides for sub-agent delegation. Merged on top of Mastra instance-level versions and propagated automatically through sub-agent calls via requestContext. Requires the editor package. See
|
|
217
|
+
**options.versions** (`VersionOverrides`): Per-invocation version overrides for sub-agent delegation. Merged on top of Mastra instance-level versions and propagated automatically through sub-agent calls via requestContext. Requires the editor package. See Editor versioning.
|
|
218
218
|
|
|
219
219
|
**options.versions.agents** (`Record<string, VersionSelector>`): A map of agent IDs to their version selectors.
|
|
220
220
|
|
|
@@ -2,110 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Build with AI
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
To give your agent access to Mastra's documentation, we recommend using **skills**. While the MCP docs server also provides this information, skills will perform better. Use the MCP docs server when you need its tools, e.g. the migration tool.
|
|
8
|
-
|
|
9
|
-
## Mastra skills
|
|
10
|
-
|
|
11
|
-
Agent Skills are folders of instructions, scripts, and resources that agents can discover and use to do things accurately and efficiently. Mastra skills contain setup instructions, best practices, CLI commands, and instructions on how to fetch up-to-date information from Mastra's documentation.
|
|
12
|
-
|
|
13
|
-
To install all available Mastra skills, run the following command:
|
|
14
|
-
|
|
15
|
-
**npm**:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npx skills add mastra-ai/skills
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**pnpm**:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pnpm dlx skills add mastra-ai/skills
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Yarn**:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
yarn dlx skills add mastra-ai/skills
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Bun**:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
bun x skills add mastra-ai/skills
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Mastra skills work with any coding agent that supports the [Skills standard](https://agentskills.io/), including Claude Code, Cursor, Codex, OpenCode, and others.
|
|
40
|
-
|
|
41
|
-
They're also available on [GitHub](https://github.com/mastra-ai/skills).
|
|
42
|
-
|
|
43
|
-
### Update skill
|
|
44
|
-
|
|
45
|
-
To update to the latest version of the Mastra skill, run:
|
|
46
|
-
|
|
47
|
-
**npm**:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npx skills update mastra
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**pnpm**:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
pnpm dlx skills update mastra
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**Yarn**:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
yarn dlx skills update mastra
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**Bun**:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
bun x skills update mastra
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Mastra CLI
|
|
72
|
-
|
|
73
|
-
The [Mastra CLI](https://mastra.ai/reference/cli/mastra) gives your coding agent a direct line to your Mastra runtime.
|
|
74
|
-
|
|
75
|
-
Agents can invoke other agents and run workflows. They can execute tools and inspect memory. They can also run evals or query traces and logs.
|
|
76
|
-
|
|
77
|
-
**npm**:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
npm install mastra@latest -g
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**pnpm**:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
pnpm add mastra@latest -g
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Yarn**:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
yarn global add mastra@latest
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Bun**:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
bun add mastra@latest --global
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
For example, your coding agent can run an agent, then pull traces to inspect the results:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
mastra api --url http://localhost:4111 agent run weather-agent '{"messages":"What is the weather in London?"}'
|
|
105
|
-
mastra api --url http://localhost:4111 trace list
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Install the [Mastra skills](#mastra-skills) to teach your agent how to use the CLI. See the [CLI commands reference](https://mastra.ai/reference/cli/mastra) for the full list of available commands.
|
|
5
|
+
For everyday AI-assisted development with Mastra skills and the CLI, see [Develop](https://mastra.ai/docs/getting-started/develop). This page covers other ways to give coding agents access to Mastra documentation.
|
|
109
6
|
|
|
110
7
|
## Embedded package docs
|
|
111
8
|
|
|
@@ -130,12 +27,10 @@ Examples for the [introduction page](https://mastra.ai/docs):
|
|
|
130
27
|
- [`/docs/llms.txt`](https://mastra.ai/docs/llms.txt)
|
|
131
28
|
- [`/docs.md`](https://mastra.ai/docs.md)
|
|
132
29
|
|
|
133
|
-
## Mastra's documentation
|
|
134
|
-
|
|
135
|
-
In addition to the [context files](#context-files) each documentation page also features a "Copy markdown" button at the top of the page. It'll copy the streamlined markdown version to your clipboard. Beside it, you'll find a dropdown menu to open the page on GitHub, in ChatGPT, Claude, and others.
|
|
136
|
-
|
|
137
30
|
## MCP docs server
|
|
138
31
|
|
|
32
|
+
> **Warning:** The MCP docs server isn't recommended for everyday development. Use the [Mastra skill](https://mastra.ai/docs/getting-started/develop) instead because it's more up to date and performs better.
|
|
33
|
+
|
|
139
34
|
The `@mastra/mcp-docs-server` package provides direct local access to Mastra’s full documentation via the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro). It works with Cursor, Windsurf, Cline, Claude Code, VS Code, Codex or any tool that supports MCP.
|
|
140
35
|
|
|
141
36
|
These tools are designed to help agents retrieve precise, task-specific information, whether you're adding a feature to an agent or scaffolding a new project, or alternatively exploring how something works.
|
|
@@ -144,7 +39,7 @@ If you're unable to use a local MCP server and need to connect to a remote serve
|
|
|
144
39
|
|
|
145
40
|
### Installation
|
|
146
41
|
|
|
147
|
-
The [`create-mastra`](https://mastra.ai/reference/cli/create-mastra) command
|
|
42
|
+
The [`create-mastra`](https://mastra.ai/reference/cli/create-mastra) command doesn't configure the MCP docs server. Add the server manually when you need MCP-specific tools such as the migration tool.
|
|
148
43
|
|
|
149
44
|
If there are no specific instructions for your tool below, you may be able to add the MCP server with this common JSON configuration.
|
|
150
45
|
|
|
@@ -354,7 +249,7 @@ Once configured, you can ask your AI tool questions about Mastra or instruct it
|
|
|
354
249
|
- "How does working memory behave in Mastra and how can I use it to do `[task]`? It doesn't seem to work the way I expect."
|
|
355
250
|
- "I saw there are new workflow features, explain them to me and then update `[workflow]` to use them."
|
|
356
251
|
|
|
357
|
-
|
|
252
|
+
### Troubleshooting
|
|
358
253
|
|
|
359
254
|
1. **Server Not Starting**
|
|
360
255
|
|
|
@@ -201,6 +201,8 @@ Invalid input is rejected before templates are fetched or files are created.
|
|
|
201
201
|
|
|
202
202
|
**--no-git** (`boolean`): Skip automatic Git initialization and the initial commit.
|
|
203
203
|
|
|
204
|
+
**--no-install** (`boolean`): Skip dependency installation.
|
|
205
|
+
|
|
204
206
|
**-t, --template \[template]** (`string`): Use a template slug or public GitHub URL. Omit the value to select interactively.
|
|
205
207
|
|
|
206
208
|
**--timeout \<milliseconds>** (`number`): Positive integer timeout for dependency installation. Defaults to 60000.
|
|
@@ -103,7 +103,7 @@ These are forwarded to the Mastra model router and will work with any `"openai/.
|
|
|
103
103
|
|
|
104
104
|
## `mastra factory dev`
|
|
105
105
|
|
|
106
|
-
Starts a development server for [Agent Builder](https://mastra.ai/
|
|
106
|
+
Starts a development server for [Agent Builder](https://agent-builder.mastra.ai/) development. It uses the same dev runtime and flags as [`mastra dev`](#mastra-dev) and writes to the same `.mastra/output` directory.
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
109
|
npx mastra factory dev
|
|
@@ -171,7 +171,7 @@ Comma-separated list of custom arguments to pass to the Node.js process, e.g. `-
|
|
|
171
171
|
|
|
172
172
|
## `mastra worker build`
|
|
173
173
|
|
|
174
|
-
Bundles your Mastra application for worker deployment. Produces the same output as `mastra build
|
|
174
|
+
Bundles your Mastra application for worker deployment. Produces the same output as `mastra build`: a self-contained `.mastra/output/` directory.
|
|
175
175
|
|
|
176
176
|
```bash
|
|
177
177
|
mastra worker build [options]
|
|
@@ -179,29 +179,45 @@ mastra worker build [options]
|
|
|
179
179
|
|
|
180
180
|
### Flags
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
#### `--dir`
|
|
183
|
+
|
|
184
|
+
Path to your Mastra source directory. Defaults to `src/mastra`.
|
|
185
|
+
|
|
186
|
+
#### `--root`
|
|
187
|
+
|
|
188
|
+
Project root directory. Defaults to the current directory.
|
|
189
|
+
|
|
190
|
+
#### `--tools`
|
|
191
|
+
|
|
192
|
+
Comma-separated tool paths to include in the bundle.
|
|
193
|
+
|
|
194
|
+
#### `--output-dir`
|
|
195
|
+
|
|
196
|
+
Custom output directory. Defaults to `.mastra/output`.
|
|
197
|
+
|
|
198
|
+
#### `--debug`
|
|
199
|
+
|
|
200
|
+
Enable debug logging during the build.
|
|
189
201
|
|
|
190
202
|
## `mastra worker start`
|
|
191
203
|
|
|
192
204
|
> **Info:** You need to run `mastra worker build` or `mastra build` before using `mastra worker start`.
|
|
193
205
|
|
|
194
|
-
Starts a worker process from a previously built bundle.
|
|
206
|
+
Starts a worker process from a previously built bundle. The optional `name` argument sets `MASTRA_WORKERS` in the spawned process, controlling which worker starts.
|
|
195
207
|
|
|
196
208
|
```bash
|
|
197
209
|
mastra worker start [name] [options]
|
|
198
210
|
```
|
|
199
211
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
212
|
+
### Flags
|
|
213
|
+
|
|
214
|
+
#### `--dir`
|
|
215
|
+
|
|
216
|
+
Path to the build output directory. Defaults to `.mastra/output`.
|
|
217
|
+
|
|
218
|
+
#### `--env`
|
|
219
|
+
|
|
220
|
+
Path to the environment file. Defaults to `.env.production`, falling back to `.env`.
|
|
205
221
|
|
|
206
222
|
### Examples
|
|
207
223
|
|
|
@@ -412,12 +428,16 @@ mastra env vars pull
|
|
|
412
428
|
mastra env vars pull <env> --output .env.staging
|
|
413
429
|
```
|
|
414
430
|
|
|
415
|
-
`<env>` can be an environment name, slug, or ID, and can be omitted when the project has exactly one environment. The file is written with `0600` permissions.
|
|
431
|
+
`<env>` can be an environment name, slug, or ID, and can be omitted when the project has exactly one environment. The file is written with `0600` permissions. The command stops if the output file already exists. Pass `--force` to replace it.
|
|
416
432
|
|
|
417
433
|
#### `-o, --output`
|
|
418
434
|
|
|
419
435
|
File to write. Defaults to `.env`.
|
|
420
436
|
|
|
437
|
+
#### `-f, --force`
|
|
438
|
+
|
|
439
|
+
Replace an existing output file.
|
|
440
|
+
|
|
421
441
|
### `mastra env db`
|
|
422
442
|
|
|
423
443
|
Manages databases attached to a project on Mastra platform. Databases are provisioned from a managed provider (for example Turso or Neon) and inject their connection env vars into deploys automatically.
|
|
@@ -838,7 +838,7 @@ console.log(result.success) // true
|
|
|
838
838
|
|
|
839
839
|
## Version management
|
|
840
840
|
|
|
841
|
-
Both `Agent` (code-defined) and `StoredAgent` instances have methods for managing configuration versions. See
|
|
841
|
+
Both `Agent` (code-defined) and `StoredAgent` instances have methods for managing configuration versions. See [Editor versioning](https://mastra.ai/docs/editor/overview) for lifecycle and selection behavior.
|
|
842
842
|
|
|
843
843
|
### Getting an agent with a specific version
|
|
844
844
|
|
|
@@ -419,7 +419,7 @@ export const mastra = new Mastra({
|
|
|
419
419
|
|
|
420
420
|
Text-to-speech providers for voice synthesis capabilities. Register voice providers to enable agents to convert text responses into spoken audio.
|
|
421
421
|
|
|
422
|
-
Visit the [Voice documentation](https://mastra.ai/
|
|
422
|
+
Visit the [Voice documentation](https://mastra.ai/guides/voice/overview) to learn more.
|
|
423
423
|
|
|
424
424
|
> **Note:** Most users configure voice directly on agents. This top-level configuration is for defining reusable voice providers that can be shared across multiple agents.
|
|
425
425
|
|
|
@@ -440,7 +440,7 @@ export const mastra = new Mastra({
|
|
|
440
440
|
|
|
441
441
|
Vector stores for semantic search and embeddings. Used in RAG pipelines, similarity search, and other embedding-based features. Mastra supports multiple vector databases including Pinecone, PostgreSQL with pgvector, MongoDB, and more.
|
|
442
442
|
|
|
443
|
-
Visit the [RAG documentation](https://mastra.ai/
|
|
443
|
+
Visit the [RAG documentation](https://mastra.ai/guides/rag/overview) to learn more.
|
|
444
444
|
|
|
445
445
|
> **Note:** Most users create vector stores directly when building RAG pipelines. This top-level configuration is for defining reusable vector store instances that can be shared across your application.
|
|
446
446
|
|
|
@@ -20,5 +20,5 @@ mastra.getVector('testVectorStore')
|
|
|
20
20
|
|
|
21
21
|
## Related
|
|
22
22
|
|
|
23
|
-
- [Vector stores overview](https://mastra.ai/
|
|
24
|
-
- [RAG overview](https://mastra.ai/
|
|
23
|
+
- [Vector stores overview](https://mastra.ai/guides/rag/vector-databases)
|
|
24
|
+
- [RAG overview](https://mastra.ai/guides/rag/overview)
|
|
@@ -20,5 +20,5 @@ This method doesn't accept any parameters.
|
|
|
20
20
|
|
|
21
21
|
## Related
|
|
22
22
|
|
|
23
|
-
- [Vector stores overview](https://mastra.ai/
|
|
24
|
-
- [RAG overview](https://mastra.ai/
|
|
23
|
+
- [Vector stores overview](https://mastra.ai/guides/rag/vector-databases)
|
|
24
|
+
- [RAG overview](https://mastra.ai/guides/rag/overview)
|
|
@@ -97,7 +97,7 @@ Visit the [Configuration reference](https://mastra.ai/reference/configuration) f
|
|
|
97
97
|
|
|
98
98
|
**notifications.dispatch.batchSize** (`number`): Maximum number of due notification records to process per dispatch run.
|
|
99
99
|
|
|
100
|
-
**versions** (`VersionOverrides`): Global version overrides for sub-agent delegation. When a supervisor agent delegates to a sub-agent, these overrides determine which stored version of that sub-agent to use instead of the code-defined default. Requires the editor package to be configured. See
|
|
100
|
+
**versions** (`VersionOverrides`): Global version overrides for sub-agent delegation. When a supervisor agent delegates to a sub-agent, these overrides determine which stored version of that sub-agent to use instead of the code-defined default. Requires the editor package to be configured. See Editor versioning for details.
|
|
101
101
|
|
|
102
102
|
**versions.agents** (`Record<string, VersionSelector>`): A map of agent IDs to their version selectors. Each selector can target a specific version by ID or by publication status.
|
|
103
103
|
|
|
@@ -135,7 +135,7 @@ Visit the [Configuration reference](https://mastra.ai/reference/configuration) f
|
|
|
135
135
|
|
|
136
136
|
Re-drives every orphaned `running` durable-agent run across all registered durable agents. Called automatically on boot when `recovery.durableAgents` is `'auto'`. You can also call it directly for manual recovery or from a scheduled task.
|
|
137
137
|
|
|
138
|
-
Requires persistent storage
|
|
138
|
+
Requires persistent storage. With an in-memory store, there's nothing to recover after a process restart.
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
141
|
const result = await mastra.recoverAllDurableAgents()
|
|
@@ -79,6 +79,12 @@ console.log(`Status: ${summary2.status}`)
|
|
|
79
79
|
|
|
80
80
|
**unmockedToolPolicy** (`'allow' | 'deny'`): Controls undeclared agent tool calls. allow executes them live. deny fails the item with TOOL\_MOCK\_NOT\_DECLARED before execution. An item-level value overrides this experiment default. (Default: `'allow'`)
|
|
81
81
|
|
|
82
|
+
**persistence** (`ExperimentPersistencePolicy`): Controls whether this run writes experiment records and score records. Targets and scorers still execute, and results remain available in the returned summary.
|
|
83
|
+
|
|
84
|
+
**persistence.experiments** (`'default' | 'none'`): Set to none to skip experiment creation, item results, progress, and terminal status writes.
|
|
85
|
+
|
|
86
|
+
**persistence.scores** (`'default' | 'none'`): Set to none to skip score writes while still running scorers.
|
|
87
|
+
|
|
82
88
|
## Returns
|
|
83
89
|
|
|
84
90
|
**result** (`Promise<ExperimentSummary>`): Summary of the completed experiment.
|
|
@@ -33,6 +33,10 @@ console.log(`Current status: ${experiment.status}`)
|
|
|
33
33
|
|
|
34
34
|
Takes the same `StartExperimentConfig` as [`dataset.startExperiment()`](https://mastra.ai/reference/datasets/startExperiment).
|
|
35
35
|
|
|
36
|
+
When `persistence.experiments` is set to `'none'`, `startExperimentAsync()` doesn't persist an experiment record, progress updates, or item results. Score persistence remains controlled separately by `persistence.scores`. Without an experiment event observer, the run is fire-and-forget, and the experiment API can't report whether it completed or failed.
|
|
37
|
+
|
|
38
|
+
Use synchronous [`startExperiment()`](https://mastra.ai/reference/datasets/startExperiment) when the caller needs the returned summary. An experiment event observer can receive lifecycle events and the terminal summary.
|
|
39
|
+
|
|
36
40
|
## Returns
|
|
37
41
|
|
|
38
42
|
**result** (`Promise<object>`): Immediate response with experiment ID.
|