December 9, 2025
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add support for typed structured output in agent workflow steps (#11014)
When wrapping an agent with createStep() and providing a structuredOutput.schema, the step's outputSchema is now correctly inferred from the provided schema instead of defaulting to { text: string }.
This enables type-safe chaining of agent steps with structured output to subsequent steps:
const articleSchema = z.object({
title: z.string(),
summary: z.string(),
tags: z.array(z.string()),
});
// Agent step with structured output - outputSchema is now articleSchema
const agentStep = createStep(agent, {
structuredOutput: { schema: articleSchema },
});
// Next step can receive the structured output directly
const processStep = createStep({
id: 'process',
inputSchema: articleSchema, // Matches agent's outputSchema
outputSchema: z.object({ tagCount: z.number() }),
execute: async ({ inputData }) => ({
tagCount: inputData.tags.length, // Fully typed!
}),
});
workflow.then(agentStep).then(processStep).commit();
When structuredOutput is not provided, the agent step continues to use the default { text: string } output schema.
Fixed a bug where multiple tools streaming output simultaneously could fail with "WritableStreamDefaultWriter is locked" errors. Tool streaming now works reliably during concurrent tool executions. (#10830)
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Fixed CachedToken tracking in all Observability Exporters. Also fixed TimeToFirstToken in Langfuse, Braintrust, PostHog exporters. Fixed trace formatting in Posthog Exporter. (#11029)
fix: persist data-* chunks from writer.custom() to memory storage (#10884)
data-* parts) emitted via writer.custom() in tools@assistant-ui/react to v0.11.47 with native DataMessagePart supportdata-* parts to DataMessagePart format ({ type: 'data', name: string, data: T })@assistant-ui/* packages for compatibilityFixed double validation bug that prevented Zod transforms from working correctly in tool schemas. (#11025)
When tools with Zod .transform() or .pipe() in their outputSchema were executed through the Agent pipeline, validation was happening twice - once in Tool.execute() (correct) and again in CoreToolBuilder (incorrect). The second validation received already-transformed data but expected pre-transform data, causing validation errors.
This fix enables proper use of Zod transforms in both inputSchema (for normalizing/cleaning input data) and outputSchema (for transforming output data to be LLM-friendly).
RuntimeContext type to ServerContext to avoid confusion with the user-facing RequestContext (previously called RuntimeContext)playground and isDev options from server adapter constructors - these only set context variables without any actual functionality@mastra/server
RuntimeContext type to ServerContext in route handler typescreateTestRuntimeContext to createTestServerContext in test utilitiesisPlayground parameter to isStudio in formatAgent function@mastra/hono
playground and isDev from HonoVariables typeplayground and isDev context variables in middleware@mastra/express
playground and isDev from Express.Locals interfaceplayground and isDev in response localsAdd delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
RuntimeContext type to ServerContext to avoid confusion with the user-facing RequestContext (previously called RuntimeContext)playground and isDev options from server adapter constructors - these only set context variables without any actual functionality@mastra/server
RuntimeContext type to ServerContext in route handler typescreateTestRuntimeContext to createTestServerContext in test utilitiesisPlayground parameter to isStudio in formatAgent function@mastra/hono
playground and isDev from HonoVariables typeplayground and isDev context variables in middleware@mastra/express
playground and isDev from Express.Locals interfaceplayground and isDev in response localsRuntimeContext type to ServerContext to avoid confusion with the user-facing RequestContext (previously called RuntimeContext)playground and isDev options from server adapter constructors - these only set context variables without any actual functionality@mastra/server
RuntimeContext type to ServerContext in route handler typescreateTestRuntimeContext to createTestServerContext in test utilitiesisPlayground parameter to isStudio in formatAgent function@mastra/hono
playground and isDev from HonoVariables typeplayground and isDev context variables in middleware@mastra/express
playground and isDev from Express.Locals interfaceplayground and isDev in response localsInternal code refactoring (#10830)
Add support for typed structured output in agent workflow steps (#11014)
When wrapping an agent with createStep() and providing a structuredOutput.schema, the step's outputSchema is now correctly inferred from the provided schema instead of defaulting to { text: string }.
This enables type-safe chaining of agent steps with structured output to subsequent steps:
const articleSchema = z.object({
title: z.string(),
summary: z.string(),
tags: z.array(z.string()),
});
// Agent step with structured output - outputSchema is now articleSchema
const agentStep = createStep(agent, {
structuredOutput: { schema: articleSchema },
});
// Next step can receive the structured output directly
const processStep = createStep({
id: 'process',
inputSchema: articleSchema, // Matches agent's outputSchema
outputSchema: z.object({ tagCount: z.number() }),
execute: async ({ inputData }) => ({
tagCount: inputData.tags.length, // Fully typed!
}),
});
workflow.then(agentStep).then(processStep).commit();
When structuredOutput is not provided, the agent step continues to use the default { text: string } output schema.
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add halfvec type support for large dimension embeddings (#11002)
Adds vectorType option to createIndex() for choosing between full precision (vector) and half precision (halfvec) storage. halfvec uses 2 bytes per dimension instead of 4, enabling indexes on embeddings up to 4000 dimensions.
await pgVector.createIndex({
indexName: 'large-embeddings',
dimension: 3072, // text-embedding-3-large
metric: 'cosine',
vectorType: 'halfvec',
});
Requires pgvector >= 0.7.0 for halfvec support. Docker compose files updated to use pgvector 0.8.0.
useMessagePart hook with useAssistantState (#11039)Remove console.log in playground-ui (#11004)
Use the hash based stringification mechanism of tanstack query to ensure keys ordering (and to keep the caching key valid and consistent) (#11008)
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add the possibility to pass down options to the tanstack query client. Goal is to have cacheable request in cloud and it's not possible for now because of context resolution beeing different (#11026)
fix: persist data-* chunks from writer.custom() to memory storage (#10884)
data-* parts) emitted via writer.custom() in tools@assistant-ui/react to v0.11.47 with native DataMessagePart supportdata-* parts to DataMessagePart format ({ type: 'data', name: string, data: T })@assistant-ui/* packages for compatibilityuseMessagePart hook with useAssistantState (#11039)data-* parts) emitted via writer.custom() in tools@assistant-ui/react to v0.11.47 with native DataMessagePart supportdata-* parts to DataMessagePart format ({ type: 'data', name: string, data: T })@assistant-ui/* packages for compatibilityRuntimeContext type to ServerContext to avoid confusion with the user-facing RequestContext (previously called RuntimeContext)playground and isDev options from server adapter constructors - these only set context variables without any actual functionality@mastra/server
RuntimeContext type to ServerContext in route handler typescreateTestRuntimeContext to createTestServerContext in test utilitiesisPlayground parameter to isStudio in formatAgent function@mastra/hono
playground and isDev from HonoVariables typeplayground and isDev context variables in middleware@mastra/express
playground and isDev from Express.Locals interfaceplayground and isDev in response localsAdd delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Add output format support to ElevenLabs voice integration (#11027)
The speak() method now supports specifying audio output formats via the outputFormat option. This enables telephony and VoIP use cases that require specific audio formats like μ-law (ulaw_8000) or PCM formats.
import { ElevenLabsVoice } from '@mastra/voice-elevenlabs';
const voice = new ElevenLabsVoice();
// Generate speech with telephony format (μ-law 8kHz)
const stream = await voice.speak('Hello from Mastra!', {
outputFormat: 'ulaw_8000',
});
// Generate speech with PCM format
const pcmStream = await voice.speak('Hello from Mastra!', {
outputFormat: 'pcm_16000',
});
Supported formats include:
mp3_22050_32, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192pcm_8000, pcm_16000, pcm_22050, pcm_24000, pcm_44100ulaw_8000, alaw_8000 (μ-law and A-law 8kHz for VoIP/telephony)wav, wav_8000, wav_16000If outputFormat is not specified, the method defaults to ElevenLabs' default format (typically mp3_44100_128).
Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
useMessagePart hook with useAssistantState (#11039)Add delete workflow run API (#10991)
await workflow.deleteWorkflowRunById(runId);
Fetched April 7, 2026