Mastra
Mastra is an open-source TypeScript framework for building AI-powered applications and agents, with agents, workflows, memory, workspaces, and observability for moving from prototype to production.
Visit mastra-ai/mastraOverview
Mastra is an open-source TypeScript framework for building AI-powered applications and agents. It provides agents, workflows, memory, workspaces, and observability, and integrates with frontend and backend frameworks such as React, Next.js, and Node, or can run as a standalone server.
Key Features
- Agents use LLMs and tools to solve open-ended tasks, reason about goals, decide which tools to use, and iterate until a final answer or optional stopping condition is met.
- Graph-based workflows orchestrate complex multi-step processes with control flow methods such as .then(), .branch(), and .parallel(), including human-in-the-loop suspend and resume.
- Memory and context management combine conversation history, retrieval from APIs, databases, and files, plus observational memory and semantic recall.
- Built-in observability includes evals, metrics, datasets, traces, and signals for inspecting and improving agent runs.
- Model routing connects to multiple AI providers through one standard interface, including OpenAI, Anthropic, and Gemini.
- Applications can deploy as a standalone Hono-powered server, integrate with React, Next.js, or Node, or use existing Hono, Express, or Fastify server apps.
Use Cases
- Conversational agents for customer support, onboarding, or internal queries.
- Domain-specific copilots for coding, legal, finance, research, or creative work.
- Workflow automations that trigger, route, and complete multi-step processes.
- Decision-support tools that analyze data and provide actionable recommendations.
Getting Started
- Create a project with npm create mastra@latest <project-name> -- --llm <provider>, choosing a supported provider such as openai, anthropic, google, or xai.
- Enter the project directory and start the development server with npm run dev.
- Open Mastra Studio at http://localhost:4111 to build, test, and manage agents, workflows, and tools.
Deployment & Requirements
- Mastra applications can be deployed to any Node.js-compatible environment.
- Optional built-in deployers support Vercel, Netlify, and Cloudflare.
- Deploy as a standalone server powered by Hono, integrate with Next.js, or use an existing Hono, Express, Fastify, or other server app.
Before You Adopt
- License: Other. Review its terms before using, modifying, or distributing the project.
- Human-in-the-loop workflow pause and resume depends on storage to remember execution state.