@mastra/mcp-docs-server 1.3.4 → 1.3.5-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 (90) hide show
  1. package/.docs/docs/agents/code-mode.md +0 -2
  2. package/.docs/docs/channels.md +12 -4
  3. package/.docs/docs/develop.md +1 -3
  4. package/.docs/docs/guides/context-engineering.md +0 -2
  5. package/.docs/docs/harness/agent-controller.md +0 -2
  6. package/.docs/docs/harness/durable-agents.md +2 -0
  7. package/.docs/docs/harness/goals.md +1 -3
  8. package/.docs/docs/harness/schedules.md +0 -2
  9. package/.docs/docs/harness/signal-providers.md +1 -3
  10. package/.docs/docs/harness/signals.md +15 -3
  11. package/.docs/docs/memory/observational-memory.md +26 -2
  12. package/.docs/docs/memory/semantic-recall.md +35 -1
  13. package/.docs/docs/storage.md +1 -0
  14. package/.docs/docs/workflows/error-handling.md +2 -0
  15. package/.docs/docs/workflows/scheduled-workflows.md +2 -2
  16. package/.docs/integrations/databases/clickhouse-managed-postgres.md +82 -0
  17. package/.docs/integrations/file-storage/mesa.md +40 -39
  18. package/.docs/integrations.md +1 -0
  19. package/.docs/models/environment-variables.md +1 -0
  20. package/.docs/models/gateways/merge-gateway.md +3 -1
  21. package/.docs/models/gateways/neon.md +2 -1
  22. package/.docs/models/gateways/netlify.md +5 -1
  23. package/.docs/models/gateways/openrouter.md +4 -1
  24. package/.docs/models/gateways/vercel.md +10 -3
  25. package/.docs/models/index.md +2 -1
  26. package/.docs/models/providers/aiand.md +17 -15
  27. package/.docs/models/providers/blueclaw.md +8 -9
  28. package/.docs/models/providers/coralbricks.md +6 -4
  29. package/.docs/models/providers/cortecs.md +5 -11
  30. package/.docs/models/providers/crossmodel.md +2 -1
  31. package/.docs/models/providers/deepinfra.md +57 -62
  32. package/.docs/models/providers/deepseek.md +1 -1
  33. package/.docs/models/providers/edenai.md +12 -7
  34. package/.docs/models/providers/engy.md +84 -0
  35. package/.docs/models/providers/fireworks-ai.md +2 -2
  36. package/.docs/models/providers/hyper.md +1 -1
  37. package/.docs/models/providers/kilo.md +18 -15
  38. package/.docs/models/providers/llmgateway-providers.md +23 -13
  39. package/.docs/models/providers/llmgateway.md +8 -8
  40. package/.docs/models/providers/nano-gpt.md +8 -6
  41. package/.docs/models/providers/nvidia.md +4 -4
  42. package/.docs/models/providers/opencode.md +3 -1
  43. package/.docs/models/providers/privatemode-ai.md +5 -5
  44. package/.docs/models/providers/requesty.md +2 -1
  45. package/.docs/models/providers/subconscious.md +8 -8
  46. package/.docs/models/providers/synthetic.md +2 -1
  47. package/.docs/models/providers/togetherai.md +21 -28
  48. package/.docs/models/providers/umans-ai-coding-plan.md +2 -1
  49. package/.docs/models/providers/umans-ai.md +2 -1
  50. package/.docs/models/providers/xai.md +3 -2
  51. package/.docs/models/providers.md +1 -0
  52. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  53. package/.docs/reference/agent-controller/session.md +8 -2
  54. package/.docs/reference/agents/channels.md +3 -2
  55. package/.docs/reference/agents/durable-agent.md +12 -7
  56. package/.docs/reference/client-js/agents.md +1 -1
  57. package/.docs/reference/client-js/observability.md +28 -0
  58. package/.docs/reference/code-sdk/acp-server.md +19 -2
  59. package/.docs/reference/code-sdk/mount-agent-controller.md +0 -2
  60. package/.docs/reference/configuration.md +1 -1
  61. package/.docs/reference/editor/mastra-editor.md +28 -0
  62. package/.docs/reference/file-based-agents/config.md +0 -2
  63. package/.docs/reference/file-based-agents/instructions.md +0 -2
  64. package/.docs/reference/file-based-agents/logger.md +0 -2
  65. package/.docs/reference/file-based-agents/memory.md +0 -2
  66. package/.docs/reference/file-based-agents/observability.md +0 -2
  67. package/.docs/reference/file-based-agents/processors.md +0 -2
  68. package/.docs/reference/file-based-agents/schedules.md +2 -4
  69. package/.docs/reference/file-based-agents/scorers.md +0 -2
  70. package/.docs/reference/file-based-agents/server.md +0 -2
  71. package/.docs/reference/file-based-agents/skills.md +0 -2
  72. package/.docs/reference/file-based-agents/storage.md +0 -2
  73. package/.docs/reference/file-based-agents/studio.md +0 -2
  74. package/.docs/reference/file-based-agents/subagents.md +0 -2
  75. package/.docs/reference/file-based-agents/tools.md +0 -2
  76. package/.docs/reference/file-based-agents/workflows.md +0 -2
  77. package/.docs/reference/file-based-agents/workspace.md +0 -2
  78. package/.docs/reference/memory/observational-memory.md +5 -5
  79. package/.docs/reference/observability/tracing/interfaces.md +62 -2
  80. package/.docs/reference/observability/tracing/trace-query.md +113 -2
  81. package/.docs/reference/schedules/overview.md +3 -5
  82. package/.docs/reference/server/elysia-adapter.md +18 -0
  83. package/.docs/reference/signals/create-notification-inbox-tool.md +0 -2
  84. package/.docs/reference/signals/signal-provider.md +1 -3
  85. package/.docs/reference/signals/task-signal-provider.md +1 -1
  86. package/.docs/reference/signals/webhook-signal-provider.md +1 -3
  87. package/.docs/reference/streaming/ChunkType.md +2 -0
  88. package/.docs/reference/tools/create-code-mode.md +0 -2
  89. package/.docs/reference/tools/mcp-client.md +17 -0
  90. package/package.json +4 -4
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![OpenCode Zen logo](https://models.dev/logos/opencode.svg)OpenCode Zen
6
6
 
7
- Access 114 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
7
+ Access 116 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
10
10
 
@@ -57,6 +57,7 @@ for await (const chunk of stream) {
57
57
  | `opencode/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.14 | $0.28 |
58
58
  | `opencode/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
59
59
  | `opencode/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
60
+ | `opencode/fledge-alpha-free` | 1.0M | | | | | | — | — |
60
61
  | `opencode/gemini-3-flash` | 1.0M | | | | | | $0.50 | $3 |
61
62
  | `opencode/gemini-3.1-pro` | 1.0M | | | | | | $2 | $12 |
62
63
  | `opencode/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
@@ -102,6 +103,7 @@ for await (const chunk of stream) {
102
103
  | `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
103
104
  | `opencode/kimi-k3` | 1.0M | | | | | | $3 | $15 |
104
105
  | `opencode/ling-3.0-flash-fin-free` | 262K | | | | | | — | — |
106
+ | `opencode/ling-3.1-flash-free` | 262K | | | | | | — | — |
105
107
  | `opencode/longcat-2.5-preview-free` | 1.0M | | | | | | — | — |
106
108
  | `opencode/mimo-v2.6-flash-free` | 200K | | | | | | — | — |
107
109
  | `opencode/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
@@ -39,11 +39,11 @@ for await (const chunk of stream) {
39
39
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
40
  | ----------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
41
  | `privatemode-ai/deepseek-ocr-2` | 8K | | | | | | $0.89 | $1 |
42
- | `privatemode-ai/glm-5.3` | 256K | | | | | | $2 | $9 |
43
- | `privatemode-ai/glm-5.3-flash` | 256K | | | | | | $0.23 | $0.75 |
44
- | `privatemode-ai/glm-flash-latest` | 256K | | | | | | $0.23 | $0.75 |
45
- | `privatemode-ai/glm-latest` | 256K | | | | | | $2 | $9 |
46
- | `privatemode-ai/gpt-oss-120b` | 128K | | | | | | $0.50 | $2 |
42
+ | `privatemode-ai/glm-5.3` | 1.0M | | | | | | $2 | $7 |
43
+ | `privatemode-ai/glm-5.3-flash` | 1.0M | | | | | | $0.23 | $0.75 |
44
+ | `privatemode-ai/glm-flash-latest` | 1.0M | | | | | | $0.23 | $0.75 |
45
+ | `privatemode-ai/glm-latest` | 1.0M | | | | | | $2 | $7 |
46
+ | `privatemode-ai/gpt-oss-120b` | 128K | | | | | | $0.23 | $0.75 |
47
47
  | `privatemode-ai/qwen3-embedding-4b` | 32K | | | | | | $0.15 | — |
48
48
  | `privatemode-ai/voxtral-mini-3b` | 32K | | | | | | $0.00 | — |
49
49
  | `privatemode-ai/whisper-large-v3` | 448 | | | | | | $0.02 | — |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Requesty logo](https://models.dev/logos/requesty.svg)Requesty
6
6
 
7
- Access 165 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
7
+ Access 166 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Requesty documentation](https://requesty.ai/solution/llm-routing/models).
10
10
 
@@ -140,6 +140,7 @@ for await (const chunk of stream) {
140
140
  | `requesty/grok-4.3` | 1.0M | | | | | | $1 | $3 |
141
141
  | `requesty/grok-4.5` | 500K | | | | | | $2 | $6 |
142
142
  | `requesty/grok-4.6` | 500K | | | | | | $2 | $6 |
143
+ | `requesty/grok-4.7` | 500K | | | | | | $2 | $6 |
143
144
  | `requesty/grok-build-0.1` | 256K | | | | | | $1 | $2 |
144
145
  | `requesty/hy3` | 262K | | | | | | $0.14 | $0.58 |
145
146
  | `requesty/inkling` | 66K | | | | | | $2 | $5 |
@@ -19,7 +19,7 @@ const agent = new Agent({
19
19
  id: "my-agent",
20
20
  name: "My Agent",
21
21
  instructions: "You are a helpful assistant",
22
- model: "subconscious/subconscious/glm-5.2"
22
+ model: "subconscious/subconscious/deepseek-v4.1-flash-marathon"
23
23
  });
24
24
 
25
25
  // Generate a response
@@ -36,10 +36,10 @@ for await (const chunk of stream) {
36
36
 
37
37
  ## Models
38
38
 
39
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
- | ------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
- | `subconscious/subconscious/glm-5.2` | 1.0M | | | | | | $1 | $4 |
42
- | `subconscious/subconscious/tim-qwen3.6-27b` | 8K | | | | | | $0.30 | $3 |
39
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
+ | -------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
+ | `subconscious/subconscious/deepseek-v4.1-flash-marathon` | 5.0M | | | | | | $0.14 | $0.28 |
42
+ | `subconscious/subconscious/glm-5.3-marathon` | 5.0M | | | | | | $1 | $4 |
43
43
 
44
44
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
45
45
 
@@ -53,7 +53,7 @@ const agent = new Agent({
53
53
  name: "custom-agent",
54
54
  model: {
55
55
  url: "https://api.subconscious.dev/v1",
56
- id: "subconscious/subconscious/glm-5.2",
56
+ id: "subconscious/subconscious/deepseek-v4.1-flash-marathon",
57
57
  apiKey: process.env.SUBCONSCIOUS_API_KEY,
58
58
  headers: {
59
59
  "X-Custom-Header": "value"
@@ -71,8 +71,8 @@ const agent = new Agent({
71
71
  model: ({ requestContext }) => {
72
72
  const useAdvanced = requestContext.task === "complex";
73
73
  return useAdvanced
74
- ? "subconscious/subconscious/tim-qwen3.6-27b"
75
- : "subconscious/subconscious/glm-5.2";
74
+ ? "subconscious/subconscious/glm-5.3-marathon"
75
+ : "subconscious/subconscious/deepseek-v4.1-flash-marathon";
76
76
  }
77
77
  });
78
78
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Synthetic logo](https://models.dev/logos/synthetic.svg)Synthetic
6
6
 
7
- Access 10 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
7
+ Access 11 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Synthetic documentation](https://synthetic.new/pricing).
10
10
 
@@ -47,6 +47,7 @@ for await (const chunk of stream) {
47
47
  | `synthetic/hf:Qwen/Qwen3.6-27B` | 262K | | | | | | $0.45 | $4 |
48
48
  | `synthetic/hf:zai-org/GLM-4.7-Flash` | 197K | | | | | | $0.10 | $0.50 |
49
49
  | `synthetic/hf:zai-org/GLM-5.2` | 524K | | | | | | $1 | $4 |
50
+ | `synthetic/hf:zai-org/GLM-5.3` | 524K | | | | | | $1 | $4 |
50
51
  | `synthetic/hf:zai-org/GLM-5.3-Flash` | 524K | | | | | | $0.15 | $0.50 |
51
52
 
52
53
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Together AI logo](https://models.dev/logos/togetherai.svg)Together AI
6
6
 
7
- Access 36 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
7
+ Access 29 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
10
10
 
@@ -34,33 +34,26 @@ 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
- | `togetherai/deepcogito/cogito-v2-1-671b` | 164K | | | | | | $1 | $1 |
40
- | `togetherai/deepseek-ai/DeepSeek-V4-Flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
41
- | `togetherai/deepseek-ai/DeepSeek-V4-Pro` | 512K | | | | | | $2 | $3 |
42
- | `togetherai/deepseek-ai/DeepSeek-V4-Pro-0813` | 1.0M | | | | | | $1 | $4 |
43
- | `togetherai/deepseek-ai/DeepSeek-V4.1-Flash` | 1.0M | | | | | | $0.30 | $1 |
44
- | `togetherai/google/gemma-3n-E4B-it` | 33K | | | | | | $0.06 | $0.12 |
45
- | `togetherai/google/gemma-4-31B-it` | 262K | | | | | | $0.39 | $0.97 |
46
- | `togetherai/LiquidAI/LFM2-24B-A2B` | 33K | | | | | | $0.03 | $0.12 |
47
- | `togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $1 | $1 |
48
- | `togetherai/meta-llama/Meta-Llama-3-8B-Instruct-Lite` | 8K | | | | | | $0.14 | $0.14 |
49
- | `togetherai/MiniMaxAI/MiniMax-M2.7` | 197K | | | | | | $0.30 | $1 |
50
- | `togetherai/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
51
- | `togetherai/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
52
- | `togetherai/nvidia/nemotron-3-ultra-550b-a55b` | 512K | | | | | | $0.60 | $4 |
53
- | `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
54
- | `togetherai/openai/gpt-oss-20b` | 131K | | | | | | $0.05 | $0.20 |
55
- | `togetherai/pearl-ai/gemma-4-31b-it` | 32K | | | | | | $0.28 | $0.86 |
56
- | `togetherai/Qwen/Qwen2.5-7B-Instruct-Turbo` | 33K | | | | | | $0.30 | $0.30 |
57
- | `togetherai/Qwen/Qwen3.5-9B` | 262K | | | | | | $0.17 | $0.25 |
58
- | `togetherai/Qwen/Qwen3.6-Plus` | 1.0M | | | | | | $0.50 | $3 |
59
- | `togetherai/Qwen/Qwen3.7-Max` | 1.0M | | | | | | $1 | $4 |
60
- | `togetherai/thinkingmachines/Inkling` | 524K | | | | | | $1 | $4 |
61
- | `togetherai/zai-org/GLM-5.2` | 1.0M | | | | | | $1 | $4 |
62
- | `togetherai/zai-org/GLM-5.3` | 1.0M | | | | | | $1 | $4 |
63
- | `togetherai/zai-org/GLM-5.3-Flash` | 1.0M | | | | | | $0.15 | $0.50 |
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `togetherai/deepseek-ai/DeepSeek-V4-Flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
40
+ | `togetherai/deepseek-ai/DeepSeek-V4-Pro-0813` | 1.0M | | | | | | $1 | $4 |
41
+ | `togetherai/deepseek-ai/DeepSeek-V4.1-Flash` | 1.0M | | | | | | $0.30 | $1 |
42
+ | `togetherai/LiquidAI/LFM2-24B-A2B` | 33K | | | | | | $0.03 | $0.12 |
43
+ | `togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $1 | $1 |
44
+ | `togetherai/MiniMaxAI/MiniMax-M2.7` | 197K | | | | | | $0.30 | $1 |
45
+ | `togetherai/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
46
+ | `togetherai/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
47
+ | `togetherai/nvidia/nemotron-3-ultra-550b-a55b` | 512K | | | | | | $0.60 | $4 |
48
+ | `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
49
+ | `togetherai/Qwen/Qwen2.5-7B-Instruct-Turbo` | 33K | | | | | | $0.30 | $0.30 |
50
+ | `togetherai/Qwen/Qwen3.5-9B` | 262K | | | | | | $0.17 | $0.25 |
51
+ | `togetherai/Qwen/Qwen3.6-Plus` | 1.0M | | | | | | $0.50 | $3 |
52
+ | `togetherai/Qwen/Qwen3.7-Max` | 1.0M | | | | | | $1 | $4 |
53
+ | `togetherai/thinkingmachines/Inkling` | 524K | | | | | | $1 | $4 |
54
+ | `togetherai/zai-org/GLM-5.2` | 1.0M | | | | | | $1 | $4 |
55
+ | `togetherai/zai-org/GLM-5.3` | 1.0M | | | | | | $1 | $4 |
56
+ | `togetherai/zai-org/GLM-5.3-Flash` | 1.0M | | | | | | $0.15 | $0.50 |
64
57
 
65
58
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
66
59
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Umans AI Coding Plan logo](https://models.dev/logos/umans-ai-coding-plan.svg)Umans AI Coding Plan
6
6
 
7
- Access 7 Umans AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_CODING_PLAN_API_KEY` environment variable.
7
+ Access 8 Umans AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_CODING_PLAN_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Umans AI Coding Plan documentation](https://app.umans.ai/offers/code/docs).
10
10
 
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
42
42
  | `umans-ai-coding-plan/umans-deepseek-v4-flash-0731` | 1.0M | | | | | | — | — |
43
43
  | `umans-ai-coding-plan/umans-deepseek-v4.1-flash` | 1.0M | | | | | | — | — |
44
44
  | `umans-ai-coding-plan/umans-flash` | 262K | | | | | | — | — |
45
+ | `umans-ai-coding-plan/umans-glm-5.3` | 1.0M | | | | | | — | — |
45
46
  | `umans-ai-coding-plan/umans-glm-5.3-flash` | 1.0M | | | | | | — | — |
46
47
  | `umans-ai-coding-plan/umans-kimi-k3` | 1.0M | | | | | | — | — |
47
48
  | `umans-ai-coding-plan/umans-qwen3.6-35b-a3b` | 262K | | | | | | — | — |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Umans AI logo](https://models.dev/logos/umans-ai.svg)Umans AI
6
6
 
7
- Access 6 Umans AI models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_API_KEY` environment variable.
7
+ Access 7 Umans AI models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Umans AI documentation](https://app.umans.ai/offers/code/docs/orgs).
10
10
 
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
42
42
  | `umans-ai/umans-deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
43
43
  | `umans-ai/umans-deepseek-v4.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
44
44
  | `umans-ai/umans-flash` | 262K | | | | | | $0.15 | $1 |
45
+ | `umans-ai/umans-glm-5.3` | 1.0M | | | | | | $1 | $4 |
45
46
  | `umans-ai/umans-glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
46
47
  | `umans-ai/umans-kimi-k3` | 1.0M | | | | | | $3 | $15 |
47
48
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![xAI logo](https://models.dev/logos/xai.svg)xAI
6
6
 
7
- Access 12 xAI models through Mastra's model router. Authentication is handled automatically using the `XAI_API_KEY` environment variable.
7
+ Access 13 xAI models through Mastra's model router. Authentication is handled automatically using the `XAI_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [xAI documentation](https://docs.x.ai/docs/models).
10
10
 
@@ -48,6 +48,7 @@ for await (const chunk of stream) {
48
48
  | `xai/grok-imagine-image-quality` | 16K | | | | | | — | — |
49
49
  | `xai/grok-imagine-video` | 1K | | | | | | — | — |
50
50
  | `xai/grok-imagine-video-1.5` | 1K | | | | | | — | — |
51
+ | `xai/grok-imagine-video-1.5-lite` | 1K | | | | | | — | — |
51
52
 
52
53
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
53
54
 
@@ -78,7 +79,7 @@ const agent = new Agent({
78
79
  model: ({ requestContext }) => {
79
80
  const useAdvanced = requestContext.task === "complex";
80
81
  return useAdvanced
81
- ? "xai/grok-imagine-video-1.5"
82
+ ? "xai/grok-imagine-video-1.5-lite"
82
83
  : "xai/grok-4.20-0309-non-reasoning";
83
84
  }
84
85
  });
@@ -68,6 +68,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
68
68
  - [Echo](https://mastra.ai/models/providers/echo)
69
69
  - [Eden AI](https://mastra.ai/models/providers/edenai)
70
70
  - [EmpirioLabs AI](https://mastra.ai/models/providers/empiriolabs)
71
+ - [engy](https://mastra.ai/models/providers/engy)
71
72
  - [evroc](https://mastra.ai/models/providers/evroc)
72
73
  - [FastRouter](https://mastra.ai/models/providers/fastrouter)
73
74
  - [Fireworks AI](https://mastra.ai/models/providers/fireworks-ai)
@@ -4,8 +4,6 @@
4
4
 
5
5
  # AgentController
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  The `AgentController` class is a shared host for one or more [`Session`](https://mastra.ai/reference/agent-controller/session) instances. Initialize the controller, create a session, then use `session.*` APIs for conversation state and run control.
10
8
 
11
9
  For a guided introduction, see the [AgentController overview](https://mastra.ai/docs/harness/agent-controller).
@@ -178,6 +176,8 @@ The same `resourceId` and `scope` return the same `Session` instance. A differen
178
176
 
179
177
  **threadId** (`string`): Exact thread to bind. Missing threads are created with this identifier.
180
178
 
179
+ **createInitialThread** (`boolean`): Create a thread when no existing thread matches. Set false to start the session without a thread; the first message or session.thread.ensureId() creates it, so unused sessions leave no empty thread behind. (Default: `true`)
180
+
181
181
  **id** (`string`): Stable session identifier. Defaults to the controller id.
182
182
 
183
183
  **ownerId** (`string`): Stable session owner identifier. Defaults to id.
@@ -4,8 +4,6 @@
4
4
 
5
5
  # Session
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  A `Session` is the isolated runtime for one resource and optional scope. It owns its event bus, thread binding, state, mode and model selections, run control, approvals, suspensions, follow-ups, and display state. The [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) supplies shared agents, configuration, storage, workspaces, and services.
10
8
 
11
9
  Create sessions through `controller.createSession()`. Direct construction and controller wiring methods aren't application APIs.
@@ -351,6 +349,14 @@ Return the active thread ID, or `null` when no thread is bound.
351
349
  const threadId = session.thread.getId()
352
350
  ```
353
351
 
352
+ ### `session.thread.ensureId({ requestContext? })`
353
+
354
+ Return the active thread ID, creating and binding a new thread when none is bound. Concurrent calls share one thread. Use it with sessions created with `createInitialThread: false`.
355
+
356
+ ```typescript
357
+ const threadId = await session.thread.ensureId()
358
+ ```
359
+
354
360
  ### `session.thread.list(options?)`
355
361
 
356
362
  List threads from storage. By default only threads for the current resource are returned, and transient forked subagent threads are hidden.
@@ -47,7 +47,7 @@ The `channels` property accepts a `ChannelConfig` object with the following fiel
47
47
 
48
48
  **userName** (`string`): Bot display name shown in platform messages. Defaults to the agent's name, or 'Mastra' if no name is set. (Default: `` agent's `name` ``)
49
49
 
50
- **threadContext** (`{ maxMessages?: number; addSystemMessage?: boolean }`): How the agent picks up context about the current thread. maxMessages controls how many recent platform messages are fetched on first mention (set to 0 to disable; only applies to non-DM threads). addSystemMessage: false skips the built-in system message that tells the agent which channel/platform a request came from. (Default: `{ maxMessages: 10, addSystemMessage: true }`)
50
+ **threadContext** (`{ maxMessages?: number; addSystemMessage?: boolean }`): How the agent picks up context about the current thread. maxMessages sets how many platform messages are saved to memory on first mention: the thread's first message plus up to maxMessages - 1 recent messages, with an omitted-count marker between them when needed (set to 0 to disable; only applies to non-DM threads). addSystemMessage: false skips the built-in system message that tells the agent which channel/platform a request came from. (Default: `{ maxMessages: 10, addSystemMessage: true }`)
51
51
 
52
52
  **chatOptions** (`Omit<ChatConfig, 'adapters' | 'state' | 'userName'>`): Additional options passed directly to the Chat SDK. Use for advanced configuration such as dedupeTtlMs, fallbackStreamingPlaceholderText, lockScope, and messageHistory.
53
53
 
@@ -202,7 +202,8 @@ Override built-in event handlers. Each handler can be:
202
202
 
203
203
  - **Omitted**: uses the default Mastra handler (routes the message through the agent and posts the response)
204
204
  - **`false`**: disables the handler entirely
205
- - **A function** `(thread, message, defaultHandler) => Promise<void>`: wraps or replaces the default
205
+ - **A function** `(thread, message, defaultHandler, ctx) => Promise<void>`: wraps or replaces the default
206
+ - When a `chatOptions.concurrency` strategy batches messages from several senders into one dispatch, the function is called once per sender's turn, each with its own `ctx`; `ctx.skipped` holds that turn's earlier batched messages
206
207
 
207
208
  ```typescript
208
209
  import { Agent } from '@mastra/core/agent'
@@ -179,17 +179,22 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
179
179
 
180
180
  #### `observe(runId, options?)`
181
181
 
182
- Reconnects to an existing run, replaying cached events before delivering live ones. Use this after a network disconnection. Pass `offset` to start replay from a known position.
182
+ Reconnects to an existing run. Use this after a network disconnection. For the supported general reconnect flow, omit `offset` to replay all available cached events before receiving live events.
183
183
 
184
184
  ```typescript
185
- const { output, cleanup } = await durableAgent.observe(runId, {
186
- offset: 0,
185
+ const { output } = await durableAgent.observe(runId, {
187
186
  onChunk: chunk => console.log(chunk),
188
187
  })
189
188
 
190
189
  await output.text
191
190
  ```
192
191
 
192
+ The `offset` option is an inclusive, zero-based PubSub event index. It counts every cached event published to the run topic, including lifecycle events, so it isn't a chunk count. Public stream chunks and callbacks don't expose the PubSub index. Only pass an offset when another integration already tracks the transport position.
193
+
194
+ A non-zero offset can skip earlier events. Aggregated values are built only from chunks delivered to that observer. If the offset skips earlier text deltas, `output.text` is partial and structured output may be incomplete or fail validation or parsing.
195
+
196
+ When the PubSub transport supports numeric offsets, an offset beyond the highest retained index replays nothing and also skips live events with lower indexes. The observer receives events only when the published index reaches the requested offset. If the index counter restarts below that offset, the observer can wait indefinitely. On a transport without numeric offset support, providing an offset starts with new live events and doesn't replay cached events. Replay is limited to events still available in the configured cache. Events can't be replayed when caching is disabled, `shouldCache` excludes the run topic, a cache write fails, or retained events have been cleared.
197
+
193
198
  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 end the stream after a bounded period of silence. Before timing out, `observe()` can consult an optional `isAlive` check. Return `true` while work continues, such as during a long-running tool call or a pause for human input. A `false` result ends the stream with an error, as does omitting `isAlive`. A transient throw from `isAlive` is treated as "still alive", so a momentary check failure never ends a live stream.
194
199
 
195
200
  ```typescript
@@ -235,7 +240,7 @@ interface PrepareResult {
235
240
 
236
241
  #### `abortRunStream(runId)`
237
242
 
238
- Stops a run by ID from any process that shares the agent's [PubSub](https://mastra.ai/docs/server/pubsub). Only the `runId` from `stream()` or `prepare()` is needed, so a later request can stop a run it didn't start. The run ends the same way as `abort()` on the stream result: the `finish` event carries reason `abort`, `onAbort` fires, and `observe()` consumers see the stream end.
243
+ Stops a run by ID from any process that shares the agent's [PubSub](https://mastra.ai/docs/server/pubsub). Only the `runId` from `stream()` or `prepare()` is needed, so a later request can stop a run it didn't start. The run ends the same way as `abort()` on the stream result: the stream emits an `abort` chunk, `onAbort` fires, and `observe()` consumers see the stream end.
239
244
 
240
245
  ```typescript
241
246
  const { runId } = await durableAgent.stream('Summarize the document')
@@ -426,7 +431,7 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
426
431
 
427
432
  **onStepFinish** (`(result: AgentStepFinishEventData) => void | Promise<void>`): Called when a step in the agentic loop finishes.
428
433
 
429
- **onFinish** (`(result: AgentFinishEventData) => void | Promise<void>`): Called when the run finishes.
434
+ **onFinish** (`(result: AgentFinishEventData) => void | Promise<void>`): Called when the run completes successfully. Aborted runs call onAbort; failed runs call onError.
430
435
 
431
436
  **onError** (`(error: Error) => void | Promise<void>`): Called when the run errors.
432
437
 
@@ -434,9 +439,9 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
434
439
 
435
440
  **onAbort** (`AgentExecutionOptions['onAbort']`): Called when the run is aborted via abortSignal, result.abort(), abortRunStream(), or abortThreadStream(). Receives the steps completed before the abort and, in text, the assistant text streamed so far.
436
441
 
437
- **onIterationComplete** (`AgentExecutionOptions['onIterationComplete']`): Called after every agentic-loop iteration with the latest messageList, finishReason, and isFinal flag. Observation-only on durable agents: returning continue: false or feedback does not influence the loop.
442
+ **onIterationComplete** (`AgentExecutionOptions['onIterationComplete']`): Called after every agentic-loop iteration with the latest messageList, finishReason, and isFinal flag. Return continue: true to request another iteration or continue: false to stop. Feedback is added as a synthetic assistant message when the loop runs another iteration. If the model has stopped, feedback alone or continue: false with feedback does not start another iteration. When the loop was already going to continue, continue: false with feedback runs one final feedback-guided iteration before stopping.
438
443
 
439
- `resume()` and `observe()` accept the same lifecycle callbacks (`onChunk`, `onStepFinish`, `onFinish`, `onError`, `onSuspended`). `observe()` also accepts an `offset` to control where replay starts.
444
+ `resume()`, `observe()`, and `recover()` accept the same lifecycle callbacks (`onChunk`, `onStepFinish`, `onFinish`, `onError`, `onAbort`, `onSuspended`). `observe()` also accepts an `offset` to control where replay starts.
440
445
 
441
446
  ## DurableAgentStreamResult
442
447
 
@@ -1040,7 +1040,7 @@ console.log(diff.changes) // Fields that changed between versions
1040
1040
  In the React SDK, pass an `agentVersionId` through `requestContext` when using the `useChat` hook:
1041
1041
 
1042
1042
  ```typescript
1043
- import { useChat } from '@mastra/react'
1043
+ import { useChat } from '@mastra/react/chat'
1044
1044
 
1045
1045
  function Chat() {
1046
1046
  const { messages, input, handleInputChange, handleSubmit } = useChat({
@@ -217,6 +217,34 @@ The API limits predicate depth, nodes, related clauses, set members, literal byt
217
217
 
218
218
  See [Advanced trace queries](https://mastra.ai/reference/observability/tracing/trace-query) for the complete limits, request fields, predicates, thread qualification semantics, cursor pagination, response shapes, and errors.
219
219
 
220
+ ## Querying spans
221
+
222
+ `querySpans()` returns one row per matching completed span across traces. Use it to list the spans themselves. `queryTraces()` with a `spans.some` predicate returns the traces that contain a matching span instead. Every query requires an ISO timestamp range of at most 31 days.
223
+
224
+ ```typescript
225
+ const result = await mastraClient.querySpans({
226
+ timeRange: {
227
+ from: '2026-10-01T00:00:00.000Z',
228
+ to: '2026-10-02T00:00:00.000Z',
229
+ },
230
+ where: {
231
+ op: 'eq',
232
+ left: { path: 'spanType' },
233
+ right: { literal: 'tool_call' },
234
+ },
235
+ orderBy: [{ field: 'startedAt', direction: 'desc' }],
236
+ page: { limit: 50 },
237
+ })
238
+
239
+ // { spans: [{ traceId, spanId, name, spanType, status, durationMs, cost, ... }], page: { next } }
240
+ ```
241
+
242
+ Pass `result.page.next` back as `page.after` with the same time range, filter, and ordering to load the next page. Each row contains identifiers, display fields, input and output previews, and the span's model cost. Use `getSpan()` to load the full span.
243
+
244
+ Span queries are optional for observability stores. Check `capabilities.spanQuery` from `getObservabilityCapabilities()` before calling `querySpans()`, and treat a missing value as unsupported. Unsupported servers reject with `501 SPAN_QUERY_UNSUPPORTED`.
245
+
246
+ See [Query individual spans](https://mastra.ai/reference/observability/tracing/trace-query) for filters, ordering, cursors, cost states, limits, and errors.
247
+
220
248
  ## Deleting traces
221
249
 
222
250
  Delete traces and their associated spans, metrics, logs, scores, and feedback:
@@ -25,10 +25,27 @@ A client that accepts command and argument fields can use:
25
25
  }
26
26
  ```
27
27
 
28
- Configure provider authentication in Mastra Code before starting the client, or supply API keys in the server process's environment. ACP sessions don't load project `.env` files into the shared process environment. The server doesn't offer interactive ACP authentication.
29
-
30
28
  After initialization, the client calls `session/new` with an absolute `cwd` and an `mcpServers` array. The response includes the session ID and configuration choices. Send that ID with subsequent prompts and configuration requests.
31
29
 
30
+ ## Authentication
31
+
32
+ `session/new` returns an `auth_required` error when no model provider is configured, so clients can offer the methods from the `initialize` response:
33
+
34
+ | Method ID | Type | Behavior |
35
+ | ------------------ | -------- | ---------------------------------------------------------------------------------------------- |
36
+ | `openai-codex` | Agent | Opens the browser to sign in with a ChatGPT Plus or Pro subscription. |
37
+ | `kimi-for-coding` | Agent | Opens the browser to approve a Kimi For Coding device sign-in. |
38
+ | `xai` | Agent | Opens the browser to approve an xAI device sign-in. |
39
+ | `anthropic` | Terminal | Runs `mastracode login --provider anthropic` to sign in with a Claude Pro or Max subscription. |
40
+ | `github-copilot` | Terminal | Runs `mastracode login --provider github-copilot` to sign in with GitHub Copilot. |
41
+ | `mastracode-login` | Terminal | Runs `mastracode login` to choose any provider or save an API key. |
42
+
43
+ Terminal methods are offered only to clients that advertise terminal authentication.
44
+
45
+ For agent methods, `authenticate` runs the sign-in inside the server process and returns after the credentials are saved. If a provider needs typed input, such as a code to paste, the request fails and asks you to run `mastracode login` in a terminal.
46
+
47
+ API keys in the server process's environment also count as a configured provider. ACP sessions don't load project `.env` files into the shared process environment. New sessions pick up saved credentials without restarting the server. When the default model's provider isn't configured, a new session starts on the default model of a provider that is, such as `anthropic/claude-fable-5` after an Anthropic sign-in.
48
+
32
49
  ## `acpMain(options?)`
33
50
 
34
51
  To start the same server from an SDK entry point:
@@ -4,8 +4,6 @@
4
4
 
5
5
  # mountAgentControllerOnMastra()
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  The `mountAgentControllerOnMastra()` function builds the Mastra Code agent controller (the coding agent behind [Mastra Code](https://code.mastra.ai), with its modes, tools, memory, and thread management) and registers it on a server-owned [Mastra](https://mastra.ai/reference/core/mastra-class) instance. Use it to serve the Mastra Code agent to your own UI (web app, editor, bot): each client creates or resumes its own isolated session through the returned [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
10
8
 
11
9
  To construct the `Mastra` instance yourself (for example in a deployable entry file), use `prepareAgentControllerMount()` from the same package, which returns the constructor args plus a `finalize()` callback.
@@ -244,7 +244,7 @@ export const mastra = new Mastra({
244
244
 
245
245
  **Type:** `Record<string, MastraMemory>`
246
246
 
247
- A registry of memory instances that can be referenced by agents. Memory gives agents coherence across interactions by retaining relevant information from past conversations. Mastra supports message history for recent messages and working memory for persistent user-specific details. Semantic recall retrieves older messages based on relevance.
247
+ A registry of memory instances that can be referenced by agents, including stored agents that use `{ type: 'id', memoryId: '<key>' }`. Memory gives agents coherence across interactions by retaining relevant information from past conversations. Mastra supports message history for recent messages and working memory for persistent user-specific details. Semantic recall retrieves older messages based on relevance.
248
248
 
249
249
  Visit the [Memory documentation](https://mastra.ai/docs/memory/overview) to learn more.
250
250
 
@@ -192,6 +192,34 @@ await editor.agent.create({
192
192
  })
193
193
  ```
194
194
 
195
+ ### Stored agent memory
196
+
197
+ The `memory` field of a stored agent accepts one of these shapes:
198
+
199
+ - `{ type: 'id', memoryId: string }`: Uses a memory instance registered on the Mastra instance. The editor looks up `memoryId` as a registry key first, then as the memory instance's `id`. The agent uses that exact instance, including its storage, processors, and working memory settings.
200
+ - `{ type: 'inline', config: SerializedMemoryConfig }`: Builds a new memory instance from a serializable config.
201
+ - `SerializedMemoryConfig`: The untagged inline config. Existing stored agents use this shape and keep working.
202
+
203
+ Reference a registered memory instance so many stored agents share one configuration:
204
+
205
+ ```typescript
206
+ import { mastra } from '../mastra'
207
+
208
+ const editor = mastra.getEditor()!
209
+
210
+ await editor.agent.create({
211
+ id: 'support-agent',
212
+ name: 'Support agent',
213
+ instructions: 'You are a friendly support agent for Acme.',
214
+ model: { provider: 'openai', name: 'gpt-5' },
215
+ memory: { type: 'id', memoryId: 'supportMemory' },
216
+ })
217
+ ```
218
+
219
+ The reference is resolved when the editor loads the agent. If no registered memory matches `memoryId`, the agent loads without memory and the editor logs a warning that names the missing key. The stored reference isn't changed. In conditional memory, a variant whose reference isn't registered is skipped. If you register memory with `mastra.addMemory()` after an agent has loaded, call `editor.agent.clearCache(id)` so the next load picks it up. Renaming or removing a key in the Mastra `memory` config detaches memory from every stored agent that references it, so keep keys stable across deployments.
220
+
221
+ `editor.agent.clone()` stores a reference when the source agent uses a registered memory instance, and an inline config otherwise.
222
+
195
223
  ## Methods
196
224
 
197
225
  ### Provider access
@@ -4,8 +4,6 @@
4
4
 
5
5
  # config.ts
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  An agent's `config.ts` sets its model and runtime options. Use it for options that belong to the [`Agent`](https://mastra.ai/reference/agents/agent) itself, while sibling files provide instructions, tools, skills, et cetera.
10
8
 
11
9
  ## What belongs in `config.ts`
@@ -4,8 +4,6 @@
4
4
 
5
5
  # Instructions
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  An agent's instructions hold its always-on system prompt: the model reads it on every turn. Use them to define the agent's identity, tone, role, and standing rules.
10
8
 
11
9
  Write them in one of two files at the agent root. Use `instructions.md` when the prompt is fixed text. Use `instructions.ts` when the prompt needs code, for example when it's built from shared constants or resolved per request.
@@ -4,8 +4,6 @@
4
4
 
5
5
  # Logger
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  Mastra sets the project's [logger](https://mastra.ai/docs/observability/logging) from a `logger.ts` file directly under `src/mastra/`. The file default-exports a logger, which replaces the built-in `ConsoleLogger` used across agents, workflows, and other components.
10
8
 
11
9
  Use this page for the file-based convention. For log levels, transports, and provider details, see [logging](https://mastra.ai/docs/observability/logging).
@@ -4,8 +4,6 @@
4
4
 
5
5
  # Memory
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  A file-based agent gets [memory](https://mastra.ai/docs/memory/overview) from a `memory.ts` file that default-exports a [`Memory`](https://mastra.ai/reference/memory/memory-class) instance. Use this page for the file-based convention; use the memory docs for message history, semantic recall, storage, and processors.
10
8
 
11
9
  Without `memory.ts` or `config.memory`, the agent has no memory by default. Each `generate()` or `stream()` call starts without remembered conversation state unless you pass the prior context yourself.
@@ -4,8 +4,6 @@
4
4
 
5
5
  # Observability
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  Mastra configures [observability](https://mastra.ai/docs/observability/overview) from an `observability.ts` file directly under `src/mastra/`. The file default-exports an `Observability` instance that sets up tracing, logging, metrics, and feedback for the project.
10
8
 
11
9
  Use this page for the file-based convention. For the signal model, exporters, storage, and multi-config setup, see the [observability overview](https://mastra.ai/docs/observability/overview) and [observability configuration](https://mastra.ai/docs/observability/overview).
@@ -4,8 +4,6 @@
4
4
 
5
5
  # Processors
6
6
 
7
- > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
-
9
7
  A file-based agent discovers [processors](https://mastra.ai/docs/agents/processors) from its `processors/` directory. Use this page for the file-based convention; use the processors guide for built-in processors, custom processors, streaming behavior, and advanced patterns.
10
8
 
11
9
  Files under `processors/input/` run before messages reach the model. Files under `processors/output/` run after the model responds. Each file default-exports one [`Processor`](https://mastra.ai/reference/processors/processor-interface), and the filename becomes its discovery key.