mastra
Installation
Summary
Reference guide for building agents and workflows with current Mastra APIs.
- Always verify against embedded docs in
node_modules/@mastra/*/dist/docs/(installed version) or remote docs athttps://mastra.ai/llms.txtbefore writing code; training data is outdated - Core building blocks: Agents (autonomous, decision-making), Workflows (structured sequences), Tools (extend capabilities), Memory (maintain context), and RAG (external knowledge)
- Requires ES2022 modules in TypeScript config and model format of
"provider/model-name"(e.g.,"openai/gpt-5.4") - Includes embedded references for setup, common errors, migrations, and API lookup strategies to match your exact installed version
SKILL.md
Mastra Framework Guide
Build AI applications with Mastra. This skill teaches you how to find current documentation and build agents and workflows.
Critical: Do not trust internal knowledge
Everything you know about Mastra is likely outdated or wrong. Never rely on memory. Always verify against current documentation.
Your training data contains obsolete APIs, deprecated patterns, and incorrect usage. Mastra evolves rapidly - APIs change between versions, constructor signatures shift, and patterns get refactored.
Prerequisites
Before writing any Mastra code, check if packages are installed:
ls node_modules/@mastra/