December 4, 2025
Updated OtelExporters, Bridge, and Arize packages to better implement GenAI v1.38.0 Otel Semantic Conventions. See: (#10591) https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
feat(observability): Add tags support to OtelExporter, OtelBridge, and ArizeExporter (#10843)
This change adds support for the tracingOptions.tags feature to the OpenTelemetry-based exporters and bridge. Tags are now included as span attributes when present on root spans, following the same pattern as Braintrust and Langfuse exporters.
Changes:
mastra.tags span attribute for root spansmastra.tagstag.tags semantic conventionImplementation Details:
Usage:
const result = await agent.generate({
messages: [{ role: 'user', content: 'Hello' }],
tracingOptions: {
tags: ['production', 'experiment-v2'],
},
});
Fixes #10771
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add time-to-first-token (TTFT) support for Braintrust integration (#10840)
Adds time_to_first_token metric to Braintrust spans, populated from the completionStartTime attribute captured when the first streaming chunk arrives.
// time_to_first_token is now automatically sent to Braintrust
// as part of span metrics during streaming
const result = await agent.stream('Hello');
Fix Braintrust Thread view not displaying LLM messages correctly (#10794)
Transforms LLM input/output format to match Braintrust's expected format for Thread view. Input is unwrapped from { messages: [...] } to direct array format, and output is unwrapped from { content: '...' } to direct string format.
Fixed Braintrust span nesting so root spans correctly show as the trace name. (#10876)
Standardize error IDs across all storage and vector stores using centralized helper functions (createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)
update chroma dep (#10883)
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)fix: standardize pagination params to page/perPage with backwards compatibility for limit/offset (#10790)
page/perPage and legacy limit/offset params for workflow runs and MCP server listing endpointscreateCombinedPaginationSchema helper for endpoints needing backwards compatibilitylimit and offset as deprecated in client typesfeat: Add partial response support for agent and workflow list endpoints (#10886)
Add optional partial query parameter to /api/agents and /api/workflows endpoints to return minimal data without schemas, reducing payload size for list views:
partial=true: tool schemas (inputSchema, outputSchema) are omittedpartial=true: workflow steps are replaced with stepCount integerpartial=true: workflow root schemas (inputSchema, outputSchema) are omitted# Get partial agent data (no tool schemas)
GET /api/agents?partial=true
# Get full agent data (default behavior)
GET /api/agents
# Get partial workflow data (stepCount instead of steps, no schemas)
GET /api/workflows?partial=true
# Get full workflow data (default behavior)
GET /api/workflows
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
// Get partial agent list (smaller payload)
const partialAgents = await client.listAgents({ partial: true });
// Get full agent list with tool schemas
const fullAgents = await client.listAgents();
// Get partial workflow list (smaller payload)
const partialWorkflows = await client.listWorkflows({ partial: true });
// Get full workflow list with steps and schemas
const fullWorkflows = await client.listWorkflows();
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)v1/workflow-stream-vnext codemod. This codemod renames streamVNext(), resumeStreamVNext(), and observeStreamVNext() to their "non-VNext" counterparts. (#10802)Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
Add time-to-first-token (TTFT) support for Langfuse integration (#10781)
Adds completionStartTime to model generation spans, which Langfuse uses to calculate TTFT metrics. The timestamp is automatically captured when the first content chunk arrives during streaming.
// completionStartTime is now automatically captured and sent to Langfuse
// enabling TTFT metrics in your Langfuse dashboard
const result = await agent.stream('Hello');
Updated OtelExporters, Bridge, and Arize packages to better implement GenAI v1.38.0 Otel Semantic Conventions. See: (#10591) https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
Standardize error IDs across all storage and vector stores using centralized helper functions (createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)
fix: generate unique text IDs for Anthropic/Google providers (#10740)
Workaround for duplicate text-start/text-end IDs in multi-step agentic flows.
The @ai-sdk/anthropic and @ai-sdk/google providers use numeric indices ("0", "1", etc.) for text block IDs that reset for each LLM call. This caused duplicate IDs when an agent does TEXT → TOOL → TEXT, breaking message ordering and storage.
The fix replaces numeric IDs with UUIDs, maintaining a map per step so text-start, text-delta, and text-end chunks for the same block share the same UUID. OpenAI's UUIDs pass through unchanged.
Related: #9909
Fix sub-agent requestContext propagation in listAgentTools (#10844)
Sub-agents with dynamic model configurations were broken because requestContext was not being passed to getModel() when creating agent tools. This caused sub-agents using function-based model configurations to receive an empty context instead of the parent's context.
No code changes required for consumers - this fix restores expected behavior for dynamic model configurations in sub-agents.
Fix ToolStream type error when piping streams with different types (#10845)
Changes ToolStream to extend WritableStream<unknown> instead of WritableStream<T>. This fixes the TypeScript error when piping objectStream or fullStream to writer in workflow steps.
Before:
// TypeError: ToolStream<ChunkType> is not assignable to WritableStream<Partial<StoryPlan>>
await response.objectStream.pipeTo(writer);
After:
// Works without type errors
await response.objectStream.pipeTo(writer);
feat: add native Perplexity provider support (#10885)
When sending the first message to a new thread with PostgresStore, users would get a "Thread not found" error. This happened because the thread was created in memory but not persisted to the database before the MessageHistory output processor tried to save messages. (#10881)
Before:
threadObject = await memory.createThread({
// ...
saveThread: false, // thread not in DB yet
});
// Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
After:
threadObject = await memory.createThread({
// ...
saveThread: true, // thread persisted immediately
});
// MessageHistory can now save messages without error
Emit error chunk and call onError when agent workflow step fails (#10907)
When a workflow step fails (e.g., tool not found), the error is now properly emitted as an error chunk to the stream and the onError callback is called. This fixes the issue where agent.generate() would throw "promise 'text' was not resolved or rejected" instead of the actual error message.
fix(core): use agent description when converting agent to tool (#10879)
Adds native @ai-sdk/deepseek provider support instead of using the OpenAI-compatible fallback. (#10822)
const agent = new Agent({
model: 'deepseek/deepseek-reasoner',
});
// With provider options for reasoning
const response = await agent.generate('Solve this problem', {
providerOptions: {
deepseek: {
thinking: { type: 'enabled' },
},
},
});
Also updates the doc generation scripts so DeepSeek provider options show up in the generated docs.
Return state too if includeState: true is in outputOptions and workflow run is not successful (#10806)
feat: Add partial response support for agent and workflow list endpoints (#10886)
Add optional partial query parameter to /api/agents and /api/workflows endpoints to return minimal data without schemas, reducing payload size for list views:
partial=true: tool schemas (inputSchema, outputSchema) are omittedpartial=true: workflow steps are replaced with stepCount integerpartial=true: workflow root schemas (inputSchema, outputSchema) are omitted# Get partial agent data (no tool schemas)
GET /api/agents?partial=true
# Get full agent data (default behavior)
GET /api/agents
# Get partial workflow data (stepCount instead of steps, no schemas)
GET /api/workflows?partial=true
# Get full workflow data (default behavior)
GET /api/workflows
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
// Get partial agent list (smaller payload)
const partialAgents = await client.listAgents({ partial: true });
// Get full agent list with tool schemas
const fullAgents = await client.listAgents();
// Get partial workflow list (smaller payload)
const partialWorkflows = await client.listWorkflows({ partial: true });
// Get full workflow list with steps and schemas
const fullWorkflows = await client.listWorkflows();
Fix processInputStep so it runs correctly. (#10909)
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Remove cast as any from MastraServer in deployer (#10796)
Fixed a bug where ESM shims were incorrectly injected even when the user had already declared __filename or __dirname (#10809)
Add simple virtual check for tsconfigpaths plugin, misbehaves on CI (#10832)
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Fix README and ChangeLog for hono and express adapters (#10873)
Fix abort signal being prematurely aborted in Express adapter (#10901)
The abort signal was being triggered when the request body was parsed by express.json() middleware, causing agent.generate() to return empty responses with 0 tokens. Changed from req.on('close') to res.on('close') to properly detect client disconnection instead of body consumption.
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add time-to-first-token (TTFT) support for Langfuse integration (#10781)
Adds completionStartTime to model generation spans, which Langfuse uses to calculate TTFT metrics. The timestamp is automatically captured when the first content chunk arrives during streaming.
// completionStartTime is now automatically captured and sent to Langfuse
// enabling TTFT metrics in your Langfuse dashboard
const result = await agent.stream('Hello');
Fix Langfuse exporter to reuse existing traces when multiple root spans share the same traceId. This resolves an issue where multiple agent.stream() calls with client-side tools would create separate traces in Langfuse instead of grouping them under a single trace. The exporter now checks if a trace already exists before creating a new one, allowing proper trace consolidation for conversations with multiple agent interactions. (#10838)
Fixes #8830
link langfuse prompts and helper functions (#10738)
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add support for RequestOptions in elicitation requests to allow custom timeouts and request cancellation. (#10849)
You can now pass RequestOptions when sending elicitation requests:
// Within a tool's execute function
const result = await options.mcp.elicitation.sendRequest(
{
message: 'Please provide your email',
requestedSchema: {
type: 'object',
properties: { email: { type: 'string' } },
},
},
{ timeout: 120000 }, // Custom 2-minute timeout
);
The RequestOptions parameter supports:
timeout: Custom timeout in milliseconds (default: 60000ms)signal: AbortSignal for request cancellationFixes #10834
Fix HTTP SSE fallback to only trigger for 400/404/405 per MCP spec (#10803)
With @modelcontextprotocol/sdk 1.24.0+, SSE fallback now only occurs for HTTP status codes 400, 404, and 405. Other errors (like 401 Unauthorized) are re-thrown for proper handling.
Older SDK versions maintain the existing behavior (always fallback to SSE).
Add injectable fetch into mcp client integration. Follows from modelcontextprotocol/sdk implementation of Streamable HTTP and SSE transports. (#10780)
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add time-to-first-token (TTFT) support for Braintrust integration (#10840)
Adds time_to_first_token metric to Braintrust spans, populated from the completionStartTime attribute captured when the first streaming chunk arrives.
// time_to_first_token is now automatically sent to Braintrust
// as part of span metrics during streaming
const result = await agent.stream('Hello');
Add time-to-first-token (TTFT) support for Langfuse integration (#10781)
Adds completionStartTime to model generation spans, which Langfuse uses to calculate TTFT metrics. The timestamp is automatically captured when the first content chunk arrives during streaming.
// completionStartTime is now automatically captured and sent to Langfuse
// enabling TTFT metrics in your Langfuse dashboard
const result = await agent.stream('Hello');
Consolidated tool-output chunks from nested agents into single tool-result spans (#10836)
link langfuse prompts and helper functions (#10738)
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Updated OtelExporters, Bridge, and Arize packages to better implement GenAI v1.38.0 Otel Semantic Conventions. See: (#10591) https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
feat(observability): Add tags support to OtelExporter, OtelBridge, and ArizeExporter (#10843)
This change adds support for the tracingOptions.tags feature to the OpenTelemetry-based exporters and bridge. Tags are now included as span attributes when present on root spans, following the same pattern as Braintrust and Langfuse exporters.
Changes:
mastra.tags span attribute for root spansmastra.tagstag.tags semantic conventionImplementation Details:
Usage:
const result = await agent.generate({
messages: [{ role: 'user', content: 'Hello' }],
tracingOptions: {
tags: ['production', 'experiment-v2'],
},
});
Fixes #10771
Updated OtelExporters, Bridge, and Arize packages to better implement GenAI v1.38.0 Otel Semantic Conventions. See: (#10591) https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
feat(observability): Add tags support to OtelExporter, OtelBridge, and ArizeExporter (#10843)
This change adds support for the tracingOptions.tags feature to the OpenTelemetry-based exporters and bridge. Tags are now included as span attributes when present on root spans, following the same pattern as Braintrust and Langfuse exporters.
Changes:
mastra.tags span attribute for root spansmastra.tagstag.tags semantic conventionImplementation Details:
Usage:
const result = await agent.generate({
messages: [{ role: 'user', content: 'Hello' }],
tracingOptions: {
tags: ['production', 'experiment-v2'],
},
});
Fixes #10771
Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add StudioConfig and associated context to manage the headers and base URL of a given Mastra instance. (#10804)
This also introduces a header form available from the side bar to edit those headers.
Fix select options overflow when list is long by adding maximum height (#10813)
Removed uneeded calls to the message endpoint when the user is on a new thread (#10872)
Add prominent warning banner in observability UI when token limits are exceeded (finishReason: 'length'). (#10835)
When a model stops generating due to token limits, the span details now display:
This helps developers quickly identify and debug token limit issues in the observation page.
Fixes #8828
Add a specific page for the studio settings and moved the headers configuration form here instead of in a dialog (#10812)
Add tags support to PostHog exporter (#10785)
Include tracingOptions.tags in PostHog event properties as $ai_tags for root spans, enabling filtering and segmentation in PostHog.
const result = await agent.generate({
messages: [{ role: 'user', content: 'Hello' }],
tracingOptions: {
tags: ['production', 'experiment-v2'],
},
});
// PostHog event now includes: { $ai_tags: ["production", "experiment-v2"] }
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)fix: standardize pagination params to page/perPage with backwards compatibility for limit/offset (#10790)
page/perPage and legacy limit/offset params for workflow runs and MCP server listing endpointscreateCombinedPaginationSchema helper for endpoints needing backwards compatibilitylimit and offset as deprecated in client typesfeat: Add partial response support for agent and workflow list endpoints (#10886)
Add optional partial query parameter to /api/agents and /api/workflows endpoints to return minimal data without schemas, reducing payload size for list views:
partial=true: tool schemas (inputSchema, outputSchema) are omittedpartial=true: workflow steps are replaced with stepCount integerpartial=true: workflow root schemas (inputSchema, outputSchema) are omitted# Get partial agent data (no tool schemas)
GET /api/agents?partial=true
# Get full agent data (default behavior)
GET /api/agents
# Get partial workflow data (stepCount instead of steps, no schemas)
GET /api/workflows?partial=true
# Get full workflow data (default behavior)
GET /api/workflows
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
// Get partial agent list (smaller payload)
const partialAgents = await client.listAgents({ partial: true });
// Get full agent list with tool schemas
const fullAgents = await client.listAgents();
// Get partial workflow list (smaller payload)
const partialWorkflows = await client.listWorkflows({ partial: true });
// Get full workflow list with steps and schemas
const fullWorkflows = await client.listWorkflows();
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Add disableInit option to all storage adapters (#10851)
Adds a new disableInit config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with disableInit: true so it doesn't attempt schema changes at runtime.
// CI/CD script - run migrations
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
});
await storage.init();
// Runtime - skip auto-init
const storage = new PostgresStore({
connectionString: DATABASE_URL,
id: 'pg-storage',
disableInit: true,
});
createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)createStorageErrorId and createVectorErrorId). This ensures consistent error ID patterns (MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS} and MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}) across the codebase for better error tracking and debugging. (#10913)Fix select options overflow when list is long by adding maximum height (#10813)
Now when you run npx mastra@beta init, the CLI detects it's running from the beta dist-tag and installs the correct versions. (#10821)
Fetched April 7, 2026