DocsIntroduction

Introduction

Mastra is an opinionated Typescript framework that helps you build AI applications and features quickly. It gives you the set of primitives you need: workflows, agents, RAG, integrations, syncs and evals. You can run Mastra on your local machine, or deploy to a serverless cloud.

The main Mastra features are:

FeaturesDescription
LLM ModelsMastra supports a variety of LLM providers, including OpenAI, Anthropic, Google Gemini.
AgentsAgents are systems where the language model chooses a sequence of actions.
ToolsTools are typed functions that can be executed by agents or workflows, with built-in integration access and parameter validation.
WorkflowsWorkflows are durable graph-based state machines with built-in tracing. They can execute complex sequences of LLM operations.
RAGRetrieval-augemented generation (RAG) lets you construct a knowledge base for your agents.
Integrations & SyncsIn Mastra, syncs are async functions that can be deployed as background tasks. Integrations are auto-generated, type-safe API clients for third-party services.
EvalsEvals are automated tests that evaluate LLM outputs using model-graded, rule-based, and statistical methods.

MIT 2025 © Nextra.