unstale

npm / mastra

mastra

What changed in mastra 1, from its official release notes, upgrade guides and advisories. Also covers @mastra/agent-builder, @mastra/ai-sdk, @mastra/arize, @mastra/client-js, @mastra/codemod, @mastra/convex, @mastra/core, @mastra/deployer-cloudflare, @mastra/editor, @mastra/elasticsearch, @mastra/evals, @mastra/memory, @mastra/observability, @mastra/playground-ui, @mastra/rag, @mastra/react, @mastra/schema-compat, @mastra/server. Sources checked 2026-11-30.

39 breaking5 security1 deprecations77 new APIs and options1 performance24 behavior and defaults6 tooling30 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

mastra 1183 changes

Breaking changes 39

  • Vector document IDs now come from Elasticsearch _id; stored id fields are no longer written, which affects code relying on source.id.

    1.2.0release notes

  • The Hono adapter returns HTTP 400 with a structured error for invalid POST JSON instead of HTTP 200, preventing workflows from starting with undefined input.

    1.1.0release notes

  • The Hono adapter returns HTTP 400 with a structured error for invalid JSON POST bodies instead of accepting them with HTTP 200.

    1.1.0release notes

  • Memory API endpoints now prioritize this middleware-reserved context key over client-provided values for secure user isolation.

    1.1.0release notes

  • Memory API endpoints now prioritize this middleware-reserved context key over client-provided values for secure user isolation.

    1.1.0release notes

  • A configured route prefix now replaces the default /api prefix instead of being prepended to it.

    1.1.0release notes

  • Adapters and @mastra/server add explicit per-route authentication controls, with routes protected by default.

    1.1.0release notes

  • Built-in API routes now declare whether authentication is required; routes default to protected, and setting requiresAuth: false makes a route public.

    1.1.0release notes

  • Stored agent records now contain metadata only; configuration lives in versioned snapshot rows, and ownerId is renamed to authorId.

    1.1.0release notes

  • Stored agent records now contain metadata while configuration lives in version snapshots; ownerId is renamed to authorId, memory becomes a record, and status is added.

    1.1.0release notes

  • Stored agent records now contain metadata only; configuration lives in version snapshots, and list endpoints return resolved agents. The ownerId field is renamed to authorId.

    1.1.0release notes

  • Stored agent records now hold metadata while configuration lives in version snapshots; resolved agents combine the record with active-version configuration. Inputs are flattened, memory is an object, and ownerId is renamed to authorId.

    1.1.0release notes

  • Stored agent records now hold thin metadata while configuration lives in version snapshots; the change also adds status, renames ownerId to authorId, changes memory to an object, and flattens create/update inputs.

    1.1.0release notes

  • The Google embedding model was removed from the model router; use google/gemini-embedding-001 instead.

    1.1.0release notes

  • A codemod transforms getInitData() calls to getInitData<any>() to restore the previous behavior after its return type changed from any to unknown.

    1.1.0release notes

  • Replaced the deprecated client.getTraces method with client.listTraces.

    1.0.0release notes

  • Tool execution now consistently receives input data as the first argument and context as the second, replacing several context-dependent signatures.

    1.0.0release notes

  • The default is now true for mastra build and cloud-deployer; set externals: false to retain bundling all dependencies.

    1.0.0release notes

  • Use listAgents instead of getAgents.

    1.0.0release notes

  • Use listTools instead of getTools.

    1.0.0release notes

  • Use listWorkflows instead of getWorkflows.

    1.0.0release notes

  • Legacy evals were removed from Mastra.

    1.0.0release notes

  • Replaces getAgents as the agent-listing API method.

    1.0.0release notes

  • Replaces getTools as the tool-listing API method.

    1.0.0release notes

  • Replaces getWorkflows as the workflow-listing API method.

    1.0.0release notes

  • The Studio output folder is now .mastra/output/studio.

    1.0.0release notes

  • Files created in dev mode are now saved in the public directory, where they can be committed or ignored through .gitignore.

    1.0.0release notes

  • The minimum required Node.js version is now 22.13.0.

    1.0.0release notes

  • Configure observability with an explicitly imported Observability instance in the Mastra configuration instead of the initialization side-effect import and plain object.

    1.0.0release notes

  • Observability is now configured with an explicitly imported Observability instance instead of the init side-effect import and plain configuration object; tracing names were also renamed.

    1.0.0release notes

  • Removed observeStreamVNext; call observeStream directly instead.

    1.0.0release notes

  • The old tracing implementation based on OpenTelemetry was removed.

    1.0.0release notes

  • The old tracing code based on OpenTelemetry was removed.

    1.0.0release notes

  • Removed resumeStreamVNext; call resumeStream directly instead.

    1.0.0release notes

  • Scorers moved under the eval domain, prebuilt evals were added, and scorers now require ids.

    1.0.0release notes

  • Removed streamVNext; call stream directly instead.

    1.0.0release notes

  • Tool execution now takes input data as its first argument and execution context as its second, consolidating the previous context-dependent calling forms.

    1.0.0release notes

  • Tracing-related names were renamed to Observability-related names.

    1.0.0release notes

  • workflow.createRun returns a Run instance for run methods; run methods can no longer be called directly on the workflow instance.

    1.0.0release notes

Security 5

  • Sensitive observability credentials in tracingContext are excluded from tool execution error logs.

    1.2.0release notes

  • Custom routes with requiresAuth: true enforce authentication in dev mode, and routes with path parameters correctly respect requiresAuth: false.

    1.1.0release notes

  • Custom routes registered with requiresAuth: true now enforce authentication in development mode.

    1.1.0release notes

  • Built-in API routes expose requiresAuth, defaulting to true; set it to false to make a route public.

    1.1.0release notes

  • A unified API provides filesystem operations, sandboxed execution, search, and SKILL.md discovery with safety controls.

    1.1.0release notes

Deprecations 1

  • The method is deprecated; use client.listTraces instead.

    1.0.0release notes

New APIs and options 77

  • Look up processors by ID on an Agent.

    1.2.0release notes

  • Elasticsearch connections accept authentication configuration, including API key, basic, and bearer authentication.

    1.2.0release notes

  • The project creation wizard can optionally install official Mastra skills and lets users choose an agent.

    1.2.0release notes

  • A utility helps extract tool results from scorer output for use in dynamic scoring context.

    1.2.0release notes

  • The hallucination scorer accepts a getContext hook to resolve scoring context dynamically at runtime.

    1.2.0release notes

  • A utility type for schema input type inference is available.

    1.2.0release notes

  • A utility type for schema output type inference is available.

    1.2.0release notes

  • A new package stores, versions, and resolves agent configurations from a database, including dependencies from the Mastra registry.

    1.2.0release notes

  • The server adds proxy endpoints for searching, browsing, previewing, installing, updating, and removing skills from skills.sh.

    1.2.0release notes

  • Workspace filesystem errors expose a MastraClientError with status and body properties; not-found errors return 404 instead of 500.

    1.2.0release notes

  • Set observationalMemory: true to enable a three-tier memory system that compresses conversation history into observations and reflections.

    1.2.0release notes

  • A manual API for triggering observation outside the normal agent loop is available.

    1.2.0release notes

  • Processor state can be persisted across loop iterations.

    1.2.0release notes

  • Processors can emit custom stream events using ProcessorStreamWriter.

    1.2.0release notes

  • ToolSearchProcessor's search configuration accepts minScore to filter results below a score threshold; the documented default is 0.

    1.2.0release notes

  • ToolSearchProcessor's search configuration accepts topK to set the number of returned results; the documented default is 5.

    1.2.0release notes

  • Workspace accepts a custom search index name; default index names now use underscores to work with SQL-based vector stores.

    1.2.0release notes

  • Non-interactive project creation can install skills by passing comma-separated agent names with --skills.

    1.2.0release notes

  • Studio adds an Add Skill dialog to browse, preview, install, update, and remove skills from the skills.sh registry.

    1.2.0release notes

  • A type is available for schemas implementing both validation and JSON Schema conversion.

    1.2.0release notes

  • Agents can search for and load tools on demand through built-in meta-tools, reducing context usage when working with large tool libraries.

    1.2.0release notes

  • Convert Zod, JSON Schema, or AI SDK schemas to Standard Schema format.

    1.2.0release notes

  • The model loop stream accepts activeTools to control which tools are available during LLM execution.

    1.1.0release notes

  • Network calls can receive an abort signal and an onAbort callback so callers can cancel execution and handle aborts.

    1.1.0release notes

  • Dynamic agent management adds CRUD operations, version history, compare and restore capabilities, and automatic versioning on updates.

    1.1.0release notes

  • MastraClient accepts a custom API route prefix for servers deployed behind non-default paths; the default remains /api.

    1.1.0release notes

  • MastraClientProvider accepts apiPrefix for connecting to servers with custom API route prefixes; it defaults to /api.

    1.1.0release notes

  • Stored agents can be created, edited, and deleted through CRUD APIs, with version history, compare and restore capabilities, and optional automatic versioning.

    1.1.0release notes

  • Trace results include a status of success, error, or running, making trace state easier to filter and display.

    1.1.0release notes

  • The client adds workspace methods for files, skills, references, and search.

    1.1.0release notes

  • Set MASTRA_SKIP_PEERDEP_CHECK=1 to skip the CLI peer dependency check.

    1.1.0release notes

  • The studio command accepts --server-api-prefix to connect to servers with custom API route prefixes.

    1.1.0release notes

  • Workspace client methods support workspace discovery, filesystem operations, skill management, and indexed-content search.

    1.1.0release notes

  • Server adapters accept MCP options, including serverless: true, for stateless MCP HTTP transport in serverless or edge environments.

    1.1.0release notes

  • Providers using non-default AI SDK packages are routed to their correct SDK instead of falling back to openai-compatible; Cerebras, Together AI, and DeepInfra are added as native SDK providers.

    1.1.0release notes

  • When enabled, working memory is provided as context but the updateWorkingMemory tool is unavailable.

    1.1.0release notes

  • When readOnly is true, working memory is provided as context but the updateWorkingMemory tool is unavailable.

    1.1.0release notes

  • Provides access to all request context values, including validated values.

    1.1.0release notes

  • Tools, agents, workflows, and steps can define a Zod schema to validate request context at runtime and provide typed access.

    1.1.0release notes

  • Adds an option to connect Mastra Studio to a server using a custom API prefix.

    1.1.0release notes

  • Stored agents gain CRUD and version-management APIs, client SDK support, and automatic versioning on updates when enabled, allowing dynamic configuration management and audit history.

    1.1.0release notes

  • Stored agents gain CRUD and version-management operations, including creating, listing, activating, restoring, deleting, and comparing versions, with automatic versioning on updates when enabled.

    1.1.0release notes

  • Developers can configure a custom API route prefix in the Studio UI so Studio works with servers using a custom base path instead of /api.

    1.1.0release notes

  • The workflow-run cancellation hook is now exported from @mastra/react for use in custom applications.

    1.1.0release notes

  • A new @mastra/react hook supports streaming, observing, resuming, and time-traveling workflows, with tracingOptions and onError parameters.

    1.1.0release notes

  • The playground UI adds components for browsing and viewing workspace files, listing skills, searching workspace content, and viewing skill reference files.

    1.1.0release notes

  • Workspace API endpoints provide workspace discovery, filesystem operations, skill listing and details, references, and indexed-content search.

    1.1.0release notes

  • Agent networks gain human-in-the-loop support, including an API to approve a network tool call.

    1.0.0release notes

  • Added an API to approve a network tool call as part of human-in-the-loop support for agent networks.

    1.0.0release notes

  • Agent networks gain human-in-the-loop support, including an API to decline a network tool call.

    1.0.0release notes

  • Added an API to decline a network tool call as part of human-in-the-loop support for agent networks.

    1.0.0release notes

  • Agent networks gain suspend and resume capabilities, including an API to resume a network.

    1.0.0release notes

  • When true, suspended tools automatically resume; the flag can be set in defaultAgentOptions or in agent.stream or agent.generate options.

    1.0.0release notes

  • The init function accepts an optional versionTag to keep installed Mastra packages on the same version.

    1.0.0release notes

  • The flag accepts an optional host:port value for Docker debugging while retaining boolean-flag compatibility.

    1.0.0release notes

  • A status filter was added to listWorkflowRuns.

    1.0.0release notes

  • The --studio flag bundles the Studio/playground UI into the build output so it can be served from the deployed server.

    1.0.0release notes

  • Set this environment variable to skip automatic storage initialization when importing Mastra configuration, allowing the migration command to avoid triggering migration checks.

    1.0.0release notes

  • A CLI command manually runs storage migrations against the configured backend, including deduplicating spans and adding unique constraints.

    1.0.0release notes

  • Enables debug logs for the migration command.

    1.0.0release notes

  • Specifies the path to the Mastra folder; the default is src/mastra.

    1.0.0release notes

  • Specifies a custom environment file to include.

    1.0.0release notes

  • Specifies the path to the root folder.

    1.0.0release notes

  • Set this environment variable to skip dotenv and environment-file loading.

    1.0.0release notes

  • The CLI command can serve the built playground as a static server and can run from anywhere in the file system, not only inside a Mastra project.

    1.0.0release notes

  • Studio connection settings can be overridden with command-line arguments, including the server host.

    1.0.0release notes

  • Adds a command-line option to configure the server host used by the Studio frontend to connect to the API server.

    1.0.0release notes

  • Studio connection settings can be overridden with command-line arguments, including the server port.

    1.0.0release notes

  • Adds a command-line option to configure the server port used by the Studio frontend to connect to the API server.

    1.0.0release notes

  • Studio connection settings can be overridden with command-line arguments, including the server protocol.

    1.0.0release notes

  • Adds a command-line option to configure the server protocol used by the Studio frontend to connect to the API server.

    1.0.0release notes

  • Adds a CLI command to serve the built playground as a static server.

    1.0.0release notes

  • Mastra Studio now lists configured processors, shows which agents use them, and lets users test processors directly from the UI.

    1.0.0release notes

  • Workflow runs gained a restart method for restarting an active run; active runs are also automatically restarted when the server starts.

    1.0.0release notes

  • Time travel APIs and a corresponding Studio feature were added.

    1.0.0release notes

  • A workflow run can be restarted while active; active runs are also automatically restarted when the server starts.

    1.0.0release notes

  • A workflow run can be deleted by its id.

    1.0.0release notes

Performance 1

  • The Cloudflare deployer stubs out TypeScript to avoid exceeding the Workers 3MB size limit; agent-builder falls back to basic validation when TypeScript is unavailable.

    1.1.0release notes

Behavior and default changes 24

  • Filesystem providers extending MastraFilesystem now automatically receive the Mastra logger for consistent file-operation logging.

    1.2.0release notes

  • Sandbox providers extending MastraSandbox now automatically receive the Mastra logger for consistent command-execution logging.

    1.2.0release notes

  • Custom input processors replace only configured processors; memory and workspace skill tools remain available in generate() and stream().

    1.2.0release notes

  • recall now returns token usage from the vector-search query embedding.

    1.2.0release notes

  • saveMessages now returns aggregated embedding token usage so applications can track embedding consumption.

    1.2.0release notes

  • AI tracing now defaults to a 128KB maxStringLength and maxDepth 8, reducing truncation of large prompts and responses.

    1.2.0release notes

  • Agent voice configuration now accepts any MastraVoice implementation directly, without requiring a CompositeVoice wrapper.

    1.1.0release notes

  • bail() accepts any value, allowing workflow steps to exit early with a custom result.

    1.1.0release notes

  • AgentBuilder now uses InMemoryStore as a fallback when no storage is provided, allowing Memory operations without explicit storage configuration.

    1.1.0release notes

  • The Agent voice property now accepts MastraVoice implementations directly instead of only CompositeVoice.

    1.1.0release notes

  • The model router now propagates providers' supported URL patterns, allowing supported file URLs to be passed directly instead of downloaded and converted to bytes or base64.

    1.1.0release notes

  • Custom API routes registered with registerApiRoute are included in generated OpenAPI documentation alongside built-in routes.

    1.1.0release notes

  • The playground no longer hardcodes temperature: 0.5 or topP: 1 in agent settings; agent configuration and provider defaults now determine these values.

    1.1.0release notes

  • Tool approval requests now create MODEL_CHUNK spans containing the tool call ID and name, approval arguments, and resume schema, making approval flows visible for debugging.

    1.1.0release notes

  • Spans inherit entity metadata from the closest non-internal parent, processor spans track input and output separately, streaming emits model chunk spans, and internal framework spans are omitted from exported traces.

    1.1.0release notes

  • Spans inherit entity identifiers from the closest non-internal parent, processor spans track input and output separately, streaming chunks emit model chunk spans, and internal framework spans are excluded from exported traces.

    1.1.0release notes

  • Made initialState optional in Studio.

    1.0.0release notes

  • Mastra is marked stable.

    1.0.0release notes

  • The externals setting now defaults to true to reduce bundle issues with native dependencies.

    1.0.0release notes

  • Files created by mastra dev are now saved in the public directory so they can be version-controlled or ignored with .gitignore.

    1.0.0release notes

  • When run in a project that already has git initialized, the CLI skips the prompt to initialize git.

    1.0.0release notes

  • Studio can now be run from anywhere in the file system, not only from inside a Mastra project.

    1.0.0release notes

  • The default create-mastra project no longer defines a LibSQLStore for weather-agent memory and instead uses the root-level storage option, which is memory.

    1.0.0release notes

  • The Studio workflow form accepts initial state input, and initialState is optional.

    1.0.0release notes

Tooling 6

  • create mastra can add an AGENTS.md file during project creation, and can optionally add CLAUDE.md.

    1.2.0release notes

  • The CLI checks whether installed @mastra/* packages satisfy each other's peer dependency requirements and warns with upgrade instructions when they do not.

    1.1.0release notes

  • The project initialization CLI supports selecting Antigravity and automatically configuring the global Mastra MCP server for the IDE.

    1.0.0release notes

  • During development, installed Mastra packages are detected and version information is passed to the playground server through this environment variable.

    1.0.0release notes

  • The CLI start server command was updated.

    1.0.0release notes

  • The create-mastra command now adds a README.md with basic project information and links to Mastra's docs.

    1.0.0release notes

Fixes and other changes 30

  • The moonshotai provider now uses an Anthropic-compatible API endpoint to properly handle reasoning_content for kimi-k2.5.

    1.2.0release notes

  • The China moonshotai provider now uses an Anthropic-compatible API endpoint to properly handle reasoning_content for kimi-k2.5.

    1.2.0release notes

  • An explicit toolChoice of none returned with empty tools is preserved instead of being discarded and defaulting to auto.

    1.2.0release notes

  • Malformed routing-agent JSON is fed back to the routing agent so it can retry instead of crashing the network.

    1.1.0release notes

  • Network workflow runs now receive request context, including user and resource metadata for observability and analytics.

    1.1.0release notes

  • Configured input and output processors are applied to the routing agent, while memory-derived processors are excluded.

    1.1.0release notes

  • Configured output processors are applied to messages before network execution saves them to storage.

    1.1.0release notes

  • Sub-agents no longer receive completion-check feedback from prior network iterations.

    1.1.0release notes

  • Deployer resolves dependency versions accurately in monorepos, including hoisted dependencies, ESM-only packages, transitive workspace dependencies, and deployer-provided packages.

    1.1.0release notes

  • Template merging now converts kebab-case filenames to camelCase correctly and fixes PascalCase and acronym-boundary conversions.

    1.1.0release notes

  • RecursiveCharacterTransformer now supports all languages defined in the Language enum, including languages that previously caused runtime errors during code chunking.

    1.1.0release notes

  • The Convex workflow snapshots table schema now defines the id field required by the by_record_id index, enabling successful Convex deployments.

    1.1.0release notes

  • Swagger UI now uses the correct OpenAPI endpoint URL, /api/openapi.json.

    1.1.0release notes

  • Agent and workflow operations now receive requestContext, preventing tools and nested operations that depend on its values from failing or behaving incorrectly.

    1.1.0release notes

  • Route prefixes are normalized, and a custom prefix replaces the default /api prefix rather than being prepended to it.

    1.1.0release notes

  • Workflow, agent, and tool spans now map to CHAIN, AGENT, and TOOL respectively instead of defaulting to LLM.

    1.1.0release notes

  • PATCH requests now save stored-agent changes correctly instead of failing silently; schema migration and stale-record cleanup restore create and edit flows.

    1.1.0release notes

  • Server handlers now resolve stored and sub-agents as well as registered agents for A2A, memory, scores, tools, and voice endpoints.

    1.1.0release notes

  • suspendedToolRunId is nullable to fix null handling in tool input validation.

    1.1.0release notes

  • The function imports ReadableStream and TransformStream from node:stream/web, fixing TypeScript async-iterator errors with for-await-of loops.

    1.1.0release notes

  • Langfuse and PostHog exporters exclude cached tokens from input counts, report cache read and creation tokens separately, and clamp input counts to prevent negative values.

    1.1.0release notes

  • Validation retries after stripping null values when the initial attempt fails, so optional fields accept null while nullable fields continue to work.

    1.1.0release notes

  • Tags from agent defaultOptions.tracingOptions are now preserved when merging call-site options and passed to observability exporters.

    1.1.0release notes

  • Tags from agent default tracing options are preserved when call-site options are merged and are passed to observability exporters.

    1.1.0release notes

  • Bun runtime detection and cleanup on failure were fixed.

    1.0.0release notes

  • Installation now uses -D instead of --save-dev to avoid errors with Bun and Yarn.

    1.0.0release notes

  • mastra init now installs the mastra CLI package if it is not already installed.

    1.0.0release notes

  • Studio verifies that a Mastra instance is running on server.port or, by default, port 4111.

    1.0.0release notes

  • The CLI detects when it is running from the beta dist-tag and installs the correct versions.

    1.0.0release notes

  • The product formerly called Playground is now named Studio.

    1.0.0release notes