mastra README

The project's README from github.com/mastra-ai/mastra. As one markdown file: README.md.

Mastra

npm version CodeQl GitHub Repo stars Discord Twitter Follow NPM Downloads Static Badge

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

It includes everything you need to go from early prototypes to production-ready applications. Mastra integrates with frontend and backend frameworks like React, Next.js, and Node, or you can deploy it anywhere as a standalone server. It's the easiest way to build, tune, and scale reliable AI products.

Why Mastra?

Purpose-built for TypeScript and designed around established AI patterns, Mastra gives you everything you need to build great AI applications out-of-the-box.

Some highlights include:

Get started

The recommended way to get started with Mastra is by running the command below:

npm create mastra@latest

Follow the Installation guide for step-by-step setup with the CLI or a manual install.

If you're new to AI agents, check out our templates, course, and YouTube videos to start building with Mastra today.

Alternative: Use this pre-built prompt to get started
Create a new Mastra project. Mastra is a framework for AI applications and agents on a modern TypeScript stack. Before running the command, ask these questions one at a time and wait for each answer unless it was already provided:

1. Project name? (default: "my-mastra-app")
2. Provider? (required; options: "openai", "anthropic", "google", "xai")

If the provider isn't supported, ask again and list the supported values.

Run: `npm create mastra@latest <project-name> -- --llm <provider>`

The command creates a default Mastra project, installs Mastra skills for detected coding assistants, and initializes Git when appropriate.

After creation, enter the project directory and start the dev server: `npx bgproc start -n <project-name> -w -- npm run dev`

Open Mastra Studio at `http://localhost:4111`. Studio is the interface for building, testing, and managing agents, workflows, and tools.

Also mention that the Mastra model router provides access to thousands of models: https://mastra.ai/models

Documentation

Visit our official documentation.

Build with AI

Learn how to make your agent a Mastra expert by following the Build with AI guide.

Contributing

Looking to contribute? All types of help are appreciated, from coding to testing and feature specification. Read CONTRIBUTING.md for more details on how to get involved.

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

Support

We have an open community Discord. 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

Licensing

This repository uses a dual-license model:

See LICENSE.md for the full license mapping and ee/LICENSE for the enterprise license terms.

Security

We are committed to maintaining the security of this repo and of Mastra as a whole. If you discover a security finding we ask you to please responsibly disclose this to us at [email protected] and we will get back to you.

mastra (mastra-ai/mastra)

observability
Searching Database…

28.9K ·GitHub
What is this?Mastra is a TypeScript framework for building AI-powered applications and agents, designed to take you from early prototypes to production-ready products.
Is this a finished app I install, or something I build my own product with?It's a framework, not a ready product: you bundle its agents and workflows into your React, Next.js or Node.js code, or deploy them as a standalone server.
How do I get started, and what do I need to have first?You work in a modern TypeScript stack on Node.js. The recommended path is running the Mastra CLI command from the Get started section, and a manual install is covered in the Installation guide.
Is the whole thing open source, or is there a catch?Mostly: the core framework is Apache-2.0, but code in any ee/ directory is under the Mastra Enterprise License — free for development and testing, while production use requires a valid enterprise license.
Why pick Mastra over calling model APIs directly?It packages the established AI patterns — model routing, agents, workflow orchestration, memory and evals — out-of-the-box in one TypeScript stack, so you don't have to assemble all those pieces yourself on the way from prototype to production.
I'm new to AI agents — is there material to learn from?Yes: the project points beginners to ready-made templates, a course and YouTube videos, and there's an open community Discord for questions and help getting things running.
What does the workflow syntax look like?Workflows are graph-based and use an intuitive control-flow syntax: .then(), .branch() and .parallel() for sequencing, branching and running steps in parallel.
Creator
mastra-ai
Size
2 GB
Stars
28.9K
Age
2y
Commits · 90 Days