https://github.com/mastra-ai/mastra
Mastra is the modern TypeScript framework for AI-powered applications and agents.
https://github.com/mastra-ai/mastra
agents ai chatbots evals javascript llm mcp nextjs nodejs reactjs tts typescript workflows
Last synced: about 23 hours ago
JSON representation
Mastra is the modern TypeScript framework for AI-powered applications and agents.
- Host: GitHub
- URL: https://github.com/mastra-ai/mastra
- Owner: mastra-ai
- License: other
- Created: 2024-08-06T20:44:31.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-10-23T12:11:35.000Z (2 days ago)
- Last Synced: 2026-10-23T12:14:18.894Z (2 days ago)
- Topics: agents, ai, chatbots, evals, javascript, llm, mcp, nextjs, nodejs, reactjs, tts, typescript, workflows
- Language: TypeScript
- Homepage: https://mastra.ai
- Size: 2 GB
- Stars: 29,032
- Watchers: 107
- Forks: 3,038
- Open Issues: 596
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Agents: AGENTS.md
- Claude: CLAUDE.md
Awesome Lists containing this project
- awesome-production-agentic-systems - Mastra - ai/mastra.svg?cacheSeconds=86400) - Mastra is a TypeScript framework for building and shipping AI agents with workflows, memory, and observability. (Agentic Frameworks)
- awesome-mcp - mastra-ai/mastra
- awesome-ai-agents-2026 - Mastra - ๐ TypeScript ๅชๅ ใฎใจใผใธใงใณใใใฌใผใ ใฏใผใฏใใฏใผใฏใใญใผ้งๅ + ใชใใถใผใใใชใใฃๅ ่ตใ (๐๏ธ ใจใผใธใงใณใใใฌใผใ ใฏใผใฏ / ใใฎไปใฎๆจๆบ)
- awesome-mcp-devtools - Mastra AI - Mastra is a Typescript-based AI agent framework that can be used to author MCP servers. (SDKs / JavaScript/TypeScript)
- awesome-agent-frameworks - Mastra - ai/mastra?style=social) - TypeScript-first AI application framework from the team behind Gatsby. (Agent SDK / framework)
- awesome-rainmana - mastra-ai/mastra - Mastra is the modern TypeScript framework for AI-powered applications and agents. (TypeScript)
- best-of-Agent-Harnesses - **mastra** - ai/mastra/stargazers) | TypeScript-first; agents, tools, and workflows with a single runtime and minimal boilerplate. <sup>`typed` ยท `typescript`</sup> | โ ๏ธ Elastic-2.0 | slightly complex (TS-first, minimal boilerplate) | [Durable research agent](https://github.com/mastra-ai/mastra/tree/main/examples/durable-agents) | (Frameworks / Or hire a skeleton)
- awesome-ai - ๐
- awesome-ai-coding - mastra
- awesome-agents - Mastra - ai/mastra?style=social) (Frameworks)
- awesome-harness-engineering - Mastra - native agent framework (from the Gatsby team) with 22K+ stars and 300K+ weekly npm downloads. Connects to 40+ providers through one standard interface, with built-in workflows, RAG pipelines, and agent orchestration. The `@mastra/deployer` handles serverless deployment, and the eval system supports LLM-as-judge out of the box. The strongest alternative to Vercel AI SDK for teams that need more opinionated agent primitives.  (Design Primitives / Task Runners & Orchestration)
- awesome-ai-agents - Mastra
- awesome-ChatGPT-repositories - mastra - The TypeScript AI agent framework. โก Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. (Chatbots)
- awesome-ai-agents - Mastra - first AI agent framework with workflows, RAG, and integrations. (Frameworks & Libraries / Multi-Agent Orchestration)
- Awesome-RAG - Mastra
- metorial-index - Mastra MCP Client - Integrate with MCP-compatible AI models and tools for enhanced functionality, allowing the management of multiple server connections and tool execution. It simplifies resource discovery, automatic error handling, and logging. (APIs and HTTP Requests)
- awesome-agents - Mastra - TypeScript framework for building AI applications with agents, workflows, and RAG. (Frameworks)
- AiTreasureBox - mastra-ai/mastra - 11-03_17961_2](https://img.shields.io/github/stars/mastra-ai/mastra.svg)|the TypeScript AI agent framework| (Repos)
- Awesome-AI-Agents - Mastra - Mastra is an opinionated TypeScript framework that helps you build AI applications and features quickly.  (Frameworks / Advanced Components)
- awesome-ai-agents-2026 - Mastra - first. Observational Memory. Apache 2.0. | (๐งฑ Agent Frameworks / General Purpose)
- awesome-agentic - Mastra
- awesome-typescript - mastra-ai/mastra - Mastra is the modern TypeScript framework for AI-powered applications and agents. (Machine Learning and AI / LLM and Inference)
- awesome-langchain - Mastra AI - powered applications and agents with a modern TypeScript stack. (Other LLM Frameworks / Videos Playlists)
- awesome-llm-agents - Mastra - 10 | TypeScript agents with RAG and observability | (Core Frameworks)
- awesome-ai-agents - mastra-ai/mastra - Mastra is a TypeScript AI agent framework that enables rapid development of AI applications with support for multiple LLMs, advanced agents, workflows, RAG, integrations, and automated evaluations. (Agent Integration & Deployment Tools / AI Agent Gateway)
- awesome-llm - mastra-ai/mastra - Mastra is the modern TypeScript framework for AI-powered applications and agents. (AI Agents / Agent Frameworks and Runtimes)
- awesome-ai-tools - Mastra - native AI agent framework for web developers. Workflow automation with typed tools and integrations. MIT. (Other AI Agents / Multi-Agent / Orchestration Frameworks)
- awesome-prompts - **Mastra** - first AI agent framework โ Agent/Workflow/RAG/Evals primitives, 40+ model providers, native MCP server support (YC W25, 2026)  | (Agent Ecosystem / Frameworks)
- awesome-agentic-ai-js - GitHub
- awesome-cli-agentic-tools - Mastra - first agent framework with built-in tools. | `npm i mastra` | TypeScript | (Agent Frameworks / Community)
- awesome-mcp-servers - Mastra AI - TypeScript AI agent framework with native MCP server support for orchestration and tool integration. Enables building composable agents that expose MCP endpoints. Compared to LangGraph or CrewAI, emphasizes MCP interoperability. Use cases: multi-agent systems, workflow automation via MCP-compatible tools. ([Read more](/details/mastra-ai.md)) `Ai Agent` `Framework` `Mcp` `Typescript` (MCP DevTools)
- awesome_ai_agents - Mastra - Mastra is an opinionated TypeScript framework that helps you build AI applications and features quickly. [github](https://github.com/mastra-ai/mastra) (Building / Frameworks)
- awesome-evals - Mastra scorers - ai/mastra> (`mastra.ai/docs/evals/overview`) โ ๐ model-graded/rule/statistical scorers, live evals, CI, in the Mastra agent framework. (5 ยท Evaluation infrastructure (the eval stack: datasets, scorers, online/offline, tracing, CI) / 5b ยท TypeScript/JS-native eval runners)
- awesome-data-analysis - Mastra - Open-source AI agent platform for building and scaling production-grade autonomous agents. (๐ง AI Applications & Platforms / Tools)
- awesome-claude-multi-agent - Mastra - TypeScript framework for agent workflows with multi-agent networks, durable execution, and first-class Claude support. (Orchestration Frameworks)
- awesome-ai-agents - Mastra - ai/mastra) | TypeScript AI framework for agents, workflows, MCP servers, and evals | (๐ Core Frameworks)
- my-awesome-list - mastra - powered applications and agents. | mastra-ai | 28841 | (TypeScript)
- awesome-llm-tools - Mastra
- awesome-x-ops - Mastra - powered applications and multi-agent systems with built-in observability. (Agentic Workflow)
- best_ai_repo_collection - mastra-ai/mastra - powered applications and agents. | (๐งโ๐ป AI Coding & Developer Tools (13))
- awesome-mcp-devtools - Mastra AI - Mastra is a Typescript-based AI agent framework that can be used to author MCP servers. (SDKs / JavaScript/TypeScript)
- Awesome-Prompt-Engineering - GitHub
- awesome-hacking-lists - mastra-ai/mastra - The TypeScript AI agent framework. โก Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. (TypeScript)
- awesome-agent-cortex - Mastra - TypeScript framework for building AI applications and agents. (Agent Frameworks)
- awesome-agent-collaborate-tools - Mastra - TypeScript-first agent framework with memory, tool-calling, workflows, and RAG. Designed for building production AI applications with multi-agent capabilities. (Multi-Agent Orchestration)
- awesome-openclaw-skills - Mastra/mcp - compatible AI models and t... | - | (MCP Servers & Protocol)
- awesome-opensource-ai - Mastra - TypeScript-first agent framework with built-in RAG, workflows, tool integrations, observability and observational memory.  (4. Agentic AI & Multi-Agent Systems)
- awesome-rag - Mastra - 4, Claude, Gemini, Llama (Open Source Tools)
- awesome-vibe-coding - Mastra - source AI agent framework. Workflows, RAG, integrations, and evals in TypeScript. | (AI Frameworks & SDKs / Agent Frameworks)
- awesome-ai-coding-agent-tools - Mastra - TypeScript-first agent framework with workflows, memory, and evals. (Agent SDKs & Frameworks / Orchestration Frameworks)
- awesome-ai-agents-2026 - Mastra - Opinionated TypeScript framework with RAG, observability, and MCP support built in. (Orchestration Frameworks / Submit an Agent)
- awesome-github-projects - mastra - Mastra is the modern TypeScript framework for AI-powered applications and agents. โญ28,726 `TypeScript` ๐ฅ (๐ค AI & Machine Learning)
- awesome-ag-ui - mastra - ai](https://github.com/mastra-ai). Thirteen capabilities including suspend and resume, and the observational-memory cell. TypeScript, with a local-agent variant. 27,507โ . (The catalog / Connect your agent framework to a front end)
- awesome-mac-mini-homeserver - Mastra - TypeScript agent framework with workflows, RAG, and evals for shipping production agents.    (Agentic AI  / Agentic frameworks)
- Awesome-Graph-Engineering - Mastra
- Awesome-Agentic-Engineering - Mastra - first framework with observability, workflows, and memory. | `[official]` | (โ๏ธ Orchestration Frameworks / Frameworks Landscape)
- awesome-side-quests - mastra-ai/mastra - structured, production-minded, modern DX (AI & LLM / Agents & Orchestration)
- awesome-ai-pulse-georgia - Mastra - แแก AI แคแ แแแแแแ แแ Gatsby-แแก แแฃแแแแกแแแ (YC W25, $13M แแแคแแแแแกแแแ), แ แแแแแแช agents, workflows, RAG, evaluations แแ integrations แแ แ toolkit-แจแ แแแ แแแแแแแก. แกแฎแแ JS/TS แคแ แแแแแแ แแแแแกแแแ แแแก แฉแแจแแแแแฃแแ evaluation suite (แแแแแขแแแแก แฎแแ แแกแฎแแก แแแแแแแ) แแ workflow engine แแแแแแ แฉแแแก. Node.js/TypeScript แกแขแแแแ แแแแฃแจแแแ แแฃแแแแแแกแแแแก, แ แแแแแแกแแช AI production-แจแ แแแแฅแแ, แซแแแแ แ แแแขแแ แแแขแแแแ. | (๐งฌ AI แแแแแขแแแแก แคแ แแแแแแ แแแแ)
- awesome-ai-200 - mastra-ai/mastra
- awesome-rust-ai-libraries - Mastra - TypeScript AI agent framework with assistants, RAG, and observability, featuring type-safe development, multi-model routing, MCP generation, and tool integration. ([Read more](/details/mastra.md)) `Typescript` `Observability` `Mcp` (Agentic Systems)
- awesome-agent-swarm - **Mastra** - TypeScript framework for building AI-powered multi-agent applications. From the team behind Gatsby. by [@mastra-ai](https://github.com/mastra-ai) (25,406 stars) (Swarm Frameworks)
- awesome-typesafe - Mastra - Mastra is an opinionated TypeScript framework that helps you build AI applications and features quickly. (**1. Libraries** / AI)
- awesome-ai-agents-2026 - Mastra
- awesome-agent-evolution - **mastra** - TypeScript framework for building AI-powered applications with agent workflows and RAG. by [@mastra-ai](https://github.com/mastra-ai) (28,803 stars) (Agent Development Platforms)
README
# Mastra
[](https://www.npmjs.com/package/@mastra/core)

[](https://discord.gg/BTYqqHKUrf)
[](https://x.com/mastra_ai)
[](https://www.npmjs.com/package/@mastra/core)

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 and evals. You can run Mastra on your local machine, or deploy to a serverless cloud.
The main Mastra features are:
| Features | Description |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| LLM Models | Mastra uses the [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction) for model routing, providing a unified interface to interact with any LLM provider including OpenAI, Anthropic, and Google Gemini. You can choose the specific model and provider, and decide whether to stream the response. |
| [Agents](https://mastra.ai/docs/agents/overview) | Agents are systems where the language model chooses a sequence of actions. In Mastra, agents provide LLM models with tools, workflows, and synced data. Agents can call your own functions or APIs of third-party integrations and access knowledge bases you build. |
| [Tools](https://mastra.ai/docs/agents/adding-tools) | Tools are typed functions that can be executed by agents or workflows, with built-in integration access and parameter validation. Each tool has a schema that defines its inputs, an executor function that implements its logic, and access to configured integrations. |
| [Workflows](https://mastra.ai/docs/workflows/overview) | Workflows are durable graph-based state machines. They have loops, branching, wait for human input, embed other workflows, do error handling, retries, parsing and so on. They can be built in code or with a visual editor. Each step in a workflow has built-in OpenTelemetry tracing. |
| [RAG](https://mastra.ai/docs/rag/overview) | Retrieval-augemented generation (RAG) lets you construct a knowledge base for agents. RAG is an ETL pipeline with specific querying techniques, including chunking, embedding, and vector search. |
| [Integrations](https://mastra.ai/docs/integrations) | In Mastra, integrations are auto-generated, type-safe API clients for third-party services that can be used as tools for agents or steps in workflows. |
| [Evals](https://mastra.ai/docs/08-running-evals) | Evals are automated tests that evaluate LLM outputs using model-graded, rule-based, and statistical methods. Each eval returns a normalized score between 0-1 that can be logged and compared. Evals can be customized with your own prompts and scoring functions. |
## Quick Start
### Prerequisites
- Node.js (v20.0+)
## Get an LLM provider API key
If you don't have an API key for an LLM provider, you can get one from the following services:
- [OpenAI](https://platform.openai.com/)
- [Anthropic](https://console.anthropic.com/settings/keys)
- [Google Gemini](https://ai.google.dev/gemini-api/docs)
- [Groq](https://console.groq.com/docs/overview)
- [Cerebras](https://inference-docs.cerebras.ai/introduction)
If you don't have an account with these providers, you can sign up and get an API key. Anthropic require a credit card to get an API key. Some OpenAI models and Gemini do not and have a generous free tier for its API.
## Create a new project
The easiest way to get started with Mastra is by using `create-mastra`. This CLI tool enables you to quickly start building a new Mastra application, with everything set up for you.
```bash
npx create-mastra@latest
```
### Run the script
Finally, run `mastra dev` to open the Mastra playground.
```bash copy
npm run dev
```
If you're using Anthropic, set the `ANTHROPIC_API_KEY`. If you're using Gemini, set the `GOOGLE_GENERATIVE_AI_API_KEY`.
## Contributing
Looking to contribute? All types of help are appreciated, from coding to testing and feature specification.
If you are a developer and would like to contribute with code, please open an issue to discuss before opening a Pull Request.
Information about the project setup can be found in the [development documentation](./DEVELOPMENT.md)
## Support
We have an [open community Discord](https://discord.gg/BTYqqHKUrf). Come and say hello and let us know if you have any questions or need any help getting things running.
It's also super helpful if you leave the project a star here at the [top of the page](https://github.com/mastra-ai/mastra)