Navigate to the example directory you want to run. For example:
cd examples/ai-sdk-v5Install the packages:
npm installThe examples have a separate
package.jsonfile and are not part of the Mastra workspace. Most examples can usenpm install. If an example links local workspace packages, usepnpm install --ignore-workspacefrom that example directory instead.
Run the appropriate CLI command in your terminal (may vary by example). For example for the ai-sdk-v5 example:
npm run dev