docs/src/content/en/guides/migrations/upgrade-to-v1/overview.mdx
:::info[Update to latest 0.x version] Before upgrading to v1, make sure you've updated to the latest 0.x version of Mastra. Follow the upgrade to latest 0.x guide first, then return here to complete the v1 migration. :::
Mastra v1 was released in January 2026. We recommend starting any new projects with Mastra v1, or upgrading your existing project to continue receiving updates and support.
This guide provides a comprehensive overview of breaking changes when upgrading from Mastra 0.x to v1.0. The migration is organized by package and feature area to help you systematically update your codebase.
:::tip[Need help?] Need help with the migration? Join our Discord community to ask questions. :::
latest tagUse your package manager to update your project's versions. Be sure to update all Mastra packages at the same time to ensure compatibility (all @mastra/* packages and mastra).
Here's how you update the most commonly used packages:
npm install @mastra/core@latest @mastra/loggers@latest @mastra/memory@latest mastra@latest
Install any other Mastra package with the @latest tag and you'll get the latest v1 version available. Be sure to update all Mastra packages (especially if you're in a monorepo) to avoid version mismatches.
Mastra v1 requires Node.js 22.13.0 or higher. Update your development and production environments accordingly.
Work through the migration checklist below to update your codebase. Each item links to a detailed guide for that specific change.
:::info[Codemods]
We prepared automated codemods for you. If you want, you can run all v1 codemods at once:
npx @mastra/codemod@latest v1
:::
:::note[Database Migration Required]
If you're using PostgreSQL or LibSQL storage, you'll need to run a database migration. See the Storage migration guide for details.
:::
Work through this checklist in order, starting with high-impact changes that affect most applications.
:::info[Codemods]
We prepared automated codemods for you. Throughout the migration guide you'll find instructions on how to use them for specific changes.
If you want, you can run all v1 codemods at once:
npx @mastra/codemod@latest v1
:::
createTool tool signatures to (inputData, context) format - Tools@mastra/core imports to use subpath imports - Mastra Classoffset/limit to page/perPage - Storage@mastra/observability and wrap configuration with new Observability() - Tracingtelemetry: to observability: configuration (if upgrading from 0.x OTEL) - TracingRuntimeContext to RequestContext throughout codebase - Agent Class, Tools, Workflowsget* to list* pattern - Storagethread scope - Memoryformat parameter from agent methods - Agent Classagent.voice namespace - Agent Classprocessors to spanOutputProcessors (if using custom processors) - TracingkeepSeparator to separatorPosition in chunk options - RAGcreateRunAsync to createRun - Workflows@mastra/speech-* to @mastra/voice-* - Voice PackagesrunExperiment → runEvals, getScorerByName → getScorerById - Evals & ScorersGet* to List* - Client SDKsrunCount with retryCount - WorkflowsexportEvent to exportTracingEvent (if using custom exporters) - Tracing