Mastra
TypeScript framework for agents, workflows, memory, RAG helpers and evals.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkWhat it is
Mastra is a TypeScript framework with agents, graph-style workflows, memory, RAG helpers, evals and a local playground for testing.
Start a project with npm create mastra@latest. Agents are defined in code with instructions, a model and tools created with createTool(), and models are named as provider/model strings with the API key read from an environment variable, so switching provider is a one-line change. Mastra Studio, an interactive UI, opens on the project straight after setup for chatting with agents and inspecting runs. There are guides for adding it to Next.js, React with Vite, Astro, Express, SvelteKit and Hono apps.
Best for
TypeScript teams who want one framework for agents and workflows.
Skills it helps with
Related tools
LangChain
Components and integrations for building LLM applications.
LlamaIndex
Framework for document agents and retrieval over your data.
Haystack
deepset's Python framework for RAG pipelines and agents built from components.
Letta
Platform for stateful agents that keep long-term memory across sessions.
Mem0
Memory layer that extracts facts from conversations and retrieves them later.
Temporal
Durable execution platform that lets long-running workflows survive crashes and restarts.