@mastra/mcp-docs-server 1.2.24-alpha.9 → 1.2.25-alpha.1

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.
Files changed (106) hide show
  1. package/.docs/docs/agents/processors.md +3 -2
  2. package/.docs/docs/auth/fga.md +1 -1
  3. package/.docs/docs/channels.md +1 -1
  4. package/.docs/docs/evals/custom-scorers.md +2 -2
  5. package/.docs/docs/evals/datasets.md +13 -3
  6. package/.docs/docs/evals/experiments.md +11 -3
  7. package/.docs/docs/evals/multi-turn.md +1 -1
  8. package/.docs/docs/guides/agent-lifecycle.md +161 -0
  9. package/.docs/docs/guides/streaming.md +1 -1
  10. package/.docs/docs/harness/agent-controller.md +1 -1
  11. package/.docs/docs/harness/durable-agents.md +11 -0
  12. package/.docs/docs/index.md +7 -7
  13. package/.docs/docs/mastra-platform/database.md +3 -1
  14. package/.docs/docs/memory/message-history.md +1 -1
  15. package/.docs/docs/memory/multi-user-threads.md +1 -1
  16. package/.docs/docs/memory/observational-memory.md +41 -1
  17. package/.docs/docs/memory/overview.md +4 -4
  18. package/.docs/docs/observability/tracing/overview.md +2 -2
  19. package/.docs/docs/server/middleware.md +17 -7
  20. package/.docs/docs/server/pubsub.md +1 -1
  21. package/.docs/docs/server/request-context.md +7 -5
  22. package/.docs/docs/studio/overview.md +1 -1
  23. package/.docs/docs/workflows/control-flow.md +0 -8
  24. package/.docs/integrations/browsers/browser-viewer.md +10 -2
  25. package/.docs/integrations/deploy/kubernetes-helm.md +13 -2
  26. package/.docs/integrations/frameworks/tanstack-start.md +3 -3
  27. package/.docs/integrations/observability/langfuse.md +3 -0
  28. package/.docs/integrations/tools/parallel.md +2 -2
  29. package/.docs/models/gateways/merge-gateway.md +2 -1
  30. package/.docs/models/gateways/neon.md +5 -1
  31. package/.docs/models/gateways/netlify.md +2 -3
  32. package/.docs/models/gateways/openrouter.md +5 -8
  33. package/.docs/models/gateways/vercel.md +4 -4
  34. package/.docs/models/index.md +1 -1
  35. package/.docs/models/providers/302ai.md +52 -33
  36. package/.docs/models/providers/anthropic.md +1 -31
  37. package/.docs/models/providers/cerebras.md +6 -36
  38. package/.docs/models/providers/cortecs.md +2 -5
  39. package/.docs/models/providers/crof.md +27 -26
  40. package/.docs/models/providers/crossmodel.md +2 -2
  41. package/.docs/models/providers/deepinfra.md +2 -33
  42. package/.docs/models/providers/digitalocean.md +2 -1
  43. package/.docs/models/providers/edenai.md +25 -14
  44. package/.docs/models/providers/fireworks-ai.md +2 -1
  45. package/.docs/models/providers/freemodel.md +0 -28
  46. package/.docs/models/providers/google.md +1 -31
  47. package/.docs/models/providers/groq.md +1 -31
  48. package/.docs/models/providers/hyper.md +5 -4
  49. package/.docs/models/providers/kilo.md +17 -19
  50. package/.docs/models/providers/kimi-for-coding.md +0 -28
  51. package/.docs/models/providers/llmgateway-providers.md +5 -5
  52. package/.docs/models/providers/llmgateway.md +3 -3
  53. package/.docs/models/providers/meta.md +0 -28
  54. package/.docs/models/providers/minimax-cn-coding-plan.md +0 -28
  55. package/.docs/models/providers/minimax-cn.md +0 -28
  56. package/.docs/models/providers/minimax-coding-plan.md +0 -28
  57. package/.docs/models/providers/minimax.md +1 -31
  58. package/.docs/models/providers/mistral.md +1 -31
  59. package/.docs/models/providers/moonshotai-cn.md +4 -10
  60. package/.docs/models/providers/moonshotai.md +4 -10
  61. package/.docs/models/providers/nano-gpt.md +13 -21
  62. package/.docs/models/providers/neosmith.md +0 -28
  63. package/.docs/models/providers/ofox.md +2 -1
  64. package/.docs/models/providers/openai.md +1 -31
  65. package/.docs/models/providers/opencode.md +6 -1
  66. package/.docs/models/providers/orcarouter.md +2 -2
  67. package/.docs/models/providers/perplexity-agent.md +0 -28
  68. package/.docs/models/providers/perplexity.md +1 -31
  69. package/.docs/models/providers/privatemode-ai.md +3 -1
  70. package/.docs/models/providers/requesty.md +9 -8
  71. package/.docs/models/providers/sensenova.md +3 -1
  72. package/.docs/models/providers/subconscious.md +0 -28
  73. package/.docs/models/providers/thinkingmachines.md +0 -28
  74. package/.docs/models/providers/togetherai.md +1 -31
  75. package/.docs/models/providers/vivgrid.md +9 -32
  76. package/.docs/models/providers/xai.md +1 -31
  77. package/.docs/reference/agent-controller/session.md +2 -0
  78. package/.docs/reference/agents/durable-agent.md +7 -1
  79. package/.docs/reference/agents/generate.md +1 -1
  80. package/.docs/reference/agents/network.md +1 -1
  81. package/.docs/reference/build-with-ai.md +8 -24
  82. package/.docs/reference/cli/mastra.md +30 -0
  83. package/.docs/reference/client-js/datasets.md +56 -1
  84. package/.docs/reference/coding-agent/build-base-prompt.md +4 -4
  85. package/.docs/reference/datasets/dataset.md +1 -0
  86. package/.docs/reference/datasets/datasets-manager.md +14 -0
  87. package/.docs/reference/datasets/deleteExperiment.md +47 -9
  88. package/.docs/reference/datasets/purgeItem.md +41 -0
  89. package/.docs/reference/editor/versioning.md +1 -1
  90. package/.docs/reference/evals/completeness.md +1 -1
  91. package/.docs/reference/evals/faithfulness.md +1 -1
  92. package/.docs/reference/evals/noise-sensitivity.md +1 -1
  93. package/.docs/reference/evals/prompt-alignment.md +2 -4
  94. package/.docs/reference/index.md +1 -0
  95. package/.docs/reference/memory/observational-memory.md +1 -1
  96. package/.docs/reference/migrations/upgrade-to-v1/workflows.md +1 -1
  97. package/.docs/reference/processors/processor-interface.md +21 -83
  98. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  99. package/.docs/reference/rag/vector-databases.md +1 -1
  100. package/.docs/reference/server/routes.md +44 -19
  101. package/.docs/reference/streaming/agents/stream.md +7 -3
  102. package/.docs/reference/tools/graph-rag-tool.md +3 -1
  103. package/.docs/reference/tools/mcp-server.md +1 -1
  104. package/.docs/reference/tools/vector-query-tool.md +4 -2
  105. package/.docs/reference/workspace/sandbox.md +2 -2
  106. package/package.json +5 -5
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Requesty logo](https://models.dev/logos/requesty.svg)Requesty
6
6
 
7
- Access 152 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
7
+ Access 153 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Requesty documentation](https://requesty.ai/solution/llm-routing/models).
10
10
 
@@ -62,9 +62,9 @@ for await (const chunk of stream) {
62
62
  | `requesty/claude-sonnet-4@eu` | 1.0M | | | | | | $3 | $15 |
63
63
  | `requesty/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
64
64
  | `requesty/claude-sonnet-5@eu` | 1.0M | | | | | | $2 | $11 |
65
- | `requesty/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
66
- | `requesty/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
67
- | `requesty/deepseek-v4-flash-0731@eu` | 1.0M | | | | | | $0.14 | $0.28 |
65
+ | `requesty/deepseek-v4-flash` | 1.0M | | | | | | $0.28 | $0.56 |
66
+ | `requesty/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.28 | $0.56 |
67
+ | `requesty/deepseek-v4-flash-0731@eu` | 1.0M | | | | | | $0.28 | $0.56 |
68
68
  | `requesty/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
69
69
  | `requesty/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
70
70
  | `requesty/deepseek-v4-pro-0813@eu` | 1.0M | | | | | | $2 | $4 |
@@ -97,8 +97,8 @@ for await (const chunk of stream) {
97
97
  | `requesty/glm-5.2-fast` | 1.0M | | | | | | $2 | $7 |
98
98
  | `requesty/glm-5.2@eu` | 1.0M | | | | | | $1 | $4 |
99
99
  | `requesty/glm-5.3` | 1.0M | | | | | | $1 | $4 |
100
- | `requesty/glm-5.3-flash` | 1.0M | | | | | | $0.20 | $0.50 |
101
- | `requesty/glm-5.3-flash@eu` | 1.0M | | | | | | $0.20 | $0.50 |
100
+ | `requesty/glm-5.3-flash` | 1.0M | | | | | | $0.20 | $0.60 |
101
+ | `requesty/glm-5.3-flash@eu` | 1.0M | | | | | | $0.20 | $0.60 |
102
102
  | `requesty/glm-5.3@eu` | 1.0M | | | | | | $1 | $4 |
103
103
  | `requesty/gpt-4.1-mini@eu` | 1.0M | | | | | | $0.44 | $2 |
104
104
  | `requesty/gpt-4.1-nano@eu` | 1.0M | | | | | | $0.11 | $0.44 |
@@ -123,6 +123,7 @@ for await (const chunk of stream) {
123
123
  | `requesty/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
124
124
  | `requesty/gpt-5.6-terra@eu` | 1.1M | | | | | | $2 | $13 |
125
125
  | `requesty/gpt-5@eu` | 400K | | | | | | $1 | $11 |
126
+ | `requesty/gpt-6-astra` | 1.1M | | | | | | $10 | $50 |
126
127
  | `requesty/grok-4.2-beta` | 2.0M | | | | | | $2 | $6 |
127
128
  | `requesty/grok-4.3` | 1.0M | | | | | | $1 | $3 |
128
129
  | `requesty/grok-4.5` | 500K | | | | | | $2 | $6 |
@@ -136,8 +137,8 @@ for await (const chunk of stream) {
136
137
  | `requesty/kimi-k2.6@eu` | 256K | | | | | | $0.95 | $4 |
137
138
  | `requesty/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
138
139
  | `requesty/kimi-k2.7-code@eu` | 262K | | | | | | $1 | $5 |
139
- | `requesty/kimi-k3` | 1.0M | | | | | | $2 | $11 |
140
- | `requesty/kimi-k3@eu` | 1.0M | | | | | | $2 | $11 |
140
+ | `requesty/kimi-k3` | 1.0M | | | | | | $3 | $15 |
141
+ | `requesty/kimi-k3@eu` | 1.0M | | | | | | $3 | $15 |
141
142
  | `requesty/laguna-m.1` | 33K | | | | | | — | — |
142
143
  | `requesty/laguna-xs.2` | 33K | | | | | | — | — |
143
144
  | `requesty/leanstral-1-5` | 262K | | | | | | — | — |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![SenseNova (China) logo](https://models.dev/logos/sensenova.svg)SenseNova (China)
6
6
 
7
- Access 3 SenseNova (China) models through Mastra's model router. Authentication is handled automatically using the `SENSENOVA_API_KEY` environment variable.
7
+ Access 5 SenseNova (China) models through Mastra's model router. Authentication is handled automatically using the `SENSENOVA_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [SenseNova (China) documentation](https://platform.sensenova.cn/docs).
10
10
 
@@ -39,7 +39,9 @@ for await (const chunk of stream) {
39
39
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
40
  | ------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
41
  | `sensenova/deepseek-v4-flash` | 1.0M | | | | | | — | — |
42
+ | `sensenova/deepseek-v4-pro` | 1.0M | | | | | | — | — |
42
43
  | `sensenova/glm-5.2` | 1.0M | | | | | | — | — |
44
+ | `sensenova/kimi-k3` | 1.0M | | | | | | — | — |
43
45
  | `sensenova/sensenova-6.8-flash-lite` | 262K | | | | | | — | — |
44
46
 
45
47
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
@@ -75,32 +75,4 @@ const agent = new Agent({
75
75
  : "subconscious/subconscious/glm-5.2";
76
76
  }
77
77
  });
78
- ```
79
-
80
- ## Direct provider installation
81
-
82
- This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/@ai-sdk/anthropic) for more details.
83
-
84
- **npm**:
85
-
86
- ```bash
87
- npm install @ai-sdk/anthropic
88
- ```
89
-
90
- **pnpm**:
91
-
92
- ```bash
93
- pnpm add @ai-sdk/anthropic
94
- ```
95
-
96
- **Yarn**:
97
-
98
- ```bash
99
- yarn add @ai-sdk/anthropic
100
- ```
101
-
102
- **Bun**:
103
-
104
- ```bash
105
- bun add @ai-sdk/anthropic
106
78
  ```
@@ -75,32 +75,4 @@ const agent = new Agent({
75
75
  : "thinkingmachines/thinkingmachines/Inkling";
76
76
  }
77
77
  });
78
- ```
79
-
80
- ## Direct provider installation
81
-
82
- This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/@ai-sdk/anthropic) for more details.
83
-
84
- **npm**:
85
-
86
- ```bash
87
- npm install @ai-sdk/anthropic
88
- ```
89
-
90
- **pnpm**:
91
-
92
- ```bash
93
- pnpm add @ai-sdk/anthropic
94
- ```
95
-
96
- **Yarn**:
97
-
98
- ```bash
99
- yarn add @ai-sdk/anthropic
100
- ```
101
-
102
- **Bun**:
103
-
104
- ```bash
105
- bun add @ai-sdk/anthropic
106
78
  ```
@@ -96,34 +96,4 @@ const agent = new Agent({
96
96
  : "togetherai/LiquidAI/LFM2-24B-A2B";
97
97
  }
98
98
  });
99
- ```
100
-
101
- ## Direct provider installation
102
-
103
- This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/@ai-sdk/togetherai) for more details.
104
-
105
- **npm**:
106
-
107
- ```bash
108
- npm install @ai-sdk/togetherai
109
- ```
110
-
111
- **pnpm**:
112
-
113
- ```bash
114
- pnpm add @ai-sdk/togetherai
115
- ```
116
-
117
- **Yarn**:
118
-
119
- ```bash
120
- yarn add @ai-sdk/togetherai
121
- ```
122
-
123
- **Bun**:
124
-
125
- ```bash
126
- bun add @ai-sdk/togetherai
127
- ```
128
-
129
- For detailed provider-specific documentation, see the [AI SDK Together AI provider docs](https://ai-sdk.dev/providers/ai-sdk-providers/togetherai).
99
+ ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Vivgrid logo](https://models.dev/logos/vivgrid.svg)Vivgrid
6
6
 
7
- Access 22 Vivgrid models through Mastra's model router. Authentication is handled automatically using the `VIVGRID_API_KEY` environment variable.
7
+ Access 27 Vivgrid models through Mastra's model router. Authentication is handled automatically using the `VIVGRID_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Vivgrid documentation](https://docs.vivgrid.com/models).
10
10
 
@@ -19,7 +19,7 @@ const agent = new Agent({
19
19
  id: "my-agent",
20
20
  name: "My Agent",
21
21
  instructions: "You are a helpful assistant",
22
- model: "vivgrid/deepseek-v3.2"
22
+ model: "vivgrid/claude-fable-5"
23
23
  });
24
24
 
25
25
  // Generate a response
@@ -38,12 +38,16 @@ for await (const chunk of stream) {
38
38
 
39
39
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
40
  | --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
+ | `vivgrid/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
42
+ | `vivgrid/claude-fable-5-1` | 1.0M | | | | | | $10 | $50 |
41
43
  | `vivgrid/deepseek-v3.2` | 128K | | | | | | $0.28 | $0.42 |
42
44
  | `vivgrid/deepseek-v4-flash` | 1.0M | | | | | | $0.15 | $0.30 |
43
45
  | `vivgrid/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
46
+ | `vivgrid/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $3 |
44
47
  | `vivgrid/gemini-3.1-flash-lite-preview` | 1.0M | | | | | | $0.25 | $2 |
45
48
  | `vivgrid/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
46
49
  | `vivgrid/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
50
+ | `vivgrid/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
47
51
  | `vivgrid/glm-5.2` | 1.0M | | | | | | $1 | $4 |
48
52
  | `vivgrid/glm-5.3` | 1.0M | | | | | | $1 | $4 |
49
53
  | `vivgrid/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
@@ -59,6 +63,7 @@ for await (const chunk of stream) {
59
63
  | `vivgrid/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 |
60
64
  | `vivgrid/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
61
65
  | `vivgrid/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
66
+ | `vivgrid/gpt-6-astra` | 1.1M | | | | | | $10 | $50 |
62
67
  | `vivgrid/kimi-k3` | 1.0M | | | | | | $3 | $15 |
63
68
 
64
69
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
@@ -73,7 +78,7 @@ const agent = new Agent({
73
78
  name: "custom-agent",
74
79
  model: {
75
80
  url: "https://api.vivgrid.com/v1",
76
- id: "vivgrid/deepseek-v3.2",
81
+ id: "vivgrid/claude-fable-5",
77
82
  apiKey: process.env.VIVGRID_API_KEY,
78
83
  headers: {
79
84
  "X-Custom-Header": "value"
@@ -92,35 +97,7 @@ const agent = new Agent({
92
97
  const useAdvanced = requestContext.task === "complex";
93
98
  return useAdvanced
94
99
  ? "vivgrid/kimi-k3"
95
- : "vivgrid/deepseek-v3.2";
100
+ : "vivgrid/claude-fable-5";
96
101
  }
97
102
  });
98
- ```
99
-
100
- ## Direct provider installation
101
-
102
- This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/@ai-sdk/openai) for more details.
103
-
104
- **npm**:
105
-
106
- ```bash
107
- npm install @ai-sdk/openai
108
- ```
109
-
110
- **pnpm**:
111
-
112
- ```bash
113
- pnpm add @ai-sdk/openai
114
- ```
115
-
116
- **Yarn**:
117
-
118
- ```bash
119
- yarn add @ai-sdk/openai
120
- ```
121
-
122
- **Bun**:
123
-
124
- ```bash
125
- bun add @ai-sdk/openai
126
103
  ```
@@ -108,34 +108,4 @@ const response = await agent.generate("Hello!", {
108
108
 
109
109
  **parallel\_function\_calling** (`boolean | undefined`)
110
110
 
111
- **searchParameters** (`{ mode: "off" | "auto" | "on"; returnCitations?: boolean | undefined; fromDate?: string | undefined; toDate?: string | undefined; maxSearchResults?: number | undefined; sources?: ({ ...; } | ... 2 more ... | { ...; })[] | undefined; } | undefined`)
112
-
113
- ## Direct provider installation
114
-
115
- This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/@ai-sdk/xai) for more details.
116
-
117
- **npm**:
118
-
119
- ```bash
120
- npm install @ai-sdk/xai
121
- ```
122
-
123
- **pnpm**:
124
-
125
- ```bash
126
- pnpm add @ai-sdk/xai
127
- ```
128
-
129
- **Yarn**:
130
-
131
- ```bash
132
- yarn add @ai-sdk/xai
133
- ```
134
-
135
- **Bun**:
136
-
137
- ```bash
138
- bun add @ai-sdk/xai
139
- ```
140
-
141
- For detailed provider-specific documentation, see the [AI SDK xAI provider docs](https://ai-sdk.dev/providers/ai-sdk-providers/xai).
111
+ **searchParameters** (`{ mode: "off" | "auto" | "on"; returnCitations?: boolean | undefined; fromDate?: string | undefined; toDate?: string | undefined; maxSearchResults?: number | undefined; sources?: ({ ...; } | ... 2 more ... | { ...; })[] | undefined; } | undefined`)
@@ -105,6 +105,8 @@ await session.sendMessage({
105
105
  })
106
106
  ```
107
107
 
108
+ When `requestContext` carries `MASTRA_MESSAGE_AUTHOR_KEY`, the stored message names that sender under `content.providerMetadata.mastra.author`. See [Reserved keys](https://mastra.ai/docs/server/request-context).
109
+
108
110
  #### `steer({ content, requestContext? })`
109
111
 
110
112
  Queue steering content into an active run.
@@ -43,7 +43,7 @@ cleanup()
43
43
 
44
44
  ### Using the `durable` config flag
45
45
 
46
- Set `durable: true` on `AgentConfig` and the agent is automatically wrapped with `createDurableAgent` when it's attached to a `Mastra` instance. Use an object to forward advanced options such as `cache`, `pubsub`, `maxSteps`, or `cleanupTimeoutMs`.
46
+ Set `durable: true` on `AgentConfig` and the agent is automatically wrapped with `createDurableAgent` when it's attached to a `Mastra` instance. Use an object to forward advanced options such as `cache`, `pubsub`, `maxSteps`, `cleanupTimeoutMs`, or `shouldCache`.
47
47
 
48
48
  ```typescript
49
49
  import { Mastra } from '@mastra/core'
@@ -90,6 +90,8 @@ Returns: `DurableAgent`
90
90
 
91
91
  **maxSteps** (`number`): Maximum number of steps for the agentic loop.
92
92
 
93
+ **shouldCache** (`(topic: string) => boolean`): Per-topic opt-out of the replay cache. Return false to publish a topic straight to the underlying PubSub without recording it; subscribers of that topic receive live events only and cannot resume from an offset. Useful for trading replay for minimum publish latency on hot topics when the cache is remote (for example, cross-region Redis). Run-local topics are always excluded, regardless of this option.
94
+
93
95
  ## `createEventedAgent(options)`
94
96
 
95
97
  Wraps an `Agent` with fire-and-forget durable execution on the built-in workflow engine. Like `createDurableAgent`, it returns a result you stream from, but the underlying workflow runs non-blocking (via `startAsync`) instead of running to completion before the stream is wired up. Use it when you want the run to progress independently of the caller. It doesn't accept `id` or `name` overrides.
@@ -112,6 +114,8 @@ Returns: `EventedAgent` (a subclass of `DurableAgent`)
112
114
 
113
115
  **maxSteps** (`number`): Maximum number of steps for the agentic loop.
114
116
 
117
+ **shouldCache** (`(topic: string) => boolean`): Per-topic opt-out of the replay cache. Return false to publish a topic straight to the underlying PubSub without recording it; subscribers of that topic receive live events only and cannot resume from an offset. Useful for trading replay for minimum publish latency on hot topics when the cache is remote (for example, cross-region Redis). Run-local topics are always excluded, regardless of this option.
118
+
115
119
  ## Constructor parameters
116
120
 
117
121
  The `DurableAgent` class accepts the same options as `createDurableAgent`, plus `cleanupTimeoutMs`. Prefer the factory unless you need to subclass.
@@ -128,6 +132,8 @@ The `DurableAgent` class accepts the same options as `createDurableAgent`, plus
128
132
 
129
133
  **maxSteps** (`number`): Maximum number of steps for the agentic loop.
130
134
 
135
+ **shouldCache** (`(topic: string) => boolean`): Per-topic opt-out of the replay cache. Return false to publish a topic straight to the underlying PubSub without recording it; subscribers of that topic receive live events only and cannot resume from an offset. Useful for trading replay for minimum publish latency on hot topics when the cache is remote (for example, cross-region Redis). Run-local topics are always excluded, regardless of this option.
136
+
131
137
  **cleanupTimeoutMs** (`number`): Grace period in milliseconds before registry entries are cleaned up automatically after a stream finishes or errors. Set to 0 to disable auto-cleanup and require a manual cleanup() call. Auto-cleanup does not fire on suspended events. (Default: `30000`)
132
138
 
133
139
  ## Methods
@@ -166,7 +166,7 @@ const result = await agent.generate('message for agent')
166
166
 
167
167
  **options.modelSettings.frequencyPenalty** (`number`): Penalty for token frequency (-2 to 2). Reduces repetition of frequent tokens.
168
168
 
169
- **options.modelSettings.timeout** (`object`): Time-based execution budget for the run. Accepts totalMs, the maximum duration of the entire agent run across every loop iteration, tool call and retry, and stepMs, the maximum duration of a single model call including the time spent consuming its stream. Exceeding either budget fails with a MastraTimeoutError. A totalMs timeout ends the run and does not try fallback models, because it is a hard deadline for the whole run. A stepMs timeout is not retried against the same model but does advance to the next entry in models when fallback models are configured.
169
+ **options.modelSettings.timeout** (`object`): Time-based execution budget for the run. Accepts totalMs, the maximum duration of the entire agent run across every loop iteration, tool call and retry, and stepMs, the maximum duration of a single model call including the time spent consuming its stream. Exceeding either budget fails with a MastraTimeoutError. A totalMs timeout ends the run and does not try fallback models, because it is a hard deadline for the whole run. A stepMs timeout is not retried against the same model but does advance to the next entry in models when fallback models are configured. Also accepts firstChunkMs, which only applies to streaming calls and is the maximum time the model may take to emit its first content-bearing chunk (text, reasoning, tool call, file or source; stream-start and metadata chunks do not count). A firstChunkMs timeout fails with timeoutType: 'firstChunk', behaves like stepMs for fallback, and is reset for each provider retry attempt. Nested timeout keys are merged across call-time and per-model settings.
170
170
 
171
171
  **options.modelSettings.stopSequences** (`string[]`): Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated.
172
172
 
@@ -102,7 +102,7 @@ await agent.network(`
102
102
 
103
103
  **options.modelSettings.frequencyPenalty** (`number`): Penalty for token frequency (-2 to 2). Reduces repetition of frequent tokens.
104
104
 
105
- **options.modelSettings.timeout** (`object`): Time-based execution budget for the run. Accepts totalMs, the maximum duration of the entire agent run across every loop iteration, tool call and retry, and stepMs, the maximum duration of a single model call including the time spent consuming its stream. Exceeding either budget fails with a MastraTimeoutError. A totalMs timeout ends the run and does not try fallback models, because it is a hard deadline for the whole run. A stepMs timeout is not retried against the same model but does advance to the next entry in models when fallback models are configured.
105
+ **options.modelSettings.timeout** (`object`): Time-based execution budget for the run. Accepts totalMs, the maximum duration of the entire agent run across every loop iteration, tool call and retry, and stepMs, the maximum duration of a single model call including the time spent consuming its stream. Exceeding either budget fails with a MastraTimeoutError. A totalMs timeout ends the run and does not try fallback models, because it is a hard deadline for the whole run. A stepMs timeout is not retried against the same model but does advance to the next entry in models when fallback models are configured. Also accepts firstChunkMs, which only applies to streaming calls and is the maximum time the model may take to emit its first content-bearing chunk (text, reasoning, tool call, file or source; stream-start and metadata chunks do not count). A firstChunkMs timeout fails with timeoutType: 'firstChunk', behaves like stepMs for fallback, and is reset for each provider retry attempt. Nested timeout keys are merged across call-time and per-model settings.
106
106
 
107
107
  **options.modelSettings.stopSequences** (`string[]`): Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated.
108
108
 
@@ -87,9 +87,9 @@ Install by selecting the button below:
87
87
 
88
88
  [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=mastra\&config=eyJjb21tYW5kIjoibnB4IC15IEBtYXN0cmEvbWNwLWRvY3Mtc2VydmVyIn0%3D)
89
89
 
90
- If you followed the automatic installation, you'll see a popup when you open cursor in the bottom left corner to prompt you to enable the Mastra Docs MCP Server.
90
+ After installation, open **Customize** > **MCPs** in Cursor and enable the **mastra** server.
91
91
 
92
- ![Popup inside Cursor showing: \"New MCP server detected: mastra\". The user can \"Skip\" or \"Enable\" it as an action.](/assets/images/enable-mastra-docs-cursor-cd5872abdc36c0e10951a59a47f25e12.png)
92
+ Cursor may also show a **New MCP server detected: mastra** popup. Select **Enable** as a shortcut, or select **Skip** and enable it later from **Customize** > **MCPs**.
93
93
 
94
94
  [More info on using MCP servers with Cursor](https://cursor.com/de/docs/context/mcp)
95
95
 
@@ -100,14 +100,10 @@ Google Antigravity is an agent-first development platform that supports MCP serv
100
100
  1. Open your Antigravity MCP configuration file:
101
101
 
102
102
  - Click on **Agent session** and select the **“…” dropdown** at the top of the editor’s side panel, then select **MCP Servers** to access the **MCP Store**.
103
- - You can access it through the MCP Store interface in Antigravity
104
-
105
- ![The Antigravity MCP store. At the top is a search bar and below a list of available MCP servers. On the very top right is a dropdown menu.](/assets/images/antigravity_mcp_server-689ea495d9c7139cc431f1f1b9827f9b.png)
103
+ - You can access it through the MCP Store interface in Antigravity.
106
104
 
107
105
  2. To add a custom MCP server, select **Manage MCP Servers** at the top of the MCP Store and select **View raw config** in the main tab.
108
106
 
109
- ![The Antigravity MCP store showing the Manage MCP Servers option and the View raw config button.](/assets/images/antigravity_managed_mcp-b661e8c04b3219000f8d842e5eb26a1a.png)
110
-
111
107
  3. Add the Mastra MCP server configuration:
112
108
 
113
109
  ```json
@@ -123,8 +119,6 @@ Google Antigravity is an agent-first development platform that supports MCP serv
123
119
 
124
120
  4. Save the configuration and restart Antigravity
125
121
 
126
- ![The UI shows that the MCP server is enabled. You can also toggle individual tools.](/assets/images/antigravity_final_interface_mcp-7fa132dbe76cdee9f61136a26d6e6615.png)
127
-
128
122
  Once configured, the Mastra MCP server exposes the following to Antigravity agents:
129
123
 
130
124
  - Indexed documentation and API schemas for Mastra, enabling programmatic retrieval of relevant context during code generation
@@ -154,23 +148,13 @@ The MCP server will appear in Antigravity's MCP Store, where you can manage its
154
148
  }
155
149
  ```
156
150
 
157
- Once you installed the MCP server, you can use it like so:
158
-
159
- 1. Open VSCode settings.
160
-
161
- 2. Navigate to MCP settings.
162
-
163
- 3. Click "enable" on the Chat > MCP option.
164
-
165
- ![Entry in VSCode\'s settings page. The option is called \"Chat \> MCP: Enabled (Preview)\". The description says: \"Enables integration with Model Context Protocol servers to provide additional tools and functionality.\"](/assets/images/vscode-mcp-setting-8d1eb4f3df1e33606503f8c5e937e9e3.png)
166
-
167
- MCP only works in Agent mode in VSCode. Once you are in agent mode, open the `mcp.json` file and select the "start" button. Note that the "start" button will only appear if the `.vscode` folder containing `mcp.json` is in your workspace root, or the highest level of the in-editor file explorer.
168
-
169
- ![A screenshot of the mcp.json file showing the start button in the editor](/assets/images/vscode-start-mcp-26480d86080c4907cb497a325de106a4.png)
151
+ After saving the configuration, enable the server:
170
152
 
171
- After starting the MCP server, select the tools button in the Copilot pane to see available tools.
153
+ 1. Open the Command Palette.
154
+ 2. Run **MCP: List Servers**.
155
+ 3. Select **mastra**, then select **Enable**.
172
156
 
173
- ![Tools page of VSCode to see available tools](/assets/images/vscode-mcp-running-d92d6ed234d1148093dc804b0ead3515.png)
157
+ MCP tools are available in Agent mode in Visual Studio Code. Select the tools button in the Copilot pane to see the available tools.
174
158
 
175
159
  [More info on using MCP servers with Visual Studio Code](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)
176
160
 
@@ -1121,6 +1121,36 @@ mastra api --url https://observability.eu.mastra.ai trace list
1121
1121
 
1122
1122
  Use `--url` and `--header` when you need to override another target or its credentials.
1123
1123
 
1124
+ ### Factory commands
1125
+
1126
+ Use `mastra api factory` to manage Factory projects, work items, decisions, attention items, queue health, and supervisor sessions. These commands use the same JSON input, output, authentication, headers, timeout, and target resolution as other `mastra api` commands.
1127
+
1128
+ List the Factory projects available to the current organization:
1129
+
1130
+ ```bash
1131
+ mastra api factory project list
1132
+ ```
1133
+
1134
+ Inspect the generated request schema before sending a governed work-item transition:
1135
+
1136
+ ```bash
1137
+ mastra api factory work-item transition --schema
1138
+ ```
1139
+
1140
+ Move a work item using its current revision:
1141
+
1142
+ ```bash
1143
+ mastra api factory work-item transition <project-id> <work-item-id> '{"board":"work","stage":"planning","requestId":"00000000-0000-4000-8000-000000000000","cause":"manual","expectedRevision":1}'
1144
+ ```
1145
+
1146
+ After you deploy the project with `mastra deploy`, the resulting non-secret `.mastra-project.json` lets the CLI find the hosted Factory instance, apply your Mastra CLI credentials, and select the deployed project's organization automatically. For an explicit hosted Factory `--url`, the CLI uses `MASTRA_ORG_ID` when set, then the organization selected by `mastra auth orgs switch`. An explicit `X-Mastra-Organization-Id` header takes precedence over both. Before deployment, or to target a specific local, remote, or self-hosted Factory server, pass `--url` instead:
1147
+
1148
+ ```bash
1149
+ mastra api --url http://localhost:4111 factory project list
1150
+ ```
1151
+
1152
+ Factory endpoints use their root-level `/web/factory/...` paths. `--server-api-prefix` still controls local target probing, but it isn't prepended to Factory requests.
1153
+
1124
1154
  ### Flags
1125
1155
 
1126
1156
  #### `--url <url>`
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Datasets API
6
6
 
7
- The Datasets API exposes Mastra's dataset and experiment routes from `MastraClient`. This page covers the caller-driven experiment methods, which let an orchestrator you own (for example a Temporal workflow) drive the experiment loop while Mastra acts as the system of record. Create the experiment, then either have Mastra execute each item server-side with `runExperimentItem` or ingest results you computed yourself with `submitExperimentResult`, and call finalize when the run is done.
7
+ The Datasets API exposes Mastra's dataset and experiment routes from `MastraClient`. It includes caller-driven experiment methods and experiment deletion methods. The caller-driven methods let an orchestrator you own (for example a Temporal workflow) drive the experiment loop while Mastra acts as the system of record. Create the experiment, then either have Mastra execute each item server-side with `runExperimentItem` or ingest results you computed yourself with `submitExperimentResult`, and call finalize when the run is done.
8
8
 
9
9
  Item runs, result submission, and finalization are safe to retry. Creation is safe to retry only when the request includes a caller-supplied `id`; without one, each retry creates a new experiment.
10
10
 
@@ -138,6 +138,61 @@ Marks a caller-driven experiment completed. The server computes per-item counts
138
138
 
139
139
  Returns `Promise<DatasetExperiment>`, the updated experiment record.
140
140
 
141
+ ## deleteDatasetExperiment()
142
+
143
+ Deletes an experiment through its dataset. The server deletes the experiment's result records and attempts to delete its observability traces, including their spans and trace-linked signals, but unsupported storage leaves the traces in place and causes the server to log a warning. If trace cleanup fails after an earlier batch succeeds, the promise rejects and preserves the experiment and result records even though some traces may already have been removed.
144
+
145
+ ```typescript
146
+ await client.deleteDatasetExperiment('dataset-id', 'experiment-id', {
147
+ organizationId: 'organization-id',
148
+ projectId: 'project-id',
149
+ })
150
+ ```
151
+
152
+ **datasetId** (`string`): ID of the dataset that owns the experiment.
153
+
154
+ **experimentId** (`string`): ID of the experiment to delete.
155
+
156
+ **tenancy.organizationId** (`string`): Organization ID used to scope the dataset lookup.
157
+
158
+ **tenancy.projectId** (`string`): Project ID used to scope the dataset lookup.
159
+
160
+ Returns `Promise<{ success: boolean }>`. A missing experiment, an experiment associated with another dataset, or a dataset outside the supplied tenancy returns a `404` response.
161
+
162
+ ## deleteExperiment()
163
+
164
+ Deletes an experiment by ID without requiring a dataset reference. Use this method for experiments orphaned by dataset deletion. The server deletes the experiment's result records and attempts to delete its observability traces, but unsupported storage leaves the traces in place and causes the server to log a warning. If trace cleanup fails after an earlier batch succeeds, the promise rejects and preserves the experiment and result records even though some traces may already have been removed.
165
+
166
+ ```typescript
167
+ await client.deleteExperiment('experiment-id', {
168
+ organizationId: 'organization-id',
169
+ projectId: 'project-id',
170
+ })
171
+ ```
172
+
173
+ **experimentId** (`string`): ID of the experiment to delete.
174
+
175
+ **options.organizationId** (`string`): Organization ID used to scope the deletion.
176
+
177
+ **options.projectId** (`string`): Project ID used to scope the deletion.
178
+
179
+ Returns `Promise<{ success: boolean }>`. An unscoped request returns a `404` response when the experiment doesn't exist. A tenancy-scoped request that doesn't match the experiment returns success without deleting it.
180
+
181
+ ## purgeDatasetItem()
182
+
183
+ Scrubs an item's content from existing dataset history and linked experiment results, including result tags and comments, while preserving version history, experiment counters, and review status. Later result submissions for the item are stored with redacted content, and later dataset item updates are rejected.
184
+
185
+ ```typescript
186
+ await client.purgeDatasetItem('dataset-id', 'item-id', {
187
+ organizationId: 'organization-id',
188
+ projectId: 'project-id',
189
+ })
190
+ ```
191
+
192
+ The optional third argument scopes the purge to a tenant organization and project. The server returns `404` when the dataset doesn't belong to that scope.
193
+
194
+ Returns `Promise<{ success: boolean }>`. The operation is idempotent and can't be undone. Don't run it concurrently with dataset item updates or deletions because a write that started before purge can commit a stale revision afterward. MongoDB storage requires a replica set or sharded deployment with transaction support. See [`dataset.purgeItem()`](https://mastra.ai/reference/datasets/purgeItem) for the complete purge behavior.
195
+
141
196
  ## Related
142
197
 
143
198
  - [Running experiments](https://mastra.ai/docs/evals/experiments)
@@ -6,7 +6,7 @@
6
6
 
7
7
  `buildBasePrompt()` builds the shared base system prompt for a coding agent: the behavioral instructions that make the agent a good coding assistant. It takes a `PromptContext` describing the current environment (project, platform, git branch, mode, model) and returns the prompt as a string.
8
8
 
9
- Product-specific strings are parameterized through `productName`, `coAuthorName`, and `coAuthorEmail`, so you can rebrand the prompt and commit trailer without forking it. They default to `"Mastra Code"` / `"noreply@mastra.ai"`, so existing callers keep identical output.
9
+ Product-specific strings are parameterized through `productName`, `coAuthorName`, and `coAuthorEmail`, so you can rebrand the prompt and commit trailer without forking it. The co-author defaults to `"mastra-platform[bot]"` and `"284800079+mastra-platform[bot]@users.noreply.github.com"`.
10
10
 
11
11
  Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build runtime-defined instructions for the agent.
12
12
 
@@ -58,7 +58,7 @@ const prompt = buildBasePrompt({
58
58
 
59
59
  **mode** (`string`): Active agent mode (for example, "build" or "plan").
60
60
 
61
- **modelId** (`string`): Identifier of the active model, included in the commit Co-Authored-By line when provided.
61
+ **modelId** (`string`): Identifier of the active model.
62
62
 
63
63
  **activePlan** (`{ title: string; plan: string; approvedAt: string } | null`): The currently approved plan, if any.
64
64
 
@@ -66,9 +66,9 @@ const prompt = buildBasePrompt({
66
66
 
67
67
  **productName** (`string`): Display name used in the prompt header. (Default: `Mastra Code`)
68
68
 
69
- **coAuthorName** (`string`): Name used in the commit Co-Authored-By line. (Default: `Mastra Code`)
69
+ **coAuthorName** (`string`): Name used in the commit Co-Authored-By line. (Default: `mastra-platform[bot]`)
70
70
 
71
- **coAuthorEmail** (`string`): Email used in the commit Co-Authored-By line. (Default: `noreply@mastra.ai`)
71
+ **coAuthorEmail** (`string`): Email used in the commit Co-Authored-By line. (Default: `284800079+mastra-platform[bot]@users.noreply.github.com`)
72
72
 
73
73
  ## Returns
74
74
 
@@ -78,5 +78,6 @@ For the full dataset record (name, description, schemas, version, timestamps), c
78
78
 
79
79
  - [DatasetsManager class](https://mastra.ai/reference/datasets/datasets-manager)
80
80
  - [dataset.startExperiment()](https://mastra.ai/reference/datasets/startExperiment)
81
+ - [dataset.deleteExperiment()](https://mastra.ai/reference/datasets/deleteExperiment)
81
82
  - [dataset.addItems()](https://mastra.ai/reference/datasets/addItems)
82
83
  - [dataset.listVersions()](https://mastra.ai/reference/datasets/listVersions)
@@ -59,6 +59,20 @@ console.log(`Dataset: ${experiment.datasetId}`)
59
59
  console.log(`Status: ${experiment.status}`)
60
60
  ```
61
61
 
62
+ ### Delete experiment
63
+
64
+ Deletes an experiment directly by ID, including experiments orphaned by dataset deletion. The experiment's results are deleted, and Mastra also attempts to delete its observability traces. Unsupported observability storage leaves the traces in place and logs a warning.
65
+
66
+ ```typescript
67
+ await mastra.datasets.deleteExperiment({
68
+ experimentId: 'experiment-id',
69
+ organizationId: 'organization-id',
70
+ projectId: 'project-id',
71
+ })
72
+ ```
73
+
74
+ See [`DatasetsManager.deleteExperiment()`](https://mastra.ai/reference/datasets/deleteExperiment) for tenancy behavior and trace cascade details.
75
+
62
76
  ### Compare experiments
63
77
 
64
78
  ```typescript