@mastra/mcp-docs-server 1.2.13-alpha.1 → 1.2.13-alpha.11

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 (128) hide show
  1. package/.docs/docs/agents/agent-approval.md +2 -2
  2. package/.docs/docs/agents/overview.md +1 -1
  3. package/.docs/docs/agents/supervisor-agents.md +2 -2
  4. package/.docs/docs/agents/using-tools.md +29 -0
  5. package/.docs/docs/{evals/datasets → datasets}/overview.md +3 -3
  6. package/.docs/docs/{evals/datasets → datasets}/running-experiments.md +27 -3
  7. package/.docs/docs/deployment/workers.md +14 -14
  8. package/.docs/docs/editor/overview.md +201 -206
  9. package/.docs/docs/evals/evals-with-memory.md +1 -1
  10. package/.docs/docs/getting-started/develop.md +196 -0
  11. package/.docs/docs/index.md +78 -1
  12. package/.docs/docs/long-running-agents/durable-agents.md +2 -2
  13. package/.docs/docs/mastra-platform/overview.md +1 -1
  14. package/.docs/docs/mastra-platform/workspaces.md +152 -0
  15. package/.docs/docs/memory/observational-memory.md +53 -13
  16. package/.docs/docs/memory/overview.md +14 -0
  17. package/.docs/docs/server/auth/workers.md +7 -5
  18. package/.docs/docs/server/mastra-client.md +60 -0
  19. package/.docs/docs/server/pubsub.md +2 -2
  20. package/.docs/docs/studio/observability.md +4 -0
  21. package/.docs/docs/studio/overview.md +2 -2
  22. package/.docs/docs/workflows/overview.md +1 -1
  23. package/.docs/docs/workflows/scheduled-workflows.md +1 -0
  24. package/.docs/docs/workspace/search.md +1 -1
  25. package/.docs/guides/deployment/kubernetes.md +2 -0
  26. package/.docs/guides/deployment/mastra-workers.md +350 -6
  27. package/.docs/guides/deployment/vercel.md +2 -0
  28. package/.docs/guides/getting-started/quickstart.md +3 -3
  29. package/.docs/{docs → guides}/rag/chunking-and-embedding.md +1 -1
  30. package/.docs/{docs → guides}/rag/graph-rag.md +1 -1
  31. package/.docs/{docs → guides}/rag/overview.md +2 -2
  32. package/.docs/{docs → guides}/rag/retrieval.md +1 -1
  33. package/.docs/{docs → guides}/voice/overview.md +4 -4
  34. package/.docs/{docs → guides}/voice/realtime-voice.md +2 -2
  35. package/.docs/{docs → guides}/voice/speech-to-speech.md +1 -1
  36. package/.docs/{docs → guides}/voice/speech-to-text.md +1 -1
  37. package/.docs/{docs → guides}/voice/text-to-speech.md +2 -2
  38. package/.docs/models/embeddings.md +63 -65
  39. package/.docs/models/environment-variables.md +1 -1
  40. package/.docs/models/gateways/openrouter.md +3 -6
  41. package/.docs/models/gateways/vercel.md +4 -1
  42. package/.docs/models/index.md +1 -1
  43. package/.docs/models/providers/crof.md +2 -1
  44. package/.docs/models/providers/crossmodel.md +4 -3
  45. package/.docs/models/providers/empiriolabs.md +2 -1
  46. package/.docs/models/providers/huggingface.md +3 -1
  47. package/.docs/models/providers/hyper.md +10 -7
  48. package/.docs/models/providers/llmgateway.md +5 -4
  49. package/.docs/models/providers/minimax.md +1 -1
  50. package/.docs/models/providers/neuralwatt.md +3 -1
  51. package/.docs/models/providers/openai.md +2 -2
  52. package/.docs/models/providers/opencode-go.md +2 -1
  53. package/.docs/models/providers/opencode.md +1 -1
  54. package/.docs/models/providers/perplexity-agent.md +3 -1
  55. package/.docs/models/providers/scaleway.md +1 -3
  56. package/.docs/models/providers/the-grid-ai.md +3 -3
  57. package/.docs/models/providers/zai-coding-plan.md +11 -13
  58. package/.docs/models/providers/zhipuai-coding-plan.md +12 -12
  59. package/.docs/reference/agents/agent.md +1 -1
  60. package/.docs/reference/agents/durable-agent.md +12 -1
  61. package/.docs/reference/agents/generate.md +1 -1
  62. package/.docs/reference/agents/getVoice.md +1 -1
  63. package/.docs/{docs/getting-started → reference}/build-with-ai.md +5 -110
  64. package/.docs/reference/cli/create-mastra.md +2 -0
  65. package/.docs/reference/cli/mastra.md +36 -16
  66. package/.docs/reference/client-js/agents.md +1 -1
  67. package/.docs/reference/configuration.md +2 -2
  68. package/.docs/reference/core/getEditor.md +1 -1
  69. package/.docs/reference/core/getVector.md +2 -2
  70. package/.docs/reference/core/listVectors.md +2 -2
  71. package/.docs/reference/core/mastra-class.md +2 -2
  72. package/.docs/reference/datasets/startExperiment.md +6 -0
  73. package/.docs/reference/datasets/startExperimentAsync.md +4 -0
  74. package/.docs/reference/editor/browser-provider.md +2 -2
  75. package/.docs/reference/editor/filesystem-provider.md +1 -1
  76. package/.docs/reference/editor/mastra-editor.md +31 -18
  77. package/.docs/reference/editor/prompt-blocks.md +137 -0
  78. package/.docs/reference/editor/sandbox-provider.md +1 -1
  79. package/.docs/reference/editor/storage-browser-ref.md +3 -3
  80. package/.docs/reference/editor/storage-workspace-ref.md +3 -3
  81. package/.docs/reference/editor/tool-provider.md +44 -10
  82. package/.docs/reference/editor/tools.md +100 -0
  83. package/.docs/reference/editor/versioning.md +130 -0
  84. package/.docs/reference/evals/mastra-scorer.md +68 -8
  85. package/.docs/reference/evals/summarization.md +203 -0
  86. package/.docs/reference/file-based-agents/config.md +39 -1
  87. package/.docs/reference/index.md +4 -4
  88. package/.docs/reference/memory/observational-memory.md +76 -24
  89. package/.docs/reference/memory/serialized-memory-config.md +3 -3
  90. package/.docs/reference/observability/tracing/interfaces.md +6 -1
  91. package/.docs/reference/processors/processor-interface.md +14 -2
  92. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  93. package/.docs/reference/processors/token-limiter-processor.md +15 -1
  94. package/.docs/reference/project-structure.md +1 -1
  95. package/.docs/reference/rag/database-config.md +1 -1
  96. package/.docs/reference/storage/composite.md +2 -0
  97. package/.docs/reference/streaming/agents/stream.md +1 -1
  98. package/.docs/reference/tools/isolated-vm-transport.md +1 -1
  99. package/.docs/reference/vectors/mongodb.md +13 -13
  100. package/.docs/reference/voice/livekit.md +3 -3
  101. package/.docs/reference/workers/overview.md +10 -8
  102. package/.docs/reference/workspace/platform-filesystem.md +8 -5
  103. package/.docs/reference/workspace/platform-sandbox.md +83 -7
  104. package/CHANGELOG.md +44 -0
  105. package/README.md +1 -1
  106. package/package.json +5 -5
  107. package/.docs/docs/agent-builder/access-control.md +0 -99
  108. package/.docs/docs/agent-builder/browser.md +0 -63
  109. package/.docs/docs/agent-builder/channels.md +0 -78
  110. package/.docs/docs/agent-builder/configuration.md +0 -132
  111. package/.docs/docs/agent-builder/deploying.md +0 -124
  112. package/.docs/docs/agent-builder/integrations.md +0 -115
  113. package/.docs/docs/agent-builder/memory.md +0 -69
  114. package/.docs/docs/agent-builder/model-policy.md +0 -50
  115. package/.docs/docs/agent-builder/overview.md +0 -114
  116. package/.docs/docs/agent-builder/skill-registries.md +0 -31
  117. package/.docs/docs/agent-builder/workspace.md +0 -62
  118. package/.docs/docs/editor/prompts.md +0 -140
  119. package/.docs/docs/editor/tools.md +0 -148
  120. package/.docs/docs/getting-started/file-based-agents.md +0 -121
  121. package/.docs/docs/mastra-platform/workspace.md +0 -111
  122. package/.docs/docs/what-is-mastra.md +0 -161
  123. package/.docs/reference/client-js/agent-builder.md +0 -163
  124. package/.docs/reference/editor/agent-builder/agent-builder-options.md +0 -76
  125. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +0 -79
  126. package/.docs/reference/editor/agent-builder/builder-models.md +0 -66
  127. /package/.docs/{docs → guides}/getting-started/manual-install.md +0 -0
  128. /package/.docs/{docs → guides}/rag/vector-databases.md +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![LLM Gateway logo](https://models.dev/logos/llmgateway.svg)LLM Gateway
4
4
 
5
- Access 186 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
5
+ Access 187 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
8
8
 
@@ -119,9 +119,9 @@ for await (const chunk of stream) {
119
119
  | `llmgateway/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
120
120
  | `llmgateway/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
121
121
  | `llmgateway/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
122
- | `llmgateway/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 |
122
+ | `llmgateway/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
123
123
  | `llmgateway/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
124
- | `llmgateway/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
124
+ | `llmgateway/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
125
125
  | `llmgateway/gpt-oss-120b` | 131K | | | | | | $0.03 | $0.14 |
126
126
  | `llmgateway/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.15 |
127
127
  | `llmgateway/grok-4` | 256K | | | | | | $3 | $15 |
@@ -136,6 +136,7 @@ for await (const chunk of stream) {
136
136
  | `llmgateway/grok-build-0-1` | 256K | | | | | | $1 | $2 |
137
137
  | `llmgateway/hermes-4-405b` | 131K | | | | | | $1 | $3 |
138
138
  | `llmgateway/hermes-4-70b` | 131K | | | | | | $0.13 | $0.40 |
139
+ | `llmgateway/hy3` | 262K | | | | | | $0.14 | $0.58 |
139
140
  | `llmgateway/kimi-k2` | 256K | | | | | | $0.57 | $2 |
140
141
  | `llmgateway/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
141
142
  | `llmgateway/kimi-k2.5` | 262K | | | | | | $0.41 | $2 |
@@ -207,7 +208,7 @@ for await (const chunk of stream) {
207
208
  | `llmgateway/qwen3-vl-plus` | 262K | | | | | | $0.20 | $2 |
208
209
  | `llmgateway/qwen3.5-9b` | 262K | | | | | | $0.10 | $0.15 |
209
210
  | `llmgateway/qwen3.6-35b-a3b` | 262K | | | | | | $0.25 | $1 |
210
- | `llmgateway/qwen3.6-flash` | 262K | | | | | | $0.15 | $0.90 |
211
+ | `llmgateway/qwen3.6-flash` | 1.0M | | | | | | $0.25 | $2 |
211
212
  | `llmgateway/qwen3.6-max-preview` | 262K | | | | | | $1 | $8 |
212
213
  | `llmgateway/qwen3.6-plus` | 262K | | | | | | $0.50 | $3 |
213
214
  | `llmgateway/qwen3.7-flash` | 1.0M | | | | | | $0.03 | $0.13 |
@@ -106,4 +106,4 @@ yarn add @ai-sdk/anthropic
106
106
  bun add @ai-sdk/anthropic
107
107
  ```
108
108
 
109
- For detailed provider-specific documentation, see the [AI SDK MiniMax (minimax.io) provider docs](https://ai-sdk.dev/providers/community-providers/minimax).
109
+ For detailed provider-specific documentation, see the [AI SDK MiniMax (minimax.io) provider docs](https://ai-sdk.dev/providers/ai-sdk-providers/minimax).
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Neuralwatt logo](https://models.dev/logos/neuralwatt.svg)Neuralwatt
4
4
 
5
- Access 18 Neuralwatt models through Mastra's model router. Authentication is handled automatically using the `NEURALWATT_API_KEY` environment variable.
5
+ Access 20 Neuralwatt models through Mastra's model router. Authentication is handled automatically using the `NEURALWATT_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Neuralwatt documentation](https://portal.neuralwatt.com/docs).
8
8
 
@@ -36,6 +36,8 @@ for await (const chunk of stream) {
36
36
 
37
37
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
38
  | --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `neuralwatt/deepseek-v4-flash` | 1.0M | | | | | | $0.10 | $0.21 |
40
+ | `neuralwatt/gemma-4-31b` | 262K | | | | | | $0.14 | $0.42 |
39
41
  | `neuralwatt/glm-5.2` | 1.0M | | | | | | $1 | $5 |
40
42
  | `neuralwatt/glm-5.2-fast` | 1.0M | | | | | | $1 | $5 |
41
43
  | `neuralwatt/glm-5.2-flex` | 1.0M | | | | | | $0.72 | $2 |
@@ -59,9 +59,9 @@ for await (const chunk of stream) {
59
59
  | `openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
60
60
  | `openai/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
61
61
  | `openai/gpt-5.6` | 1.1M | | | | | | $5 | $30 |
62
- | `openai/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 |
62
+ | `openai/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
63
63
  | `openai/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
64
- | `openai/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
64
+ | `openai/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
65
65
  | `openai/gpt-image-1-mini` | — | | | | | | — | — |
66
66
  | `openai/gpt-image-1.5` | — | | | | | | — | — |
67
67
  | `openai/gpt-image-2` | — | | | | | | $5 | $30 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![OpenCode Go logo](https://models.dev/logos/opencode-go.svg)OpenCode Go
4
4
 
5
- Access 22 OpenCode Go models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
5
+ Access 23 OpenCode Go models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [OpenCode Go documentation](https://opencode.ai/docs/zen).
8
8
 
@@ -40,6 +40,7 @@ for await (const chunk of stream) {
40
40
  | `opencode-go/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
41
41
  | `opencode-go/glm-5.1` | 203K | | | | | | $1 | $4 |
42
42
  | `opencode-go/glm-5.2` | 1.0M | | | | | | $1 | $4 |
43
+ | `opencode-go/gpt-5.6-luna` | 1.1M | | | | | | $0.10 | $0.60 |
43
44
  | `opencode-go/grok-4.5` | 500K | | | | | | $2 | $6 |
44
45
  | `opencode-go/hy3` | 256K | | | | | | $0.14 | $0.58 |
45
46
  | `opencode-go/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
@@ -77,7 +77,7 @@ for await (const chunk of stream) {
77
77
  | `opencode/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
78
78
  | `opencode/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
79
79
  | `opencode/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
80
- | `opencode/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 |
80
+ | `opencode/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
81
81
  | `opencode/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
82
82
  | `opencode/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
83
83
  | `opencode/grok-4.5` | 500K | | | | | | $2 | $6 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Perplexity Agent logo](https://models.dev/logos/perplexity-agent.svg)Perplexity Agent
4
4
 
5
- Access 18 Perplexity Agent models through Mastra's model router. Authentication is handled automatically using the `PERPLEXITY_API_KEY` environment variable.
5
+ Access 20 Perplexity Agent models through Mastra's model router. Authentication is handled automatically using the `PERPLEXITY_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Perplexity Agent documentation](https://docs.perplexity.ai/docs/agent-api/models).
8
8
 
@@ -46,6 +46,8 @@ for await (const chunk of stream) {
46
46
  | `perplexity-agent/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
47
47
  | `perplexity-agent/google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
48
48
  | `perplexity-agent/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
49
+ | `perplexity-agent/moonshot-ai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
50
+ | `perplexity-agent/moonshot-ai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
49
51
  | `perplexity-agent/nvidia/nemotron-3-super-120b-a12b` | 1.0M | | | | | | $0.25 | $3 |
50
52
  | `perplexity-agent/openai/gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
51
53
  | `perplexity-agent/openai/gpt-5.1` | 400K | | | | | | $1 | $10 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Scaleway logo](https://models.dev/logos/scaleway.svg)Scaleway
4
4
 
5
- Access 17 Scaleway models through Mastra's model router. Authentication is handled automatically using the `SCALEWAY_API_KEY` environment variable.
5
+ Access 14 Scaleway models through Mastra's model router. Authentication is handled automatically using the `SCALEWAY_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Scaleway documentation](https://www.scaleway.com/en/docs/generative-apis/).
8
8
 
@@ -37,7 +37,6 @@ for await (const chunk of stream) {
37
37
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
38
  | ---------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
39
  | `scaleway/bge-multilingual-gemma2` | 8K | | | | | | $0.10 | — |
40
- | `scaleway/gemma-3-27b-it` | 40K | | | | | | $0.25 | $0.50 |
41
40
  | `scaleway/gemma-4-26b-a4b-it` | 256K | | | | | | $0.25 | $0.50 |
42
41
  | `scaleway/glm-5.2` | 256K | | | | | | $2 | $6 |
43
42
  | `scaleway/gpt-oss-120b` | 128K | | | | | | $0.15 | $0.60 |
@@ -50,7 +49,6 @@ for await (const chunk of stream) {
50
49
  | `scaleway/qwen3-embedding-8b` | 33K | | | | | | $0.10 | — |
51
50
  | `scaleway/qwen3.5-397b-a17b` | 256K | | | | | | $0.60 | $4 |
52
51
  | `scaleway/qwen3.6-35b-a3b` | 128K | | | | | | $0.25 | $2 |
53
- | `scaleway/voxtral-small-24b-2507` | 32K | | | | | | $0.15 | $0.35 |
54
52
  | `scaleway/whisper-large-v3` | — | | | | | | $0.00 | — |
55
53
 
56
54
  ## Advanced configuration
@@ -2,12 +2,12 @@
2
2
 
3
3
  # ![The Grid AI logo](https://models.dev/logos/the-grid-ai.svg)The Grid AI
4
4
 
5
- Access 9 The Grid AI models through Mastra's model router. Authentication is handled automatically using the `THEGRIDAI_API_KEY` environment variable.
5
+ Access 9 The Grid AI models through Mastra's model router. Authentication is handled automatically using the `THEGRID_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [The Grid AI documentation](https://thegrid.ai/docs).
8
8
 
9
9
  ```bash
10
- THEGRIDAI_API_KEY=your-api-key
10
+ THEGRID_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
@@ -57,7 +57,7 @@ const agent = new Agent({
57
57
  model: {
58
58
  url: "https://api.thegrid.ai/v1",
59
59
  id: "the-grid-ai/agent-max",
60
- apiKey: process.env.THEGRIDAI_API_KEY,
60
+ apiKey: process.env.THEGRID_API_KEY,
61
61
  headers: {
62
62
  "X-Custom-Header": "value"
63
63
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Z.AI Coding Plan logo](https://models.dev/logos/zai-coding-plan.svg)Z.AI Coding Plan
4
4
 
5
- Access 6 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
5
+ Access 4 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Z.AI Coding Plan documentation](https://docs.z.ai/devpack/overview).
8
8
 
@@ -17,7 +17,7 @@ const agent = new Agent({
17
17
  id: "my-agent",
18
18
  name: "My Agent",
19
19
  instructions: "You are a helpful assistant",
20
- model: "zai-coding-plan/glm-4.5-air"
20
+ model: "zai-coding-plan/glm-4.7"
21
21
  });
22
22
 
23
23
  // Generate a response
@@ -34,14 +34,12 @@ for await (const chunk of stream) {
34
34
 
35
35
  ## Models
36
36
 
37
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
- | ------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
- | `zai-coding-plan/glm-4.5-air` | 131K | | | | | | — | — |
40
- | `zai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
41
- | `zai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
42
- | `zai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
43
- | `zai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
44
- | `zai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `zai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
40
+ | `zai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
41
+ | `zai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
42
+ | `zai-coding-plan/glm-5.2-highspeed[1m]` | 1.0M | | | | | | — | — |
45
43
 
46
44
  ## Advanced configuration
47
45
 
@@ -53,7 +51,7 @@ const agent = new Agent({
53
51
  name: "custom-agent",
54
52
  model: {
55
53
  url: "https://api.z.ai/api/coding/paas/v4",
56
- id: "zai-coding-plan/glm-4.5-air",
54
+ id: "zai-coding-plan/glm-4.7",
57
55
  apiKey: process.env.ZHIPU_API_KEY,
58
56
  headers: {
59
57
  "X-Custom-Header": "value"
@@ -71,8 +69,8 @@ const agent = new Agent({
71
69
  model: ({ requestContext }) => {
72
70
  const useAdvanced = requestContext.task === "complex";
73
71
  return useAdvanced
74
- ? "zai-coding-plan/glm-5v-turbo"
75
- : "zai-coding-plan/glm-4.5-air";
72
+ ? "zai-coding-plan/glm-5.2-highspeed[1m]"
73
+ : "zai-coding-plan/glm-4.7";
76
74
  }
77
75
  });
78
76
  ```
@@ -17,7 +17,7 @@ const agent = new Agent({
17
17
  id: "my-agent",
18
18
  name: "My Agent",
19
19
  instructions: "You are a helpful assistant",
20
- model: "zhipuai-coding-plan/glm-4.5-air"
20
+ model: "zhipuai-coding-plan/glm-4.6v"
21
21
  });
22
22
 
23
23
  // Generate a response
@@ -34,15 +34,15 @@ for await (const chunk of stream) {
34
34
 
35
35
  ## Models
36
36
 
37
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
- | ---------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
- | `zhipuai-coding-plan/glm-4.5-air` | 131K | | | | | | — | — |
40
- | `zhipuai-coding-plan/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
41
- | `zhipuai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
42
- | `zhipuai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
43
- | `zhipuai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
44
- | `zhipuai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
45
- | `zhipuai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | ------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `zhipuai-coding-plan/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
40
+ | `zhipuai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
41
+ | `zhipuai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
42
+ | `zhipuai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
43
+ | `zhipuai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
44
+ | `zhipuai-coding-plan/glm-5.2-highspeed[1m]` | 1.0M | | | | | | — | — |
45
+ | `zhipuai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
46
46
 
47
47
  ## Advanced configuration
48
48
 
@@ -54,7 +54,7 @@ const agent = new Agent({
54
54
  name: "custom-agent",
55
55
  model: {
56
56
  url: "https://open.bigmodel.cn/api/coding/paas/v4",
57
- id: "zhipuai-coding-plan/glm-4.5-air",
57
+ id: "zhipuai-coding-plan/glm-4.6v",
58
58
  apiKey: process.env.ZHIPU_API_KEY,
59
59
  headers: {
60
60
  "X-Custom-Header": "value"
@@ -73,7 +73,7 @@ const agent = new Agent({
73
73
  const useAdvanced = requestContext.task === "complex";
74
74
  return useAdvanced
75
75
  ? "zhipuai-coding-plan/glm-5v-turbo"
76
- : "zhipuai-coding-plan/glm-4.5-air";
76
+ : "zhipuai-coding-plan/glm-4.6v";
77
77
  }
78
78
  });
79
79
  ```
@@ -564,7 +564,7 @@ When you register the [`MastraEditor`](https://mastra.ai/reference/editor/mastra
564
564
 
565
565
  **editor** (`false | { instructions?: boolean; tools?: boolean | { description?: boolean } }`): Omit to allow editing instructions and tools. Set to false to lock the agent. Set instructions: true to allow instruction edits. Set tools: true to allow tool membership and description edits, or tools: { description: true } to allow only description edits.
566
566
 
567
- The agent's `id`, `name`, and `model` always come from code and can't be overridden through the editor. See the [Editor overview](https://mastra.ai/docs/editor/overview) for usage.
567
+ The agent's `id`, `name`, and `model` always come from code and can't be overridden through Editor. See [Editor](https://mastra.ai/docs/editor/overview) for usage.
568
568
 
569
569
  ## Returns
570
570
 
@@ -174,6 +174,17 @@ const { output, cleanup } = await durableAgent.observe(runId, {
174
174
  await output.text
175
175
  ```
176
176
 
177
+ By default `observe()` waits indefinitely for events. If the process running the run stops unexpectedly, the run stops producing events but never emits a completion event, so the observed stream would wait forever. Pass `idleTimeoutMs` to bound that wait: after that many milliseconds of silence the stream ends. An optional `isAlive` check is consulted first. Return `true` while the run is still being worked on (for example a long-running tool call, or a run paused waiting for human input) to keep waiting. Returning `false`, or omitting `isAlive`, ends the stream with an error. A transient throw from `isAlive` is treated as "still alive", so a momentary check failure never ends a live stream.
178
+
179
+ ```typescript
180
+ const { output } = await durableAgent.observe(runId, {
181
+ idleTimeoutMs: 30_000,
182
+ isAlive: () => runHeartbeat.isFresh(runId),
183
+ })
184
+ ```
185
+
186
+ Ending a run on idle timeout runs the same cleanup as a run that errors (see the warning below), so its cached state is released rather than retained. Both options are opt-in. Omit them for the previous wait-indefinitely behavior.
187
+
177
188
  Returns: `Promise<DurableAgentStreamResult>`
178
189
 
179
190
  > **Warning:** The `cleanup()` returned by `observe()` destroys the run's registry entries and cached events. Only call it when you are done with the run. If the run is suspended and you intend to resume later, don't call `cleanup()`. Let the auto-cleanup timer handle it after the run finishes or errors. Auto-cleanup doesn't fire on suspended events.
@@ -333,7 +344,7 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
333
344
 
334
345
  ## DurableAgentStreamResult
335
346
 
336
- The object returned by `stream()`, `resume()`, and `observe()`.
347
+ The object returned by `stream()`, `resume()`, `observe()`, and `recover()`.
337
348
 
338
349
  ```typescript
339
350
  interface DurableAgentStreamResult<OUTPUT = undefined> {
@@ -214,7 +214,7 @@ const result = await agent.generate('message for agent')
214
214
 
215
215
  **options.tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
216
216
 
217
- **options.versions** (`VersionOverrides`): Per-invocation version overrides for sub-agent delegation. Merged on top of Mastra instance-level versions and propagated automatically through sub-agent calls via requestContext. Requires the editor package. See Sub-agent versioning.
217
+ **options.versions** (`VersionOverrides`): Per-invocation version overrides for sub-agent delegation. Merged on top of Mastra instance-level versions and propagated automatically through sub-agent calls via requestContext. Requires the editor package. See Editor versioning.
218
218
 
219
219
  **options.versions.agents** (`Record<string, VersionSelector>`): A map of agent IDs to their version selectors.
220
220
 
@@ -30,5 +30,5 @@ await agent.getVoice({
30
30
 
31
31
  ## Related
32
32
 
33
- - [Voice in Mastra](https://mastra.ai/docs/voice/overview)
33
+ - [Voice in Mastra](https://mastra.ai/guides/voice/overview)
34
34
  - [Voice providers](https://mastra.ai/reference/voice/mastra-voice)
@@ -2,110 +2,7 @@
2
2
 
3
3
  # Build with AI
4
4
 
5
- AI agents may not have up-to-date knowledge about Mastra's APIs, patterns, and best practices. These resources give your AI tools direct access to current Mastra documentation, enabling them to generate accurate code and help you build faster.
6
-
7
- To give your agent access to Mastra's documentation, we recommend using **skills**. While the MCP docs server also provides this information, skills will perform better. Use the MCP docs server when you need its tools, e.g. the migration tool.
8
-
9
- ## Mastra skills
10
-
11
- Agent Skills are folders of instructions, scripts, and resources that agents can discover and use to do things accurately and efficiently. Mastra skills contain setup instructions, best practices, CLI commands, and instructions on how to fetch up-to-date information from Mastra's documentation.
12
-
13
- To install all available Mastra skills, run the following command:
14
-
15
- **npm**:
16
-
17
- ```bash
18
- npx skills add mastra-ai/skills
19
- ```
20
-
21
- **pnpm**:
22
-
23
- ```bash
24
- pnpm dlx skills add mastra-ai/skills
25
- ```
26
-
27
- **Yarn**:
28
-
29
- ```bash
30
- yarn dlx skills add mastra-ai/skills
31
- ```
32
-
33
- **Bun**:
34
-
35
- ```bash
36
- bun x skills add mastra-ai/skills
37
- ```
38
-
39
- Mastra skills work with any coding agent that supports the [Skills standard](https://agentskills.io/), including Claude Code, Cursor, Codex, OpenCode, and others.
40
-
41
- They're also available on [GitHub](https://github.com/mastra-ai/skills).
42
-
43
- ### Update skill
44
-
45
- To update to the latest version of the Mastra skill, run:
46
-
47
- **npm**:
48
-
49
- ```bash
50
- npx skills update mastra
51
- ```
52
-
53
- **pnpm**:
54
-
55
- ```bash
56
- pnpm dlx skills update mastra
57
- ```
58
-
59
- **Yarn**:
60
-
61
- ```bash
62
- yarn dlx skills update mastra
63
- ```
64
-
65
- **Bun**:
66
-
67
- ```bash
68
- bun x skills update mastra
69
- ```
70
-
71
- ## Mastra CLI
72
-
73
- The [Mastra CLI](https://mastra.ai/reference/cli/mastra) gives your coding agent a direct line to your Mastra runtime.
74
-
75
- Agents can invoke other agents and run workflows. They can execute tools and inspect memory. They can also run evals or query traces and logs.
76
-
77
- **npm**:
78
-
79
- ```bash
80
- npm install mastra@latest -g
81
- ```
82
-
83
- **pnpm**:
84
-
85
- ```bash
86
- pnpm add mastra@latest -g
87
- ```
88
-
89
- **Yarn**:
90
-
91
- ```bash
92
- yarn global add mastra@latest
93
- ```
94
-
95
- **Bun**:
96
-
97
- ```bash
98
- bun add mastra@latest --global
99
- ```
100
-
101
- For example, your coding agent can run an agent, then pull traces to inspect the results:
102
-
103
- ```bash
104
- mastra api --url http://localhost:4111 agent run weather-agent '{"messages":"What is the weather in London?"}'
105
- mastra api --url http://localhost:4111 trace list
106
- ```
107
-
108
- Install the [Mastra skills](#mastra-skills) to teach your agent how to use the CLI. See the [CLI commands reference](https://mastra.ai/reference/cli/mastra) for the full list of available commands.
5
+ For everyday AI-assisted development with Mastra skills and the CLI, see [Develop](https://mastra.ai/docs/getting-started/develop). This page covers other ways to give coding agents access to Mastra documentation.
109
6
 
110
7
  ## Embedded package docs
111
8
 
@@ -130,12 +27,10 @@ Examples for the [introduction page](https://mastra.ai/docs):
130
27
  - [`/docs/llms.txt`](https://mastra.ai/docs/llms.txt)
131
28
  - [`/docs.md`](https://mastra.ai/docs.md)
132
29
 
133
- ## Mastra's documentation
134
-
135
- In addition to the [context files](#context-files) each documentation page also features a "Copy markdown" button at the top of the page. It'll copy the streamlined markdown version to your clipboard. Beside it, you'll find a dropdown menu to open the page on GitHub, in ChatGPT, Claude, and others.
136
-
137
30
  ## MCP docs server
138
31
 
32
+ > **Warning:** The MCP docs server isn't recommended for everyday development. Use the [Mastra skill](https://mastra.ai/docs/getting-started/develop) instead because it's more up to date and performs better.
33
+
139
34
  The `@mastra/mcp-docs-server` package provides direct local access to Mastra’s full documentation via the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro). It works with Cursor, Windsurf, Cline, Claude Code, VS Code, Codex or any tool that supports MCP.
140
35
 
141
36
  These tools are designed to help agents retrieve precise, task-specific information, whether you're adding a feature to an agent or scaffolding a new project, or alternatively exploring how something works.
@@ -144,7 +39,7 @@ If you're unable to use a local MCP server and need to connect to a remote serve
144
39
 
145
40
  ### Installation
146
41
 
147
- The [`create-mastra`](https://mastra.ai/reference/cli/create-mastra) command installs Mastra skills automatically. It doesn't configure the MCP docs server. Add the server manually when you need MCP-specific tools such as the migration tool.
42
+ The [`create-mastra`](https://mastra.ai/reference/cli/create-mastra) command doesn't configure the MCP docs server. Add the server manually when you need MCP-specific tools such as the migration tool.
148
43
 
149
44
  If there are no specific instructions for your tool below, you may be able to add the MCP server with this common JSON configuration.
150
45
 
@@ -354,7 +249,7 @@ Once configured, you can ask your AI tool questions about Mastra or instruct it
354
249
  - "How does working memory behave in Mastra and how can I use it to do `[task]`? It doesn't seem to work the way I expect."
355
250
  - "I saw there are new workflow features, explain them to me and then update `[workflow]` to use them."
356
251
 
357
- #### Troubleshooting
252
+ ### Troubleshooting
358
253
 
359
254
  1. **Server Not Starting**
360
255
 
@@ -201,6 +201,8 @@ Invalid input is rejected before templates are fetched or files are created.
201
201
 
202
202
  **--no-git** (`boolean`): Skip automatic Git initialization and the initial commit.
203
203
 
204
+ **--no-install** (`boolean`): Skip dependency installation.
205
+
204
206
  **-t, --template \[template]** (`string`): Use a template slug or public GitHub URL. Omit the value to select interactively.
205
207
 
206
208
  **--timeout \<milliseconds>** (`number`): Positive integer timeout for dependency installation. Defaults to 60000.
@@ -103,7 +103,7 @@ These are forwarded to the Mastra model router and will work with any `"openai/.
103
103
 
104
104
  ## `mastra factory dev`
105
105
 
106
- Starts a development server for [Agent Builder](https://mastra.ai/docs/agent-builder/overview) development. It uses the same dev runtime and flags as [`mastra dev`](#mastra-dev) and writes to the same `.mastra/output` directory.
106
+ Starts a development server for [Agent Builder](https://agent-builder.mastra.ai/) development. It uses the same dev runtime and flags as [`mastra dev`](#mastra-dev) and writes to the same `.mastra/output` directory.
107
107
 
108
108
  ```bash
109
109
  npx mastra factory dev
@@ -171,7 +171,7 @@ Comma-separated list of custom arguments to pass to the Node.js process, e.g. `-
171
171
 
172
172
  ## `mastra worker build`
173
173
 
174
- Bundles your Mastra application for worker deployment. Produces the same output as `mastra build` — a self-contained `.mastra/output/` directory.
174
+ Bundles your Mastra application for worker deployment. Produces the same output as `mastra build`: a self-contained `.mastra/output/` directory.
175
175
 
176
176
  ```bash
177
177
  mastra worker build [options]
@@ -179,29 +179,45 @@ mastra worker build [options]
179
179
 
180
180
  ### Flags
181
181
 
182
- | Flag | Description |
183
- | --------------------- | ------------------------------------------------------------ |
184
- | `--dir <path>` | Path to your Mastra source directory (default: `src/mastra`) |
185
- | `--root <path>` | Project root directory (default: current directory) |
186
- | `--tools <paths>` | Comma-separated tool paths to include |
187
- | `--output-dir <path>` | Custom output directory (default: `.mastra/output`) |
188
- | `--debug` | Enable debug logging |
182
+ #### `--dir`
183
+
184
+ Path to your Mastra source directory. Defaults to `src/mastra`.
185
+
186
+ #### `--root`
187
+
188
+ Project root directory. Defaults to the current directory.
189
+
190
+ #### `--tools`
191
+
192
+ Comma-separated tool paths to include in the bundle.
193
+
194
+ #### `--output-dir`
195
+
196
+ Custom output directory. Defaults to `.mastra/output`.
197
+
198
+ #### `--debug`
199
+
200
+ Enable debug logging during the build.
189
201
 
190
202
  ## `mastra worker start`
191
203
 
192
204
  > **Info:** You need to run `mastra worker build` or `mastra build` before using `mastra worker start`.
193
205
 
194
- Starts a worker process from a previously built bundle.
206
+ Starts a worker process from a previously built bundle. The optional `name` argument sets `MASTRA_WORKERS` in the spawned process, controlling which worker starts.
195
207
 
196
208
  ```bash
197
209
  mastra worker start [name] [options]
198
210
  ```
199
211
 
200
- | Argument/Flag | Description |
201
- | -------------- | ------------------------------------------------------------------- |
202
- | `name` | Worker name to start. Sets `MASTRA_WORKERS` in the spawned process. |
203
- | `--dir <path>` | Path to the build output (default: `.mastra/output`) |
204
- | `--env <path>` | Path to environment file (default: `.env.production`, then `.env`) |
212
+ ### Flags
213
+
214
+ #### `--dir`
215
+
216
+ Path to the build output directory. Defaults to `.mastra/output`.
217
+
218
+ #### `--env`
219
+
220
+ Path to the environment file. Defaults to `.env.production`, falling back to `.env`.
205
221
 
206
222
  ### Examples
207
223
 
@@ -412,12 +428,16 @@ mastra env vars pull
412
428
  mastra env vars pull <env> --output .env.staging
413
429
  ```
414
430
 
415
- `<env>` can be an environment name, slug, or ID, and can be omitted when the project has exactly one environment. The file is written with `0600` permissions.
431
+ `<env>` can be an environment name, slug, or ID, and can be omitted when the project has exactly one environment. The file is written with `0600` permissions. The command stops if the output file already exists. Pass `--force` to replace it.
416
432
 
417
433
  #### `-o, --output`
418
434
 
419
435
  File to write. Defaults to `.env`.
420
436
 
437
+ #### `-f, --force`
438
+
439
+ Replace an existing output file.
440
+
421
441
  ### `mastra env db`
422
442
 
423
443
  Manages databases attached to a project on Mastra platform. Databases are provisioned from a managed provider (for example Turso or Neon) and inject their connection env vars into deploys automatically.
@@ -838,7 +838,7 @@ console.log(result.success) // true
838
838
 
839
839
  ## Version management
840
840
 
841
- Both `Agent` (code-defined) and `StoredAgent` instances have methods for managing configuration versions. See the [Editor overview](https://mastra.ai/docs/editor/overview) for an introduction to version management.
841
+ Both `Agent` (code-defined) and `StoredAgent` instances have methods for managing configuration versions. See [Editor versioning](https://mastra.ai/docs/editor/overview) for lifecycle and selection behavior.
842
842
 
843
843
  ### Getting an agent with a specific version
844
844
 
@@ -419,7 +419,7 @@ export const mastra = new Mastra({
419
419
 
420
420
  Text-to-speech providers for voice synthesis capabilities. Register voice providers to enable agents to convert text responses into spoken audio.
421
421
 
422
- Visit the [Voice documentation](https://mastra.ai/docs/voice/overview) to learn more.
422
+ Visit the [Voice documentation](https://mastra.ai/guides/voice/overview) to learn more.
423
423
 
424
424
  > **Note:** Most users configure voice directly on agents. This top-level configuration is for defining reusable voice providers that can be shared across multiple agents.
425
425
 
@@ -440,7 +440,7 @@ export const mastra = new Mastra({
440
440
 
441
441
  Vector stores for semantic search and embeddings. Used in RAG pipelines, similarity search, and other embedding-based features. Mastra supports multiple vector databases including Pinecone, PostgreSQL with pgvector, MongoDB, and more.
442
442
 
443
- Visit the [RAG documentation](https://mastra.ai/docs/rag/overview) to learn more.
443
+ Visit the [RAG documentation](https://mastra.ai/guides/rag/overview) to learn more.
444
444
 
445
445
  > **Note:** Most users create vector stores directly when building RAG pipelines. This top-level configuration is for defining reusable vector store instances that can be shared across your application.
446
446
 
@@ -33,5 +33,5 @@ This method doesn't accept any parameters.
33
33
 
34
34
  ## Related
35
35
 
36
- - [Editor overview](https://mastra.ai/docs/editor/overview)
36
+ - [Editor](https://mastra.ai/docs/editor/overview)
37
37
  - [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor)