Mastra Agent Framework
Build TypeScript AI agents and workflows with Mastra. Covers agents vs workflows, tools, memory, and RAG, with strategies for looking up current docs and verifying API signatures against the installed version.
This skill develops applications on the Mastra TypeScript framework. It distinguishes agents from durable workflows, wires tools and memory, adds RAG over your data, and enforces a documentation-first approach — checking embedded and remote docs to use current APIs from the installed version rather than outdated signatures.
When to use
Use when building AI agents or typed workflows in TypeScript with Mastra, including tools, memory, and RAG.
Examples
Agent with tools and memory
Build a stateful assistant
Build a Mastra agent with a weather tool and conversation memory, and expose it from a Next.js route
Typed workflow
Chain steps deterministically
Create a Mastra workflow that fetches a URL, summarizes it, and stores the result, with typed inputs and outputs