@mastra/mcp-docs-server 1.1.7 → 1.1.8-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/.docs/docs/agents/agent-approval.md +61 -31
  2. package/.docs/docs/agents/supervisor-agents.md +1 -1
  3. package/.docs/docs/getting-started/manual-install.md +1 -1
  4. package/.docs/docs/index.md +68 -24
  5. package/.docs/docs/mastra-cloud/setup.md +1 -1
  6. package/.docs/docs/memory/observational-memory.md +9 -0
  7. package/.docs/docs/memory/semantic-recall.md +17 -1
  8. package/.docs/docs/workspace/skills.md +7 -5
  9. package/.docs/guides/deployment/aws-lambda.md +76 -165
  10. package/.docs/guides/deployment/azure-app-services.md +38 -61
  11. package/.docs/guides/deployment/cloudflare.md +1 -1
  12. package/.docs/guides/deployment/netlify.md +1 -1
  13. package/.docs/guides/deployment/vercel.md +1 -1
  14. package/.docs/models/gateways/netlify.md +5 -1
  15. package/.docs/models/index.md +1 -1
  16. package/.docs/models/providers/anthropic.md +9 -9
  17. package/.docs/models/providers/deepseek.md +1 -1
  18. package/.docs/models/providers/google.md +11 -11
  19. package/.docs/models/providers/openai.md +19 -19
  20. package/.docs/models/providers/opencode.md +33 -33
  21. package/.docs/models/providers/xai.md +3 -3
  22. package/.docs/reference/agents/agent.md +20 -20
  23. package/.docs/reference/agents/generate.md +200 -66
  24. package/.docs/reference/agents/generateLegacy.md +77 -35
  25. package/.docs/reference/agents/getDefaultGenerateOptions.md +4 -6
  26. package/.docs/reference/agents/getDefaultOptions.md +4 -6
  27. package/.docs/reference/agents/getDefaultStreamOptions.md +4 -6
  28. package/.docs/reference/agents/getDescription.md +1 -1
  29. package/.docs/reference/agents/getInstructions.md +4 -6
  30. package/.docs/reference/agents/getLLM.md +6 -8
  31. package/.docs/reference/agents/getMemory.md +4 -6
  32. package/.docs/reference/agents/getModel.md +4 -6
  33. package/.docs/reference/agents/getTools.md +5 -7
  34. package/.docs/reference/agents/getVoice.md +4 -6
  35. package/.docs/reference/agents/listAgents.md +4 -6
  36. package/.docs/reference/agents/listScorers.md +4 -6
  37. package/.docs/reference/agents/listTools.md +4 -6
  38. package/.docs/reference/agents/listWorkflows.md +4 -6
  39. package/.docs/reference/agents/network.md +69 -23
  40. package/.docs/reference/ai-sdk/chat-route.md +7 -7
  41. package/.docs/reference/ai-sdk/handle-chat-stream.md +12 -12
  42. package/.docs/reference/ai-sdk/handle-network-stream.md +4 -4
  43. package/.docs/reference/ai-sdk/handle-workflow-stream.md +11 -11
  44. package/.docs/reference/ai-sdk/network-route.md +3 -3
  45. package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +9 -9
  46. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +9 -9
  47. package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +5 -5
  48. package/.docs/reference/ai-sdk/with-mastra.md +12 -12
  49. package/.docs/reference/ai-sdk/workflow-route.md +3 -3
  50. package/.docs/reference/auth/auth0.md +6 -6
  51. package/.docs/reference/auth/better-auth.md +5 -5
  52. package/.docs/reference/auth/clerk.md +5 -5
  53. package/.docs/reference/auth/firebase.md +7 -7
  54. package/.docs/reference/auth/jwt.md +1 -1
  55. package/.docs/reference/auth/supabase.md +4 -4
  56. package/.docs/reference/auth/workos.md +6 -6
  57. package/.docs/reference/cli/create-mastra.md +14 -14
  58. package/.docs/reference/client-js/mastra-client.md +23 -23
  59. package/.docs/reference/client-js/workflows.md +3 -3
  60. package/.docs/reference/core/addGateway.md +2 -2
  61. package/.docs/reference/core/getAgent.md +2 -2
  62. package/.docs/reference/core/getAgentById.md +2 -2
  63. package/.docs/reference/core/getDeployer.md +1 -1
  64. package/.docs/reference/core/getGateway.md +2 -2
  65. package/.docs/reference/core/getGatewayById.md +2 -2
  66. package/.docs/reference/core/getLogger.md +1 -1
  67. package/.docs/reference/core/getMCPServer.md +2 -2
  68. package/.docs/reference/core/getMCPServerById.md +3 -3
  69. package/.docs/reference/core/getMemory.md +2 -2
  70. package/.docs/reference/core/getScorer.md +2 -2
  71. package/.docs/reference/core/getScorerById.md +2 -2
  72. package/.docs/reference/core/getServer.md +1 -1
  73. package/.docs/reference/core/getStorage.md +1 -1
  74. package/.docs/reference/core/getStoredAgentById.md +18 -20
  75. package/.docs/reference/core/getTelemetry.md +1 -1
  76. package/.docs/reference/core/getVector.md +2 -2
  77. package/.docs/reference/core/getWorkflow.md +3 -3
  78. package/.docs/reference/core/listAgents.md +1 -1
  79. package/.docs/reference/core/listGateways.md +1 -1
  80. package/.docs/reference/core/listLogs.md +9 -11
  81. package/.docs/reference/core/listLogsByRunId.md +9 -9
  82. package/.docs/reference/core/listMCPServers.md +1 -1
  83. package/.docs/reference/core/listMemory.md +1 -1
  84. package/.docs/reference/core/listScorers.md +1 -1
  85. package/.docs/reference/core/listStoredAgents.md +9 -11
  86. package/.docs/reference/core/listVectors.md +1 -1
  87. package/.docs/reference/core/listWorkflows.md +2 -2
  88. package/.docs/reference/core/mastra-class.md +17 -17
  89. package/.docs/reference/core/mastra-model-gateway.md +15 -15
  90. package/.docs/reference/core/setLogger.md +2 -4
  91. package/.docs/reference/core/setStorage.md +1 -1
  92. package/.docs/reference/datasets/addItem.md +20 -4
  93. package/.docs/reference/datasets/addItems.md +8 -2
  94. package/.docs/reference/datasets/compareExperiments.md +15 -3
  95. package/.docs/reference/datasets/create.md +6 -6
  96. package/.docs/reference/datasets/dataset.md +1 -1
  97. package/.docs/reference/datasets/delete.md +2 -2
  98. package/.docs/reference/datasets/deleteExperiment.md +2 -2
  99. package/.docs/reference/datasets/deleteItem.md +2 -2
  100. package/.docs/reference/datasets/deleteItems.md +2 -2
  101. package/.docs/reference/datasets/get.md +2 -2
  102. package/.docs/reference/datasets/getDetails.md +9 -9
  103. package/.docs/reference/datasets/getExperiment.md +2 -2
  104. package/.docs/reference/datasets/getItem.md +3 -3
  105. package/.docs/reference/datasets/getItemHistory.md +22 -2
  106. package/.docs/reference/datasets/list.md +7 -3
  107. package/.docs/reference/datasets/listExperimentResults.md +34 -4
  108. package/.docs/reference/datasets/listExperiments.md +41 -3
  109. package/.docs/reference/datasets/listItems.md +18 -6
  110. package/.docs/reference/datasets/listVersions.md +23 -3
  111. package/.docs/reference/datasets/startExperiment.md +62 -12
  112. package/.docs/reference/datasets/startExperimentAsync.md +5 -1
  113. package/.docs/reference/datasets/update.md +6 -6
  114. package/.docs/reference/datasets/updateItem.md +5 -5
  115. package/.docs/reference/deployer.md +8 -8
  116. package/.docs/reference/evals/answer-relevancy.md +11 -11
  117. package/.docs/reference/evals/answer-similarity.md +17 -19
  118. package/.docs/reference/evals/bias.md +10 -10
  119. package/.docs/reference/evals/completeness.md +3 -3
  120. package/.docs/reference/evals/content-similarity.md +6 -6
  121. package/.docs/reference/evals/context-precision.md +4 -4
  122. package/.docs/reference/evals/context-relevance.md +4 -4
  123. package/.docs/reference/evals/create-scorer.md +47 -49
  124. package/.docs/reference/evals/faithfulness.md +11 -11
  125. package/.docs/reference/evals/hallucination.md +17 -21
  126. package/.docs/reference/evals/keyword-coverage.md +4 -4
  127. package/.docs/reference/evals/mastra-scorer.md +14 -14
  128. package/.docs/reference/evals/noise-sensitivity.md +4 -4
  129. package/.docs/reference/evals/prompt-alignment.md +4 -4
  130. package/.docs/reference/evals/run-evals.md +16 -16
  131. package/.docs/reference/evals/scorer-utils.md +3 -3
  132. package/.docs/reference/evals/textual-difference.md +3 -3
  133. package/.docs/reference/evals/tone-consistency.md +3 -3
  134. package/.docs/reference/evals/tool-call-accuracy.md +5 -5
  135. package/.docs/reference/evals/toxicity.md +8 -8
  136. package/.docs/reference/harness/harness-class.md +34 -42
  137. package/.docs/reference/logging/pino-logger.md +5 -5
  138. package/.docs/reference/memory/clone-utilities.md +5 -5
  139. package/.docs/reference/memory/cloneThread.md +17 -21
  140. package/.docs/reference/memory/createThread.md +10 -10
  141. package/.docs/reference/memory/deleteMessages.md +2 -2
  142. package/.docs/reference/memory/getThreadById.md +2 -2
  143. package/.docs/reference/memory/listThreads.md +5 -5
  144. package/.docs/reference/memory/memory-class.md +12 -14
  145. package/.docs/reference/memory/observational-memory.md +102 -94
  146. package/.docs/reference/memory/recall.md +14 -16
  147. package/.docs/reference/observability/tracing/configuration.md +27 -10
  148. package/.docs/reference/observability/tracing/exporters/console-exporter.md +4 -7
  149. package/.docs/reference/processors/batch-parts-processor.md +8 -10
  150. package/.docs/reference/processors/language-detector.md +14 -16
  151. package/.docs/reference/processors/message-history-processor.md +7 -9
  152. package/.docs/reference/processors/moderation-processor.md +13 -15
  153. package/.docs/reference/processors/pii-detector.md +14 -16
  154. package/.docs/reference/processors/processor-interface.md +62 -62
  155. package/.docs/reference/processors/prompt-injection-detector.md +11 -13
  156. package/.docs/reference/processors/semantic-recall-processor.md +14 -16
  157. package/.docs/reference/processors/system-prompt-scrubber.md +12 -14
  158. package/.docs/reference/processors/token-limiter-processor.md +11 -13
  159. package/.docs/reference/processors/tool-call-filter.md +5 -7
  160. package/.docs/reference/processors/tool-search-processor.md +9 -11
  161. package/.docs/reference/processors/unicode-normalizer.md +8 -10
  162. package/.docs/reference/processors/working-memory-processor.md +14 -18
  163. package/.docs/reference/rag/chunk.md +38 -38
  164. package/.docs/reference/rag/database-config.md +11 -7
  165. package/.docs/reference/rag/document.md +2 -2
  166. package/.docs/reference/rag/embeddings.md +12 -12
  167. package/.docs/reference/rag/extract-params.md +23 -23
  168. package/.docs/reference/rag/graph-rag.md +12 -12
  169. package/.docs/reference/rag/rerank.md +25 -17
  170. package/.docs/reference/rag/rerankWithScorer.md +25 -17
  171. package/.docs/reference/server/create-route.md +14 -14
  172. package/.docs/reference/server/express-adapter.md +10 -10
  173. package/.docs/reference/server/fastify-adapter.md +10 -10
  174. package/.docs/reference/server/hono-adapter.md +10 -10
  175. package/.docs/reference/server/koa-adapter.md +10 -10
  176. package/.docs/reference/server/mastra-server.md +10 -10
  177. package/.docs/reference/server/register-api-route.md +13 -13
  178. package/.docs/reference/storage/cloudflare-d1.md +5 -5
  179. package/.docs/reference/storage/cloudflare.md +6 -6
  180. package/.docs/reference/storage/composite.md +9 -9
  181. package/.docs/reference/storage/convex.md +3 -3
  182. package/.docs/reference/storage/dynamodb.md +9 -9
  183. package/.docs/reference/storage/lance.md +3 -3
  184. package/.docs/reference/storage/libsql.md +2 -2
  185. package/.docs/reference/storage/mongodb.md +5 -5
  186. package/.docs/reference/storage/mssql.md +2 -2
  187. package/.docs/reference/storage/postgresql.md +25 -25
  188. package/.docs/reference/storage/upstash.md +3 -3
  189. package/.docs/reference/streaming/ChunkType.md +251 -59
  190. package/.docs/reference/streaming/agents/MastraModelOutput.md +86 -16
  191. package/.docs/reference/streaming/agents/stream.md +155 -43
  192. package/.docs/reference/streaming/agents/streamLegacy.md +79 -39
  193. package/.docs/reference/streaming/workflows/resumeStream.md +18 -8
  194. package/.docs/reference/streaming/workflows/stream.md +21 -9
  195. package/.docs/reference/streaming/workflows/timeTravelStream.md +4 -4
  196. package/.docs/reference/tools/create-tool.md +25 -21
  197. package/.docs/reference/tools/document-chunker-tool.md +7 -7
  198. package/.docs/reference/tools/graph-rag-tool.md +16 -18
  199. package/.docs/reference/tools/mcp-client.md +38 -27
  200. package/.docs/reference/tools/mcp-server.md +45 -45
  201. package/.docs/reference/tools/vector-query-tool.md +34 -22
  202. package/.docs/reference/vectors/astra.md +22 -22
  203. package/.docs/reference/vectors/chroma.md +44 -44
  204. package/.docs/reference/vectors/convex.md +26 -26
  205. package/.docs/reference/vectors/couchbase.md +30 -30
  206. package/.docs/reference/vectors/duckdb.md +29 -29
  207. package/.docs/reference/vectors/elasticsearch.md +27 -27
  208. package/.docs/reference/vectors/lance.md +46 -38
  209. package/.docs/reference/vectors/libsql.md +31 -31
  210. package/.docs/reference/vectors/mongodb.md +32 -32
  211. package/.docs/reference/vectors/opensearch.md +27 -27
  212. package/.docs/reference/vectors/pg.md +60 -44
  213. package/.docs/reference/vectors/pinecone.md +38 -38
  214. package/.docs/reference/vectors/qdrant.md +36 -36
  215. package/.docs/reference/vectors/s3vectors.md +24 -24
  216. package/.docs/reference/vectors/turbopuffer.md +29 -29
  217. package/.docs/reference/vectors/upstash.md +25 -25
  218. package/.docs/reference/vectors/vectorize.md +27 -27
  219. package/.docs/reference/voice/azure.md +19 -15
  220. package/.docs/reference/voice/cloudflare.md +10 -12
  221. package/.docs/reference/voice/composite-voice.md +10 -10
  222. package/.docs/reference/voice/deepgram.md +20 -14
  223. package/.docs/reference/voice/elevenlabs.md +20 -22
  224. package/.docs/reference/voice/google-gemini-live.md +42 -44
  225. package/.docs/reference/voice/google.md +25 -21
  226. package/.docs/reference/voice/mastra-voice.md +20 -20
  227. package/.docs/reference/voice/murf.md +24 -28
  228. package/.docs/reference/voice/openai-realtime.md +26 -26
  229. package/.docs/reference/voice/openai.md +14 -12
  230. package/.docs/reference/voice/playai.md +13 -15
  231. package/.docs/reference/voice/sarvam.md +21 -25
  232. package/.docs/reference/voice/speechify.md +11 -13
  233. package/.docs/reference/voice/voice.addInstructions.md +1 -1
  234. package/.docs/reference/voice/voice.addTools.md +1 -1
  235. package/.docs/reference/voice/voice.answer.md +1 -1
  236. package/.docs/reference/voice/voice.connect.md +3 -3
  237. package/.docs/reference/voice/voice.events.md +11 -11
  238. package/.docs/reference/voice/voice.getSpeakers.md +30 -30
  239. package/.docs/reference/voice/voice.listen.md +9 -9
  240. package/.docs/reference/voice/voice.off.md +2 -2
  241. package/.docs/reference/voice/voice.on.md +2 -2
  242. package/.docs/reference/voice/voice.send.md +1 -1
  243. package/.docs/reference/voice/voice.speak.md +11 -11
  244. package/.docs/reference/voice/voice.updateConfig.md +3 -3
  245. package/.docs/reference/workflows/run-methods/cancel.md +2 -2
  246. package/.docs/reference/workflows/run-methods/restart.md +17 -5
  247. package/.docs/reference/workflows/run-methods/resume.md +23 -9
  248. package/.docs/reference/workflows/run-methods/start.md +22 -8
  249. package/.docs/reference/workflows/run-methods/startAsync.md +12 -6
  250. package/.docs/reference/workflows/run-methods/timeTravel.md +29 -13
  251. package/.docs/reference/workflows/run.md +12 -12
  252. package/.docs/reference/workflows/step.md +24 -26
  253. package/.docs/reference/workflows/workflow-methods/branch.md +2 -2
  254. package/.docs/reference/workflows/workflow-methods/commit.md +1 -1
  255. package/.docs/reference/workflows/workflow-methods/create-run.md +4 -4
  256. package/.docs/reference/workflows/workflow-methods/dountil.md +3 -3
  257. package/.docs/reference/workflows/workflow-methods/dowhile.md +3 -3
  258. package/.docs/reference/workflows/workflow-methods/foreach.md +9 -9
  259. package/.docs/reference/workflows/workflow-methods/map.md +2 -2
  260. package/.docs/reference/workflows/workflow-methods/parallel.md +2 -2
  261. package/.docs/reference/workflows/workflow-methods/sleep.md +2 -2
  262. package/.docs/reference/workflows/workflow-methods/sleepUntil.md +2 -2
  263. package/.docs/reference/workflows/workflow-methods/then.md +2 -2
  264. package/.docs/reference/workflows/workflow.md +40 -50
  265. package/.docs/reference/workspace/daytona-sandbox.md +33 -33
  266. package/.docs/reference/workspace/e2b-sandbox.md +20 -20
  267. package/.docs/reference/workspace/filesystem.md +22 -22
  268. package/.docs/reference/workspace/gcs-filesystem.md +15 -15
  269. package/.docs/reference/workspace/local-filesystem.md +35 -35
  270. package/.docs/reference/workspace/local-sandbox.md +26 -26
  271. package/.docs/reference/workspace/s3-filesystem.md +18 -18
  272. package/.docs/reference/workspace/sandbox.md +8 -8
  273. package/.docs/reference/workspace/workspace-class.md +30 -34
  274. package/CHANGELOG.md +8 -0
  275. package/package.json +6 -6
  276. package/.docs/docs/getting-started/start.md +0 -28
@@ -4,9 +4,9 @@ The `listen()` method is a core function available in all Mastra voice providers
4
4
 
5
5
  ## Parameters
6
6
 
7
- **audioStream:** (`NodeJS.ReadableStream`): Audio stream to transcribe. This can be a file stream or a microphone stream.
7
+ **audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe. This can be a file stream or a microphone stream.
8
8
 
9
- **options?:** (`object`): Provider-specific options for speech recognition
9
+ **options** (`object`): Provider-specific options for speech recognition
10
10
 
11
11
  ## Return Value
12
12
 
@@ -22,23 +22,23 @@ Each voice provider may support additional options specific to their implementat
22
22
 
23
23
  ### OpenAI
24
24
 
25
- **options.filetype?:** (`string`): Audio file format (e.g., 'mp3', 'wav', 'm4a') (Default: `'mp3'`)
25
+ **options.filetype** (`string`): Audio file format (e.g., 'mp3', 'wav', 'm4a') (Default: `'mp3'`)
26
26
 
27
- **options.prompt?:** (`string`): Text to guide the model's transcription
27
+ **options.prompt** (`string`): Text to guide the model's transcription
28
28
 
29
- **options.language?:** (`string`): Language code (e.g., 'en', 'fr', 'de')
29
+ **options.language** (`string`): Language code (e.g., 'en', 'fr', 'de')
30
30
 
31
31
  ### Google
32
32
 
33
- **options.stream?:** (`boolean`): Whether to use streaming recognition (Default: `false`)
33
+ **options.stream** (`boolean`): Whether to use streaming recognition (Default: `false`)
34
34
 
35
- **options.config?:** (`object`): Recognition configuration from Google Cloud Speech-to-Text API (Default: `{ encoding: 'LINEAR16', languageCode: 'en-US' }`)
35
+ **options.config** (`object`): Recognition configuration from Google Cloud Speech-to-Text API (Default: `{ encoding: 'LINEAR16', languageCode: 'en-US' }`)
36
36
 
37
37
  ### Deepgram
38
38
 
39
- **options.model?:** (`string`): Deepgram model to use for transcription (Default: `'nova-2'`)
39
+ **options.model** (`string`): Deepgram model to use for transcription (Default: `'nova-2'`)
40
40
 
41
- **options.language?:** (`string`): Language code for transcription (Default: `'en'`)
41
+ **options.language** (`string`): Language code for transcription (Default: `'en'`)
42
42
 
43
43
  ## Usage Example
44
44
 
@@ -37,9 +37,9 @@ voice.off('writing', writingCallback)
37
37
 
38
38
  ## Parameters
39
39
 
40
- **event:** (`string`): Name of the event to stop listening for (e.g., 'speaking', 'writing', 'error')
40
+ **event** (`string`): Name of the event to stop listening for (e.g., 'speaking', 'writing', 'error')
41
41
 
42
- **callback:** (`function`): The same callback function that was passed to on()
42
+ **callback** (`function`): The same callback function that was passed to on()
43
43
 
44
44
  ## Return Value
45
45
 
@@ -48,9 +48,9 @@ voice.on('error', ({ message, code, details }) => {
48
48
 
49
49
  ## Parameters
50
50
 
51
- **event:** (`string`): Name of the event to listen for. See the \[Voice Events]\(./voice.events) documentation for a list of available events.
51
+ **event** (`string`): Name of the event to listen for. See the \[Voice Events]\(./voice.events) documentation for a list of available events.
52
52
 
53
- **callback:** (`function`): Callback function that will be called when the event occurs. The callback signature depends on the specific event.
53
+ **callback** (`function`): Callback function that will be called when the event occurs. The callback signature depends on the specific event.
54
54
 
55
55
  ## Return Value
56
56
 
@@ -48,7 +48,7 @@ await voice.send(audioBuffer)
48
48
 
49
49
  ## Parameters
50
50
 
51
- **audioData:** (`NodeJS.ReadableStream | Int16Array`): Audio data to send to the voice provider. Can be a readable stream (like a microphone stream) or an Int16Array of audio samples.
51
+ **audioData** (`NodeJS.ReadableStream | Int16Array`): Audio data to send to the voice provider. Can be a readable stream (like a microphone stream) or an Int16Array of audio samples.
52
52
 
53
53
  ## Return Value
54
54
 
@@ -4,11 +4,11 @@ The `speak()` method is a core function available in all Mastra voice providers
4
4
 
5
5
  ## Parameters
6
6
 
7
- **input:** (`string | NodeJS.ReadableStream`): Text to convert to speech. Can be a string or a readable stream of text.
7
+ **input** (`string | NodeJS.ReadableStream`): Text to convert to speech. Can be a string or a readable stream of text.
8
8
 
9
- **options?:** (`object`): Options for speech synthesis
9
+ **options** (`object`): Options for speech synthesis
10
10
 
11
- **options.speaker?:** (`string`): Voice ID to use for this specific request. Overrides the default speaker set in the constructor.
11
+ **options.speaker** (`string`): Voice ID to use for this specific request. Overrides the default speaker set in the constructor.
12
12
 
13
13
  ## Return Value
14
14
 
@@ -23,27 +23,27 @@ Each voice provider may support additional options specific to their implementat
23
23
 
24
24
  ### OpenAI
25
25
 
26
- **options.speed?:** (`number`): Speech speed multiplier. Values between 0.25 and 4.0 are supported. (Default: `1.0`)
26
+ **options.speed** (`number`): Speech speed multiplier. Values between 0.25 and 4.0 are supported. (Default: `1.0`)
27
27
 
28
28
  ### ElevenLabs
29
29
 
30
- **options.stability?:** (`number`): Voice stability. Higher values result in more stable, less expressive speech. (Default: `0.5`)
30
+ **options.stability** (`number`): Voice stability. Higher values result in more stable, less expressive speech. (Default: `0.5`)
31
31
 
32
- **options.similarity\_boost?:** (`number`): Voice clarity and similarity to the original voice. (Default: `0.75`)
32
+ **options.similarity\_boost** (`number`): Voice clarity and similarity to the original voice. (Default: `0.75`)
33
33
 
34
34
  ### Google
35
35
 
36
- **options.languageCode?:** (`string`): Language code for the voice (e.g., 'en-US').
36
+ **options.languageCode** (`string`): Language code for the voice (e.g., 'en-US').
37
37
 
38
- **options.audioConfig?:** (`object`): Audio configuration options from Google Cloud Text-to-Speech API. (Default: `{ audioEncoding: 'LINEAR16' }`)
38
+ **options.audioConfig** (`object`): Audio configuration options from Google Cloud Text-to-Speech API. (Default: `{ audioEncoding: 'LINEAR16' }`)
39
39
 
40
40
  ### Murf
41
41
 
42
- **options.properties.rate?:** (`number`): Speech rate multiplier.
42
+ **options.properties.rate** (`number`): Speech rate multiplier.
43
43
 
44
- **options.properties.pitch?:** (`number`): Voice pitch adjustment.
44
+ **options.properties.pitch** (`number`): Voice pitch adjustment.
45
45
 
46
- **options.properties.format?:** (`'MP3' | 'WAV' | 'FLAC' | 'ALAW' | 'ULAW'`): Output audio format.
46
+ **options.properties.format** (`'MP3' | 'WAV' | 'FLAC' | 'ALAW' | 'ULAW'`): Output audio format.
47
47
 
48
48
  ## Usage Example
49
49
 
@@ -35,7 +35,7 @@ await voice.speak('Hello with my new voice!')
35
35
 
36
36
  ## Parameters
37
37
 
38
- **options:** (`Record<string, unknown>`): Configuration options to update. The specific properties depend on the voice provider.
38
+ **options** (`Record<string, unknown>`): Configuration options to update. The specific properties depend on the voice provider.
39
39
 
40
40
  ## Return Value
41
41
 
@@ -47,9 +47,9 @@ Different voice providers support different configuration options:
47
47
 
48
48
  ### OpenAI Realtime
49
49
 
50
- **voice?:** (`string`): Voice ID to use for speech synthesis (e.g., 'alloy', 'echo', 'nova')
50
+ **voice** (`string`): Voice ID to use for speech synthesis (e.g., 'alloy', 'echo', 'nova')
51
51
 
52
- **turn\_detection?:** (`{ type: string, threshold?: number, silence_duration_ms?: number }`): Configuration for detecting when a user has finished speaking
52
+ **turn\_detection** (`{ type: string, threshold?: number, silence_duration_ms?: number }`): Configuration for detecting when a user has finished speaking
53
53
 
54
54
  ## Notes
55
55
 
@@ -15,11 +15,11 @@ await run.cancel()
15
15
 
16
16
  ## Parameters
17
17
 
18
- **No parameters:** (`void`): This method takes no parameters
18
+ **No parameters** (`void`): This method takes no parameters
19
19
 
20
20
  ## Returns
21
21
 
22
- **result:** (`Promise<{ message: string }>`): A promise that resolves with { message: 'Workflow run canceled' } when cancellation succeeds
22
+ **result** (`Promise<{ message: string }>`): A promise that resolves with { message: 'Workflow run canceled' } when cancellation succeeds
23
23
 
24
24
  ## How cancellation works
25
25
 
@@ -14,17 +14,29 @@ const restartedResult = await run.restart()
14
14
 
15
15
  ## Parameters
16
16
 
17
- **requestContext?:** (`RequestContext`): Request Context data to use when resuming
17
+ **requestContext** (`RequestContext`): Request Context data to use when resuming
18
18
 
19
- **tracingContext?:** (`TracingContext`): currentSpan?:SpanCurrent span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
19
+ **tracingContext** (`TracingContext`): Tracing context for creating child spans and adding metadata. Automatically injected when using Mastra's tracing system.
20
20
 
21
- **tracingOptions?:** (`TracingOptions`): metadata?:Record\<string, any>Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.requestContextKeys?:string\[]Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.parentSpanId?:stringParent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.tags?:string\[]Tags to apply to this trace. String labels for categorizing and filtering traces.
21
+ **tracingContext.currentSpan** (`Span`): Current span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
22
+
23
+ **tracingOptions** (`TracingOptions`): Options for Tracing configuration.
24
+
25
+ **tracingOptions.metadata** (`Record<string, any>`): Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.
26
+
27
+ **tracingOptions.requestContextKeys** (`string[]`): Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').
28
+
29
+ **tracingOptions.traceId** (`string`): Trace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
30
+
31
+ **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
32
+
33
+ **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
22
34
 
23
35
  ## Returns
24
36
 
25
- **result:** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
37
+ **result** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
26
38
 
27
- **traceId?:** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
39
+ **traceId** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
28
40
 
29
41
  ## Related
30
42
 
@@ -18,25 +18,39 @@ if (result.status === 'suspended') {
18
18
 
19
19
  ## Parameters
20
20
 
21
- **resumeData?:** (`z.infer<TResumeSchema>`): Data for resuming the suspended step
21
+ **resumeData** (`z.infer<TResumeSchema>`): Data for resuming the suspended step
22
22
 
23
- **step?:** (`Step<string, any, any, TResumeSchema, any, TEngineType> | [...Step<string, any, any, any, any, TEngineType>[], Step<string, any, any, TResumeSchema, any, TEngineType>] | string | string[]`): The step(s) to resume execution from. Can be a Step instance, array of Steps, step ID string, or array of step ID strings
23
+ **step** (`Step<string, any, any, TResumeSchema, any, TEngineType> | [...Step<string, any, any, any, any, TEngineType>[], Step<string, any, any, TResumeSchema, any, TEngineType>] | string | string[]`): The step(s) to resume execution from. Can be a Step instance, array of Steps, step ID string, or array of step ID strings
24
24
 
25
- **requestContext?:** (`RequestContext`): Request Context data to use when resuming
25
+ **requestContext** (`RequestContext`): Request Context data to use when resuming
26
26
 
27
- **retryCount?:** (`number`): Optional retry count for nested workflow execution
27
+ **retryCount** (`number`): Optional retry count for nested workflow execution
28
28
 
29
- **tracingContext?:** (`TracingContext`): currentSpan?:SpanCurrent span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
29
+ **tracingContext** (`TracingContext`): Tracing context for creating child spans and adding metadata. Automatically injected when using Mastra's tracing system.
30
30
 
31
- **tracingOptions?:** (`TracingOptions`): metadata?:Record\<string, any>Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.requestContextKeys?:string\[]Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.parentSpanId?:stringParent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.tags?:string\[]Tags to apply to this trace. String labels for categorizing and filtering traces.
31
+ **tracingContext.currentSpan** (`Span`): Current span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
32
32
 
33
- **outputOptions?:** (`OutputOptions`): includeState?:booleanWhether to include the workflow run state in the result.
33
+ **tracingOptions** (`TracingOptions`): Options for Tracing configuration.
34
+
35
+ **tracingOptions.metadata** (`Record<string, any>`): Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.
36
+
37
+ **tracingOptions.requestContextKeys** (`string[]`): Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').
38
+
39
+ **tracingOptions.traceId** (`string`): Trace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
40
+
41
+ **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
42
+
43
+ **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
44
+
45
+ **outputOptions** (`OutputOptions`): Options for output configuration.
46
+
47
+ **outputOptions.includeState** (`boolean`): Whether to include the workflow run state in the result.
34
48
 
35
49
  ## Returns
36
50
 
37
- **result:** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
51
+ **result** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
38
52
 
39
- **traceId?:** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
53
+ **traceId** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
40
54
 
41
55
  ## Extended usage example
42
56
 
@@ -16,23 +16,37 @@ const result = await run.start({
16
16
 
17
17
  ## Parameters
18
18
 
19
- **inputData?:** (`z.infer<TInput>`): Input data that matches the workflow's input schema
19
+ **inputData** (`z.infer<TInput>`): Input data that matches the workflow's input schema
20
20
 
21
- **requestContext?:** (`RequestContext`): Request Context data to use during workflow execution
21
+ **requestContext** (`RequestContext`): Request Context data to use during workflow execution
22
22
 
23
- **outputWriter?:** (`(chunk: TOutput) => Promise<void>`): Optional asynchronous function to handle output chunks as they are produced
23
+ **outputWriter** (`(chunk: TOutput) => Promise<void>`): Optional asynchronous function to handle output chunks as they are produced
24
24
 
25
- **tracingContext?:** (`TracingContext`): currentSpan?:SpanCurrent span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
25
+ **tracingContext** (`TracingContext`): Tracing context for creating child spans and adding metadata. Automatically injected when using Mastra's tracing system.
26
26
 
27
- **tracingOptions?:** (`TracingOptions`): metadata?:Record\<string, any>Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.requestContextKeys?:string\[]Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.parentSpanId?:stringParent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.tags?:string\[]Tags to apply to this trace. String labels for categorizing and filtering traces.
27
+ **tracingContext.currentSpan** (`Span`): Current span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
28
28
 
29
- **outputOptions?:** (`OutputOptions`): includeState?:booleanWhether to include the workflow run state in the result.
29
+ **tracingOptions** (`TracingOptions`): Options for Tracing configuration.
30
+
31
+ **tracingOptions.metadata** (`Record<string, any>`): Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.
32
+
33
+ **tracingOptions.requestContextKeys** (`string[]`): Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').
34
+
35
+ **tracingOptions.traceId** (`string`): Trace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
36
+
37
+ **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
38
+
39
+ **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
40
+
41
+ **outputOptions** (`OutputOptions`): Options for output configuration.
42
+
43
+ **outputOptions.includeState** (`boolean`): Whether to include the workflow run state in the result.
30
44
 
31
45
  ## Returns
32
46
 
33
- **result:** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
47
+ **result** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
34
48
 
35
- **traceId?:** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
49
+ **traceId** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
36
50
 
37
51
  ## Extended usage example
38
52
 
@@ -20,19 +20,25 @@ const result = await workflow.getWorkflowRunExecutionResult(runId)
20
20
 
21
21
  ## Parameters
22
22
 
23
- **inputData?:** (`z.infer<TInput>`): Input data that matches the workflow's input schema
23
+ **inputData** (`z.infer<TInput>`): Input data that matches the workflow's input schema
24
24
 
25
- **requestContext?:** (`RequestContext`): Request Context data to use during workflow execution
25
+ **requestContext** (`RequestContext`): Request Context data to use during workflow execution
26
26
 
27
- **initialState?:** (`z.infer<TState>`): Initial state to use for the workflow execution
27
+ **initialState** (`z.infer<TState>`): Initial state to use for the workflow execution
28
28
 
29
- **tracingOptions?:** (`TracingOptions`): metadata?:Record\<string, any>Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
29
+ **tracingOptions** (`TracingOptions`): Options for Tracing configuration.
30
30
 
31
- **outputOptions?:** (`OutputOptions`): includeState?:booleanWhether to include the workflow run state in the result.
31
+ **tracingOptions.metadata** (`Record<string, any>`): Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.
32
+
33
+ **tracingOptions.traceId** (`string`): Trace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
34
+
35
+ **outputOptions** (`OutputOptions`): Options for output configuration.
36
+
37
+ **outputOptions.includeState** (`boolean`): Whether to include the workflow run state in the result.
32
38
 
33
39
  ## Returns
34
40
 
35
- **runId:** (`string`): The unique identifier for this workflow run. Use this to check status or retrieve results later.
41
+ **runId** (`string`): The unique identifier for this workflow run. Use this to check status or retrieve results later.
36
42
 
37
43
  ## When to use startAsync()
38
44
 
@@ -15,33 +15,49 @@ const result = await run.timeTravel({
15
15
 
16
16
  ## Parameters
17
17
 
18
- **step:** (`Step<string, any, TInputSchema, any, any, any, TEngineType> | [...Step<string, any, any, any, any, any, TEngineType>[], Step<string, any, TInputSchema, any, any, any, TEngineType>] | string | string[]`): The target step to start execution from. It can be a Step instance, array of Steps (for nested workflows), step ID string, or array of step ID strings. Use dot notation or arrays for nested workflow steps (e.g., 'nestedWorkflow\.step3' or \['nestedWorkflow', 'step3'])
18
+ **step** (`Step<string, any, TInputSchema, any, any, any, TEngineType> | [...Step<string, any, any, any, any, any, TEngineType>[], Step<string, any, TInputSchema, any, any, any, TEngineType>] | string | string[]`): The target step to start execution from. It can be a Step instance, array of Steps (for nested workflows), step ID string, or array of step ID strings. Use dot notation or arrays for nested workflow steps (e.g., 'nestedWorkflow\.step3' or \['nestedWorkflow', 'step3'])
19
19
 
20
- **inputData?:** (`z.infer<TInputSchema>`): Input data for the target step. Must match the step's input schema. If not provided, uses data from the workflow snapshot
20
+ **inputData** (`z.infer<TInputSchema>`): Input data for the target step. Must match the step's input schema. If not provided, uses data from the workflow snapshot
21
21
 
22
- **resumeData?:** (`any`): Resume data to provide if the workflow was previously suspended
22
+ **resumeData** (`any`): Resume data to provide if the workflow was previously suspended
23
23
 
24
- **initialState?:** (`z.infer<TState>`): Initial state to set for the workflow run. Used to set workflow-level state before execution
24
+ **initialState** (`z.infer<TState>`): Initial state to set for the workflow run. Used to set workflow-level state before execution
25
25
 
26
- **context?:** (`TimeTravelContext<any, any, any, any>`): Execution context containing step results for steps before the target step. Each key is a step ID with a StepResult object containing status, payload, output, startedAt, endedAt, suspendPayload, and resumePayload
26
+ **context** (`TimeTravelContext<any, any, any, any>`): Execution context containing step results for steps before the target step. Each key is a step ID with a StepResult object containing status, payload, output, startedAt, endedAt, suspendPayload, and resumePayload
27
27
 
28
- **nestedStepsContext?:** (`Record<string, TimeTravelContext<any, any, any, any>>`): Context for nested workflow steps. Keyed by nested workflow ID, each containing step results for that nested workflow
28
+ **nestedStepsContext** (`Record<string, TimeTravelContext<any, any, any, any>>`): Context for nested workflow steps. Keyed by nested workflow ID, each containing step results for that nested workflow
29
29
 
30
- **requestContext?:** (`RequestContext`): Request Context data to use during time travel execution
30
+ **requestContext** (`RequestContext`): Request Context data to use during time travel execution
31
31
 
32
- **outputWriter?:** (`(chunk: TOutput) => Promise<void>`): Optional asynchronous function to handle output chunks as they are produced
32
+ **outputWriter** (`(chunk: TOutput) => Promise<void>`): Optional asynchronous function to handle output chunks as they are produced
33
33
 
34
- **tracingContext?:** (`TracingContext`): currentSpan?:SpanCurrent span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
34
+ **tracingContext** (`TracingContext`): Tracing context for creating child spans and adding metadata. Automatically injected when using Mastra's tracing system.
35
35
 
36
- **tracingOptions?:** (`TracingOptions`): metadata?:Record\<string, any>Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.requestContextKeys?:string\[]Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.parentSpanId?:stringParent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.tags?:string\[]Tags to apply to this trace. String labels for categorizing and filtering traces.
36
+ **tracingContext.currentSpan** (`Span`): Current span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
37
37
 
38
- **outputOptions?:** (`OutputOptions`): includeState?:booleanWhether to include the workflow run state in the result.includeResumeLabels?:booleanWhether to include resume labels in the result.
38
+ **tracingOptions** (`TracingOptions`): Options for Tracing configuration.
39
+
40
+ **tracingOptions.metadata** (`Record<string, any>`): Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.
41
+
42
+ **tracingOptions.requestContextKeys** (`string[]`): Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').
43
+
44
+ **tracingOptions.traceId** (`string`): Trace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
45
+
46
+ **tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
47
+
48
+ **tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
49
+
50
+ **outputOptions** (`OutputOptions`): Options for output configuration.
51
+
52
+ **outputOptions.includeState** (`boolean`): Whether to include the workflow run state in the result.
53
+
54
+ **outputOptions.includeResumeLabels** (`boolean`): Whether to include resume labels in the result.
39
55
 
40
56
  ## Returns
41
57
 
42
- **result:** (`Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
58
+ **result** (`Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>`): A promise that resolves to the workflow execution result containing step outputs and status
43
59
 
44
- **traceId?:** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
60
+ **traceId** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
45
61
 
46
62
  ## Extended usage examples
47
63
 
@@ -20,33 +20,33 @@ if (result.status === 'suspended') {
20
20
 
21
21
  ## Run Methods
22
22
 
23
- **start:** (`(options?: StartOptions) => Promise<WorkflowResult>`): Starts workflow execution with input data
23
+ **start** (`(options?: StartOptions) => Promise<WorkflowResult>`): Starts workflow execution with input data
24
24
 
25
- **resume:** (`(options?: ResumeOptions) => Promise<WorkflowResult>`): Resumes a suspended workflow from a specific step
25
+ **resume** (`(options?: ResumeOptions) => Promise<WorkflowResult>`): Resumes a suspended workflow from a specific step
26
26
 
27
- **stream:** (`(options?: StreamOptions) => MastraWorkflowStream`): Monitors workflow execution as a stream of events with enhanced streaming features
27
+ **stream** (`(options?: StreamOptions) => MastraWorkflowStream`): Monitors workflow execution as a stream of events with enhanced streaming features
28
28
 
29
- **resumeStream:** (`(options?: ResumeStreamOptions) => MastraWorkflowStream`): Resumes a suspended workflow with streaming support
29
+ **resumeStream** (`(options?: ResumeStreamOptions) => MastraWorkflowStream`): Resumes a suspended workflow with streaming support
30
30
 
31
- **cancel:** (`() => Promise<{ message: string }>`): Cancels the workflow execution, stopping any running steps and preventing subsequent steps from executing
31
+ **cancel** (`() => Promise<{ message: string }>`): Cancels the workflow execution, stopping any running steps and preventing subsequent steps from executing
32
32
 
33
- **restart:** (`(options?: RestartOptions) => Promise<WorkflowResult>`): Restarts the workflow execution from last active step
33
+ **restart** (`(options?: RestartOptions) => Promise<WorkflowResult>`): Restarts the workflow execution from last active step
34
34
 
35
- **timeTravel:** (`(options?: TimeTravelOptions) => Promise<WorkflowResult>`): Re-executes a workflow starting from any specific step, using either stored snapshot data or custom context you provide.
35
+ **timeTravel** (`(options?: TimeTravelOptions) => Promise<WorkflowResult>`): Re-executes a workflow starting from any specific step, using either stored snapshot data or custom context you provide.
36
36
 
37
- **timeTravelStream:** (`(options?: TimeTravelOptions) => MastraWorkflowStream`): Time travels a workflow execution with streaming support
37
+ **timeTravelStream** (`(options?: TimeTravelOptions) => MastraWorkflowStream`): Time travels a workflow execution with streaming support
38
38
 
39
39
  ## Run Status
40
40
 
41
41
  A workflow run's `status` indicates its current execution state. The possible values are:
42
42
 
43
- **success:** (`string`): All steps finished executing successfully, with a valid result output
43
+ **success** (`string`): All steps finished executing successfully, with a valid result output
44
44
 
45
- **failed:** (`string`): Workflow execution encountered an error during execution, with error details available
45
+ **failed** (`string`): Workflow execution encountered an error during execution, with error details available
46
46
 
47
- **suspended:** (`string`): Workflow execution is paused waiting for resume, with suspended step information
47
+ **suspended** (`string`): Workflow execution is paused waiting for resume, with suspended step information
48
48
 
49
- **canceled:** (`string`): Workflow execution was canceled via the cancel() method, stopping any running steps and preventing subsequent steps from executing
49
+ **canceled** (`string`): Workflow execution was canceled via the cancel() method, stopping any running steps and preventing subsequent steps from executing
50
50
 
51
51
  ## Related
52
52
 
@@ -60,57 +60,55 @@ const agentStep = createStep(testAgent, {
60
60
 
61
61
  ### Agent step options
62
62
 
63
- **structuredOutput:** (`{ schema: z.ZodType<any> }`): When provided, the agent returns structured data matching this schema instead of plain text. The step's outputSchema is set to the provided schema.
63
+ **structuredOutput** (`{ schema: z.ZodType<any> }`): When provided, the agent returns structured data matching this schema instead of plain text. The step's outputSchema is set to the provided schema.
64
64
 
65
- **onFinish:** (`(result: AgentResult) => void`): Callback invoked when the agent completes generation.
65
+ **onFinish** (`(result: AgentResult) => void`): Callback invoked when the agent completes generation.
66
66
 
67
67
  ## Constructor Parameters
68
68
 
69
- **id:** (`string`): Unique identifier for the step
69
+ **id** (`string`): Unique identifier for the step
70
70
 
71
- **description:** (`string`): Optional description of what the step does
71
+ **description** (`string`): Optional description of what the step does
72
72
 
73
- **inputSchema:** (`z.ZodType<any>`): Zod schema defining the input structure
73
+ **inputSchema** (`z.ZodType<any>`): Zod schema defining the input structure
74
74
 
75
- **outputSchema:** (`z.ZodType<any>`): Zod schema defining the output structure
75
+ **outputSchema** (`z.ZodType<any>`): Zod schema defining the output structure
76
76
 
77
- **resumeSchema:** (`z.ZodType<any>`): Optional Zod schema for resuming the step
77
+ **resumeSchema** (`z.ZodType<any>`): Optional Zod schema for resuming the step
78
78
 
79
- **suspendSchema:** (`z.ZodType<any>`): Optional Zod schema for suspending the step
79
+ **suspendSchema** (`z.ZodType<any>`): Optional Zod schema for suspending the step
80
80
 
81
- **stateSchema:** (`z.ZodObject<any>`): Optional Zod schema for the step state. Automatically injected when using Mastra's state system. The stateSchema must be a subset of the workflow's stateSchema. If not specified, type is 'any'.
81
+ **stateSchema** (`z.ZodObject<any>`): Optional Zod schema for the step state. Automatically injected when using Mastra's state system. The stateSchema must be a subset of the workflow's stateSchema. If not specified, type is 'any'.
82
82
 
83
- **requestContextSchema:** (`z.ZodType<any>`): Zod schema for validating request context values. When provided, the context is validated before the step's execute() runs, failing the step if validation fails.
83
+ **requestContextSchema** (`z.ZodType<any>`): Zod schema for validating request context values. When provided, the context is validated before the step's execute() runs, failing the step if validation fails.
84
84
 
85
- **execute:** (`(params: ExecuteParams) => Promise<any>`): Async function containing step logic
85
+ **execute** (`(params: ExecuteParams) => Promise<any>`): Async function containing step logic
86
86
 
87
- **metadata:** (`Record<string, any>`): Optional key-value pairs for storing additional step information. Values must be serializable (no functions, circular references, etc.).
87
+ **execute.inputData** (`z.infer<TStepInput>`): The input data matching the inputSchema
88
88
 
89
- ### ExecuteParams
89
+ **execute.resumeData** (`z.infer<TResumeSchema>`): The resume data matching the resumeSchema, when resuming the step from a suspended state. Only exists if the step is being resumed.
90
90
 
91
- **inputData:** (`z.infer<TStepInput>`): The input data matching the inputSchema
91
+ **execute.suspendData** (`z.infer<TSuspendSchema>`): The suspend data that was originally passed to suspend() when the step was suspended. Only exists if the step is being resumed and was previously suspended with data.
92
92
 
93
- **resumeData:** (`z.infer<TResumeSchema>`): The resume data matching the resumeSchema, when resuming the step from a suspended state. Only exists if the step is being resumed.
93
+ **execute.mastra** (`Mastra`): Access to Mastra services (agents, tools, etc.)
94
94
 
95
- **suspendData:** (`z.infer<TSuspendSchema>`): The suspend data that was originally passed to suspend() when the step was suspended. Only exists if the step is being resumed and was previously suspended with data.
95
+ **execute.getStepResult** (`(step: Step | string) => any`): Function to access results from other steps
96
96
 
97
- **mastra:** (`Mastra`): Access to Mastra services (agents, tools, etc.)
97
+ **execute.getInitData** (`() => any`): Function to access the initial input data of the workflow in any step
98
98
 
99
- **getStepResult:** (`(step: Step | string) => any`): Function to access results from other steps
99
+ **execute.suspend** (`(suspendPayload: any, suspendOptions?: { resumeLabel?: string }) => Promise<void>`): Function to pause workflow execution
100
100
 
101
- **getInitData:** (`() => any`): Function to access the initial input data of the workflow in any step
101
+ **execute.state** (`z.infer<TState>`): The current workflow state. Contains shared values that persist across all steps and suspend/resume cycles. The structure is defined by the step's stateSchema.
102
102
 
103
- **suspend:** (`(suspendPayload: any, suspendOptions?: { resumeLabel?: string }) => Promise<void>`): Function to pause workflow execution
103
+ **execute.setState** (`(state: z.infer<TState>) => void`): Function to set the state of the workflow. Inject via reducer-like pattern, such as 'setState({ ...state, ...newState })'
104
104
 
105
- **state:** (`z.infer<TState>`): The current workflow state. Contains shared values that persist across all steps and suspend/resume cycles. The structure is defined by the step's stateSchema.
105
+ **execute.runId** (`string`): Current run id
106
106
 
107
- **setState:** (`(state: z.infer<TState>) => void`): Function to set the state of the workflow. Inject via reducer-like pattern, such as 'setState({ ...state, ...newState })'
107
+ **execute.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
108
108
 
109
- **runId:** (`string`): Current run id
109
+ **execute.retryCount** (`number`): The retry count for this specific step, it automatically increases each time the step is retried
110
110
 
111
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information.
112
-
113
- **retryCount?:** (`number`): The retry count for this specific step, it automatically increases each time the step is retried
111
+ **metadata** (`Record<string, any>`): Optional key-value pairs for storing additional step information. Values must be serializable (no functions, circular references, etc.).
114
112
 
115
113
  ## Related
116
114
 
@@ -13,11 +13,11 @@ workflow.branch([
13
13
 
14
14
  ## Parameters
15
15
 
16
- **steps:** (`[() => boolean, Step]`): An array of tuples, each containing a condition function and a step to execute if the condition is true
16
+ **steps** (`[() => boolean, Step]`): An array of tuples, each containing a condition function and a step to execute if the condition is true
17
17
 
18
18
  ## Returns
19
19
 
20
- **workflow:** (`NewWorkflow`): The workflow instance for method chaining
20
+ **workflow** (`NewWorkflow`): The workflow instance for method chaining
21
21
 
22
22
  ## Related
23
23
 
@@ -10,7 +10,7 @@ workflow.then(step1).commit()
10
10
 
11
11
  ## Returns
12
12
 
13
- **workflow:** (`Workflow`): The workflow instance for method chaining
13
+ **workflow** (`Workflow`): The workflow instance for method chaining
14
14
 
15
15
  ## Related
16
16
 
@@ -10,15 +10,15 @@ await workflow.createRun()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **runId?:** (`string`): Optional custom identifier for the workflow run
13
+ **runId** (`string`): Optional custom identifier for the workflow run
14
14
 
15
- **resourceId?:** (`string`): Optional identifier to associate the workflow run with a specific resource (e.g., user ID, tenant ID). This value is persisted with the workflow run and can be used for filtering and querying runs.
15
+ **resourceId** (`string`): Optional identifier to associate the workflow run with a specific resource (e.g., user ID, tenant ID). This value is persisted with the workflow run and can be used for filtering and querying runs.
16
16
 
17
- **disableScorers?:** (`boolean`): Optional flag to disable scorers for this workflow run
17
+ **disableScorers** (`boolean`): Optional flag to disable scorers for this workflow run
18
18
 
19
19
  ## Returns
20
20
 
21
- **run:** (`Run`): A new workflow run instance that can be used to execute the workflow
21
+ **run** (`Run`): A new workflow run instance that can be used to execute the workflow
22
22
 
23
23
  ## Extended usage example
24
24
 
@@ -10,13 +10,13 @@ workflow.dountil(step1, async ({ inputData }) => true)
10
10
 
11
11
  ## Parameters
12
12
 
13
- **step:** (`Step`): The step instance to execute in the loop
13
+ **step** (`Step`): The step instance to execute in the loop
14
14
 
15
- **condition:** (`(params : ExecuteParams & { iterationCount: number }) => Promise<boolean>`): A function that returns a boolean indicating whether to continue the loop. The function receives the execution parameters and the iteration count.
15
+ **condition** (`(params : ExecuteParams & { iterationCount: number }) => Promise<boolean>`): A function that returns a boolean indicating whether to continue the loop. The function receives the execution parameters and the iteration count.
16
16
 
17
17
  ## Returns
18
18
 
19
- **workflow:** (`Workflow`): The workflow instance for method chaining
19
+ **workflow** (`Workflow`): The workflow instance for method chaining
20
20
 
21
21
  ## Related
22
22