@mastra/mcp-docs-server 1.1.29 → 1.1.30-alpha.3

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.
@@ -1,6 +1,6 @@
1
1
  # Background tasks
2
2
 
3
- **Added in:** `@mastra/core@1.28.0`
3
+ **Added in:** `@mastra/core@1.29.0`
4
4
 
5
5
  Background tasks let an agent dispatch a long-running tool call without blocking the agentic loop. The tool returns an immediate acknowledgement, the LLM continues responding, and the task runs to completion in the background. When it finishes, its result is written to memory and if you use [`streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) the agent is re-invoked automatically so the result is processed in the same call.
6
6
 
@@ -8,9 +8,9 @@ Three categories of metrics are emitted automatically:
8
8
  - **Token usage metrics**: Input and output token counts broken down by type (text, cache, audio, image, reasoning).
9
9
  - **Cost estimation**: Estimated cost per model call based on an embedded pricing registry.
10
10
 
11
- > **Note:** Metrics require a separate OLAP store for observability. Relational databases like PostgreSQL, LibSQL, etc. are not supported for metrics. In-memory storage resets on restart.
11
+ > **Note:** Metrics require an OLAP-capable store for observability. Relational databases like PostgreSQL, LibSQL, etc. are not supported for metrics. In-memory storage resets on restart.
12
12
  >
13
- > For local development, you can use [DuckDB](https://mastra.ai/reference/vectors/duckdb). We don't recommend using in-memory/DuckDB for production, ClickHouse support is coming soon for scalable metrics storage.
13
+ > For local development, use [DuckDB](https://duckdb.org/) through `@mastra/duckdb`. For production, use [ClickHouse](https://clickhouse.com/) through `@mastra/clickhouse`.
14
14
 
15
15
  ## When to use metrics
16
16
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The `DefaultExporter` persists traces to your configured storage backend, making them accessible through Studio. It's automatically enabled when using the default observability configuration and requires no external services.
4
4
 
5
- > **Production Observability:** Observability data can quickly overwhelm general-purpose databases in production. For high-traffic applications, we recommend using **ClickHouse** for the observability storage domain via [composite storage](https://mastra.ai/reference/storage/composite). See [Production Recommendations](#production-recommendations) for details.
5
+ > **Production Observability:** Observability data can quickly overwhelm general-purpose databases in production. For high-traffic applications, route the observability storage domain to [ClickHouse](https://mastra.ai/reference/storage/clickhouse) through [composite storage](https://mastra.ai/reference/storage/composite). See [Production Recommendations](#production-recommendations) for details.
6
6
 
7
7
  ## Configuration
8
8
 
@@ -114,7 +114,7 @@ If you set the strategy to `'auto'`, the `DefaultExporter` automatically selects
114
114
 
115
115
  | Storage Provider | Preferred Strategy | Supported Strategies | Recommended Use |
116
116
  | ---------------------------------------------------------------- | ------------------ | ------------------------------- | ------------------------------------- |
117
- | **ClickHouse** (`@mastra/clickhouse`) | insert-only | insert-only | Production (high-volume) |
117
+ | **[ClickHouse](https://mastra.ai/reference/storage/clickhouse)** | insert-only | insert-only | Production (high-volume) |
118
118
  | **[PostgreSQL](https://mastra.ai/reference/storage/postgresql)** | batch-with-updates | batch-with-updates, insert-only | Production (low volume) |
119
119
  | **[MSSQL](https://mastra.ai/reference/storage/mssql)** | batch-with-updates | batch-with-updates, insert-only | Production (low volume) |
120
120
  | **[MongoDB](https://mastra.ai/reference/storage/mongodb)** | batch-with-updates | batch-with-updates, insert-only | Production (low volume) |
@@ -143,7 +143,7 @@ Observability data grows quickly in production environments. A single agent inte
143
143
 
144
144
  ### Recommended: ClickHouse for High-Volume Production
145
145
 
146
- [ClickHouse](https://mastra.ai/reference/storage/composite) is a columnar database designed for high-volume analytics workloads. It's the recommended choice for production observability because:
146
+ [ClickHouse](https://mastra.ai/reference/storage/clickhouse) is a columnar database designed for high-volume analytics workloads. It's the recommended choice for production observability because:
147
147
 
148
148
  - **Optimized for writes**: Handles millions of inserts per second
149
149
  - **Efficient compression**: Reduces storage costs for trace data
@@ -1,31 +1,31 @@
1
1
  # Laminar exporter
2
2
 
3
- [Laminar](https://laminar.sh/) is an open-source platform for engineering LLM products. The Laminar exporter sends your Mastra traces to Laminar via OTLP/HTTP (protobuf), with Laminar-native span attributes for correct rendering (paths, inputs/outputs, tags, metadata).
3
+ [Laminar](https://laminar.sh/) is an open-source, OpenTelemetry-native observability platform for AI agents. Trace, debug, and monitor every Mastra agent run, model step, tool call, and sub-agent with a single `MastraExporter` wired into your `Observability` config.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  **npm**:
8
8
 
9
9
  ```bash
10
- npm install @mastra/laminar@latest
10
+ npm install @lmnr-ai/lmnr
11
11
  ```
12
12
 
13
13
  **pnpm**:
14
14
 
15
15
  ```bash
16
- pnpm add @mastra/laminar@latest
16
+ pnpm add @lmnr-ai/lmnr
17
17
  ```
18
18
 
19
19
  **Yarn**:
20
20
 
21
21
  ```bash
22
- yarn add @mastra/laminar@latest
22
+ yarn add @lmnr-ai/lmnr
23
23
  ```
24
24
 
25
25
  **Bun**:
26
26
 
27
27
  ```bash
28
- bun add @mastra/laminar@latest
28
+ bun add @lmnr-ai/lmnr
29
29
  ```
30
30
 
31
31
  ## Configuration
@@ -42,7 +42,6 @@ LMNR_PROJECT_API_KEY=lmnr_...
42
42
 
43
43
  # Optional
44
44
  LMNR_BASE_URL=https://api.lmnr.ai
45
- LAMINAR_ENDPOINT=https://api.lmnr.ai/v1/traces
46
45
  ```
47
46
 
48
47
  ### Zero-Config Setup
@@ -52,14 +51,16 @@ With environment variables set, use the exporter with no configuration:
52
51
  ```typescript
53
52
  import { Mastra } from '@mastra/core'
54
53
  import { Observability } from '@mastra/observability'
55
- import { LaminarExporter } from '@mastra/laminar'
54
+ import { Laminar, MastraExporter } from '@lmnr-ai/lmnr'
55
+
56
+ Laminar.initialize()
56
57
 
57
58
  export const mastra = new Mastra({
58
59
  observability: new Observability({
59
60
  configs: {
60
61
  laminar: {
61
62
  serviceName: 'my-service',
62
- exporters: [new LaminarExporter()],
63
+ exporters: [new MastraExporter()],
63
64
  },
64
65
  },
65
66
  }),
@@ -73,7 +74,13 @@ You can also pass credentials directly (takes precedence over environment variab
73
74
  ```typescript
74
75
  import { Mastra } from '@mastra/core'
75
76
  import { Observability } from '@mastra/observability'
76
- import { LaminarExporter } from '@mastra/laminar'
77
+ import { Laminar, MastraExporter } from '@lmnr-ai/lmnr'
78
+
79
+ Laminar.initialize({
80
+ projectApiKey: process.env.LMNR_PROJECT_API_KEY!,
81
+ baseUrl: process.env.LMNR_BASE_URL, // Optional
82
+ // ...other options
83
+ })
77
84
 
78
85
  export const mastra = new Mastra({
79
86
  observability: new Observability({
@@ -81,10 +88,7 @@ export const mastra = new Mastra({
81
88
  laminar: {
82
89
  serviceName: 'my-service',
83
90
  exporters: [
84
- new LaminarExporter({
85
- apiKey: process.env.LMNR_PROJECT_API_KEY!,
86
- baseUrl: process.env.LMNR_BASE_URL, // Optional
87
- endpoint: process.env.LAMINAR_ENDPOINT, // Optional
91
+ new MastraExporter({
88
92
  realtime: process.env.NODE_ENV === 'development', // Optional
89
93
  }),
90
94
  ],
@@ -94,7 +98,11 @@ export const mastra = new Mastra({
94
98
  })
95
99
  ```
96
100
 
101
+ > **Note:** For advanced usage, including the full `MastraExporter` options and multi-agent trace examples, see [Laminar's Mastra integration guide](https://laminar.sh/docs/tracing/integrations/mastra).
102
+
103
+ Mastra also ships a standalone [`LaminarExporter`](https://mastra.ai/reference/observability/tracing/exporters/laminar) in `@mastra/laminar` that sends spans over OTLP/HTTP. It cannot inherit an active OTel context and does not fully map Mastra spans to Laminar's native format, so use the `@lmnr-ai/lmnr` integration above for `observe()` wrappers, multi-agent root spans, and accurate Laminar rendering.
104
+
97
105
  ## Related
98
106
 
99
107
  - [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview)
100
- - [Laminar Documentation](https://docs.laminar.sh)
108
+ - [Laminar Documentation](https://laminar.sh/docs)
@@ -1,6 +1,6 @@
1
1
  # Background task streaming
2
2
 
3
- **Added in:** `@mastra/core@1.28.0`
3
+ **Added in:** `@mastra/core@1.29.0`
4
4
 
5
5
  `mastra.backgroundTaskManager.stream()` returns a `ReadableStream` of [background task](https://mastra.ai/docs/agents/background-tasks) lifecycle events. Use it to monitor running tasks across the system, for example to drive a status dashboard, surface progress in your own UI, or pipe events into an SSE response.
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Assistant UI](https://assistant-ui.com) is the TypeScript/React library for AI Chat. Built on shadcn/ui and Tailwind CSS, it enables developers to create beautiful, enterprise-grade chat experiences in minutes.
4
4
 
5
- > **Info:** For a full-stack integration approach where Mastra runs directly in your Next.js API routes, see the [Full-Stack Integration Guide](https://www.assistant-ui.com/docs/runtimes/mastra/full-stack-integration) on Assistant UI's documentation site.
5
+ > **Info:** For a full-stack integration approach where Mastra runs directly in your Next.js API routes, see the [Full-Stack Integration Guide](https://www.assistant-ui.com/docs/integrations/frameworks/mastra/full-stack) on Assistant UI's documentation site.
6
6
 
7
7
  > **Tip:** Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of Assistant UI integrated with Mastra.
8
8
 
@@ -1,6 +1,6 @@
1
1
  # ![OpenRouter logo](https://models.dev/logos/openrouter.svg)OpenRouter
2
2
 
3
- OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 179 models through Mastra's model router.
3
+ OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 181 models through Mastra's model router.
4
4
 
5
5
  Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
6
6
 
@@ -125,6 +125,7 @@ ANTHROPIC_API_KEY=ant-...
125
125
  | `nousresearch/hermes-4-405b` |
126
126
  | `nousresearch/hermes-4-70b` |
127
127
  | `nvidia/nemotron-3-nano-30b-a3b:free` |
128
+ | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free` |
128
129
  | `nvidia/nemotron-3-super-120b-a12b` |
129
130
  | `nvidia/nemotron-3-super-120b-a12b:free` |
130
131
  | `nvidia/nemotron-nano-12b-v2-vl:free` |
@@ -155,6 +156,7 @@ ANTHROPIC_API_KEY=ant-...
155
156
  | `openai/gpt-5.4-nano` |
156
157
  | `openai/gpt-5.4-pro` |
157
158
  | `openai/gpt-5.5` |
159
+ | `openai/gpt-5.5-pro` |
158
160
  | `openai/gpt-oss-120b` |
159
161
  | `openai/gpt-oss-120b:exacto` |
160
162
  | `openai/gpt-oss-120b:free` |
@@ -1,6 +1,6 @@
1
1
  # Model Providers
2
2
 
3
- Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 3761 models from 106 providers through a single API.
3
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 3775 models from 106 providers through a single API.
4
4
 
5
5
  ## Features
6
6
 
@@ -109,7 +109,7 @@ const response = await agent.generate("Hello!", {
109
109
 
110
110
  **structuredOutputMode** (`"outputFormat" | "jsonTool" | "auto" | undefined`)
111
111
 
112
- **thinking** (`{ type: "adaptive"; } | { type: "enabled"; budgetTokens?: number | undefined; } | { type: "disabled"; } | undefined`)
112
+ **thinking** (`{ type: "adaptive"; display?: "omitted" | "summarized" | undefined; } | { type: "enabled"; budgetTokens?: number | undefined; } | { type: "disabled"; } | undefined`)
113
113
 
114
114
  **disableParallelToolUse** (`boolean | undefined`)
115
115
 
@@ -123,7 +123,9 @@ const response = await agent.generate("Hello!", {
123
123
 
124
124
  **toolStreaming** (`boolean | undefined`)
125
125
 
126
- **effort** (`"low" | "medium" | "high" | "max" | undefined`)
126
+ **effort** (`"low" | "medium" | "high" | "xhigh" | "max" | undefined`)
127
+
128
+ **taskBudget** (`{ type: "tokens"; total: number; remaining?: number | undefined; } | undefined`)
127
129
 
128
130
  **speed** (`"fast" | "standard" | undefined`)
129
131
 
@@ -1,6 +1,6 @@
1
1
  # ![Baseten logo](https://models.dev/logos/baseten.svg)Baseten
2
2
 
3
- Access 10 Baseten models through Mastra's model router. Authentication is handled automatically using the `BASETEN_API_KEY` environment variable.
3
+ Access 11 Baseten models through Mastra's model router. Authentication is handled automatically using the `BASETEN_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Baseten documentation](https://docs.baseten.co/development/model-apis/overview).
6
6
 
@@ -36,6 +36,7 @@ for await (const chunk of stream) {
36
36
  | -------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
37
  | `baseten/deepseek-ai/DeepSeek-V3-0324` | 164K | | | | | | $0.77 | $0.77 |
38
38
  | `baseten/deepseek-ai/DeepSeek-V3.1` | 164K | | | | | | $0.50 | $2 |
39
+ | `baseten/deepseek-ai/DeepSeek-V4-Pro` | 1.0M | | | | | | $2 | $3 |
39
40
  | `baseten/MiniMaxAI/MiniMax-M2.5` | 204K | | | | | | $0.30 | $1 |
40
41
  | `baseten/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
41
42
  | `baseten/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
@@ -1,6 +1,6 @@
1
1
  # ![Nvidia logo](https://models.dev/logos/nvidia.svg)Nvidia
2
2
 
3
- Access 79 Nvidia models through Mastra's model router. Authentication is handled automatically using the `NVIDIA_API_KEY` environment variable.
3
+ Access 80 Nvidia models through Mastra's model router. Authentication is handled automatically using the `NVIDIA_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Nvidia documentation](https://docs.api.nvidia.com/nim/).
6
6
 
@@ -95,6 +95,7 @@ for await (const chunk of stream) {
95
95
  | `nvidia/nvidia/llama3-chatqa-1.5-70b` | 128K | | | | | | — | — |
96
96
  | `nvidia/nvidia/nemoretriever-ocr-v1` | — | | | | | | — | — |
97
97
  | `nvidia/nvidia/nemotron-3-nano-30b-a3b` | 131K | | | | | | — | — |
98
+ | `nvidia/nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | 256K | | | | | | — | — |
98
99
  | `nvidia/nvidia/nemotron-3-super-120b-a12b` | 262K | | | | | | $0.20 | $0.80 |
99
100
  | `nvidia/nvidia/nemotron-4-340b-instruct` | 128K | | | | | | — | — |
100
101
  | `nvidia/nvidia/nvidia-nemotron-nano-9b-v2` | 131K | | | | | | — | — |
@@ -1,6 +1,6 @@
1
1
  # ![OpenAI logo](https://models.dev/logos/openai.svg)OpenAI
2
2
 
3
- Access 51 OpenAI models through Mastra's model router. Authentication is handled automatically using the `OPENAI_API_KEY` environment variable.
3
+ Access 52 OpenAI models through Mastra's model router. Authentication is handled automatically using the `OPENAI_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [OpenAI documentation](https://platform.openai.com/docs/models).
6
6
 
@@ -67,6 +67,7 @@ for await (const chunk of stream) {
67
67
  | `openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
68
68
  | `openai/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
69
69
  | `openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
70
+ | `openai/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
70
71
  | `openai/gpt-image-1` | — | | | | | | — | — |
71
72
  | `openai/gpt-image-1-mini` | — | | | | | | — | — |
72
73
  | `openai/gpt-image-1.5` | — | | | | | | — | — |
@@ -1,6 +1,6 @@
1
1
  # ![Weights & Biases logo](https://models.dev/logos/wandb.svg)Weights & Biases
2
2
 
3
- Access 17 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
3
+ Access 18 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
6
6
 
@@ -51,6 +51,7 @@ for await (const chunk of stream) {
51
51
  | `wandb/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
52
52
  | `wandb/Qwen/Qwen3-Coder-480B-A35B-Instruct` | 262K | | | | | | $1 | $2 |
53
53
  | `wandb/zai-org/GLM-5-FP8` | 200K | | | | | | $1 | $3 |
54
+ | `wandb/zai-org/GLM-5.1` | 200K | | | | | | $1 | $4 |
54
55
 
55
56
  ## Advanced configuration
56
57
 
@@ -80,7 +81,7 @@ const agent = new Agent({
80
81
  model: ({ requestContext }) => {
81
82
  const useAdvanced = requestContext.task === "complex";
82
83
  return useAdvanced
83
- ? "wandb/zai-org/GLM-5-FP8"
84
+ ? "wandb/zai-org/GLM-5.1"
84
85
  : "wandb/MiniMaxAI/MiniMax-M2.5";
85
86
  }
86
87
  });
@@ -1,6 +1,6 @@
1
1
  # ![Z.AI Coding Plan logo](https://models.dev/logos/zai-coding-plan.svg)Z.AI Coding Plan
2
2
 
3
- Access 4 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
3
+ Access 5 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Z.AI Coding Plan documentation](https://docs.z.ai/devpack/overview).
6
6
 
@@ -32,12 +32,13 @@ for await (const chunk of stream) {
32
32
 
33
33
  ## Models
34
34
 
35
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
- | ----------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `zai-coding-plan/glm-4.5-air` | 131K | | | | | | — | — |
38
- | `zai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
39
- | `zai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
40
- | `zai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `zai-coding-plan/glm-4.5-air` | 131K | | | | | | — | — |
38
+ | `zai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
39
+ | `zai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
40
+ | `zai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
41
+ | `zai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
41
42
 
42
43
  ## Advanced configuration
43
44
 
@@ -67,7 +68,7 @@ const agent = new Agent({
67
68
  model: ({ requestContext }) => {
68
69
  const useAdvanced = requestContext.task === "complex";
69
70
  return useAdvanced
70
- ? "zai-coding-plan/glm-5.1"
71
+ ? "zai-coding-plan/glm-5v-turbo"
71
72
  : "zai-coding-plan/glm-4.5-air";
72
73
  }
73
74
  });
@@ -1,6 +1,6 @@
1
1
  # ![ZenMux logo](https://models.dev/logos/zenmux.svg)ZenMux
2
2
 
3
- Access 89 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
3
+ Access 96 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [ZenMux documentation](https://docs.zenmux.ai).
6
6
 
@@ -49,6 +49,8 @@ for await (const chunk of stream) {
49
49
  | `zenmux/deepseek/deepseek-chat` | 128K | | | | | | $0.28 | $0.42 |
50
50
  | `zenmux/deepseek/deepseek-v3.2` | 128K | | | | | | $0.28 | $0.43 |
51
51
  | `zenmux/deepseek/deepseek-v3.2-exp` | 163K | | | | | | $0.22 | $0.33 |
52
+ | `zenmux/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
53
+ | `zenmux/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
52
54
  | `zenmux/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
53
55
  | `zenmux/google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
54
56
  | `zenmux/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
@@ -84,6 +86,8 @@ for await (const chunk of stream) {
84
86
  | `zenmux/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
85
87
  | `zenmux/openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
86
88
  | `zenmux/openai/gpt-5.4-pro` | 1.1M | | | | | | $45 | $225 |
89
+ | `zenmux/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
90
+ | `zenmux/openai/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
87
91
  | `zenmux/qwen/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 |
88
92
  | `zenmux/qwen/qwen3-max` | 256K | | | | | | $1 | $6 |
89
93
  | `zenmux/qwen/qwen3.5-flash` | 1.0M | | | | | | $0.10 | $0.40 |
@@ -94,6 +98,7 @@ for await (const chunk of stream) {
94
98
  | `zenmux/stepfun/step-3` | 66K | | | | | | $0.21 | $0.57 |
95
99
  | `zenmux/stepfun/step-3.5-flash` | 256K | | | | | | $0.10 | $0.30 |
96
100
  | `zenmux/stepfun/step-3.5-flash-free` | 256K | | | | | | — | — |
101
+ | `zenmux/tencent/hy3-preview` | 256K | | | | | | $0.17 | $0.57 |
97
102
  | `zenmux/volcengine/doubao-seed-1.8` | 256K | | | | | | $0.11 | $0.28 |
98
103
  | `zenmux/volcengine/doubao-seed-2.0-code` | 256K | | | | | | $0.90 | $4 |
99
104
  | `zenmux/volcengine/doubao-seed-2.0-lite` | 256K | | | | | | $0.09 | $0.51 |
@@ -110,6 +115,8 @@ for await (const chunk of stream) {
110
115
  | `zenmux/xiaomi/mimo-v2-flash` | 262K | | | | | | $0.10 | $0.30 |
111
116
  | `zenmux/xiaomi/mimo-v2-omni` | 265K | | | | | | $0.40 | $2 |
112
117
  | `zenmux/xiaomi/mimo-v2-pro` | 1.0M | | | | | | $2 | $5 |
118
+ | `zenmux/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.40 | $2 |
119
+ | `zenmux/xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $1 | $3 |
113
120
  | `zenmux/z-ai/glm-4.5` | 128K | | | | | | $0.35 | $2 |
114
121
  | `zenmux/z-ai/glm-4.5-air` | 128K | | | | | | $0.11 | $0.56 |
115
122
  | `zenmux/z-ai/glm-4.6` | 200K | | | | | | $0.35 | $2 |
@@ -194,6 +194,7 @@ The Reference section provides documentation of Mastra's API, including paramete
194
194
  - [registerApiRoute()](https://mastra.ai/reference/server/register-api-route)
195
195
  - [Server Routes](https://mastra.ai/reference/server/routes)
196
196
  - [Overview](https://mastra.ai/reference/storage/overview)
197
+ - [ClickHouse Storage](https://mastra.ai/reference/storage/clickhouse)
197
198
  - [Cloudflare D1 Storage](https://mastra.ai/reference/storage/cloudflare-d1)
198
199
  - [Cloudflare KV Storage](https://mastra.ai/reference/storage/cloudflare)
199
200
  - [Composite Storage](https://mastra.ai/reference/storage/composite)
@@ -8,14 +8,14 @@ For setup instructions, see the [Metrics overview](https://mastra.ai/docs/observ
8
8
 
9
9
  Metrics are extracted from spans when they end. The observability layer inspects each completed span, calculates duration, and (for model generation spans) reads token usage data. No manual instrumentation is needed.
10
10
 
11
- Metrics are routed through an internal event bus to the `DefaultExporter`, which batches and flushes them to storage. Only DuckDB and in-memory storage backends support metrics persistence today.
11
+ Metrics are routed through an internal event bus to the `DefaultExporter`, which batches and flushes them to storage.
12
12
 
13
13
  ### What affects whether a metric is available
14
14
 
15
15
  Two conditions must be true for a metric to reach storage:
16
16
 
17
17
  1. `DefaultExporter` is configured as an exporter.
18
- 2. The storage backend supports metrics (`DuckDB` or `InMemory`).
18
+ 2. The storage backend supports metrics (ClickHouse, DuckDB, or in-memory).
19
19
 
20
20
  If metrics aren't appearing, see [troubleshooting](#troubleshooting).
21
21
 
@@ -0,0 +1,274 @@
1
+ # ClickHouse storage
2
+
3
+ [ClickHouse](https://clickhouse.com/) is a columnar database designed for analytical workloads. The `@mastra/clickhouse` package provides storage adapters for several Mastra storage domains and is the recommended backend for production observability.
4
+
5
+ ClickHouse is most commonly used as the dedicated observability backend in a [composite storage](https://mastra.ai/reference/storage/composite) setup, with another database serving the remaining domains. It can also back the supported domains on its own through `ClickhouseStore`.
6
+
7
+ ## When to use ClickHouse
8
+
9
+ - Production observability for traces, logs, metrics, scores, and feedback.
10
+ - Append-heavy workloads where columnar storage and compression help keep costs down.
11
+ - Deployment platforms with ephemeral filesystems (such as [Railway](#deploying-with-railway-and-similar-platforms), Fly.io, Render, Heroku, or container schedulers) where embedded backends like DuckDB cannot persist data.
12
+
13
+ For local development, [LibSQL](https://mastra.ai/reference/storage/libsql) or `@mastra/duckdb` are usually a better fit because they need no external service.
14
+
15
+ ## Installation
16
+
17
+ **npm**:
18
+
19
+ ```bash
20
+ npm install @mastra/clickhouse@latest
21
+ ```
22
+
23
+ **pnpm**:
24
+
25
+ ```bash
26
+ pnpm add @mastra/clickhouse@latest
27
+ ```
28
+
29
+ **Yarn**:
30
+
31
+ ```bash
32
+ yarn add @mastra/clickhouse@latest
33
+ ```
34
+
35
+ **Bun**:
36
+
37
+ ```bash
38
+ bun add @mastra/clickhouse@latest
39
+ ```
40
+
41
+ You will also need a running ClickHouse server. See [Hosting options](#hosting-options) for managed and self-hosted choices.
42
+
43
+ ## Usage
44
+
45
+ ### Observability with vNext (recommended)
46
+
47
+ `ObservabilityStorageClickhouseVNext` is the current observability domain implementation. It uses an insert-only schema backed by `ReplacingMergeTree` and is optimized for the volume produced by traces, logs, metrics, scores, and feedback.
48
+
49
+ Compose it with another storage adapter so observability writes do not contend with your application data:
50
+
51
+ ```typescript
52
+ import { Mastra } from '@mastra/core'
53
+ import { MastraCompositeStore } from '@mastra/core/storage'
54
+ import { LibSQLStore } from '@mastra/libsql'
55
+ import { ObservabilityStorageClickhouseVNext } from '@mastra/clickhouse'
56
+ import { Observability, DefaultExporter } from '@mastra/observability'
57
+
58
+ const observabilityStore = new ObservabilityStorageClickhouseVNext({
59
+ url: process.env.CLICKHOUSE_URL!,
60
+ username: process.env.CLICKHOUSE_USERNAME!,
61
+ password: process.env.CLICKHOUSE_PASSWORD!,
62
+ })
63
+
64
+ export const mastra = new Mastra({
65
+ storage: new MastraCompositeStore({
66
+ id: 'composite-storage',
67
+ default: new LibSQLStore({
68
+ id: 'mastra-storage',
69
+ url: 'file:./mastra.db',
70
+ }),
71
+ domains: {
72
+ observability: observabilityStore,
73
+ },
74
+ }),
75
+ observability: new Observability({
76
+ configs: {
77
+ default: {
78
+ serviceName: 'mastra',
79
+ exporters: [new DefaultExporter()],
80
+ },
81
+ },
82
+ }),
83
+ })
84
+ ```
85
+
86
+ `DefaultExporter` automatically selects the `insert-only` strategy when ClickHouse is the observability backend, which gives the highest write throughput. See [tracing strategies](https://mastra.ai/docs/observability/tracing/exporters/default) for details.
87
+
88
+ ### Observability with the legacy domain
89
+
90
+ `ObservabilityStorageClickhouse` is the original observability adapter and remains supported for projects that have not migrated to the vNext schema. The configuration shape is the same as the vNext class.
91
+
92
+ ```typescript
93
+ import { ObservabilityStorageClickhouse } from '@mastra/clickhouse'
94
+
95
+ const observabilityStore = new ObservabilityStorageClickhouse({
96
+ url: process.env.CLICKHOUSE_URL!,
97
+ username: process.env.CLICKHOUSE_USERNAME!,
98
+ password: process.env.CLICKHOUSE_PASSWORD!,
99
+ })
100
+ ```
101
+
102
+ New projects should use `ObservabilityStorageClickhouseVNext` instead.
103
+
104
+ ### Full storage with `ClickhouseStore`
105
+
106
+ `ClickhouseStore` implements the `memory`, `workflows`, `scores`, and `observability` domains. Use it when you want a single backend for the supported domains. For most observability deployments, the composite setup above is preferable because it isolates observability writes from primary application data.
107
+
108
+ ```typescript
109
+ import { Mastra } from '@mastra/core'
110
+ import { ClickhouseStore } from '@mastra/clickhouse'
111
+
112
+ export const mastra = new Mastra({
113
+ storage: new ClickhouseStore({
114
+ id: 'clickhouse-storage',
115
+ url: process.env.CLICKHOUSE_URL!,
116
+ username: process.env.CLICKHOUSE_USERNAME!,
117
+ password: process.env.CLICKHOUSE_PASSWORD!,
118
+ }),
119
+ })
120
+ ```
121
+
122
+ ### Bring your own ClickHouse client
123
+
124
+ Pass a pre-configured client when you need custom connection settings such as request timeouts, compression, or interceptors:
125
+
126
+ ```typescript
127
+ import { createClient } from '@clickhouse/client'
128
+ import { ClickhouseStore } from '@mastra/clickhouse'
129
+
130
+ const client = createClient({
131
+ url: process.env.CLICKHOUSE_URL!,
132
+ username: process.env.CLICKHOUSE_USERNAME!,
133
+ password: process.env.CLICKHOUSE_PASSWORD!,
134
+ request_timeout: 60_000,
135
+ compression: { request: true, response: true },
136
+ })
137
+
138
+ const storage = new ClickhouseStore({ id: 'clickhouse-storage', client })
139
+ ```
140
+
141
+ The same `client` form is accepted by `ObservabilityStorageClickhouse` and `ObservabilityStorageClickhouseVNext`.
142
+
143
+ ## Configuration
144
+
145
+ ### `ClickhouseStore` options
146
+
147
+ **id** (`string`): Unique identifier for this storage instance.
148
+
149
+ **url** (`string`): ClickHouse server URL (for example, \`https\://your-instance.clickhouse.cloud:8443\` or \`http\://localhost:8123\`). Required when not passing a pre-configured \`client\`.
150
+
151
+ **username** (`string`): ClickHouse username. Required when not passing a pre-configured \`client\`.
152
+
153
+ **password** (`string`): ClickHouse password. Required when not passing a pre-configured \`client\`. Can be an empty string for the default user on a local instance.
154
+
155
+ **client** (`ClickHouseClient`): Pre-configured ClickHouse client from \`@clickhouse/client\`. Use this when you need custom request settings. Mutually exclusive with the credential fields above.
156
+
157
+ **ttl** (`object`): Per-table TTL configuration applied at table creation time. Accepts row-level and column-level TTLs in interval units from \`NANOSECOND\` through \`YEAR\`.
158
+
159
+ **disableInit** (`boolean`): When \`true\`, the store does not run table creation or migrations on first use. Call \`storage.init()\` explicitly from your deployment scripts. (Default: `false`)
160
+
161
+ `ClickhouseStore` also accepts every option from `ClickHouseClientConfigOptions` (such as `database`, `request_timeout`, `compression`, `keep_alive`, and `max_open_connections`).
162
+
163
+ ### Observability domain options
164
+
165
+ `ObservabilityStorageClickhouse` and `ObservabilityStorageClickhouseVNext` accept the same connection options as `ClickhouseStore` (`url`, `username`, `password`, or a pre-configured `client`).
166
+
167
+ ## Hosting options
168
+
169
+ ClickHouse runs anywhere you can reach it over HTTP. Two common choices:
170
+
171
+ - **[ClickHouse Cloud](https://clickhouse.com/cloud)**: Managed service with a free trial tier. Provides connection details directly compatible with `url`, `username`, and `password`.
172
+ - **Self-hosted**: Run the official [`clickhouse/clickhouse-server`](https://hub.docker.com/r/clickhouse/clickhouse-server) container or install from the [official packages](https://clickhouse.com/docs/en/install). Suitable for VPS, dedicated hardware, or Kubernetes.
173
+
174
+ For local development:
175
+
176
+ ```bash
177
+ docker run -d --name mastra-clickhouse \
178
+ -p 8123:8123 -p 9000:9000 \
179
+ -e CLICKHOUSE_USER=default \
180
+ -e CLICKHOUSE_PASSWORD=password \
181
+ clickhouse/clickhouse-server
182
+ ```
183
+
184
+ ```typescript
185
+ new ObservabilityStorageClickhouseVNext({
186
+ url: 'http://localhost:8123',
187
+ username: 'default',
188
+ password: 'password',
189
+ })
190
+ ```
191
+
192
+ ## Deploying with Railway and similar platforms
193
+
194
+ Platforms like [Railway](https://railway.com), [Fly.io](https://fly.io), [Render](https://render.com), and Heroku run application containers on ephemeral filesystems. Embedded observability backends such as DuckDB require a writable, persistent local file, so they either lose data on restart or fail to deploy entirely on these platforms.
195
+
196
+ Use ClickHouse instead. Because ClickHouse is reached over HTTP, the same connection works from any host:
197
+
198
+ ```typescript
199
+ import { Mastra } from '@mastra/core'
200
+ import { MastraCompositeStore } from '@mastra/core/storage'
201
+ import { PostgresStore } from '@mastra/pg'
202
+ import { ObservabilityStorageClickhouseVNext } from '@mastra/clickhouse'
203
+ import { Observability, DefaultExporter } from '@mastra/observability'
204
+
205
+ export const mastra = new Mastra({
206
+ storage: new MastraCompositeStore({
207
+ id: 'composite-storage',
208
+ default: new PostgresStore({
209
+ id: 'pg',
210
+ connectionString: process.env.DATABASE_URL!,
211
+ }),
212
+ domains: {
213
+ observability: new ObservabilityStorageClickhouseVNext({
214
+ url: process.env.CLICKHOUSE_URL!,
215
+ username: process.env.CLICKHOUSE_USERNAME!,
216
+ password: process.env.CLICKHOUSE_PASSWORD!,
217
+ }),
218
+ },
219
+ }),
220
+ observability: new Observability({
221
+ configs: {
222
+ default: {
223
+ serviceName: 'mastra',
224
+ exporters: [new DefaultExporter()],
225
+ },
226
+ },
227
+ }),
228
+ })
229
+ ```
230
+
231
+ Two ways to provision the database:
232
+
233
+ - **Managed**: Use ClickHouse Cloud. Set `CLICKHOUSE_URL`, `CLICKHOUSE_USERNAME`, and `CLICKHOUSE_PASSWORD` as environment variables in your hosting platform.
234
+ - **Self-hosted on Railway**: Add a ClickHouse service to your Railway project from the official Docker image, then reference it in the application service through Railway's private networking.
235
+
236
+ The same approach applies to other hosts with ephemeral filesystems. For application data that should also live off-host, pair this setup with a managed PostgreSQL or LibSQL/Turso instance for the `default` storage.
237
+
238
+ > **Warning:** Do not point an embedded backend like DuckDB at a path inside an ephemeral container filesystem. Data written there is lost when the container restarts, and on some platforms the path is read-only.
239
+
240
+ ## Initialization
241
+
242
+ When passed to the `Mastra` class, `ClickhouseStore` calls `init()` automatically to create the schema and run any pending migrations. The same applies to `ObservabilityStorageClickhouseVNext` when used through `MastraCompositeStore`.
243
+
244
+ If you manage storage outside of `Mastra`, call `init()` explicitly:
245
+
246
+ ```typescript
247
+ import { ObservabilityStorageClickhouseVNext } from '@mastra/clickhouse'
248
+
249
+ const observability = new ObservabilityStorageClickhouseVNext({
250
+ url: process.env.CLICKHOUSE_URL!,
251
+ username: process.env.CLICKHOUSE_USERNAME!,
252
+ password: process.env.CLICKHOUSE_PASSWORD!,
253
+ })
254
+
255
+ await observability.init()
256
+ ```
257
+
258
+ In CI/CD pipelines, set `disableInit: true` on `ClickhouseStore` and run `init()` from a deployment step that uses elevated credentials. Runtime application credentials can then be limited to read and insert.
259
+
260
+ ## Observability
261
+
262
+ ClickHouse is the recommended backend for production observability:
263
+
264
+ - **Insert-only strategy**: `DefaultExporter` writes completed spans in batches without per-span updates, which is the highest-throughput strategy available.
265
+ - **Columnar compression**: Span attributes and log payloads compress well compared to the same data in row-oriented databases.
266
+
267
+ For the full strategy matrix and production guidance, see the [`DefaultExporter` reference](https://mastra.ai/docs/observability/tracing/exporters/default).
268
+
269
+ ## Related
270
+
271
+ - [Storage overview](https://mastra.ai/reference/storage/overview)
272
+ - [Composite storage](https://mastra.ai/reference/storage/composite)
273
+ - [`DefaultExporter`](https://mastra.ai/docs/observability/tracing/exporters/default)
274
+ - [Observability overview](https://mastra.ai/docs/observability/overview)
@@ -218,12 +218,12 @@ const storage = new MastraCompositeStore({
218
218
 
219
219
  Observability data can quickly overwhelm general-purpose databases in production. A single agent interaction can generate hundreds of spans, and high-traffic applications can produce thousands of traces per day.
220
220
 
221
- **ClickHouse** is recommended for production observability because it's optimized for high-volume, write-heavy analytics workloads. Use composite storage to route observability to ClickHouse while keeping other data in your primary database:
221
+ **[ClickHouse](https://mastra.ai/reference/storage/clickhouse)** is recommended for production observability because it's optimized for high-volume, write-heavy analytics workloads. Use composite storage to route observability to ClickHouse while keeping other data in your primary database:
222
222
 
223
223
  ```typescript
224
224
  import { MastraCompositeStore } from '@mastra/core/storage'
225
225
  import { MemoryPG, WorkflowsPG, ScoresPG } from '@mastra/pg'
226
- import { ObservabilityStorageClickhouse } from '@mastra/clickhouse'
226
+ import { ObservabilityStorageClickhouseVNext } from '@mastra/clickhouse'
227
227
 
228
228
  const storage = new MastraCompositeStore({
229
229
  id: 'composite',
@@ -231,7 +231,7 @@ const storage = new MastraCompositeStore({
231
231
  memory: new MemoryPG({ connectionString: process.env.DATABASE_URL }),
232
232
  workflows: new WorkflowsPG({ connectionString: process.env.DATABASE_URL }),
233
233
  scores: new ScoresPG({ connectionString: process.env.DATABASE_URL }),
234
- observability: new ObservabilityStorageClickhouse({
234
+ observability: new ObservabilityStorageClickhouseVNext({
235
235
  url: process.env.CLICKHOUSE_URL,
236
236
  username: process.env.CLICKHOUSE_USERNAME,
237
237
  password: process.env.CLICKHOUSE_PASSWORD,
@@ -240,4 +240,6 @@ const storage = new MastraCompositeStore({
240
240
  })
241
241
  ```
242
242
 
243
+ > **Note:** `ObservabilityStorageClickhouseVNext` is the current observability domain implementation. The legacy `ObservabilityStorageClickhouse` class is also exported and remains supported for projects that have not migrated. See the [ClickHouse storage reference](https://mastra.ai/reference/storage/clickhouse) for details.
244
+
243
245
  > **Info:** This approach is also required when using storage providers that don't support observability (like Convex, DynamoDB, or Cloudflare). See the [DefaultExporter documentation](https://mastra.ai/docs/observability/tracing/exporters/default) for the full list of supported providers.
@@ -1,6 +1,6 @@
1
1
  # Agent.streamUntilIdle()
2
2
 
3
- **Added in:** `@mastra/core@1.28.0`
3
+ **Added in:** `@mastra/core@1.29.0`
4
4
 
5
5
  `streamUntilIdle()` streams an agent's response and keeps the stream open until every background task dispatched during the run completes. When a task finishes, its result is written to memory and the agentic loop re-enters automatically so the LLM can react to it. The stream closes once no tasks are running and no completions are queued.
6
6
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.30-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`703a443`](https://github.com/mastra-ai/mastra/commit/703a44390c587d9c0b8ae94ec4edd8afb2a74044), [`808df1b`](https://github.com/mastra-ai/mastra/commit/808df1b39358b5f10b7317107e42b1fda7c87185)]:
8
+ - @mastra/core@1.29.1-alpha.1
9
+
10
+ ## 1.1.30-alpha.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`6db978c`](https://github.com/mastra-ai/mastra/commit/6db978c42e94e75540a504f7230086f0b5cd35f9)]:
15
+ - @mastra/core@1.29.1-alpha.0
16
+
3
17
  ## 1.1.29
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.1.29",
3
+ "version": "1.1.30-alpha.3",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "jsdom": "^26.1.0",
30
30
  "local-pkg": "^1.1.2",
31
31
  "zod": "^4.3.6",
32
- "@mastra/core": "1.29.0",
32
+ "@mastra/core": "1.29.1-alpha.1",
33
33
  "@mastra/mcp": "^1.6.0"
34
34
  },
35
35
  "devDependencies": {
@@ -47,8 +47,8 @@
47
47
  "typescript": "^5.9.3",
48
48
  "vitest": "4.1.5",
49
49
  "@internal/lint": "0.0.87",
50
- "@mastra/core": "1.29.0",
51
- "@internal/types-builder": "0.0.62"
50
+ "@internal/types-builder": "0.0.62",
51
+ "@mastra/core": "1.29.1-alpha.1"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {