
The TypeScript framework for building AI agents and workflows
Mastra is an open-source TypeScript framework for building AI-powered applications and agents. Built by the team behind Gatsby, it provides AI primitives including agents, workflows, RAG, memory, and evals — everything needed to go from prototype to production.
Build autonomous agents that use LLMs and tools to solve open-ended tasks with built-in memory and context management
Graph-based state machines with branching, parallel execution, resource suspension, and human-in-the-loop interactions
Retrieval-augmented generation for grounding agent responses in external knowledge bases and documents
Access 88+ AI providers and 2,600+ models through a unified interface including OpenAI, Anthropic, and Google
First-class memory system that maintains context across interactions, recalling previous queries, session data, and task states
Built-in evaluation framework and tracing for testing agent quality and monitoring production performance
Interactive sandbox environment for testing and debugging agents, workflows, and tools during development
Build intelligent agents that can reason, use tools, and complete multi-step tasks with persistent memory across conversations
Create document QA systems, knowledge search tools, and transcript analysis applications grounded in your own data
Orchestrate multi-agent systems with branching logic, parallel execution, and human approval steps for enterprise processes
Embed AI capabilities into existing React or Next.js applications with type-safe APIs and streaming support
Integrates with React, Next.js, Node.js, Vercel AI SDK, and CopilotKit for seamless embedding in existing apps
Quickly prototype and iterate on AI features using the local dev playground before deploying to production

The fastest AI code editor — built in Rust for speed and collaboration