Mastra is a TypeScript framework for rapidly building AI applications, offering primitives like workflows, agents, RAG, integrations, and evals, supporting local or serverless cloud deployment with unified LLM provider interaction.
Mastra is a TypeScript framework designed to accelerate the development of AI applications. It provides essential primitives like workflows, agents, RAG, integrations, and evals, deployable locally or on serverless clouds.
Key features include LLM model integration via the Vercel AI SDK, supporting providers like OpenAI and Google Gemini. Agents enable LLMs to execute actions using tools, workflows, and synced data, accessing functions, APIs, and knowledge bases. Tools are typed functions with schema definitions and integration access. Workflows are durable state machines with branching, loops, and error handling, visually editable and OpenTelemetry-traced. RAG constructs knowledge bases with chunking, embedding, and vector search. Integrations are type-safe API clients for third-party services. Evals automate LLM output testing with model-graded, rule-based, and statistical methods.
To start, Node.js v20+ is required. Use create-mastra
to initiate a new project and npm run dev
to launch the Mastra playground. Contributing and support information are available in the development documentation and community Discord.
mastra-ai/mastra
August 6, 2024
March 28, 2025
TypeScript