releases.shpreview
Mastra/GitHub Releases

GitHub Releases

$npx -y @buildinternet/releases show mastra-github-releases
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases39Avg12/moVersions@mastra/core@1.0.0-beta.6 → @mastra/core@1.24.0
Nov 20, 2025
2025-11-19

Highlights

Generate Endpoint Fix for OpenAI Streaming

We've switched to using proper generate endpoints for model calls, fixing a critical permission issue with OpenAI streaming. No more 403 errors when your users don't have full model permissions - the generate endpoint respects granular API key scopes properly.

AI SDK v5: Fine-Grained Stream Control

Building custom UIs? You now have complete control over what gets sent in your AI SDK streams. Configure exactly which message chunks your frontend receives with the new sendStart, sendFinish, sendReasoning, and sendSources options.

Changelog

@mastra/ai-sdk

  • Add sendStart, sendFinish, sendReasoning, and sendSources options to toAISdkV5Stream function, allowing fine-grained control over which message chunks are included in the converted stream. Previously, these values were hardcoded in the transformer.

    BREAKING CHANGE: AgentStreamToAISDKTransformer now accepts an options object instead of a single lastMessageId parameter

    Also, add sendStart, sendFinish, sendReasoning, and sendSources parameters to chatRoute function, enabling fine-grained control over which chunks are included in the AI SDK stream output. (#10127)

  • Added support for tripwire data chunks in streaming responses.

    Tripwire chunks allow the AI SDK to emit special data events when certain conditions are triggered during stream processing. These chunks include a tripwireReason field explaining why the tripwire was activated.

    Usage

    When converting Mastra chunks to AI SDK v5 format, tripwire chunks are now automatically handled:

// Tripwire chunks are converted to data-tripwire format
const chunk = {
  type: 'tripwire',
  payload: { tripwireReason: 'Rate limit approaching' }
};

	// Converts to:
{
  type: 'data-tripwire',
  data: { tripwireReason: 'Rate limit approaching' }
}

(#10269)

@mastra/auth

  • Allow provider to pass through options to the auth config (#10284)

@mastra/auth-auth0

  • Allow provider to pass through options to the auth config (#10284)

@mastra/auth-clerk

  • Allow provider to pass through options to the auth config (#10284)

@mastra/auth-firebase

  • Allow provider to pass through options to the auth config (#10284)

@mastra/auth-supabase

  • Allow provider to pass through options to the auth config (#10284)

@mastra/auth-workos

  • Allow provider to pass through options to the auth config (#10284)

@mastra/client-js

  • Added optional description field to GetAgentResponse to support richer agent metadata (#10305)

@mastra/core

  • Only handle download image asset transformation if needed (#10122)

  • Fix tool outputSchema validation to allow unsupported Zod types like ZodTuple. The outputSchema is only used for internal validation and never sent to the LLM, so model compatibility checks are not needed. (#9409)

  • Fix vector definition to fix pinecone (#10150)

  • Add type bailed to workflowRunStatus (#10091)

  • Allow provider to pass through options to the auth config (#10284)

  • Fix deprecation warning when agent network executes workflows by using .fullStream instead of iterating WorkflowRunOutput directly (#10306)

  • Add support for doGenerate in LanguageModelV2. This change fixes issues with OpenAI stream permissions.

    • Added new abstraction over LanguageModelV2 (#10239)

@mastra/mcp

  • Add timeout configuration to mcp server config (#9891)

@mastra/mcp-docs-server

  • Add migration tool to mcp docs server for stable branch that will let users know to upgrade mcp docs server @latest to @beta to get the proper migration tool. (#10200)

@mastra/server

  • Network handler now accesses thread and resource parameters from the nested memory object instead of directly from request body. (#10294)

@mastra/observability

  • Updates console warning when cloud access token env is not set. (#9149)

@mastra/pinecone

  • Adjust pinecone settings (#10182)

@mastra/playground-ui

  • Fix scorer filtering for SpanScoring, add error and info message for user (#10160)

@mastra/voice-google-gemini-live

  • gemini live fix (#10234)
  • fix(voice): Fix Vertex AI WebSocket connection failures in GeminiLiveVoice (#10243)

create-mastra

  • fix: detect bun runtime and cleanup on failure (#10307)

mastra

  • Add support to skip dotenv/env file loading by adding MASTRA_SKIP_DOTENV (#9455)
  • fix: detect bun runtime and cleanup on failure (#10307)
Nov 14, 2025
2025-11-14

Highlights

1.0 Beta is ready!

We've worked hard on a 1.0 beta version to signal that Mastra is ready for prime time and there will not be any breaking changes in the near future. Please visit the migration guide to get started.

Improved support for files in models

We added the ability not to download images or any supported files by the model, and instead send the raw URL so it can handle it on its own. This improves the speed of the LLM call.

Mistral

Added improved support for Mistral by using the ai-sdk provider under the hood instead of the openai compat provider.

Changelog

@mastra/ai-sdk

  • Fix bad dane change in 0.x workflowRoute (#10090)

  • Improve ai-sdk transformers, handle custom data from agent sub workflow, sug agent tools (#10026)

  • Extend the workflow route to accept optional runId and resourceId parameters, allowing clients to specify custom identifiers when creating workflow runs. These parameters are now properly validated in the OpenAPI schema and passed through to the createRun method.

    Also updates the OpenAPI schema to include previously undocumented resumeData and step fields. (#10034)

@mastra/client-js

  • Fix clientTools execution in client js (#9880)

@mastra/core

  • Integrates the native Mistral AI SDK provider (@ai-sdk/mistral) to replace the current OpenAI-compatible endpoint implementation for Mistral models. (#9789)

  • Fix: Don't download unsupported media (#9209)

  • Use a shared getAllToolPaths() method from the bundler to discover tool paths. (#9204)

  • Add an additional check to determine whether the model natively supports specific file types. Only download the file if the model does not support it natively. (#9790)

  • Fix agent network iteration counter bug causing infinite loops

    The iteration counter in agent networks was stuck at 0 due to a faulty ternary operator that treated 0 as falsy. This prevented maxSteps from working correctly, causing infinite loops when the routing agent kept selecting primitives instead of returning "none".

    Changes:

  • Fixed iteration counter logic in loop/network/index.ts from (inputData.iteration ? inputData.iteration : -1) + 1 to (inputData.iteration ?? -1) + 1

  • Changed initial iteration value from 0 to -1 so first iteration correctly starts at 0

  • Added checkIterations() helper to validate iteration counting in all network tests

    Fixes #9314 (#9762)

  • Exposes requiresAuth to custom api routes (#9952)

  • Fix agent network working memory tool routing. Memory tools are now included in routing agent instructions but excluded from its direct tool calls, allowing the routing agent to properly route to tool execution steps for memory updates. (#9428)

  • Fixes assets not being downloaded when available (#10079)

@mastra/deployer

  • Added /health endpoint for service monitoring (#9142)
  • Use a shared getAllToolPaths() method from the bundler to discover tool paths. (#9204)

@mastra/deployer-cloud

  • Use a shared getAllToolPaths() method from the bundler to discover tool paths. (#9204)

@mastra/evals

@mastra/mssql

  • Prevents double stringification for MSSQL jsonb columns by reusing incoming strings that already contain valid JSON while still stringifying other inputs as needed. (#9901)

mastra

  • Add warning to mastra dev and mastra build about upcoming stable release of v1.0.0. (#9524)
  • Use a shared getAllToolPaths() method from the bundler to discover tool paths. (#9204)
Nov 5, 2025
2025-11-05

Highlights

This release focuses primarily on bug fixes and stability improvements.

AI-SDK

We've resolved several issues related to message deduplication and preserving lastMessageIds. More importantly, this release adds support for suspend/resume operations and custom data writes, with network data now properly surfacing as data-parts.

Bundling

We've fully resolved bundling issues with the reflect-metadata package by ensuring it's not removed during the bundling step. This means packages no longer need to be marked as externals to avoid runtime crashes in the Mastra server.

Changelog

@mastra/agent-builder

@mastra/ai-sdk

  • update peerdeps (5ca1cca)
  • Preserve lastMessageId in chatRoute (#9556)
  • Handle custom data writes in agent network execution events in ai sdk transformers (#9717)
  • Add support for suspend/resume in AI SDK workflowRoute (#9392)

@mastra/arize

@mastra/astra

@mastra/auth

@mastra/auth-auth0

@mastra/auth-clerk

@mastra/auth-firebase

@mastra/auth-supabase

@mastra/auth-workos

@mastra/braintrust

@mastra/chroma

@mastra/clickhouse

@mastra/client-js

  • update peerdeps (5ca1cca)
  • Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. (#9487)
  • Remove unused /model-providers API (#9533)
  • Fix undefined runtimeContext using memory from playground (#9328)

@mastra/cloud

@mastra/cloudflare

@mastra/cloudflare-d1

@mastra/core

  • update peerdeps (5ca1cca)

  • Fix workflow input property preservation after resume from snapshot

    Ensure that when resuming a workflow from a snapshot, the input property is correctly set from the snapshot's context input rather than from resume data. This prevents the loss of original workflow input data during suspend/resume cycles. (#9380)

  • Fix a bug where streaming didn't output the final chunk (#9546)

  • Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. (#9487)

  • Fix network routing agent smoothstreaming (#9247)

@mastra/couchbase

@mastra/dane

@mastra/deployer

  • update peerdeps (5ca1cca)

  • Improve analyze recursion in bundler when using monorepos (#9490)

  • Update peer dependencies to match core package version bump (0.23.4) (#9487)

  • Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. (#9487)

  • Make sure external deps are built with side-effects. Fixes an issue with reflect-metadata #7328 (#9714)

  • Remove unused /model-providers API (#9533)

  • Fix undefined runtimeContext using memory from playground (#9328)

  • Add readable-streams to global externals, not compatible with CJS compilation (#9735)

  • fix: add /api route to default public routes to allow unauthenticated access

    The /api route was returning 401 instead of 200 because it was being caught by the /api/_ protected pattern. Adding it to the default public routes ensures the root API endpoint is accessible without authentication while keeping /api/_ routes protected. (#9662)

@mastra/deployer-cloud

@mastra/deployer-cloudflare

@mastra/deployer-netlify

@mastra/deployer-vercel

@mastra/dynamodb

@mastra/evals

@mastra/fastembed

@mastra/google-cloud-pubsub

@mastra/inngest

@mastra/lance

@mastra/langfuse

@mastra/langsmith

@mastra/libsql

@mastra/loggers

@mastra/longmemeval

@mastra/mcp

@mastra/mcp-docs-server

@mastra/mcp-registry-registry

@mastra/memory

@mastra/mongodb

@mastra/mssql

@mastra/observability

@mastra/opensearch

@mastra/otel-exporter

@mastra/pg

@mastra/pinecone

@mastra/playground-ui

  • update peerdeps (5ca1cca)
  • Update peer dependencies to match core package version bump (0.23.4) (#9487)
  • Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. (#9487)
  • Remove unused /model-providers API (#9533)
  • Fix undefined runtimeContext using memory from playground (#9328)

@mastra/qdrant

@mastra/rag

@mastra/react

@mastra/s3vectors

@mastra/schema-compat

@mastra/server

  • update peerdeps (5ca1cca)
  • Update peer dependencies to match core package version bump (0.23.4) (#9487)
  • Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. (#9487)
  • Fix undefined runtimeContext using memory from playground (#9328)

@mastra/turbopuffer

@mastra/upstash

@mastra/vectorize

@mastra/voice-azure

@mastra/voice-cloudflare

@mastra/voice-deepgram

@mastra/voice-elevenlabs

@mastra/voice-gladia

@mastra/voice-google

@mastra/voice-google-gemini-live

@mastra/voice-murf

@mastra/voice-openai

@mastra/voice-openai-realtime

@mastra/voice-playai

@mastra/voice-sarvam

@mastra/voice-speechify

@observability/test-utils

create-mastra

mastra

  • update peerdeps (5ca1cca)
  • Update peer dependencies to match core package version bump (0.23.4) (#9487)
  • Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. (#9487)
Nov 3, 2025
2025-10-28

Highlights

Tool Schema Validation

Fixed a critical bug in @mastra/core where tool input validation used the original Zod schema while LLMs received a transformed version. This caused validation failures with models like OpenAI o3 and Claude 3.5 Haiku that send valid responses matching the transformed schema (e.g., converting .optional() to .nullable()).

Changelog

@mastra/ai-sdk

  • Fix usage tracking with agent network (#9226)

@mastra/arize

  • Fixed import isssues in exporters. (#9331)

  • fix(@mastra/arize): Auto-detect arize endpoint when endpoint field is not provided

    When spaceId is provided to ArizeExporter constructor, and endpoint is not, pre-populate endpoint with default ArizeAX endpoint. (#9250)

@mastra/braintrust

  • Fixed import isssues in exporters. (#9331)

@mastra/core

  • Fix agent onChunk callback receiving wrapped chunk instead of direct chunk (#9402)

  • Ensure model_generation spans end before agent_run spans. (#9393)

  • Fix OpenAI schema validation errors in processors (#9400)

  • Don't call os.homedir() at top level (but lazy invoke it) to accommodate sandboxed environments (#9211)

  • Detect thenable objects returned by AI model providers (#8905)

  • Bug fix: Use input processors that are passed in generate or stream agent options rather than always defaulting to the processors set on the Agent class. (#9407)

  • Fix tool input validation to use schema-compat transformed schemas

    Previously, tool input validation used the original Zod schema while the LLM received a schema-compat transformed version. This caused validation failures when LLMs (like OpenAI o3 or Claude 3.5 Haiku) sent arguments matching the transformed schema but not the original.

    For example:

  • OpenAI o3 reasoning models convert .optional() to .nullable(), sending null values

  • Claude 3.5 Haiku strips min/max string constraints, sending shorter strings

  • Validation would reject these valid responses because it checked against the original schema

    The fix ensures validation uses the same schema-compat processed schema that was sent to the LLM, eliminating this mismatch. (#9258)

  • Add import for WritableStream in execution-engine and dedupe llm.getModel in agent.ts (#9185)

  • pass writableStream parameter to workflow execution (#9139)

  • Save correct status in snapshot for all workflow parallel steps. This ensures when you poll workflow run result using getWorkflowRunExecutionResult(runId), you get the right status for all parallel steps (#9379)

  • Add ability to pass agent options when wrapping an agent with createStep. This allows configuring agent execution settings when using agents as workflow steps. (#9199)

  • Fix network loop iteration counter and usage promise handling:

    • Fixed iteration counter in network loop that was stuck at 0 due to falsy check. Properly handled zero values to ensure maxSteps is correctly enforced.
  • Fixed usage promise resolution in RunOutput stream by properly resolving or rejecting the promise on stream close, preventing hanging promises when streams complete. (#9408)

  • Workflow validation zod v4 support (#9319)

  • Fix usage tracking with agent network (#9226)

@mastra/deployer

  • Add exportConditions options to nodeResolve plugin to ensure proper handling of Node.js export condition resolution during production builds. (#9394)
  • Add better error handling during mastra build for ERR_MODULE_NOT_FOUND cases. (#9127)

@mastra/deployer-netlify

  • Do not apply ESM shim to output as Netlify should handle this already (#9239)

@mastra/inngest

  • Fix Inngest workflow tests by adding missing imports and updating middleware path. (#9259)

@mastra/lance

  • Fix eval filtering to use NULL checks instead of length function for compatibility with LanceDB 0.22.x (#9191)

@mastra/langfuse

  • Fixed import isssues in exporters. (#9331)

@mastra/langsmith

  • Fixed import isssues in exporters. (#9331)

@mastra/mssql

  • Implemented AI tracing and observability features

    • Added createAISpan, updateAISpan, getAITrace, getAITracesPaginated
  • Added batchCreateAISpans, batchUpdateAISpans, batchDeleteAITraces

  • Automatic performance indexes for AI spans

    Implemented workflow update methods

    • Added updateWorkflowResults with row-level locking (UPDLOCK, HOLDLOCK)
  • Added updateWorkflowState with row-level locking

  • Concurrent update protection for parallel workflow execution

    Added index management API

    • Added createIndex, listIndexes, describeIndex, dropIndex methods
  • Exposed index management methods directly on store instance

  • Support for composite indexes, unique constraints, and filtered indexes

    Documentation improvements

    • Comprehensive README with complete API reference (58 methods)
  • Detailed feature descriptions for all storage capabilities

  • Index management examples and best practices

  • Updated to reflect all atomic transaction usage (#9280)

@mastra/observability

  • Fixed import isssues in exporters. (#9331)

@mastra/otel-exporter

  • Fixed import isssues in exporters. (#9331)

@mastra/playground-ui

  • Update MainSidebar component to fit required changes in Cloud CTA link (#9318)
  • Render zod unions and discriminated unions correctly in dynamic form. (#9317)
  • Extract more components to playground-ui for sharing with cloud (#9241)
  • Move some components to playground-ui for usage in cloud (#9177)

@mastra/schema-compat

  • Fix Zod v4 toJSONSchema bug with z.record() single-argument form

    Zod v4 has a bug in the single-argument form of z.record(valueSchema) where it incorrectly assigns the value schema to keyType instead of valueType, leaving valueType undefined. This causes toJSONSchema() to throw "Cannot read properties of undefined (reading '_zod')" when processing schemas containing z.record() fields.

    This fix patches affected schemas before conversion by detecting records with missing valueType and correctly assigning the schema to valueType while setting keyType to z.string() (the default). The patch recursively handles nested schemas including those wrapped in .optional(), .nullable(), arrays, unions, and objects. (#9265)

  • Improved reliability of string field types in tool schema compatibility (#9266)

create-mastra

  • Update MainSidebar component to fit required changes in Cloud CTA link (#9318)

mastra

  • Use dynamic model for scorers in create cli (#9188)
  • Update MainSidebar component to fit required changes in Cloud CTA link (#9318)
  • Better handle errors during mastra start and throw them with Mastra's logger. Also add special error handling for ERR_MODULE_NOT_FOUND cases. (#9127)
  • Make sure that mastra init also installs the mastra CLI package (if not already installed) (#9179)
Oct 28, 2025
2025-10-21

Changelog

@mastra/agent-builder

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/ai-sdk

  • Pass original messages in chatRoute to fix uiMessages duplication #8830 (#8904)
  • network routing agent text delta ai-sdk streaming (#8979)
  • Support writing custom top level stream chunks (#8922)
  • Refactor workflowstream into workflow output with fullStream property (#9048)
  • Update peerdeps to 0.23.0-0 (#9043)
  • Fix streaming of custom chunks, workflow & network support (#9109)

@mastra/arize

  • feat(otel-exporter): Add customizable 'exporter' constructor parameter

    You can now pass in an instantiated TraceExporter inheriting class into OtelExporter. This will circumvent the default package detection, no longer instantiating a TraceExporter automatically if one is instead passed in to the OtelExporter constructor.

    feat(arize): Initial release of @mastra/arize observability package

    The @mastra/arize package exports an ArizeExporter class that can be used to easily send AI traces from Mastra to Arize AX, Arize Phoenix, or any OpenInference compatible collector. It sends traces uses BatchSpanProcessor over OTLP connections. It leverages the @mastra/otel-exporter package, reusing OtelExporter for transmission and span management. See the README in observability/arize/README.md for more details (#8827)

  • fix(observability): Add ParentSpanContext to MastraSpan's with parentage (#9085)

@mastra/astra

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/braintrust

  • Update peerdeps to 0.23.0-0 (#9043)

  • Rename LLM span types and attributes to use Model prefix

    BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":

    • AISpanType.LLM_GENERATIONAISpanType.MODEL_GENERATION
  • AISpanType.LLM_STEPAISpanType.MODEL_STEP

  • AISpanType.LLM_CHUNKAISpanType.MODEL_CHUNK

  • LLMGenerationAttributesModelGenerationAttributes

  • LLMStepAttributesModelStepAttributes

  • LLMChunkAttributesModelChunkAttributes

  • InternalSpans.LLMInternalSpans.MODEL

    This change better reflects that these span types apply to all AI models, not just Large Language Models.

    Migration guide:

  • Update all imports: import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'

  • Update span type references: AISpanType.MODEL_GENERATION

  • Update InternalSpans usage: InternalSpans.MODEL (#9105)

@mastra/chroma

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/clickhouse

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/client-js

  • Add tool call approval (#8649)
  • Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. (#9192)

@mastra/cloud

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/cloudflare

  • Support for custom resume labels mapping to step to be resumed (#8941)
  • Update peer dependencies to match core package version bump (0.21.2) (#8941)
  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/cloudflare-d1

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/core

  • Update provider registry and model documentation with latest models and providers (c67ca32)

  • Update provider registry and model documentation with latest models and providers (efb5ed9)

  • Add deprecation warnings for format:ai-sdk (#9018)

  • network routing agent text delta ai-sdk streaming (#8979)

  • Support writing custom top level stream chunks (#8922)

  • Consolidate streamVNext logic into stream, move old stream function into streamLegacy (#9092)

  • Fix incorrect type assertions in Tool class. Created MastraToolInvocationOptions type to properly extend AI SDK's ToolInvocationOptions with Mastra-specific properties (suspend, resumeData, writableStream). Removed unsafe type assertions from tool execution code. (#8510)

  • fix(core): Fix Gemini message ordering validation errors (#7287, #8053)

    Fixes Gemini API "single turn requests" validation error by ensuring the first non-system message is from the user role. This resolves errors when:

  • Messages start with assistant role (e.g., from memory truncation)

  • Tool-call sequences begin with assistant messages

    Breaking Change: Empty or system-only message lists now throw an error instead of adding a placeholder user message, preventing confusing LLM responses.

    This fix handles both issue #7287 (tool-call ordering) and #8053 (single-turn validation) by inserting a placeholder user message when needed. (#7287)

  • Add support for external trace and parent span IDs in TracingOptions. This enables integration with external tracing systems by allowing new AI traces to be started with existing traceId and parentSpanId values. The implementation includes OpenTelemetry-compatible ID validation (32 hex chars for trace IDs, 16 hex chars for span IDs). (#9053)

  • Updated watch and watchAsync methods to use proper function overloads instead of generic conditional types, ensuring compatibility with the base Run class signatures. (#9048)

  • Fix tracing context propagation to agent steps in workflows

    When creating a workflow step from an agent using createStep(myAgent), the tracing context was not being passed to the agent's stream() and streamLegacy() methods. This caused tracing spans to break in the workflow chain.

    This fix ensures that tracingContext is properly propagated to both agent.stream() and agent.streamLegacy() calls, matching the behavior of tool steps which already propagate tracingContext correctly. (#9074)

  • Fixes how reasoning chunks are stored in memory to prevent data loss and ensure they are consolidated as single message parts rather than split into word-level fragments. (#9041)

  • fixes an issue where input processors couldn't add system or assistant messages. Previously all messages from input processors were forced to be user messages, causing an error when trying to add other role types. (#8835)

  • fix(core): Validate structured output at text-end instead of flush

    Fixes structured output validation for Bedrock and LMStudio by moving validation from flush() to text-end chunk. Eliminates finishReason heuristics, adds special token extraction for LMStudio, and validates at the correct point in stream lifecycle. (#8934)

  • fix model.loop.test.ts tests to use structuredOutput.schema and add assertions (#8926)

  • Add initialState as an option to .streamVNext() (#9071)

  • added resourceId and runId to workflow_run metadata in ai tracing (#9031)

  • When using OpenAI models with JSON response format, automatically enable strict schema validation. (#8924)

  • Fix custom metadata preservation in UIMessages when loading threads. The getMessagesHandler now converts messagesV2 (V2 format with metadata) instead of messages (V1 format without metadata) to AIV5.UI format. Also updates the abstract MastraMemory.query() return type to include messagesV2 for proper type safety. (#8938)

  • Fix TypeScript type errors when using provider-defined tools from external AI SDK packages.

    Agents can now accept provider tools like google.tools.googleSearch() without type errors. Creates new @internal/external-types package to centralize AI SDK type re-exports and adds ProviderDefinedTool structural type to handle tools from different package versions/instances due to TypeScript's module path discrimination. (#8940)

  • feat(ai-tracing): Add automatic metadata extraction from RuntimeContext to spans

    Enables automatic extraction of RuntimeContext values as metadata for AI tracing spans across entire traces.

    Key features:

  • Configure runtimeContextKeys in TracingConfig to extract specific keys from RuntimeContext

  • Add per-request keys via tracingOptions.runtimeContextKeys for trace-specific additions

  • Supports dot notation for nested values (e.g., 'user.id', 'session.data.experimentId')

  • TraceState computed once at root span and inherited by all child spans

  • Explicit metadata in span options takes precedence over extracted metadata

    Example:

const mastra = new Mastra({
  observability: {
    configs: {
      default: {
        runtimeContextKeys: ['userId', 'environment', 'tenantId']
      }
    }
  }
});

	await agent.generate({
  messages,
  runtimeContext,
  tracingOptions: {
    runtimeContextKeys: ['experimentId']  // Adds to configured keys
  }
});

(#9072)

  • Fix provider tools for popular providers and add support for anthropic/claude skills. (#9038)

  • Refactor workflowstream into workflow output with fullStream property (#9048)

  • Added the ability to use model router configs for embedders (eg "openai/text-embedding-ada-002") (#8992)

  • Always set supportsStructuredOutputs true for openai compatible provider. (#8933)

  • Support for custom resume labels mapping to step to be resumed (#8941)

  • added tracing of LLM steps & chunks (#9058)

  • Fixed an issue where a custom URL in model router still validated unknown providers against the known providers list. Custom URL means we don't necessarily know the provider. This allows local providers like Ollama to work properly (#8989)

  • Show agent tool output better in playground (#9021)

  • feat: inject schema context into main agent for processor mode structured output (#8886)

  • Added providerOptions types to generate/stream for main builtin model router providers (openai/anthropic/google/xai) (#8995)

  • Generate a title for Agent.network() threads (#8853)

  • Fix nested workflow events and networks (#9132)

  • Update provider registry and model documentation with latest models and providers (f743dbb)

  • Add tool call approval (#8649)

  • Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. (#9192)

  • Rename LLM span types and attributes to use Model prefix

    BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":

    • AISpanType.LLM_GENERATIONAISpanType.MODEL_GENERATION
  • AISpanType.LLM_STEPAISpanType.MODEL_STEP

  • AISpanType.LLM_CHUNKAISpanType.MODEL_CHUNK

  • LLMGenerationAttributesModelGenerationAttributes

  • LLMStepAttributesModelStepAttributes

  • LLMChunkAttributesModelChunkAttributes

  • InternalSpans.LLMInternalSpans.MODEL

    This change better reflects that these span types apply to all AI models, not just Large Language Models.

    Migration guide:

  • Update all imports: import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'

  • Update span type references: AISpanType.MODEL_GENERATION

  • Update InternalSpans usage: InternalSpans.MODEL (#9105)

@mastra/couchbase

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/deployer

  • use mastra logger in error handler (#9037)
  • Consolidate streamVNext logic into stream, move old stream function into streamLegacy (#9092)
  • Fix edge case bug around transitive dependencies in monorepos (#8977)
  • Update peer dependencies to match core package version bump (0.22.0) (#9092)
  • Improve error related to finding possible binary dependencies (#9056)
  • Update peerdeps to 0.23.0-0 (#9043)
  • Update peer dependencies to match core package version bump (0.22.1) (#8649)
  • Add tool call approval (#8649)
  • Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. (#9192)
  • Update peer dependencies to match core package version bump (0.22.3) (#9192)

@mastra/deployer-cloud

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/deployer-cloudflare

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/deployer-netlify

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/deployer-vercel

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/dynamodb

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/evals

  • Updates the types for scorers to use the new MastraModelConfig type. Also updates relevant docs to reference this type, as well as the new router model signature# An empty message aborts the changeset. (#8932)
  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/google-cloud-pubsub

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/inngest

  • Consolidate streamVNext logic into stream, move old stream function into streamLegacy (#9092)
  • Updated watch and watchAsync methods to use proper function overloads instead of generic conditional types, ensuring compatibility with the base Run class signatures. (#9048)
  • Update peer dependencies to match core package version bump (0.22.0) (#9092)
  • Support for custom resume labels mapping to step to be resumed (#8941)
  • Update peer dependencies to match core package version bump (0.21.2) (#8941)
  • Update peerdeps to 0.23.0-0 (#9043)
  • Update peer dependencies to match core package version bump (0.22.1) (#8649)
  • Add tool call approval (#8649)

@mastra/lance

@mastra/langfuse

  • Update peerdeps to 0.23.0-0 (#9043)

  • Rename LLM span types and attributes to use Model prefix

    BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":

    • AISpanType.LLM_GENERATIONAISpanType.MODEL_GENERATION
  • AISpanType.LLM_STEPAISpanType.MODEL_STEP

  • AISpanType.LLM_CHUNKAISpanType.MODEL_CHUNK

  • LLMGenerationAttributesModelGenerationAttributes

  • LLMStepAttributesModelStepAttributes

  • LLMChunkAttributesModelChunkAttributes

  • InternalSpans.LLMInternalSpans.MODEL

    This change better reflects that these span types apply to all AI models, not just Large Language Models.

    Migration guide:

  • Update all imports: import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'

  • Update span type references: AISpanType.MODEL_GENERATION

  • Update InternalSpans usage: InternalSpans.MODEL (#9105)

@mastra/langsmith

  • Update peerdeps to 0.23.0-0 (#9043)

  • Rename LLM span types and attributes to use Model prefix

    BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":

    • AISpanType.LLM_GENERATIONAISpanType.MODEL_GENERATION
  • AISpanType.LLM_STEPAISpanType.MODEL_STEP

  • AISpanType.LLM_CHUNKAISpanType.MODEL_CHUNK

  • LLMGenerationAttributesModelGenerationAttributes

  • LLMStepAttributesModelStepAttributes

  • LLMChunkAttributesModelChunkAttributes

  • InternalSpans.LLMInternalSpans.MODEL

    This change better reflects that these span types apply to all AI models, not just Large Language Models.

    Migration guide:

  • Update all imports: import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'

  • Update span type references: AISpanType.MODEL_GENERATION

  • Update InternalSpans usage: InternalSpans.MODEL (#9105)

@mastra/libsql

  • Support for custom resume labels mapping to step to be resumed (#8941)
  • Update peer dependencies to match core package version bump (0.21.2) (#8941)
  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/loggers

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/mcp

  • Remove deprecated mcp options MastraMCPClient/MCPConfigurationOptions/MCPConfiguration (#9084)
  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/mcp-registry-registry

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/memory

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/mongodb

  • Adds MongoDB Observability support, and MongoDB Storage documentation, examples, and telemetry. (#8426)
  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/mssql

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/observability

  • Create new @mastra/observability package at version 0.0.1. This empty package serves as a placeholder for AI tracing and scorer code that will be migrated from other packages, allowing users to add it as a dependency before the code migration. (#9051)

@mastra/opensearch

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/otel-exporter

  • feat(otel-exporter): Add customizable 'exporter' constructor parameter

    You can now pass in an instantiated TraceExporter inheriting class into OtelExporter. This will circumvent the default package detection, no longer instantiating a TraceExporter automatically if one is instead passed in to the OtelExporter constructor.

    feat(arize): Initial release of @mastra/arize observability package

    The @mastra/arize package exports an ArizeExporter class that can be used to easily send AI traces from Mastra to Arize AX, Arize Phoenix, or any OpenInference compatible collector. It sends traces uses BatchSpanProcessor over OTLP connections. It leverages the @mastra/otel-exporter package, reusing OtelExporter for transmission and span management. See the README in observability/arize/README.md for more details (#8827)

  • fix(observability): Add ParentSpanContext to MastraSpan's with parentage (#9085)

  • Update peerdeps to 0.23.0-0 (#9043)

  • Rename LLM span types and attributes to use Model prefix

    BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":

    • AISpanType.LLM_GENERATIONAISpanType.MODEL_GENERATION
  • AISpanType.LLM_STEPAISpanType.MODEL_STEP

  • AISpanType.LLM_CHUNKAISpanType.MODEL_CHUNK

  • LLMGenerationAttributesModelGenerationAttributes

  • LLMStepAttributesModelStepAttributes

  • LLMChunkAttributesModelChunkAttributes

  • InternalSpans.LLMInternalSpans.MODEL

    This change better reflects that these span types apply to all AI models, not just Large Language Models.

    Migration guide:

  • Update all imports: import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'

  • Update span type references: AISpanType.MODEL_GENERATION

  • Update InternalSpans usage: InternalSpans.MODEL (#9105)

@mastra/pg

  • Use the tz version of the timestamp column in when fetching messages. (#8944)
  • Avoid conflicts in pg fn naming when creating new tables on storage.init() (#8946)
  • Update peerdeps to 0.23.0-0 (#9043)
  • Fixes "invalid input syntax for type json" error in AI tracing with PostgreSQL. (#9181)

@mastra/pinecone

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/playground-ui

  • Handle nested optional objects in dynamic form (#9059)
  • Threads are not refreshing correctly after generate / stream / network (#9015)
  • Update peer dependencies to match core package version bump (0.21.2) (#9021)
  • Move "Playground" to "Studio" in UI only (#9052)
  • fix template background image overflow (#9011)
  • Show agent tool output better in playground (#9021)
  • Update peerdeps to 0.23.0-0 (#9043)
  • Move all the fetching hooks that should be shared with cloud into playground-ui (#9133)
  • Update peer dependencies to match core package version bump (0.22.1) (#8649)
  • Add tool call approval (#8649)

@mastra/qdrant

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/rag

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/react

  • Fix perf issue: removed flush sync (#9014)
  • Fix tool result in playground (#9087)
  • Show agent tool output better in playground (#9021)
  • Add tool call approval (#8649)

@mastra/s3vectors

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/server

  • Consolidate streamVNext logic into stream, move old stream function into streamLegacy (#9092)
  • Updated watch and watchAsync methods to use proper function overloads instead of generic conditional types, ensuring compatibility with the base Run class signatures. (#9048)
  • Update peer dependencies to match core package version bump (0.21.2) (#9038)
  • Generate a title for Agent.network() threads (#8853)
  • Fix custom metadata preservation in UIMessages when loading threads. The getMessagesHandler now converts messagesV2 (V2 format with metadata) instead of messages (V1 format without metadata) to AIV5.UI format. Also updates the abstract MastraMemory.query() return type to include messagesV2 for proper type safety. (#8938)
  • Fix provider tools for popular providers and add support for anthropic/claude skills. (#9038)
  • Update peer dependencies to match core package version bump (0.22.0) (#9092)
  • Update peer dependencies to match core package version bump (0.21.2) (#9021)
  • Show agent tool output better in playground (#9021)
  • Update peerdeps to 0.23.0-0 (#9043)
  • Update peer dependencies to match core package version bump (0.22.1) (#8649)
  • Add tool call approval (#8649)

@mastra/turbopuffer

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/upstash

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/vectorize

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-azure

  • Use chunk buffer for the audio stream. (#9084)
  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-cloudflare

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-deepgram

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-elevenlabs

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-gladia

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-google

@mastra/voice-google-gemini-live

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-murf

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-openai

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-openai-realtime

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-playai

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-sarvam

  • Update peerdeps to 0.23.0-0 (#9043)

@mastra/voice-speechify

  • Update peerdeps to 0.23.0-0 (#9043)

create-mastra

  • Add scorers to the default weather agent in the create command. (#9042)
  • Fix tool result in playground (#9087)

mastra

  • Add scorers to the default weather agent in the create command. (#9042)
  • Fix tool result in playground (#9087)
  • Use newer model id for anthropic during create-mastra (#8996)
  • Update peerdeps to 0.23.0-0 (#9043)
Oct 16, 2025
2025-10-14

Highlights

Model Routing everywhere

Model configuration has been unified across @mastra/core, @mastra/evals, and related packages, with all components now accepting the same flexible Model Configuration. This enables consistent model specification using magic strings ("openai/gpt-4o"), config objects with custom URLs, or dynamic resolution functions across scorers, processors, and relevance scoring components.

// All of these now work everywhere models are accepted
const scorer = createScorer({
  judge: { model: "openai/gpt-4o" } // Magic string
});

	const processor = new ModerationProcessor({
  model: { id: "custom/model", url: "https://..." } // Custom config
});

	const relevanceScorer = new MastraAgentRelevanceScorer(
  async (ctx) => ctx.getModel() // Dynamic function
);

AI SDK v5 Compatibility & Streaming

We've revamped the AI-SDK documentation. You can now use the useChat hook on Networks and Workflows. When you're using Agents and Workflows as a tool, you will receive a custom data component that allows you to render a tailored Tool Widget containing all the necessary information.

"use client";
 
import { useChat } from "@ai-sdk/react";
import { AgentTool } from '../ui/agent-tool';
import type { AgentDataPart } from "@mastra/ai-sdk";
 
export default function Page() {
  const { messages } = useChat({
    transport: new DefaultChatTransport({
    api: 'http://localhost:4111/chat',
    }),
  });
 
  return (
    <div>
      {messages.map((message) => (
        <div key={message.id}>
          {message.parts.map((part, i) => {
            switch (part.type) {
              case 'data-tool-agent':
                return (
                  <AgentTool {...part.data as AgentDataPart} key={`${message.id}-${i}`} />
                );
              default:
                return null;
            }
          })}
        </div>
      ))}
    </div>
  );
}

Build System Changes

We've updated the build pipeline to better support typescript packages in workspaces. We now detect packages that we cannot build, mostly binary modules, and provide a log with instructions on how to do so.

Changelog

@mastra/agent-builder

  • Update structuredOutput to use response format by default with an opt in to json prompt injection. Replaced internal usage of output with structuredOutput. (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)

@mastra/ai-sdk

  • pass runtimeContext to agent stream options in chatRoute (#8641)
  • Improve types for networkRoute and workflowRoute functions (#8844)
  • ai-sdk workflow route, agent network route (#8672)
  • nested ai-sdk workflows and networks streaming support (#8614)

@mastra/astra

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/braintrust

  • add traceId as root_span_id for braintrust traces (#8821)
  • preserve Mastra span id when exported to Braintrust (#8714)
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/chroma

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/clickhouse

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/client-js

  • support model router in structured output and client-js (#8686)
  • Make sure to convert the agent instructions when showing them (#8702)

@mastra/cloud

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/cloudflare

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/cloudflare-d1

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/core

  • Fix aisdk format in workflow breaking stream (#8716)

  • Standardize model configuration across all Mastra components

    All model configuration points now accept the same flexible MastraModelConfig type as the Agent class:

    • Scorers: Judge models now support magic strings, config objects, and dynamic functions
    • Input/Output Processors: ModerationProcessor and PIIDetector accept flexible model configs
    • Relevance Scorers: MastraAgentRelevanceScorer supports all model config types

    This change provides:

    • Consistent API across all components
    • Support for magic strings (e.g., "openai/gpt-4o")
    • Support for OpenAI-compatible configs with custom URLs
    • Support for dynamic model resolution functions
    • Full backward compatibility with existing code

    Example:

// All of these now work everywhere models are accepted
const scorer = createScorer({
  judge: { model: "openai/gpt-4o" } // Magic string
});

	const processor = new ModerationProcessor({
  model: { id: "custom/model", url: "https://..." } // Custom config
});

	const relevanceScorer = new MastraAgentRelevanceScorer(
  async (ctx) => ctx.getModel() // Dynamic function
);

(#8626)

  • fix: preserve providerOptions through message list conversions (#8836)

  • improve error propagation in agent stream failures (#8733)

  • prevent duplicate deprecation warning logs and deprecate modelSettings.abortSignal in favor of top-level abortSignal (#8840)

  • Removed logging of massive model objects in tool failures (#8839)

  • Create unified Sidebar component to use on Playground and Cloud (#8655)

  • Added tracing of input & output processors (this includes using structuredOutput) (#8623)

  • support model router in structured output and client-js (#8686)

  • ai-sdk workflow route, agent network route (#8672)

  • Handle maxRetries in agent.generate/stream properly. Add deprecation warning to top level abortSignal in AgentExecuteOptions as that property is duplicated inside of modelSettings as well. (#8729)

  • Include span id and trace id when running live scorers (#8842)

  • Added deprecation warnings for stream and observeStream. We will switch the implementation to streamVNext/observeStreamVNext in the future. (#8701)

  • Add div wrapper around entity tables to fix table vertical position (#8758)

  • Customize AITraces type to seamlessly work on Cloud too (#8759)

  • Refactor EntryList component and Scorer and Observability pages (#8652)

  • Update structuredOutput to use response format by default with an opt in to json prompt injection. Replaced internal usage of output with structuredOutput. (#8557)

  • Add support for exporting scores for external observability providers (#8335)

  • Stream finalResult from network loop (#8795)

  • Fix broken generateTitle behaviour #8726, make generateTitle: true default memory setting (#8800)

  • Standardize model configuration across all components to support flexible model resolution

    All model configuration points now accept MastraModelConfig, enabling consistent model specification across:

  • Scorers (createScorer and all built-in scorers)

  • Input/Output Processors (ModerationProcessor, PIIDetector)

  • Relevance Scorers (MastraAgentRelevanceScorer)

    Supported formats:

  • Magic strings: 'openai/gpt-4o-mini'

  • Config objects: { id: 'openai/gpt-4o-mini' } or { providerId: 'openai', modelId: 'gpt-4o-mini' }

  • Custom endpoints: { id: 'custom/model', url: 'https://...', apiKey: '...' }

  • Dynamic resolution: (ctx) => 'openai/gpt-4o-mini'

    This change provides a unified model configuration experience matching the Agent class, making it easier to switch models and use custom providers across all Mastra components. (#8626)

  • Improve README (#8819)

  • nested ai-sdk workflows and networks streaming support (#8614)

@mastra/couchbase

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/deployer

  • dependencies updates:
  • Improve monorepo handling for mastra build & mastra start (#8653)
  • Add typescript to global externals to reduce bundling OOM (#8789)
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Improve error handling formatting in dev/build bundling. (#8792)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)
  • support model router in structured output and client-js (#8686)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Remove validation step in bundling process
  • Fixes transpilation of ts files with binary dependencies
  • Add logging to add packages to externals (#8778)

@mastra/deployer-cloud

  • dependencies updates:
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/deployer-cloudflare

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/deployer-netlify

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/deployer-vercel

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/dynamodb

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/evals

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)

  • Update peer dependencies to match core package version bump (0.21.0) (#8557)

  • Update peer dependencies to match core package version bump (0.21.0) (#8626)

  • Standardize model configuration across all components to support flexible model resolution

    All model configuration points now accept MastraModelConfig, enabling consistent model specification across:

  • Scorers (createScorer and all built-in scorers)

  • Input/Output Processors (ModerationProcessor, PIIDetector)

  • Relevance Scorers (MastraAgentRelevanceScorer)

    Supported formats:

  • Magic strings: 'openai/gpt-4o-mini'

  • Config objects: { id: 'openai/gpt-4o-mini' } or { providerId: 'openai', modelId: 'gpt-4o-mini' }

  • Custom endpoints: { id: 'custom/model', url: 'https://...', apiKey: '...' }

  • Dynamic resolution: (ctx) => 'openai/gpt-4o-mini'

    This change provides a unified model configuration experience matching the Agent class, making it easier to switch models and use custom providers across all Mastra components. (#8626)

  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/google-cloud-pubsub

  • dependencies updates:
  • dependencies updates:
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/inngest

  • dependencies updates:
  • dependencies updates:
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/lance

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/langfuse

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)

  • Add AI SDK v5 compatibility to Langfuse exporter while maintaining backward compatibility with v4

    Features:

  • Normalize token usage to handle both AI SDK v4 format (promptTokens/completionTokens) and v5 format (inputTokens/outputTokens)

  • Support AI SDK v5-specific features:

    • Reasoning tokens for models like o1-preview
    • Cached input tokens (prompt cache hit)
    • Enhanced cache metrics
  • Automatic detection and normalization of token formats with v5 taking precedence

  • Comprehensive type definitions with JSDoc annotations indicating version compatibility

    Technical Changes:

  • Added NormalizedUsage interface with detailed version documentation

  • Implemented normalizeUsage() method using nullish coalescing (??) to safely handle both formats

  • Added 8 new test cases covering v4/v5 compatibility scenarios

  • Updated documentation with AI SDK v5 compatibility guide

    Breaking Changes: None - fully backward compatible with existing AI SDK v4 implementations (#8790)

  • Update peer dependencies to match core package version bump (0.21.0) (#8557)

  • Update peer dependencies to match core package version bump (0.21.0) (#8626)

  • Support exporting scores to Langfuse traces (#8335)

  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/langsmith

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/libsql

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/loggers

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/mcp

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/mcp-registry-registry

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/memory

  • dependencies updates:

  • dependencies updates:

  • feat(pg): add flexible PostgreSQL configuration with shared types

    • Add support for multiple connection methods: connectionString, host/port/database, and Cloud SQL
  • Introduce shared PostgresConfig type with generic SSL support (ISSLConfig for pg-promise, ConnectionOptions for pg)

  • Add pgPoolOptions support to PgVector for advanced pool configuration

  • Create shared validation helpers to reduce code duplication

  • Maintain backward compatibility with existing configurations (#8103)

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)

  • Update peer dependencies to match core package version bump (0.21.0) (#8557)

  • Update peer dependencies to match core package version bump (0.21.0) (#8626)

  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/mongodb

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/mssql

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/opensearch

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/otel-exporter

  • Update peer dependencies to match core package version bump (0.21.0) (#8623)
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Added tracing of input & output processors (this includes using structuredOutput) (#8623)
  • Add resourceAttributes to OtelExporterConfig so that attributes like deployment.environment can be set in the new OpenTelemetry exporter. (#8700)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/pg

  • feat(pg): add flexible PostgreSQL configuration with shared types

    • Add support for multiple connection methods: connectionString, host/port/database, and Cloud SQL
  • Introduce shared PostgresConfig type with generic SSL support (ISSLConfig for pg-promise, ConnectionOptions for pg)

  • Add pgPoolOptions support to PgVector for advanced pool configuration

  • Create shared validation helpers to reduce code duplication

  • Maintain backward compatibility with existing configurations (#8103)

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)

  • Update peer dependencies to match core package version bump (0.21.0) (#8557)

  • Update peer dependencies to match core package version bump (0.21.0) (#8626)

  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/pinecone

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/playground-ui

  • dependencies updates:
  • Prepares some basic set of homemade components (#8619)
  • Improve the surface API of the react sdk (#8715)
  • Fix auto tab for model picker in playground-ui, the UI no longer auto tabs to the next selector when selecting a model/provider. (#8680)
  • Create unified Sidebar component to use on Playground and Cloud (#8655)
  • Adds reset button to model picker to reset to original model set on the agent. (#8633)
  • Fix back the tripwire verification inside the new react system (#8674)
  • Use only zod validation in dynamic form (#8802)
  • Add div wrapper around entity tables to fix table vertical position (#8758)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • handle error case in react sdk (#8676)
  • Make sure to convert the agent instructions when showing them (#8702)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Customize AITraces type to seamlessly work on Cloud too (#8759)
  • Refactor EntryList component and Scorer and Observability pages (#8652)
  • fix maxSteps model settings not being passed to generate and stream endpoints (#8627)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)

@mastra/qdrant

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/rag

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/react

  • Gracefully fix errors in react-sdk when error is an object (#8703)
  • Prepares some basic set of homemade components (#8619)
  • Improve the surface API of the react sdk (#8715)
  • Move react and react-dom deps to peer and dev deps (#8698)
  • Fix back the tripwire verification inside the new react system (#8674)
  • handle error case in react sdk (#8676)
  • fix maxSteps model settings not being passed to generate and stream endpoints (#8627)
  • Stream finalResult from network loop (#8795)

@mastra/s3vectors

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/server

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Include span id and trace id when running live scorers (#8842)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update structuredOutput to use response format by default with an opt in to json prompt injection. Replaced internal usage of output with structuredOutput. (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)

@mastra/turbopuffer

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/upstash

  • dependencies updates:
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/vectorize

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-azure

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-cloudflare

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-deepgram

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-elevenlabs

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-gladia

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-google

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-google-gemini-live

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-murf

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-openai

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-openai-realtime

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-playai

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-sarvam

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

@mastra/voice-speechify

  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)

create-mastra

  • Use model-router in create-mastra starter template (#8631)
  • Fix auto tab for model picker in playground-ui, the UI no longer auto tabs to the next selector when selecting a model/provider. (#8680)
  • Create unified Sidebar component to use on Playground and Cloud (#8655)
  • Adds reset button to model picker to reset to original model set on the agent. (#8633)
  • Use only zod validation in dynamic form (#8802)
  • Add div wrapper around entity tables to fix table vertical position (#8758)
  • Customize AITraces type to seamlessly work on Cloud too (#8759)
  • Refactor EntryList component and Scorer and Observability pages (#8652)
  • Stream finalResult from network loop (#8795)
  • Improve README (#8819)

mastra

  • Use model-router in create-mastra starter template (#8631)
  • Fix typo in playground causing semantic recall to always be false when enabled. (#8640)
  • Update peer dependencies to match core package version bump (0.21.0) (#8795)
  • Update peer dependencies to match core package version bump (0.21.0) (#8619)
  • Create unified Sidebar component to use on Playground and Cloud (#8655)
  • Use only zod validation in dynamic form (#8802)
  • Add support for --debug options to build/dev commands to add more logging (#8792)
  • Add div wrapper around entity tables to fix table vertical position (#8758)
  • Update peer dependencies to match core package version bump (0.21.0) (#8557)
  • Update peer dependencies to match core package version bump (0.21.0) (#8626)
  • Customize AITraces type to seamlessly work on Cloud too (#8759)
  • Refactor EntryList component and Scorer and Observability pages (#8652)
  • Stream finalResult from network loop (#8795)
  • Improve README (#8819)
  • Update peer dependencies to match core package version bump (0.21.0) (#8686)
Oct 8, 2025
2025-10-08

Highlights

Workflows

Workflows now support global state, you can now read state in each of your defined steps and set it withsetState. This makes it easier to manage state over multiple steps nstead of passing it through input/output variables.

const firstStep = createStep({
  id: "first-step",
  execute({ setState }) {
    setState({
      myValue: "a value",
    });
  },
});

const secondStep = createStep({
  id: "second-step",
  execute({ state }) {
    console.log(state.myValue);
  },
});

createWorkflow({
  id: "my-worfklow",
  stateSchema: z.object({
    myValue: z.string(),
  }),
}).then(myStep);

Memory

Working memory can be stored using thread metadata. It allows you to set the initial wokring memory directly.

const thread = await memory.createThread({
  threadId: "thread-123",
  resourceId: "user-456",
  title: "Medical Consultation",
  metadata: {
    workingMemory: `# Patient Profile
- Name: John Doe
- Blood Type: O+
- Allergies: Penicillin
- Current Medications: None
- Medical History: Hypertension (controlled)`,
  },
});

UI (ai-sdk compatability)

Improved useChat support from ai-sdk if you're using agents in your tools. You get a custom UI message called data-tool-agent with all relevant information.

// in src/mastra.ts
export const mastra = new Mastra({
  server: {
    apiRoutes: [
      chatRoute({
        path: "/chat",
        agent: "my-agent",
      }),
    ],
  },
});
// in my useChat file
const { error, status, sendMessage, messages, regenerate, stop } =
  useChat<MyMessage>({
    transport: new DefaultChatTransport({
      api: 'http://localhost:4111/chat',
      body: {

      }
    }),
  });

return (
  <div className="flex flex-col pt-24 mx-auto w-full max-w-4xl h-screen">
    <div className="flex flex-row mx-auto w-full overflow-y-auto gap-4">
      <div className="flex-1">
        {messages.map(message => {
          return (
            <div key={message.id} className="whitespace-pre-wrap">
              {message.role === 'user' ? 'User: ' : 'AI: '}{' '}
              {message.parts
                .filter(part => part.type === 'data-tool-agent')
                .map((part) => {
                  return <CustomWidget key={part.id} {...part.data} />
                })}
              {message.parts
                .filter(part => part.type === 'text')
                .map((part, index) => {
                  if (part.type === 'text') {
                    return <div key={index}>{part.text}</div>;
                  }
                })
              }
          )
        }}
      </div>
    </div>
  </div>
)

Changelog

@mastra/agent-builder

  • Fix TypeScript errors with provider-defined tools by updating ai-v5 and openai-v5 to matching provider-utils versions. This ensures npm deduplicates to a single provider-utils instance, resolving type incompatibility issues when passing provider tools to Agent.

    Also adds deprecation warning to Agent import from root path to encourage using the recommended subpath import. (#8584)

@mastra/ai-sdk

  • Mutable shared workflow run state (#8545)
  • Add support for streaming nested agent tools (#8580)

@mastra/chroma

@mastra/client-js

  • Mutable shared workflow run state (#8545)
  • add tripwire reason in playground (#8568)

@mastra/core

  • workflow run thread more visible (#8539)

  • Add iterationCount to loop condition params (#8579)

  • Mutable shared workflow run state (#8545)

  • avoid refetching memory threads and messages on window focus (#8519)

  • add tripwire reason in playground (#8568)

  • Add validation for index creation (#8552)

  • Save waiting step status in snapshot (#8576)

  • Added AI SDK provider packages to model router for anthropic/google/openai/openrouter/xai (#8559)

  • type fixes and missing changeset (#8545)

  • Convert WorkflowWatchResult to WorkflowResult in workflow graph (#8541)

  • add new deploy to cloud button (#8549)

  • remove icons in entity lists (#8520)

  • add client search to all entities (#8523)

  • Improve JSDoc documentation for Agent (#8389)

  • Properly fix cloudflare randomUUID in global scope issue (#8450)

  • Marked OTEL based telemetry as deprecated. (#8586)

  • Add support for streaming nested agent tools (#8580)

  • Fix TypeScript errors with provider-defined tools by updating ai-v5 and openai-v5 to matching provider-utils versions. This ensures npm deduplicates to a single provider-utils instance, resolving type incompatibility issues when passing provider tools to Agent.

    Also adds deprecation warning to Agent import from root path to encourage using the recommended subpath import. (#8584)

  • UX for the agents page (#8517)

  • add icons into playground titles + a link to the entity doc (#8518)

@mastra/dane

  • Mutable shared workflow run state (#8545)

@mastra/deployer

  • fix: custom API routes now properly respect authentication requirements

    Fixed a critical bug where custom routes were bypassing authentication when they should have been protected by default. The issue was in the isProtectedPath function which only checked pattern-based protection but ignored custom route configurations.

    • Custom routes are now protected by default or when specified with requiresAuth: true
  • Custom routes properly inherit protection from parent patterns (like /api/*)

  • Routes with explicit requiresAuth: false continue to work as public endpoints

  • Enhanced isProtectedPath to consider both pattern matching and custom route auth config

    This fixes issue #8421 where custom routes were not being properly protected by the authentication system. (#8469)

  • Correctly handle errors in streams. Errors (e.g. rate limiting) before the stream begins are now returned with their code. Mid-stream errors are passed as a chunk (with type: 'error') to the stream. (#8567)

  • Mutable shared workflow run state (#8545)

  • Fix bug when lodash dependencies where used in subdependencies (#8537)

@mastra/deployer-cloud

  • Mutable shared workflow run state (#8545)
  • Add dynamic creation of peerdeps (#8582)

@mastra/deployer-cloudflare

  • Mutable shared workflow run state (#8545)
  • Properly fix cloudflare randomUUID in global scope issue (#8450)

@mastra/deployer-netlify

  • Mutable shared workflow run state (#8545)

@mastra/deployer-vercel

  • Mutable shared workflow run state (#8545)

@mastra/dynamodb

@mastra/inngest

  • Mutable shared workflow run state (#8545)
  • Handle workflow run failures (fix #8130) (#8370)

@mastra/langsmith

@mastra/longmemeval

  • Mutable shared workflow run state (#8545)

@mastra/mcp

  • Mutable shared workflow run state (#8545)

@mastra/mcp-docs-server

  • Mutable shared workflow run state (#8545)

@mastra/memory

  • Ensure working memory can be updated througb createThread and updateThread (#8513)

  • Fix TypeScript errors with provider-defined tools by updating ai-v5 and openai-v5 to matching provider-utils versions. This ensures npm deduplicates to a single provider-utils instance, resolving type incompatibility issues when passing provider tools to Agent.

    Also adds deprecation warning to Agent import from root path to encourage using the recommended subpath import. (#8584)

@mastra/pg

  • Add validation for index creation (#8552)

@mastra/playground-ui

  • workflow run thread more visible (#8539)
  • Mutable shared workflow run state (#8545)
  • streamLegacy/generateLegacy clarification in playground (#8468)
  • add tripwire reason in playground (#8568)
  • Save waiting step status in snapshot (#8576)
  • Added AI SDK provider packages to model router for anthropic/google/openai/openrouter/xai (#8559)
  • type fixes and missing changeset (#8545)
  • Convert WorkflowWatchResult to WorkflowResult in workflow graph (#8541)
  • remove icons in entity lists (#8520)
  • extract mcp servers into playground + use a table instead of custom stuff (#8521)
  • add client search to all entities (#8523)
  • UX for the agents page (#8517)
  • add icons into playground titles + a link to the entity doc (#8518)

@mastra/react

  • Mutable shared workflow run state (#8545)
  • add tripwire reason in playground (#8568)
  • type fixes and missing changeset (#8545)
  • Convert WorkflowWatchResult to WorkflowResult in workflow graph (#8541)

@mastra/s3vectors

@mastra/server

  • Mutable shared workflow run state (#8545)

  • Fix TypeScript errors with provider-defined tools by updating ai-v5 and openai-v5 to matching provider-utils versions. This ensures npm deduplicates to a single provider-utils instance, resolving type incompatibility issues when passing provider tools to Agent.

    Also adds deprecation warning to Agent import from root path to encourage using the recommended subpath import. (#8584)

create-mastra

  • Mutable shared workflow run state (#8545)
  • streamLegacy/generateLegacy clarification in playground (#8468)
  • avoid refetching memory threads and messages on window focus (#8519)
  • add tripwire reason in playground (#8568)
  • Save waiting step status in snapshot (#8576)
  • Added AI SDK provider packages to model router for anthropic/google/openai/openrouter/xai (#8559)
  • Convert WorkflowWatchResult to WorkflowResult in workflow graph (#8541)
  • Fix useStreamWorkflow unmounting breaking stream call (#8449)

mastra

  • workflow run thread more visible (#8539)
  • Mutable shared workflow run state (#8545)
  • streamLegacy/generateLegacy clarification in playground (#8468)
  • avoid refetching memory threads and messages on window focus (#8519)
  • add tripwire reason in playground (#8568)
  • Save waiting step status in snapshot (#8576)
  • Added AI SDK provider packages to model router for anthropic/google/openai/openrouter/xai (#8559)
  • Convert WorkflowWatchResult to WorkflowResult in workflow graph (#8541)
  • add new deploy to cloud button (#8549)
  • remove icons in entity lists (#8520)
  • add client search to all entities (#8523)
  • Fix useStreamWorkflow unmounting breaking stream call (#8449)
  • Remove shell from dev (#8466)
  • UX for the agents page (#8517)
  • add icons into playground titles + a link to the entity doc (#8518)
Oct 3, 2025
2025-10-03

Mastra Release - 2025-10-03

This release includes improvements to documentation, playground functionality, API naming conventions, and various bug fixes across the platform.

Agents

  • Reorganizes the agent memory documentation by explaining async memory configuration, introducing runtime context, and moving detailed content to the appropriate Memory section. #8410

CLI / Playground

  • Fixes a bug where the shell option was breaking server startup on Windows environments. #8377
  • Adds a dedicated authentication token specifically for the Playground environment. #8420
  • Fixes an issue in the playground UI by properly initializing message history for v1 models, ensuring history renders correctly when refreshing a thread. #8427

Client SDK - JS

  • Fixes a race condition in the client-js library by ensuring that WritableStream operations await the completion of ongoing pipeTo() calls, preventing locked stream errors and production crashes. #8346
  • Adds GenerateVNext support to the React SDK and introduces a function to convert UIMessages to assistant-ui messages. #8345
  • Fixes issues with the custom AI SDK output. #8414

Core Platform Components

  • [IMPORTANT] Updates API and SDK naming by renaming 'generateVNext' to 'generate' and 'streamVNext' to 'stream', moving previous versions to 'generateLegacy' and 'streamLegacy', and updates all related code, documentation, and examples for consistency and backwards compatibility. #8097
  • [TIER 2] Improves structured output handling by converting it from an output processor to an EventEmitter-based stream processor, enabling multiple consumers and direct streaming of structured agent output, while also removing legacy structuredOutput usage. #8229

Deployer

  • [TIER 2] Adds support for per-function configuration overrides (maxDuration, memory, regions) in the Vercel deployer via a centralized vcConfigOverrides option, merges these into the generated .vc-config.json, extracts config types for clarity, and updates code style, all while maintaining backward compatibility. #8339
  • Adds support for resolving transitive dependencies in monorepos during development in the deployer. #8353

Developer Tools & UI

  • Fixes an issue where working memory and semantic recall were not being displayed in the UI. #8358
  • Improves the color contrast for code blocks in legacy traces to improve readability. #8385
  • Updates the thread display by showing messages in descending order and includes the thread title. #8381
  • Fixes issues with model router documentation generation and the playground UI's model picker, including logic errors, copy improvements, UI bugs, environment variable display, and adds responsive design for better mobile support. #8372

MCP

  • Updates MCPServer prompts and resource callbacks to access the 'extra' property, including AuthInfo, allowing for authenticated or personalized server interactions. #8233

Memory

  • Improves the memory indicator UX by replacing the previous small indicator with a shared Alert component, now displayed on the agent sidebar. #8382
  • Fixes the persistence of output processor state across LLM execution steps, ensuring processors retain their state and structured output is generated correctly, while also updating controller references and preventing premature 'finish' chunk processing. #8373

Networks

  • [TIER 2] Migrates agent network functionality to the new streamlined agent API, removing the separate vNext network implementation from the playground. #8329

Observability

  • Enables observability by default for all templates. #8380

Prod analytics

  • Adds a 3-second fetch interval to AI traces, making the UI and trace details update more responsively in real time. #8386

Tools

  • [TIER 2] Adds human-in-the-loop capabilities with tool call approval, allowing users to review and approve/decline tool executions before they run. #8360

Workflows

  • Fixes a bug where the resourceId was lost when resuming workflows after a server restart by ensuring it is correctly passed through all relevant server handlers and the core workflow's resume logic. #8359
  • [TIER 2] Adds the ability to resume and observe interrupted workflow streams in the playground, allowing users to continue streaming results after a workflow is suspended or the frontend stream is closed. #8318
Oct 1, 2025
2025-10-01

Mastra Release - 2025-10-01

We are excited to announce the release of our new model router and model fallbacks! You can now choose any model provider and model without the need to install or import it. If one model is not functioning properly, you will automatically be able to fallback to another model.

Agents

  • Updates step identification by including description and component key when steps are created from agents or tools, and updates related tests. #8151
  • Improves the trace scoring logic to eliminate duplication in building agent payloads and updates related tests. #8280
  • Enables the agent to return the selection reason as the result when it cannot route and pick a primitive. #8308
  • Fixes TypeScript type inference issues by making the 'suspend' property optional in ToolExecutionContext and resolves module resolution conflicts for DynamicArgument, improving tool usability and type safety. #8305
  • Updates the routing agent to throw an error if the required memory parameter is not provided. #8313
  • Fixes a race condition in the stream pipeline by adding controller state checks before enqueueing data, preventing errors from stale callbacks attempting to write to a closed ReadableStreamDefaultController during sequential agent tests. #8186

CLI / Playground

  • Removes the legacy workflow from both the playground and client-js components. #8017
  • Adds model fallback functionality to the playground as a new feature. #7427 [IMPORTANT]
  • Improves the playground UI's stream handling by ensuring correct part ordering and robustness when processing streamed assistant messages, including adding empty messages and text parts as needed and properly handling content types. #8234
  • Updates the playground to display which model from the fallback list was successfully used. #8167
  • Updates the playground's model picker to use the new model router, adding provider connection status indicators, info links to provider docs, improved warning and error handling, and preserving drag-and-drop reordering for multi-model setups. #8332 [IMPORTANT]
  • Fixes the network label when memory is not enabled or when the agent has no subagents, addressing a UI bug. #8341

Client SDK - JS

  • Fixes a bug in the client-js SDK that caused duplicate storage of the initial user message when client-side tools were executed, ensuring only assistant responses and tool results are sent back to the server instead of resending the original user message. #8187
  • Moves the useMastraClient hook and its provider to the React package. #8203
  • Fixes missing traceId output when using the aisdk format and disables tracing in input/output processors to prevent unwanted traces. #8263
  • Updates the React SDK to convert network chunks into UIMessage objects, enhancing how network data is handled in the UI. #8304

Deployer

  • Fixes a bug where a randomUUID call was leaking into the global scope of the Cloudflare worker during the mastra build process by preventing it from being called at import time. #8105
  • Adds an environment variable, MASTRA_HIDE_CLOUD_CTA, to allow hiding the Mastra cloud deploy button, requiring a full server restart to take effect. #8137
  • Fixes build and unit test issues in the Cloudflare deployer, adds end-to-end tests, and resolves a compatibility bug with @mastra/pg. #8163
  • Fixes issues with native dependencies in bun monorepos for the deployer by correcting the bun pack process. #8201
  • Updates Mastra Cloud to version 0.1.15, including the removal of a custom header from the JavaScript client, a workflow fix for JSON issues, and an AI SDK dependency update. #8134
  • Improves the installation process for indirect external dependencies in the Mastra build system. #8145
  • Fixes workspace path handling on Windows by introducing a utility to normalize path separators, resolving issues with workspace detection and comparisons. #7943
  • Adds support for Netlify Gateway by introducing a NetlifyGateway class, updating gateway and OpenAI-compatible classes for dynamic URLs and token generation, and enhancing model ID resolution. #8331 [IMPORTANT]

Evals

  • Adds conditional chaining to scorer.agentNames to prevent errors when accessing potentially undefined properties. #8199
  • Updates the score types to allow input and output to be any type. #8153
  • Adds server APIs to retrieve all scores by trace and span ID, along with corresponding test updates. #8237

MCP

  • Updates the generateVNext function to correctly return a stream response for the tripwire case and removes unnecessary special handling for tripwire responses. #8122
  • Adds comprehensive and accurate TypeScript types to the streamVNext code path, aligns return types, removes dead code, and improves overall type safety and code clarity. #8010
  • Updates core error processing to safely parse error objects using safeParse. #8312
  • Adds a model router system to @mastra/core, allowing users to specify any OpenAI-compatible provider and model using simple magic strings (e.g., 'openai/gpt-4o'), with automatic provider config resolution and support for custom providers, streamlining model selection and integration. #8235 [IMPORTANT]

Networks

  • Fixes agent networking failures with working memory by correctly passing and fetching memory tools, updates prompts to improve agent tool usage, and renames resourceId/resourceType to primitiveId/primitiveType for clarity. #8157
  • Fixes issues with the network chunk type and updates the working memory test. #8210
  • Improves error processing by ensuring that useful error information in stream error objects is no longer masked. #8270

Observability

  • Adds a new LangSmith observability package, adapted from the Braintrust implementation, to enhance monitoring and tracing capabilities. #8160 [TIER 2]
  • Introduces the initial release of an OpenTelemetry exporter to enable AI observability. #8273 [TIER 2]

Storage

  • Adds optional SSL support to PostgreSQL connection string configuration, improves type safety in config validation, and enhances error handling for invalid configurations. #8178
  • Adds a separate spanId column to the scores table to enable fetching scores by both traceId and spanId, instead of storing both under the traceId column. #8154
  • Adds full AI tracing support to the PostgreSQL storage adapter, updates SpanType to use strings instead of integers across all stores, and ensures timestamps are set by the database rather than the exporter. #8027

Tools

  • Updates type definitions to use structural typing for Zod schemas, ensuring compatibility with both Zod v3 and v4 in tool schemas, and adds CI tests to prevent future regressions. #8150
  • Fixes a bug by ensuring that ToolInvocationOptions are correctly used in the execute parameters of createTool. #8206
  • Fixes a bug where streaming would hang for client-side tools that were not self-executing by ensuring the stream properly closes when no client tools are run. #8272

Voice

  • Updates the speak method in openai-voice to destructure the options parameter to extract key properties while allowing additional OpenAI voice parameters to be passed through, improving flexibility for callers. #8228
  • Adds support for multiple Google Voice authentication methods—including API keys, service account key files, and inline credentials—enables use of Application Default Credentials (ADC), and updates the documentation accordingly. #8086

Workflows

  • Adds support for passing register options to the Inngest serve function, enabling users to configure additional registration settings when serving Mastra workflows. #8139
  • Adds optional Zod-based input and resume data validation to workflow steps, controlled by a new validateInputs option, and updates tests accordingly. #7779
  • Adds support for passing tracing options when starting or resuming workflows via the hono server APIs and client SDK. #8277
  • Fixes an issue where instructions passed as an object (instead of a string) could not be resolved in the playground, allowing both notations as valid input. #8284
  • Adds a workflow transformer to the AI SDK, allowing seamless integration of Mastra workflows with Vercel's useChat hook in React applications by automatically converting workflow responses into the required format. #7829 [TIER 2]
  • Adds support for passing metadata to traces via tracing options in workflow stream and streamVNext handlers. #8278

Changed Packages

🦋 New tag: @mastra/ai-sdk@0.0.5 🦋 New tag: @mastra/client-js@0.14.1 🦋 New tag: @mastra/react@0.0.2@mastra/deployer-cloud@0.19.1 🦋 New tag: @mastra/deployer-cloudflare@0.14.4 🦋 New tag: @mastra/deployer-netlify@0.13.4 🦋 New tag: @mastra/deployer-vercel@0.12.4 🦋 New tag: @mastra/longmemeval@0.1.23 🦋 New tag: @mastra/braintrust@0.1.5 🦋 New tag: @mastra/langfuse@0.0.10 🦋 New tag: @mastra/langsmith@0.0.1 🦋 New tag: @mastra/otel-exporter@0.0.2 🦋 New tag: @mastra/agent-builder@0.0.7 🦋 New tag: mastra@0.13.4 🦋 New tag: @mastra/cloud@0.1.17 🦋 New tag: @mastra/core@0.19.1 🦋 New tag: create-mastra@0.13.4 🦋 New tag: @mastra/deployer@0.19.1 🦋 New tag: @mastra/evals@0.13.9 🦋 New tag: @mastra/loggers@0.10.14 🦋 New tag: @mastra/mcp@0.13.2 🦋 New tag: @mastra/mcp-docs-server@0.13.26 🦋 New tag: @mastra/mcp-registry-registry@0.10.17 🦋 New tag: @mastra/memory@0.15.4 🦋 New tag: @mastra/playground-ui@6.2.4 🦋 New tag: @mastra/rag@1.2.7 🦋 New tag: @mastra/server@0.19.1 🦋 New tag: @mastra/google-cloud-pubsub@0.1.7 🦋 New tag: @mastra/astra@0.11.11 🦋 New tag: @mastra/chroma@0.11.11 🦋 New tag: @mastra/clickhouse@0.15.3 🦋 New tag: @mastra/cloudflare@0.12.3 🦋 New tag: @mastra/cloudflare-d1@0.13.3 🦋 New tag: @mastra/couchbase@0.11.11 🦋 New tag: @mastra/dynamodb@0.15.4 🦋 New tag: @mastra/lance@0.3.3 🦋 New tag: @mastra/libsql@0.15.0 🦋 New tag: @mastra/mongodb@0.14.3 🦋 New tag: @mastra/mssql@0.4.3 🦋 New tag: @mastra/opensearch@0.11.12 🦋 New tag: @mastra/pg@0.17.0 🦋 New tag: @mastra/pinecone@0.11.11 🦋 New tag: @mastra/qdrant@0.11.14 🦋 New tag: @mastra/s3vectors@0.2.4 🦋 New tag: @mastra/turbopuffer@0.11.11 🦋 New tag: @mastra/upstash@0.15.3 🦋 New tag: @mastra/vectorize@0.11.12 🦋 New tag: @mastra/voice-azure@0.10.14 🦋 New tag: @mastra/voice-cloudflare@0.11.7 🦋 New tag: @mastra/voice-deepgram@0.11.7 🦋 New tag: @mastra/voice-elevenlabs@0.11.7 🦋 New tag: @mastra/voice-gladia@0.11.7 🦋 New tag: @mastra/voice-google@0.11.7 🦋 New tag: @mastra/voice-google-gemini-live@0.10.13 🦋 New tag: @mastra/voice-murf@0.11.7 🦋 New tag: @mastra/voice-openai@0.11.7 🦋 New tag: @mastra/voice-openai-realtime@0.11.7 🦋 New tag: @mastra/voice-playai@0.11.7 🦋 New tag: @mastra/voice-sarvam@0.11.7 🦋 New tag: @mastra/voice-speechify@0.11.7 🦋 New tag: @mastra/inngest@0.14.2

Sep 23, 2025
2025-09-23

Mastra Release - 2025-09-23

Agents

  • Bugs related to agent type handling. #8072
  • An error related to the tripwire controller being closed prematurely. #8099
  • The type system for agent output options by introducing a single OUTPUT generic, ensuring mutual exclusivity between 'output' and 'structuredOutput', improving type inference and safety, and laying the groundwork for future structured output streaming. #7969
  • Agent instructions to support full SystemMessage types, enabling more flexible and structured instruction formats, updates related functions for compatibility, and adds comprehensive tests. #7987

Deployer

  • Configure the project root to support private packages in the build bundle process. #8004
  • New APIs to update and reorder models in the list, adding model fallback methods to both the server deployer and the client JS, along with corresponding tests. #7378

Developer Tools & UI

  • The codebase by removing all usage of SWR and replacing it with TanStack Query. #7931
  • The code to compute links from a provider instead of passing them through props, improving configuration and usage. #8016
  • The Template form by moving the AI model section, enhances the AgentMetadataModelSwitcher with auto-save, a new Save button, agent name filtering, and responsive styles, and applies minor style improvements to other Template components. #8071
  • A style and padding issue in the DateTimePicker popover content. #8106
  • A user interface for scoring on traces and spans. #8089
  • Navigation between scorers and entity types by using scorer names instead of IDs, resolving issues with broken navigation and duplicate scorer entries. #8129

Evals

  • A 'type' parameter to scorer creation, enabling automatic typing of scorer input and output based on the specified type (currently 'agent'), simplifying scorer definitions and payload handling. #8032
  • New server APIs and updates the client SDK to enable scoring of traces. #8064
  • The 'agent' type to all built-in scorers and corrects their names where necessary. #8101
  • A missing changeset for setting the type on built-in scorers, addressing an oversight from a previous pull request. #8132

Memory

  • An issue with the PGVector adapter that caused the memory_messages_vector_idx index to be unnecessarily dropped and recreated, improving performance and preventing chat disruptions. #8020

Observability

  • An issue with orphaned spans in the Braintrust exporter, ensuring proper span association and addressing bug #6773. #7660
  • A critical bug in the langfuse exporter that caused spans finishing after their root span to be lost by ensuring they are no longer incorrectly treated as out-of-order. #8104

Storage

  • A missing changeset related to schema compatibility. #8090
  • Vector type qualification in PgVector for AWS RDS with custom schemas by detecting the installed schema of the pgvector extension, properly qualifying vector type references in all SQL queries, enhancing installation logic, and adding comprehensive tests. #8070

Tools

  • A new feature to display tool output in streamVNext and addresses issue #7325. #7983
  • The ability to suspend and resume tool calls, laying groundwork for tool approvals, and includes related test updates. #8084 [IMPORTANT]
  • The English-to-Japanese translation service by refactoring the relevant code. #8126
  • The playground UI so that tool navigation links now correctly include the agent ID in their paths, ensuring users are directed to agent-specific tool pages. #8135

Workflows

  • A bug in workflows to ensure the correct agent method is selected based on the model version. #8001
  • Type issues and improves type safety for getStepResult in workflow steps, updates its documentation, and adds related tests. #8065
  • A batch trace scoring system with configurable scorers and introduces internal event-based workflow support to Mastra. #8033
Sep 17, 2025
2025-09-17

2025-09-17 - Mastra Release

Agents

  • Add better compatibility with Zod v4 in the OpenAI reasoning schema by ensuring default values are correctly handled whether stored as a function (Zod v3) or a value (Zod v4), and adds tests to verify the fix. #7793
  • Stream markdown as plain text in the agent summary within the agent text view. #7851
  • Display of the scorers badge in the agent metadata section for improved UI alignment. #7910
  • Fix destructuring the return value from streamVNext which caused methods and getters to lose their this context by binding all public methods and dynamically binding getters in the constructor #7920
  • Fix switch logic in the prompt-injection processor. #7951

CLI / Playground

  • Pass the runtimeContext to client SDK GET methods, following up on a previous PR. #7767
  • Fix 'mastra init' CLI by displaying an error if run outside a Node.js project and automatically installing the 'zod' dependency if it is missing. #7837
  • Add Local HTTPS support to 'mastra dev', allowing users to enable it via a command-line flag or configuration option. #7871
  • Change playground's use-workflows hook to use createRunAsync instead of createRun. #7903
  • Fix Issues with UI hydration in the traces interface. #7765
  • Add a Dynamic form rendering to correctly handle Zod intersection schemas, ensuring all relevant input fields are displayed. #7768
  • Ensure runs list is always up to date by fetching it each time the runs tab is clicked, rather than only on initial mount. #7852
  • Add default 2px width for AI span elements without an end date to ensure visibility and increases decimal precision to display milliseconds. #7853
  • Added Scorer components (ScoreDialog, ScoresTools), updates score rendering to use EntryList, adds a simplified code section option, and fixes minor issues. #7872
  • Each row in the scorers table is clickable and removes an unnecessary data table component. #7915
  • Add empty state display for scorers, improving the user interface when no scorers are present. #7846
  • scorer prompts to explicitly display 'null' for empty values instead of rendering an empty component. #7875

Client SDK - JS

  • Improves the client-js SDK's agents and workflow APIs. #7592
  • Add dedicated client-js SDK createTool that operates without server dependencies, along with related documentation updates and a changeset. #7781

Core

  • Ensure the stream deprecation warning is logged only once instead of multiple times. #7905
  • Remove unnecessary console.log statements from the codebase. #7916

Storage

  • Ensure 'postgres-store-instance-checker' Babel plugin is only added when '@mastra/pg' is used, fixing an unnecessary plugin inclusion issue. #7832
  • Support for Google Cloud SQL with IAM authentication by allowing PostgresStore to accept and forward a raw pg.ClientConfig, enabling compatibility with dynamic connection configurations used by the Cloud SQL Node.js Connector. #7523
  • Ensure database message IDs are preserved and consistently used throughout the UI message stream, allowing clients to accurately track streaming events with their corresponding persisted messages. #7783
  • Add automatic composite indexes and comprehensive index management features to the PostgreSQL storage adapter, significantly improving query performance and enabling users to create, monitor, and manage indexes for optimized query patterns. #7757
  • Server cache primitive for resumable streams. #7929

Server

  • Ensure /api routes are added to Swagger UI overview and document on custom API routes. #7826
  • A 'requiresAuth' option to custom API routes, allowing explicit control over authentication requirements and ensuring all routes are protected by default unless specified otherwise. #7703
  • Add a helpful error message to the @mastra/server root index entrypoint to guide users toward using subpath imports. #7762

Bundling

  • Standardize method signatures, enhance project context handling, improve dependency analysis for monorepos, clean up build configurations, and document code analysis. Some breaking API changes to streamline dev/build processes. #7619 [IMPORTANT]

Agents

  • Deprecate 'output' property in favor of 'structuredOutput' for the 'generateVNext' and 'streamVNext' methods, maintaining backward compatibility while encouraging migration to the new API. #7750 [IMPORTANT]
  • Fix critical issues with structured output streaming by ensuring all format handlers consistently preprocess and handle JSON code blocks, resolves enum validation bugs, and adds comprehensive tests to improve reliability and user experience when LLMs wrap JSON responses in code blocks. #7864
  • Add Model fallback support and configurable retry limits to the vnext agent stream, enabling automatic switching between models and improved error handling. #7126 [IMPORTANT]
  • Fix usage tokens for both legacy and VNext models #7901
  • .network() returns a network stream class. #7763
  • Fix the stopWhen condition in vNext to ensure the correct accumulated step results across iterations. #7862

Networks

  • Deprecate and remove legacy AgentNetwork and deprecates the old agent network implementation. #7919 [IMPORTANT]

Observability

  • Refactored the AI tracing implementation to use shared types and standardized naming, improving maintainability with minimal impact on the external API and tests. #7744
  • The ability to hide internal AI tracing spans by default, introduces a lightweight ExportedAISpan type for exporters, improves parent span handling for exported spans, and significantly enhances the SensitiveDataFilter functionality. #7764
  • The SensitiveDataFilter to use exact, normalized key matching instead of substring matching, ensuring only true sensitive fields like API keys are redacted while preserving important telemetry data such as token counts. #7840
  • Fix inconsistent timeline data for spans by adding a client-side patch. #7841
  • Fix AI span and trace dialogs by removing unnecessary fields, adds start and end times to span details, and updates the time format in the traces list. #7847
  • Refactored the handling of internal AI spans to intelligently set which spans are marked as internal during workflow or agent creation, rather than determining this during execution. #7876
  • Fix a critical bug in ai-tracing's DefaultExporter that caused completed spans to be lost as out-of-order after buffer flushes, and adds persistent span tracking with automatic memory cleanup to ensure accurate tracing and prevent memory leaks. #7895
  • Better error message displayed in observability for storage support missing #7956

RAG

  • Fix compatibility issue in the rerank function to support AI SDK v5+ and @ai-sdk/openai v2+ models by detecting the model version and using the appropriate generation method, resolving errors with V2 models. #7828

Tools

  • Add ToolInvocationOptions type alias as a union of ToolExecutionOptions and ToolCallOptions to resolve TypeScript portability issues by abstracting direct references to ai package types in createTool and related interfaces. #7914

Voice

  • Make voice handler to return a 400 status code with clearer error messages for client-side MastraError instances, instead of a 500 error. #7749

Workflows

  • Support for resumable streams, allowing stream operations to be retried if the connection is lost. #7949 [IMPORTANT]
  • Add formatting for AI SDK and improves workflow streams to better handle nested agent events. #7728
  • Support for associating workflow runs with an optional resourceId, enabling filtering and management of runs by resource across all storage providers, with full backward compatibility and automatic database migrations. #7740
  • Optional resourceId parameter is properly propagated and persisted throughout the Inngest workflow execution pipeline, enabling workflow snapshots to be associated with a resource. #7792 [TIER2]
  • Fix bug in the Inngest workflow engine's sleepUntil function by ensuring serialized Date values are properly converted back to Date objects before use, preventing TypeErrors during workflow execution. #7863
  • Support for user-supplied Inngest functions in the serve/inngestServe function, allowing users to pass custom functions alongside Mastra workflow functions for more flexible integration, while maintaining backward compatibility and type safety. #7900 [TIER2]
  • Deprecated and removed synchronous createRun() method in favor of the asynchronous createRunAsync(), updating all code, examples, and documentation to enforce async usage and improve consistency across the Mastra ecosystem. #7897 [IMPORTANT]

Changed Packages

🦋 @mastra/auth-auth0@0.10.5 🦋 @mastra/auth-clerk@0.10.5 🦋 @mastra/auth-firebase@0.10.4 🦋 @mastra/auth-supabase@0.10.6 🦋 @mastra/auth-workos@0.10.7 🦋 @mastra/ai-sdk@0.0.3 🦋 @mastra/client-js@0.13.0 🦋 @mastra/deployer-cloud@0.17.0 🦋 @mastra/deployer-cloudflare@0.14.0 🦋 @mastra/deployer-netlify@0.13.0 🦋 @mastra/deployer-vercel@0.12.0 🦋 @mastra/braintrust@0.1.3 🦋 @mastra/langfuse@0.0.8 🦋 @mastra/agent-builder@0.0.5 🦋 mastra@0.13.0 🦋 @mastra/cloud@0.1.15 🦋 @mastra/core@0.17.0 🦋 create-mastra@0.13.0 🦋 @mastra/deployer@0.17.0 🦋 @mastra/evals@0.13.7 🦋 @mastra/loggers@0.10.12 🦋 @mastra/mcp@0.13.0 🦋 @mastra/mcp-docs-server@0.13.22 🦋 @mastra/mcp-registry-registry@0.10.15 🦋 @mastra/memory@0.15.2 🦋 @mastra/playground-ui@6.2.0 🦋 @mastra/rag@1.2.5 🦋 @mastra/server@0.17.0 🦋 @mastra/google-cloud-pubsub@0.1.5 🦋 @mastra/astra@0.11.9 🦋 @mastra/chroma@0.11.9 🦋 @mastra/clickhouse@0.15.1 🦋 @mastra/cloudflare@0.12.1 🦋 @mastra/cloudflare-d1@0.13.1 🦋 @mastra/couchbase@0.11.9 🦋 @mastra/dynamodb@0.15.2 🦋 @mastra/lance@0.3.1 🦋 @mastra/libsql@0.14.2 🦋 @mastra/mongodb@0.14.1 🦋 @mastra/mssql@0.4.1 🦋 @mastra/opensearch@0.11.10 🦋 @mastra/pg@0.16.0 🦋 @mastra/pinecone@0.11.9 🦋 @mastra/qdrant@0.11.11 🦋 @mastra/s3vectors@0.2.2 🦋 @mastra/turbopuffer@0.11.9 🦋 @mastra/upstash@0.15.1 🦋 @mastra/vectorize@0.11.10 🦋 @mastra/voice-azure@0.10.12 🦋 @mastra/voice-cloudflare@0.11.5 🦋 @mastra/voice-deepgram@0.11.5 🦋 @mastra/voice-elevenlabs@0.11.5 🦋 @mastra/voice-gladia@0.11.5 🦋 @mastra/voice-google@0.11.5 🦋 @mastra/voice-google-gemini-live@0.10.11 🦋 @mastra/voice-murf@0.11.5 🦋 @mastra/voice-openai@0.11.5 🦋 @mastra/voice-openai-realtime@0.11.5 🦋 @mastra/voice-playai@0.11.5 🦋 @mastra/voice-sarvam@0.11.5 🦋 @mastra/voice-speechify@0.11.5 🦋 @mastra/inngest@0.14.0

Sep 10, 2025
2025-09-10

Agents

  • A bundling issue by marking 'typescript' as an external dependency in both '@mastra/agent-builder' and '@mastra/server', preventing unwanted TypeScript chunks in the build output. #7585

CI / Tests

  • Fixes the peerdeps action to ensure proper functionality and compatibility. #7535
  • Add a missing changeset for #7566 to ensure the Braintrust version is incremented in the next release. #7596
  • Comprehensive tests for the convertFullStreamChunkToMastra function, increasing coverage by 116 lines and validating its handling of various stream chunk types and edge cases. #7637

CLI / Playground

  • The CLI development startup copy, changing references from 'Local' to 'Playground'. #7579
  • The Storybook configuration for the Playground UI. #7584

Client SDK - JS

  • An issue in AI SDK V5 where Gemini models incorrectly handled image inputs by ensuring that image URLs and base64 data are properly distinguished during message conversion, preventing decoding errors. #7490
  • The execution of clientTools in the JavaScript client SDK when using agent streamVNext. #7577
  • A structuredOutput property to client-js, making the model parameter optional and defaulting to the agent model if not provided. #7597

Core Platform Components

  • A bug by removing a duplicate 'float' case from a switch statement. #7516
  • The passing of the usage property to streamVNext's onFinish and adds usage and total usage tracking. #7598
  • The documentation by adding Mastra class methods to the navigation. #7601

Deployer

  • The schedule to run the Discord-to-GitHub triage process daily via a cron job. #7505
  • The Vercel deployer to support HTTP PATCH requests by adding the PATCH method to its entry file. #7492
  • A bug in @mastra/deployer by correcting the usage of flags with yarn pack to properly handle native dependencies in yarn monorepos. #7570
  • Bugs with the transpilePackages feature during mastra dev by adding stricter checks and changing the transpilation output location for workspace packages to improve reliability and avoid embedding third-party dependencies. #7572
  • Missing peer dependency errors by explicitly adding '@opentelemetry/api' to the output 'package.json' during deployment. #7518
  • The AI exporter by setting a default cloud endpoint, clarifying the environment variable name, renaming the exporter for consistency, and updating the README. #7600

Developer Tools & UI

  • Support for cursor slash commands. #7528
  • Playground UI components to enhance Observability features. #7496
  • An unintended body scrollbar by adding overflow-hidden to the body, preventing unnecessary scrolling caused by Radix Popover components. #7631

MCP

  • Rollback a previous change that added the createMCPTool helper for proper execute types in the MCP module. #7513
  • That MCP tools are recreated and properly populated with the mastra instance when attaching the MCP server, fixing initialization timing issues. #7520
  • Fix the peer dependency for MCP package. #7533
  • Output schema injection for the vNext version, enhancing how output schemas are handled. #6990
  • An issue where external image URLs in message file parts were incorrectly converted to base64 data URIs, ensuring URLs are now handled and validated properly without unwanted transformation. #7542
  • The documentation for runtimeContext usage in agents and tools. #7583
  • Consistent messageId values in responses by instantiating a single MessageList per call in both stream/generate VNext and legacy paths, resolving issues with mismatched IDs between responses and the database. #7606
  • The server API route types to make them available for external use. #7657

Memory

  • That getMemoryMessages is called during the first turn in a thread when semanticMemory is scoped to resource, addressing issue #7367. #7529
  • The agent memory tests to improve or modify their coverage or behavior. #7536

Networks

  • The documentation for Agent.streamVNext. #7639

Observability

  • Comprehensive, parameterized integration tests for AI tracing in various mastra agent configurations, featuring intelligent mocking, advanced debugging, and coverage of core scenarios to validate functionality and highlight future implementation needs. #7515
  • A new Observability playground page. #6752
  • The Observability Trace Dialog by changing the 'Span Id' label to '#' for consistency and fixing the heading style. #7618

Prod analytics

  • 'projectName' as a top-level field to the Braintrust exporter and updates usage metrics to the BraintrustUsageMetrics format for improved trace reporting. #7566

Storage

  • A new @mastra/s3vectors package, providing a first-class vector store for Mastra backed by Amazon S3 Vectors (Preview), supporting index management, vector CRUD operations, strict metadata filtering, and integration with the official AWS SDK, along with comprehensive tests and documentation. #6801
  • The listIndexes() method in @mastra/pg to only return tables managed by Mastra, preventing conflicts with external pgvector tables and adds tests to ensure correct handling of such cases. #7539

Tools

  • Concurrency to the tool execution step for stream/generate vnext, improving performance by enabling parallel execution. #7524
  • Made the TracingContext parameter optional in tool.execute(), allowing manual calls without requiring it. #7532
  • A critical bug in tracing context propagation for tool calls, ensuring proper span hierarchy and observability in nested agent, tool, and workflow executions, and updates tests for complex scenarios. #7531
  • Support for provider-executed tools by checking a flag to skip local execution and return pre-computed results, ensuring correct handling of tools like OpenAI's webSearchPreview and Claude's str_replace_editor, with accompanying tests. #7642

Website

  • The documentation to fix broken links. #7603
  • The sidebar to modify the observability link. #7621
  • A previous change that updated the sidebar observability link. #7635

Workflows

  • An issue where the workflow span appeared in a separate trace, ensuring correct trace linking in the core workflow logic. #7522
  • The playground to use the new workflow streamVNext feature when streaming. #7575
  • Comprehensive tests for the Workflow.createRecordStream method in the JavaScript client SDK, increasing coverage by 15 lines and verifying both success and error scenarios for streaming record serialization. #7594
  • AI tracing propagation for workflows executed directly within agents. #7599
  • Comprehensive tests for the getStep utility, improving coverage of workflow navigation and nested EventedWorkflow resolution logic. #7433
  • Dynamic workflow execution within the agent thread as a new feature. #7506
  • Workflow documentation by moving workflow methods into a dedicated methods directory and adds a redirect. #7617
  • The codebase to use createRunAsync, likely refactoring existing functionality to support asynchronous run creation. #7632
  • Options are correctly passed to streamVNext, flattens LoopConfig callbacks into execution options, adds tests, and updates documentation. #7643
  • An issue where the wrong repository slug was used to fetch template environment variables, ensuring the correct slug from the URL is used to prevent 404 errors. #7650
  • The prepareStep option to the generateVNext and streamVNext functions in the core module. #7646
  • The Workflow type and adds support for workflow-step-output. #7519
Sep 5, 2025
2025-09-05

Mastra Release - 2025-09-05

Agents

  • Added a Mastra template for a financial modeling agent that integrates with Google Sheets via Composio, enabling professional financial models and analysis directly in Sheets. #7080
  • Updated the Agents Overview documentation to clearly show the use of experimental_output and removes references to structuredOutput in example code. #6854
  • Updated the MastraEmbeddingModel and implemented a TypeScript-related workaround. #7124
  • Added an agent builder package that enables the creation of mastra projects from templates. #7106 [IMPORTANT]
  • Ensured that the abort signal is correctly piped to the agent stream and generate functions in the Mastra server. #7259
  • Fixed an issue in @mastra/core where initial user messages with empty content were incorrectly filtered out, potentially resolving issue #7231. #7317
  • Ensured that when using streamVNext with format: 'aisdk', the onFinish callback now correctly receives all assistant response messages, fixing an issue where these messages were previously missing. #7327
  • Made minor adjustments to the agent-builder package's build process and updates its TypeScript peer dependency. #7330
  • Updated the documentation to add information about suspend feedback. #7318
  • Fixed a Base64 decoding error when handling images with Google Gemini models by properly converting image data types and refactoring image conversion logic into reusable utilities. #7396
  • Added support for passing public URLs of large documents to the LLM in Multi Modal mode by implementing a server endpoint to verify document content types. #7244
  • Added a body sanitization utility to agent handlers to remove disallowed keys like 'tools' from request bodies, preventing client-sent properties from interfering with LLM provider tool handling. #7002
  • Enhanced the agent builder workflow by adding model selection, environment variable support, improved .gitignore handling, hot reload disabling, branch creation notices, and persistent installation state, while supporting both v1 and v2 models. #6812 [IMPORTANT]

CI / Tests

  • Set up the Renovate configuration and upgrades dependencies to improve project maintenance. #7034
  • Added comprehensive tests for the StoreOperationsInMemory.batchInsert method, verifying correct ID assignment, edge case handling, and increasing code coverage by 15 lines. #7107
  • Added comprehensive tests to ensure that convertFullStreamChunkToUIMessageStream correctly transforms tool-output stream parts into UI message format, accurately mapping fields and preserving all output properties. #7130
  • Added comprehensive tests for the CohereRelevanceScorer, covering API request formatting, authentication, success and error scenarios, edge cases, and increases code coverage by 29 lines. #7214
  • Added the CI workflow for the agent builder. #7316
  • Removed Verdaccio authentication from the CI setup to eliminate intermittent npm authentication errors and make end-to-end tests more reliable. #7322
  • Fixed end-to-end test installation issues by ensuring the correct version is used. #7329
  • Added a timeout to the monorepo test to improve test reliability. #7366
  • Fixed the build process for the cloud ai-trace package to enable direct exports from '@mastra/cloud/ai-tracing'. #7384
  • Updated the peer dependencies for various packages. #7394
  • Removed the changeset plugin from the project. #7407
  • Added validation logic for peer dependencies. #7364

CLI / Playground

  • Fixed the root-level dev:playground command to ensure it works correctly. #7044
  • Improved the log output of the 'mastra dev' CLI command for improved readability and clarity during development. #7046
  • Ensured that the playground client and API requests use the same baseUrl host, addressing issue #7099. #7115
  • Updated 'mastra start' to load environment files (including custom ones) and deprecates the redundant 'mastra build --env' flag. #7218
  • Updated the documentation to include references to the Mastra playground. #7258
  • Fixed the create-mastra command by replacing the unsupported yarn --save-dev flag with the cross-compatible -D alias to ensure successful project creation across package managers. #7358
  • Added support for Mistral AI as a default provider in the CLI, improving options for users, especially in France and the EU, and refines model selection logic for better maintainability. #7268
  • Fixed a bug where the playground workflow graph was broken when the workflow started with a branch. #7434

Client SDK - JS

  • Moved the 'zod' package from dependencies to peerDependencies in the Inngest project. #7093
  • Enhanced the ai-sdk stream output to render tool-output using a custom UI, enabling support for custom AI SDK tool outputs such as weather data. #7129
  • Added the new @mastra/ai-sdk package, enabling easy creation of custom /chat routes for use with the useChat hook. #7263
  • Updated the client SDK README to document the new streamVNext and generateVNext functions. #7379
  • Added support for AI SDK v5 models in the runExperiments functionality. #7081
  • Fixed the import statement for the ai-sdk library. #7431
  • Removed the unused ag-ui client from the client-js codebase. #7371

Core Platform Components

  • Fixed an issue where the onFinish callback in defaultStreamOptions for an agent was being overridden by the telemetry decorator, ensuring custom onFinish handlers are now respected. #7386

Deployer

  • Fixed a vulnerability related to Azure. #7213
  • Suppressed non-error package manager logs during dependency installation in 'create-mastra' and 'mastra build', consolidates the logic into shared utilities, and adds type-safety. #6946
  • Added deployer, server, and client-js handlers to support agent builder actions in the agent builder template. #7136
  • Fixed the build process for the cloud ai-trace component. #7385

Developer Tools & UI

  • Improved focus outline styles in the local playground for a more consistent user experience. #7076
  • Added fixes and improvements related to outline functionality. #7101
  • Removed all hotkey references to resolve issues with child processes. #7100
  • Fixed an issue with the chat outline. #7210
  • Added support for file download functionality. #7127
  • Ensured that the 'hono' package is not treated as an external dependency during development. #7207
  • Updated the templates entry in the _meta.ts file for improved organization. #7241
  • Added a padding-bottom workaround to the DynamicForm in ToolExecutor to ensure the submit button remains fully visible when the form is long and scrollable. #7265
  • Added deprecation warnings and legacy methods to the generate and stream functions in preparation for upcoming breaking changes. #7269
  • Ensured environment variables are loaded before starting the watch process in mastra dev, allowing them to be available at bundle time. #7357

Evals

  • Set up a context precision scorer and updates the relevant documentation. #6978
  • Added support for initializing and registering scorers on the Mastra instance, enabling users to override scorers when using agent methods like generate and stream. #7039 [TIER2]
  • Set up a prompt alignment scorer and updates the relevant documentation. #7105
  • Set up a noise sensitivity scorer and updates the relevant documentation. #7077
  • Fixed passing the tracing context to scorer runs to fix a database error caused by a missing column, with plans to reintroduce the context after updating storage adapters. #7397
  • Applied a follow-up fix for issues related to scorers. #7401
  • Added support for passing tracingContext to scorer runs and introduces input validation before saving scores. #7437
  • Set up a context relevance scorer to enhance the system's ability to evaluate and rank contextual relevance. #7014

Examples

  • Updated Next.js in the travel-app example from version 15.4.5 to 15.4.7, incorporating backported bug fixes including improved router handling, error page URL management, and font asset handling. #7226
  • Updated the Next.js dependency in the voice-memo-app example from version 15.3.1 to 15.4.7, incorporating various bug fixes and improvements from recent Next.js releases. #7232
  • Added a template for an intelligent agent that analyzes Gmail messages for meeting requests and automatically schedules Google Calendar events with all email participants using Mastra. #7208
  • Updated the documentation by adding frontmatter to the memory examples. #7374

MCP

  • Fixed MCPClient to properly handle Zod v4 schemas when retrieving tools, addressing issue #7092. #7114
  • Improved schema compatibility for v2 language models by not setting 'model.supportsStructuredOutputs', ensuring the correct compatibility layer is used. #7116
  • Fixed a compilation error by ensuring zod.toJsonSchema is only called when available, improving compatibility with strict compilers and different zod versions. #7121
  • Fixed an error when using AI tracing with structured output by replacing object spread with a Proxy in model wrapping to preserve all model properties. #7203
  • Updated the codebase to allow provider options to be passed through to relevant components or functions. #7217
  • Fixed an issue where providerOptions were not passed in streamVNext, enabling reasoning-delta chunks to be received in the stream. #7323
  • Fixed a security issue by validating that the resolved documentation file path does not escape the base directory, preventing path traversal attacks. #7238
  • Added validation to ensure that URLs submitted to the docs MCP server via fetchBlogPost belong to the same domain as BASE_BLOG_URL, addressing a security and performance issue. #7237
  • Fixed persistent import errors with z.toJSONSchema in the core and schema-compat modules, addressing issues reported in #7283 and affecting the openapi-spec-writer example. #7350
  • Added a createMCPTool helper to ensure correct types are available in the execute function for MCP server tools. #7383
  • Updated the MCP server to properly handle log level changes and adds a handler for logging/setLevel requests, ensuring compatibility with WSL and alignment with the MCP specification. #7349
  • Updated MCPTool to be a generic type, enabling parameter typing for improved type safety. #7389
  • Refactored MCPTool to be a generic class for improved parameter type safety. #7391
  • Removed all references to Dexter MCP, as it is no longer in use. #7487

Memory

  • Added comprehensive tests for the InMemoryMemory.updateResource method, covering both resource creation and update scenarios and increasing code coverage by 29 lines. #7315
  • Ensured that an error is thrown if a falsy or empty string threadId is passed to message-fetching methods, clarifying that these methods require a valid threadId and cannot be used for cross-thread searches. #6675
  • Fixed an ordering issue so that output processors (like PII redaction) are applied to messages before they are saved to memory, ensuring only processed content is stored, and adds integration tests to verify the behavior. #7445
  • Fixed a bug in the Memory.query() method so that pagination parameters are now correctly handled, returning only the requested page of messages instead of all messages. #7486

Networks

  • Fixed broken links in the documentation. #7260
  • Fixed a bug where V2-to-V1 message conversion duplicated content across split messages by ensuring each message part displays its unique text, and adds comprehensive tests to prevent regression. #7321
  • Added a tripwire chunk to the streamVNext full stream. #7392

Observability

  • Added a new AI Tracing span type specifically for events. #7027
  • Added a configurable DefaultExporter for AI Tracing with support for realtime, batch-with-updates, and insert-only modes, enhancing observability options for different storage providers. #7085
  • Filtered out excessive low-level OpenTelemetry spans to prevent database storage issues and ensure only relevant traces are exported. #7091
  • Added support for OTEL exporter environment variables for OTLP headers, aligning the implementation with the documentation. #7086
  • Removed HTTP instrumentation root spans from trace queries and promotes their direct child spans as new roots to improve trace filtering and consistency with cloud practices. #7215
  • Added and propagates tracingContext throughout all components (agents, workflows, processors, scorers, etc.), ensuring unified trace generation for each AI event and enabling custom span creation by users. #7274
  • Updated the default AI observability exporter to support event-type spans that only have an 'end' event, fixing errors related to out-of-order span updates. #7353
  • Disabled creating individual event spans for each LLM chunk in streaming responses to reduce verbosity in ai-observability. #7361
  • Added a CloudAITracingExporter to stream AI trace data in batches to the Mastra Cloud observability platform, extracting team and project IDs from JWT access tokens. #7376
  • Initial release of the BraintrustExporter for ai-observability, providing functionality similar to the existing LangfuseExporter. #7419

Prod analytics

  • Fixed vulnerabilities by removing a custom header, fixing JSON issues in the client-js workflow, and updating the AI SDK dependency in the JavaScript client library. #7224
  • Enhanced the Langfuse exporter by adding robust event span handling, circular reference protection, and improved span data cleaning to prevent JSON serialization errors and database failures, while unifying span lifecycle management and improving performance. #7266
  • Updated the LangfuseExporter configuration by allowing parameters to be of type 'string' or 'undefined', enabling users to pass environment variables without using the '!' operator. #7417

RAG

  • Updated the embedding model by updating MastraEmbeddingModel, removing unnecessary embeddings, and fixing vector query logic, along with a TypeScript workaround. #7125

Storage

  • Fixed a module import error by updating the libsql store's peer dependency to require @mastra/core v0.15.0 or higher, ensuring compatibility with the new AI_SPAN_SCHEMA export and observability features. #7200
  • Fixed an issue by ensuring that existing PostgreSQL indexes are not recreated. #7326
  • Fixed an issue where text deltas from LLM providers were incorrectly stored as separate parts, ensuring they are now combined into a single text part for cleaner message formatting. #7382

Tools

  • Fixed the issue of undefined tracingContext in tool executions for AI tracing and cleans up the related tool wrapping code. #7109
  • Added support for passing providerOptions to the createVectorQueryTool and createGraphRAGTool functions, enabling users to customize embed function options. #7120
  • Improved tool validation by correctly handling cases where input data is nested under 'context' or 'inputData' keys, preventing validation failures when users use these reserved keys. #7216
  • Added the missing API endpoint to retrieve an agent tool by ID, enabling client SDK calls like agent.getTool("get-weather") to function correctly. #7250
  • Fixed an issue by adding missing tool options to the createTool function. #7267
  • Added a workflow badge and inner graph display to agents that have registered a workflow, enhancing their visual representation in threads. #7416
  • Added and updated tests related to tool retry functionality. #7435
  • Added type inference helpers to @mastra/core, enabling seamless TypeScript compatibility between Mastra tools and AI SDK v5 UI components by extracting input and output types for improved type safety. #7441

Website

  • Fixed a broken breadcrumb link on the agents/tools page. #7138
  • Fixed a vulnerability related to cookies, though specific implementation details are not provided. #7220
  • Fixed redirect issues by adding locale awareness to all redirects. #7368
  • Fixed a production issue by updating the Nextra config and sidebar links to correctly append the locale to links, preventing path duplication. #7440

Workflows

  • Enhanced RunExperiments to support workflows, enabling experiments to be run and scored at both the workflow and individual step levels. #7025
  • Updated the documentation to include error-handling information for workflows. #7074
  • Added a new 'maxSteps' feature. #7030
  • Added native flow control options—including concurrency, rate limiting, throttling, debouncing, and priority queuing—to Mastra workflows by extending WorkflowConfig to support Inngest's advanced execution management features. #7090
  • Added a workflow builder feature for creating workflows in the agent-builder component. #7223[TIER2]
  • Fixed a bug where private members could not be accessed on wrapped workflow and agent objects by ensuring proxy methods are properly bound to their targets, resolving context loss issues when calling methods like agent.getLLM(). #7246
  • Improved error handling in Mastra workflows by ensuring the original stack trace is preserved when wrapping errors, and refactors duplicated error processing logic into a single method. #6966
  • Updated documentation to include 'await' in writer calls for improved clarity and correctness. #7256
  • Updated the documentation by adding an example of using curl to run workflows. #7270
  • Updated documentation to use 'return await suspend' in workflows. #7262
  • Enhanced GetWorkflowRunExecutionResult to include detailed information about nested workflow steps, ensuring all steps (including those in nested workflows) are returned in the response. #7272
  • Improved workflow streaming by renaming events, enabling retrieval of all workflow events when used as a tool from an agent, ensuring backwards compatibility between .stream() and .streamVNext(), updating event types, fixing usage tracking for agentic loop executions, and adding writer support to workflows as a tool. #7355
  • Disabled the import of agent-builder workflows and routes due to performance slowdown issues, pending further investigation. #7388
  • Added the .streamVNext() method to enable streaming of agent events within workflows, with future updates planned for additional streaming formats and execution engines. #7413
  • Updated the system to support both the new vNext streaming event format and the existing .stream() event types for workflows. #7424
  • Fixed a TypeError by ensuring workflows can correctly access the __registerMastra function when used as a step. #7484
Aug 27, 2025
2025-08-27

Mastra Release - 2025-08-27

We're thrilled to announce the release of support for Zod v4, while maintaining compatibility with Zod v3! We've also revamped our observability under the new name ai-tracing (documentation is on the way). Plus, you'll discover improvements in our streamVNext and generateVNext methods.

General

  • Support for the PATCH HTTP method in custom API routes and updates related tests. #7006
  • Enable support for Zod v4 #6942
  • Update Zod peer dependency to version 3.25 to support both v3/v4. #7032
  • Update AI peer dependencies to include version 5, resolving npm installation issues. #6982

Agents

  • Issues with type resolution and includes an associated changeset. #6996
  • The output processor to use a new stream format, cleans up related documentation, and fixes associated tests. #6927
  • A new convertMessages utility to @mastra/core, enabling seamless conversion between various message formats (Mastra, AI SDK v4/v5, and others) while preserving metadata, addressing the need for a public message conversion API. #6864

Client SDK - JS

  • A 'credentials' option to the client-js library's fetch requests, allowing users to control cookie and authentication header behavior, with updated interfaces, tests, and documentation. #6972
  • Linting for client-js and fixes related type issues. #6993
  • Support for Zod v4 while maintaining compatibility with Zod v3, updates the schema compatibility and test suite, uses toJsonSchema from Zod, and upgrades autoform to v4. #6944
  • The internal output schema handling in the streaming pipeline for improved TypeScript generics, type safety, and documentation, without changing the user-facing API. #6949

Deployer

  • The esm-shim plugin to resolve module format ambiguity errors during 'mastra dev' by ensuring compatibility between CommonJS and ES module syntax. #6914
  • Disable the esm-shim plugin in the Cloudflare deployer. #7017

Scorers (Evals)

  • A tool-call-accuracy scorer using both LLM and code-based approaches, along with corresponding documentation and tests. #6861
  • Comprehensive tests for the InMemoryLegacyEvals.getEvals method, covering field transformation, pagination, agent and type filtering, empty collection handling, and data integrity, increasing test coverage by 39 lines. #6984

Observability

  • A database schema for AI trace spans and introduces a base observability storage class with default method stubs, creating AI span tables only if supported. #6954
  • Renamed AITraceContext to TraceContext and parentAISpan to parentSpan for clearer and more consistent naming in AI-related code. #6989
  • Server APIs and a client SDK for fetching AI traces from Mastra storage. #6967
  • A new 'isEvent' column to the 'mastra_ai_spans' table to indicate whether a span is an event. #7020
  • AI tracing APIs to the in-memory mock store and includes corresponding test cases. #6957
  • New APIs for storing AI spans and traces in Libsql, along with related tests. #6959
  • Mastra objects in workflow steps using JavaScript proxies to automatically inject tracing context into nested agent and workflow calls, simplifying trace continuity and renames 'parentSpan' to 'currentSpan' in the TracingContext object. #7011
  • A bug where an error occurred if the 'mastra' object was undefined in a step when AI Tracing is enabled. #7026

Storage

  • A new getMessagesById method to all MastraStorage adapters, enabling retrieval of messages by their IDs. #6700
  • The ClickHouse column and execution engine utilities that were missed during a previous storage adapter refactor, ensuring they are available for cloud usage. #6928

Workflows

  • Reusable utility functions for workflow information to the server handlers and updates core processors to be asynchronous. #6933
  • Workflow run status to 'running' and persists step information in storage when a step starts, addressing issue #6936 and including related test updates. #6943
  • A bug to ensure that workflow run state is preserved after viewing traces in the Mastra Playground. #6948
  • AI tracing for Mastra workflows by introducing detailed span types for improved observability, fixes typing issues, and adds basic test coverage. #6971
  • A proof-of-concept event-based workflow execution engine and a general-purpose event engine integrated with the Mastra class, featuring support for pluggable PubSub adapters. #6923
  • Workflow types, likely restructuring or refactoring type definitions related to workflows. #7018

Examples

  • A multi-turn human-in-the-loop example to the documentation. #7010
Aug 21, 2025
2025-08-21

Mastra Release - 2025-08-21

This release introduces two major features: the new streamVNext and generateVNext methods that support multiple output formats (Mastra and AI SDK v5 formats), and output processors for transforming agent streams and results.

Highlights

New Stream and Generate Methods

  • Introduced streamVNext and generateVNext methods with configurable output formats - choose between Mastra's native format or AI SDK v5 format #6877
  • Added explicit return types for the streamVNext() function API #6876
  • Extended Client JS SDK with new vnext methods #6889
  • Integrated generateVNext support in the playground #6894
  • Added vnext streaming functionality to agent networks #6910
  • Updated message list component #6870

Output Processors

  • Unified input and output processing with a single Processor interface, enabling stateful output processing for agent streams #6482
  • Added tests for agent processors #6880
  • Enhanced agent methods with customizable and structured output processing options

AI SDK v5 Support

  • Added comprehensive AI SDK v5 support to MessageList, handling both v4 and v5 message formats simultaneously #6731
  • Fixed MessageList class and streaming helpers to properly format v5 response messages #6766
  • Added v5 model input support #6719
  • Implemented chunk type support for convertMastraChunkToAISDKv5 function #6739
  • Fixed provider metadata preservation during message conversions between AI SDK v5 and internal v2 format #6760
  • Added AI SDK v5 support to model switcher with automatic version detection #6909

Observability & Tracing

  • Updated AI Tracing interface based on recent design changes #6777
  • Added experimental AI Tracing support for workflows and agents #6824

Playground Enhancements

  • Added model switcher with improved suggestions UI to playground #6737

Agents

  • Added Mastra LLM class and finalized processing loop #6742
  • Integrated Google's Gemini Live API with real-time TTS, STT, and voice-to-voice capabilities #6677
  • Added support for model version in agents handler #6881
  • Fixed agent scorers to display agent name instead of key #6898
  • Removed _wrapToolsWithAITracing function from agent tracing #6911

CI / Tests

  • Fixed types-builder to display TypeScript compilation errors in console during builds #6717
  • Fixed '@babel/preset-typescript' package resolution issue #6835
  • Fixed safelyParseJson function to handle string values correctly and added tests #6862
  • Added memory tests #6873
  • Added tests for agent processors #6880
  • Fixed linting issues #6885
  • Added end-to-end test #6895
  • Fixed loop issue in test suite #6896
  • Added ts-ignore directive in streamObject and extended test timeout #6897
  • Added comprehensive tests for DefaultExecutionEngine.executeConditional error handling during condition evaluation #6829
  • Added comprehensive tests for mitt.off method, verifying event handler removal and edge cases #6813
  • Patched peer dependencies across packages to support core upgrade #6913

CLI / Playground

  • Added 'scorers' subcommand to CLI for managing and listing scorers #6704
  • Added tracking functionality for create-mastra command #6808
  • Added dynamic options to playground interface based on selected model version #6882
  • Added generateVNext support in playground #6894
  • Fixed default value behavior in playground component #6903

Deployer

  • Fixed missing rollup json() plugin for Cloudflare deployer, resolving issue #6728 #6747
  • Fixed build failures for projects using TypeScript syntax by adding @babel/preset-typescript support #6786
  • Fixed relative imports resolution in transpiled packages by marking only absolute paths as external #6821
  • Updated Cloudflare API reference and documentation #6727
  • Consolidated bundling code by centralizing extraction logic and standardizing helper usage #6836
  • Added deployer handlers for managing deployment processes #6886

Developer Tools & UI

  • Fixed mobile overflow bug to improve layout on mobile devices #6724
  • Fixed NumberField component to correctly apply 'min', 'max', and 'step' constraints from schema #6745
  • Updated UI elements and Storybook #6748
  • Fixed MessageList class and streaming output helpers to properly format v5 response messages #6766
  • Improved Scorer page UI with fixed title, description, and input preview #6803
  • Fixed model switcher to display correct icon for Anthropic models #6823
  • Updated bundle resolution logic to use Rollup's native resolve instead of resolveFrom #6837
  • Fixed workspace dependency detection in bundler by checking workspace map directly #6883
  • Fixed compatibility issues with p-map version 7+ on Node.js 20.0–20.18 #6893

Evals

  • Updated evaluation LLM prompts to ensure 'reason' output is always returned as string #6794
  • Added runExperiment method for running and scoring agents with customizable scorers in test suites or CI #6761
  • Fixed missing threadId and resourceId fields in scorers #6850

Examples

  • Fixed example links in documentation index page #6758
  • Set up TypeScript configuration for examples directory #6780
  • Fixed agent example #6820

MCP

  • Fixed MCP Hono server to send endpoint messages before keep-alive messages #6844
  • Fixed duplicated switch-case in core module #6778
  • Updated model loop logic #6868

Memory

  • Fixed system message duplication by skipping messages retrieved from memory #6738
  • Fixed system to load most recent snapshot #6807

Networks

  • Added processing functionality for Mastra stream #6830
  • Updated server handler functionality #6884
  • Added vnext streaming functionality to agent networks #6910

Observability

  • Added LangFuse observability exporter package for AI tracing #6783
  • Added Keywords AI as new observability provider #6843

Storage

  • Upgraded Chroma dependency to v3+ with Chroma Cloud support #6735
  • Updated PostgreSQL type definitions #6872

Tools

  • Fixed tool ID propagation through transformations for accurate AI tracing and logging #6847

Website

  • Fixed '405: Method not allowed' error with feedback form in production #6819
  • Fixed Swagger UI link #6906

Workflows

  • Reorganized documentation by moving Run methods into subdirectory with redirects #6711
  • Fixed data loss during suspend/resume operations in do-while loop workflows #6720
  • Added comprehensive loop functionality for workflows with multiple tool format support and AI SDK v5 streaming #6730, #6733, #6734, #6736
  • Implemented execution step for workflows #6740
  • Added custom ID parameter to workflow .map method #6799
  • Improved workflow suspension documentation #6855
  • Added tests for .map function renaming #6856
  • Added loop-related code and tests #6869
  • Added error handling for v2 models and initial generateVNext plumbing #6871
Aug 13, 2025
2025-08-12

Mastra Release - 2025-08-12

Agents

  • Agent documentation to include the onChunk callback and addresses a user query from issue #6480. #6627
  • A bug where the scorers endpoint returned agent names instead of IDs in the agentIds field, and also removes stray console logs and corrects typos in related tests. #6683
  • The ability to update the agent model. #6687
  • System memory message is always available during agent calls, including for new threads. #6709

CI / Tests

  • A test suite to verify that Qdrant's metadata filtering for thread_id and resource_id works correctly in the Memory system, with all tests passing and no implementation changes required. #6607
  • A metadata filtering test suite for the Chroma vector store to verify compatibility with the Memory system, confirming that all shared tests pass without requiring code changes. #6645
  • TypeScript build errors correctly cause the build to fail by propagating tsc's exit code in the types-builder script. #6659
  • A broken documentation deployment by importing a missing component, resolving a build failure. #6684

CLI / Playground

  • The CLI's tool bundling logic to exclude test files by adjusting the glob pattern and function signatures, ensuring test files are not bundled and extending type compatibility. #6647
  • The playground CLI to correctly use user-specified host and port values instead of always defaulting to the standard settings. #6624
  • The temperature parameter to 1 for the gpt-5 model in the playground. #6663
  • Development environment detection by replacing the spoofable 'referer' header check with a secure 'MASTRA_DEV' environment variable, preventing authentication and authorization bypass in production. #6680

Deployer

  • Cloudflare Worker compatibility by deferring PostgresStore initialization and adding Babel plugins to ensure proper Mastra instance scoping and initialization within Cloudflare Workers. #6086
  • An early warning in the deployer for invalid configuration by introducing a new Babel check in analyzeBundle, improving error detection before bundling fails. #6682
  • A set model handler to both the server deployer and the JavaScript client SDK. #6690

Developer Tools & UI

  • The Cloudinary video links in the local-dev-playground documentation. #6626

Examples

  • The docs-chatbot template into a monorepo containing separate agent and mcp-server applications. #6685
  • A new coding agent template that utilizes e2b sandboxes. #6649

MCP

  • The schema compatibility logic to avoid relying on the full language model. #6641
  • The MastraModelInput feature, though specific details of the changes are not provided in the description. #6642
  • The codebase to support v4 model input by introducing MastraInputStream, removing extraneous code, sharing ChunkType, and upgrading to aisdk v4 input. #6658

Memory

  • Schema compatibility issues with certain model providers by ensuring memory tools use makeCoreTool, resolving errors with OpenAI reasoning models and addressing issue #6548. #6628
  • The working memory tool to use the user-provided schema directly, improving LLM compatibility and tool invocation clarity. #6640

Networks

  • The vnext agent network stream to support accepting an array of messages. #6617
  • [TIER-2] The A2A implementation to spec version 0.3.0 across multiple packages, renames key methods, adopts official a2a-js SDK types, and fixes a bug with in-memory task storage, without adding new functionality. #6441

Prod analytics

  • A bug by asynchronously capturing telemetry data on stream completion via an intercepted onFinish callback, ensuring immediate stream returns and preserving existing behaviors for both agent.stream() and agent.streamVNext(). #6265

RAG

  • [IMPORTANT] A new 'semantic-markdown' chunking strategy to the RAG package, enabling more context-aware and size-controlled splitting of markdown documents by intelligently merging related header sections, along with documentation, refactoring, performance improvements, and tests. #6595

Storage

  • [TIER-2] Support for filtering scorer scores by source in storage, fixes libSQL parsing and scorer implementation issues for storage providers, and updates tests for compatible storage providers. #6670

Tools

  • A bug where tool calls would incorrectly appear after messages when refreshing the agent chat page. #6637
  • That tool arguments are correctly preserved in tool invocations when tool-result messages arrive separately or when messages are restored from the database, preventing loss of argument data in these scenarios. #6655
  • Tool name formatting by replacing invalid characters, prefixing names that start with invalid characters, and truncating long names to ensure compatibility with LLM provider requirements such as Gemini and OpenAI. #6612
  • Tool input validation that returns structured error objects instead of throwing exceptions, enabling agents and MCP servers to handle and correct validation failures gracefully. #6466
  • A handler that returns the list of providers for which the user has keys in their environment. #6705
Aug 6, 2025
2025-08-05

2025-08-05 - Mastra Release

Agents

  • The default Google Gemini model from the deprecated experimental 'gemini-2.5-pro-exp-03-25' to the stable 'gemini-2.5-pro' model to fix onboarding issues caused by the removed model. #6443

  • The getVoice and getScorers functions from agent trace logging. #6590

  • A unified types builder utility to ensure all generated TypeScript declaration files use proper .js import extensions for ESM compatibility, updates build and tsup configurations across the monorepo, and resolves type generation issues. #6588 [TIER2]

  • The convert message list v1 function to include message deduplication and adds corresponding tests. #6597

Core Platform Components

  • Update safelyParseJSON to better handle parameter values, fixing an issue where certain database rows were not properly retrieved from the vector DB, which caused traces to fail to load for stores like PostgreSQL. #6576

  • Mastra core peer dependencies to accommodate breaking changes in the scorer API and score data storage. #6578

Deployer

  • That when scaffolding mastra, version 4 is explicitly installed instead of the newly released version 5. #6452

Developer Tools & UI

  • Fixed Lodash CommonJS import issues by adding the @optimize-lodash/rollup-plugin, allowing users to utilize lodash dependencies without manual installation. #6410
  • Added tests to the AGUIAdapter to verify correct message handling and parameter passing, clarifying its expected behavior and aiding investigation of a related issue. #6397
  • Lodash imports in the Rollup bundler, updates test templates to validate lodash usage, and corrects agent and configuration object syntax, ensuring efficient bundling and proper functionality. #6476
  • A 'transpilePackages' option to Mastra's bundler configuration, enabling custom transpilation of TypeScript packages within the monorepo. #6142
  • Added a preview button to the working memory section of the playground, allowing users to open a modal and preview rendered markdown of their current content or changes. #6437

Evals

  • Updates the ai-sdk package versions for the evals and rag packages to use pre-sdk-v5 versions instead the latest. #6505
  • Breaking changes to the Scorer API by renaming step methods, switching to a method chaining initialization pattern, removing createLLMScorer, and updating related stores, evals, and playground components. #6455 [IMPORTANT]

Examples

  • Setup a template for converting PDFs to podcasts. #6101 [TIER2]

  • Updates the examples for Agents and Tools. #6508

  • The workflow example to use the current Mastra API, refactors logic for better step usage, and ensures compatibility and type safety for both even and odd input scenarios. #6583

  • Updates the documentation by adding an image example to the agents overview section. #6442

MCP

  • A context binding bug in the MessageList ID generator and updates related tests to better cover user workflows. #6483
  • Support for OAuth authentication with automatic token refresh to HTTP-based MCP servers by exposing an authProvider option, updating relevant transports, adding tests, and updating documentation. #6370

Memory

  • A bug where memory instances were not properly registered with Mastra when added to an agent, ensuring correct use of the custom ID generator and increasing test coverage. #6420
  • An issue with AWS Bedrock agent memory by ensuring conversations start with a user message and comments out now-unnecessary logic for removing tool call messages. #6327
  • The Client SDK - JS removes a custom header from mastraClient, fixes JSON issues in the client-js workflow, and updates the AI SDK dependency to version 4.2.2. #6408
  • Enriches documentation by adding videos related to memory. #6502
  • Metadata filtering in the LibSQL vector store for the Memory system by correcting JSON path syntax, adjusting the default minScore to include all cosine similarity results, and adding tests to ensure proper filtering across vector stores. #6603

Networks

  • Fixed a bug where splitting v2 messages into multiple v1 messages caused ID collisions and loss of tool call history by ensuring each split message receives a unique ID, preserving conversation context and tool history. #6608 [IMPORTANT]

Observability

  • The PinoLogger documentation and API reference in Mastra Cloud. #6395
  • Fix the tracing of runtimeContext values to resolve issue #6517. #6589

Prod analytics

  • The initial framework for the new AI Telemetry system as a non-breaking new feature. #6380 [TIER2]

RAG

  • The Renovate tool, removes the unused tiktoken dependency, and increases the timeout in a RAG test. #6412
  • A new sentence chunking strategy with advanced boundary detection, overhauls the chunking API and type system for improved safety and usability, and enforces stricter parameter validation, resulting in breaking changes to chunking options and transformer instantiation. #6398

Storage

  • Schema support for PostgreSQL by ensuring that workflow snapshots and scores correctly include the schema name in table operations, updates related classes and tests, and ensures unique constraints across schemas. #6405
  • A test to ensure that using an empty filter in MongoDB does not produce an error, addressing issue #6367. #6462
  • A bug in the Postgres Store to ensure a score ID is generated when saving scores, preventing insert failures due to missing IDs. #6352
  • A comprehensive scoring system with full CRUD operations, enhances MSSQL storage operations including message deletion, thread management, batch trace insertion, improved schema and timestamp handling, and updates core dependencies. #6501
  • A bug where retrieving a trace from the playground would incorrectly parse the object and return an empty object. #6449
  • The JavaScript Client SDK removes a custom header, fixes JSON issues in the workflow, and updates the AI SDK dependency. #6493
  • The dynamic require of the 'crypto' module in the Upstash store to resolve issue #5028. #6479
  • MongoDB vector filtering by correctly mapping thread_id and resource_id filters to the metadata subdocument, ensuring accurate semantic recall, and adds shared test utilities to prevent similar issues. #6596
  • The PostgreSQL vector store to set the default minScore to -1 (to include orthogonal vectors with cosine similarity 0), and adds tests to ensure correct metadata filtering for the Memory system. #6605

Tools

  • An issue where tool call history was lost during V1 message conversion by ensuring tool invocations are preserved and properly processed, filtering out working memory tool calls, and adding comprehensive tests to verify correct behavior. #6387
  • The preservation of tool invocation history by ensuring assistant messages with mixed content are properly separated into distinct text and tool call messages, enabling accurate referencing of previous tool call results. #6461
  • An issue where assistant tool call messages were missing corresponding tool result messages, which caused the chatbot to break when handling follow-up questions. #6500

Website

  • Redirects to ensure that links containing a locale (e.g., /en/) work correctly when accessed directly. #6591

Workflows

  • The step parameter optional in run.resume(), enabling automatic detection and resumption of suspended workflow steps for a more user-friendly and backwards-compatible workflow API. #6396
  • An issue with AbortController usage in Cloudflare Workers by lazily initializing Run's AbortController, enabling Mastra projects to deploy without errors on that platform. #6470
  • A critical bug in parallel workflow execution by ensuring that a parallel block only completes when all parallel steps have been successfully resumed and executed, preventing silent failures and data integrity issues when only some parallel steps are resumed. #6423
  • An issue where branching workflow steps incorrectly remained in a 'suspended' state after being successfully resumed, ensuring step statuses now accurately update to 'success' and workflow state remains consistent. #6424
Jul 30, 2025
2025-07-29

2025-07-29 - Mastra Release

Agents

  • Add error messages to clearly state that both resourceId and threadId are required when using Memory in the agent. #6295
  • Expose the mastra instance in dynamic agent arguments and includes related test updates. #6342
  • Add Input message processors to the agent primitive, enabling middleware for message filtering, transformation, validation, and early termination before messages reach the language model, with built-in processors, tracing, tests, and documentation. #6254 [IMPORTANT]
  • The GenerateReturn type to properly infer return types using conditional types, ensuring correct type resolution for GenerateTextResult and GenerateObjectResult. #6185

Mastra Server

  • Fix server's registerApiRoute function by providing clearer error messages for invalid route configurations, improving developer experience. #6091
  • Support for providing a custom ID generator when creating a Mastra instance, defaulting to UUID if none is supplied. #6074 [TIER3]
  • Fix bug by adding the PATCH method to the default CORS configuration and updates the documentation accordingly. #6335

CI / Tests

  • Add regression test to ensure that runtime context data is preserved and accessible in nested workflows after suspend and resume operations. #6197
  • Move createMockModel utility to the test scope and removes its export from the MCP package, eliminating unnecessary test dependencies from production and introducing a breaking change for users importing it. #6180
  • The peer dependencies of packages to align with recent breaking changes in mastra core, ensuring compatibility for dependent packages like libsql and pg. #6386

CLI / Playground

  • New Text-to-Speech (TTS) feature to the playground. #6258 [TIER2]
  • Fix workflow form overflow issue in the playground and disables the form while a workflow is streaming. #6349
  • speech-to-text functionality using the Voice configuration in Playground. #6304[TIER2]

Client SDK - JS

  • Fix issue by ensuring the Content-Type header is not manually set when the request body is FormData, allowing FormData to handle it automatically and preventing related upload issues. #6188
  • Add an API reference for the mastra-client in the JavaScript client SDK docs. #6308
  • Support for message metadata in both the client-js SDK and agent for UIMessages. #6324
  • Error handling in client-js so that errors from failed tool calls during streaming are properly caught and logged instead of being unhandled. #6170
  • Client-js to support both MastraMessageV1 and V2 formats by extending types, updating the OpenAPI schema, and adding tests for v2 message handling. #6378
  • Fix client-js library to prevent duplicate message updates by ensuring only the final, complete message is stored before a tool call, rather than incremental partial messages. #6374

Deployer

  • Fix issue where source map configuration was not preserved in the removeDeployer Babel plugin, ensuring correct breakpoint mapping during debugging by propagating the sourcemap option through all build pipelines and adding related tests. #6109

Evals

  • Updates all evaluation examples in the /examples/evals directory, improving explanations of scores and info, and raises questions about documentation duplication and metric configuration placement. #6194
  • Improve Scorer functionality by updating input types, introducing a new scoreHookInput type, improving playground score display, and increasing LLM scorer accuracy when output schemas mismatch. #6239
  • Fix client-js types for saveScore to omit id, createdAt, and updatedAt, matching the backend implementation and fixing a type mismatch bug. #6291
  • A horizontal overflow issue in the Scorer prompts by adding text wrapping to the prompt value. #6368

Memory

  • Fix regression in the @mastra/memory package where storage was incorrectly inherited from Mastra when using in-memory storage. #6274
  • Add flexible deleteMessages method to the memory system and client SDK, enabling single and bulk message deletion via various input formats, adds a corresponding server endpoint, implements efficient bulk deletion in all storage adapters, and updates tests and documentation accordingly. #6275 [TIER2]
  • Improve thread creation so that threads are only saved after successful message generation, preventing orphaned threads from being left in memory on failure. #6154

Observability

  • Add warning when telemetry is enabled but not loaded, addressing issue #5705. #6301
  • Fix an issue where infinite trace pagination was breaking trace refinement, ensuring proper trace grouping. #6311
  • Add thread IDs to telemetry spans for agent invocations to improve downstream grouping of spans in multi-turn conversations. #6273

Storage

  • Fix Cloudflare D1 store's executeRestQuery method to correctly handle and flatten nested REST API responses, improving error resilience and maintaining compatibility for both single and multiple result queries. #6236
  • Fix bug by ensuring that a LibSQL transaction is open before attempting a rollback in LibSQLVector.doUpsert, preventing unnecessary errors. #6158
  • Fix bug where creating a MongoDBStore via ConnectorHandler resulted in empty stores due to an early return in the configuration logic. #6264
  • Fix bug in MongoDB vector queries that caused a 500 error when the filter._id.$in array was empty during semanticRecall operations in the playground. #6307
  • Fix the handling of scorers in MongoDB to store them as objects instead of strings, simplifying query creation and includes related bug fixes and test updates. #6305
  • Fix an issue where the jsonb field in MongoDB batchInsert was incorrectly saved as a string, ensuring it is now parsed properly so getTrace queries return correct results. #6262
  • Add Hybrid search support to the Upstash vector store, enabling combined semantic (dense) and keyword-based (sparse) vector search while maintaining backward compatibility with dense-only indexes. #6190
  • Update getThreadsByResourceId and getThreadsByResourceIdPaginated functions to sort results by updatedAt, addressing a bug and introducing a breaking change. #6345

Tools

  • The vector query tool can now be used without a Mastra instance by utilizing the vectorStore property from runtimeContext when a Mastra instance is not provided. #6026
  • Promise-based tools and clarifies how to add tools from an MCP server within the same repository as the MCPServer. #5809

Workflows

  • Fix handling of workflow statuses and improves the detection of changes within workflows. #6160
  • Fix bug so that when resuming suspended nested workflows with conditional branching, only the correct branches that evaluate to true are executed, preventing incorrect steps from running after resume. #6241
  • Fix path filter configuration in the workflows to ensure correct triggering of workflow runs. #6257
  • Fix bug in workflow loops by ensuring resume data is cleared after each iteration, preventing incorrect reuse and crashes in human-in-the-loop patterns. #6323
  • Fix path filter configuration for secret-related workflows. #6375
  • Fix bug to ensure that inputData is correctly restored from the snapshot after a resume, rather than incorrectly using the resume payload. #5098
Jul 23, 2025
2025-07-22

2025-07-22 - Mastra Release

Templates [IMPORTANT]

  • The examples index page on the website to correct the links and their order. #5968
  • Support for using external GitHub repositories as sources for templates. #6024
  • Improve sync process to use the description from package.json when picking a template description. #6037
  • A new browsing-agent template to the /templates folder. #6044
  • All agent and workflow files to ensure they are current and consistent. #6047
  • The docs-chat template to reference Kepler, a realistic SDK for querying planetary information, instead of the generic planets.json file. #6054
  • A pdf-to-question template to the /templates folder. #6063
  • A CSV questions template to the /templates folder. #6071
  • A text-to-SQL template to the /templates folder. #6048
  • All agents and workflow files to ensure they are synchronized with the latest template. #6045

CLI

  • Add 'sourcemap' option to the mastra bundler configuration, enabling source map generation in build outputs, not just in development. #5949
  • Ensure environment variables from .env files are correctly loaded and accessible in the running process when using the CLI dev command by spreading loadedEnv into process.env. #6052
  • A fallback mechanism for extracted mastra options during the bundling process. #6068

Playground UI

  • A light background color to visually distinguish step statuses in the interface. #6035
  • Unifying tab components and styling across the playground and export for cloud, introducing a shared EntityHeader and removing redundant code. #6041
  • Refactored and modularized the AgentMetadata component for shared use with Cloud, replacing the old AgentInformation component and aligning the UI with Cloud and Figma designs. #6064
  • Memory features added to the playground, including semantic recall and configurable options. #6080 [IMPORTANT]
  • Fix bug that was preventing the date picker from working properly. #6100
  • Fix agent chat stop button in the playground so that it properly aborts chat requests when clicked. #6114
  • The code to share the chat thread navigation component between agent, networks, and cloud sections. #6102
  • TraceView to be shareable between workflows and agents, exports it for cloud usage, and adds pagination to address issue #5754. #6031
  • Code to separate data fetching logic from a shared component due to differences in how cloud resolves data. #6034

Server

  • Organize route logic into namespace-specific files and introduces a new bodyLimitOptions type, improving code structure and maintainability. #5941

Evals

  • A minor typo in the relevancy reason prompt. #6099

Agents

  • The 'No Object Generated' error when using agent.generate with experimental_output and clientTool. #6096
  • Error handling in the streamvnext component of the core module. #6157
  • 'streamVNext', a new streaming protocol that enables unified, nested streaming and usage tracking for all Mastra primitives—including agents, tools, and workflows—improving flexibility and transparency over the previous protocol. [#5965] [IMPORTANT]

Memory

  • Fix message-list logic to ensure message parts are merged and saved in the correct order and to the correct message source, particularly when tool call parts are updated with their results. #6062
  • The ability to configure agent memory using the runtime context and adds related tests. #5966
  • A bug by removing an unnecessary reassignment of the private field Mastra.prototype.#vectors. #6023
  • The message-list logic to prevent saving duplicate parts when savePerStep is true by ensuring new parts are only added if they are not already present or are updated. #6025
  • The memory saveMessagesHandler to correctly upsert messages using the incoming ID and ensures errors are returned when resource or thread IDs are missing, instead of failing silently. #6162

Auth [TIER2]

  • The dev playground now bypasses authentication and authorization for local development by detecting specific headers and referers, enabling easier testing when auth is enabled. #6053
  • The authorization middleware to require authentication only for protected routes, allowing public routes to be accessed without authentication. #5970

Client SDK

  • The content-type header is only set for POST/PUT requests when a request body is present #6077. #6078
  • Alias createRun method to createRunAsync in the client-js library to align it with the Mastra Workflow class, addressing issue #5996. #6110
  • New eval scores methods added to the ClientJS library. #6148

Deployer

  • Dependency resolution for directory imports by updating the custom resolver to handle directory paths (e.g., resolving 'pkg/dir' to 'pkg/dir/index.js') and adds date-fns as a test case. #5961
  • Undo disabling of dependency installation for the Cloudflare deployer build, as the solution did not resolve the underlying deployment issues. #6033
  • Fix CloudflareDeployer by removing the scope, auth, and cloudflare client properties, updates the tagWorker method to direct users to the Cloudflare dashboard, and cleans up unused imports. #6095
  • Fix Cloudflare deployment issues by updating the deployer to pass all environment variables during installation and adds a changeset documenting the change. #6094
  • Fix issue with tool importing in the deployer component. #6105
  • Add Eval Scores functionality to the deployer routes. #6137

Evals [IMPORTANT]

  • A scores schema, implements an InMemoryStore, sets up related domains, performs code cleanup, and fixes a build error. #6108
  • Abstract methods for scorers to the codebase. #6111
  • The Scorer API for the PG system. #6117
  • The Cloudflare scorers API. #6125
  • The scorer API for libsql. #6126
  • A Scorer interface, updates naming conventions, and adds base tests. #6130
  • Code and LLM-based scoring functionality. #6132
  • Mastra server API scores. #6135
  • Scorers, introducing new functionality to the project. #6134
  • Scorer hooks that can be triggered for agents and workflows. #6149
  • Fix an issue where scorer input values were hardcoded, ensuring that input values are now displayed correctly for both workflow steps and agents. #6166

Networks

Observability

  • Fix Telemetry from starting when disabled, updates the dev bundler, and refactors arguments to use objects for improved future maintainability. #6076

RAG

  • An issue where 'SET LOCAL' was not correctly setting 'hnsw.ef_search' and 'probes' by wrapping the PgVector query method in a transaction and adding rollback on error. #6118

Storage [TIER2]

  • A new MSSQL memory provider to Mastra, enabling support for Microsoft SQL Server as a backend for memory storage, along with implementation, tests, and updated documentation. #5849
  • Paginated message retrieval for thread messages by implementing a new paginated endpoint on the server and deployer, and updating client-js to support it. #5945
  • A new MongoDBConnector by implementing the ConnectorHandler interface, enhancing database handling and performance. #5059
  • A bug in Upstash storage where getWorkflowRuns did not return all workflows when the namespace parameter was missing. #4456
  • A scorers storage API for LanceDB. #6113
  • A Scorers storage API using MongoDB as the backend. #6119
  • A scorer API for DynamoDB, adding new functionality to support scoring operations with the database. #6120
  • Support for ClickHouse as a new feature. #6122
  • MongoDBVector query performance by pre-filtering on properties before vector search and fixes a bug with multi-property filters. #6107
  • The @mastra/core dependency to version 0.11.0 for all stores and fixes a bug related to initializing the libsql client with an auth token. #6168

Tools

  • Fix code by extracting the tools import from createHonoServer, allowing tools to be passed via the options parameter instead. #5944
  • The #tools import to ensure compatibility after recent codebase rework. #6143

Workflows

  • Support for streaming large data to improve handling of large payloads. #5972
  • Ensure the workflowId is passed through relevant components or functions. #6131
  • New methods to retrieve workflows and agents using their true IDs. #6133
  • Workflow status reporting, unifies change detection logic, standardizes workflow triggers, and enhances linting coverage for secret and E2E test workflows. #6144
  • A bug where consecutive nested workflows that both suspend would incorrectly attempt to resume instead of start, by ensuring resume data is only passed to workflows that were actually suspended. #6127
Jul 16, 2025
2025-07-15

2025-07-15 - Mastra Release

CLI / Playground

  • Add working memory feature to the playground, enabling users to view and edit their working memory while interacting with an agent. #5665 [IMPORTANT]
  • The ability to display reasoning in the playground interface. #5829
  • The agent tables by extracting several icons into reusable components. #5843
  • Add a Link component to enable shared navigation logic between core, cloud (Next.js), and playground (React Router) environments despite their differing Link APIs. #5844
  • CLI templates #5927 [IMPORTANT]
  • Refactored the playground UI to export the network table for use in the cloud environment. #5932
  • Correctly handle navigation to '/new' as a threadId, ensuring 'new' is not incorrectly used as the threadId. #5946
  • Correctly route agent network requests to the vNext AgentNetwork instead of defaulting to the legacy network. #5950

Client SDK - JS

  • Fix usage of crypto.randomUUID in the client SDK to address compatibility or dependency concerns. #5853

RAG

  • Remove cohere-ai dependency in favor of a direct fetch call, deprecates the CohereRelevanceScorer class in @mastra/core, and resolves a peer dependency issue with Cloudflare Workers. #5819
  • Export types to make them available for external use. #5867
  • Fix semantic recall system message formatting in @mastra/core by including dates, times, and thread information, resulting in significantly improved longmemeval scores. #5916

Deployer

  • Support for handling private packages as external dependencies in the mastra build bundle output. #5834
  • Toggle installDependencies step for the Cloudflare deployer build process. #5903

Memory

  • Scripts to prepare and run benchmarks for longmemeval data across various memory configurations, enabling evaluation of memory features but does not include the actual data or results. #5925 [IMPORTANT]

MCP

  • Fix bug in @mastra/schema-compat that caused a 'Cannot read properties of undefined (reading 'typeName')' error. #5942

Memory [IMPORTANT]

  • Assistant message merge logic, ensures merged messages are consistently updated and persisted, and removes unnecessary step-start normalization for new assistant messages. #5866
  • Per-resource memory settings are correctly passed into updateWorkingMemory() in the agent tool, preserving the intended memory scope. #5913
  • Support for passing a JSON schema directly to the working memory configuration in the core and memory modules. #5918
  • An experimental 'vnext' version of working memory with improved update logic and new arguments to reduce accidental memory erasure during long, multi-threaded interactions, resulting in a 20% performance boost but still requiring further testing before full adoption. #5924

Networks

  • Pipes the runtimeContext to vNext network agents, the client SDK, and the playground, ensuring consistent runtime context handling across these components. #5828
  • Fix thread creation if it does not already exist in the agent network stream, generate, and loopStream functions, addressing a bug. #5905

Storage

  • Ensure the resourceId is selected when retrieving messages. #5824

Voice

  • OpenAIRealtimeVoice can now properly handle errors returned from OpenAI. #5653

Workflows

  • The workflow foreach loop emits the full result at once instead of emitting an event for each loop iteration. #5791
  • Workflow status is only set to success after all steps complete successfully, adds related test cases, and tests error handling for resuming non-suspended workflows or steps. #5847
  • Fix resuming a nested workflow within a loop workflow was causing failures. #5808
  • RuntimeContext is saved in snapshots and made available during step executions, allowing workflows to retain and access runtimeContext after resuming from suspension. #5911
  • That removed runtimeContext values are not saved in snapshots and adds corresponding test coverage. #5933
Latest
@mastra/core@1.24.0
Tracking Since
Apr 8, 2025
Last fetched Apr 18, 2026
GitHub Releases — Mastra — releases.sh