0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/templates
History 2026-11-12 07:20:12 -08:00
..
template-accounts-payable-invoice-processing feat(templates): add accounts payable invoice processing (#28532) 2026-10-27 22:49:27 +00:00
template-agent-builder docs: declare node types in tsconfig examples (#27974) 2026-10-21 11:51:24 +02:00
template-agent-harness chore(templates): make template-agent-harness AGENTS.md concise and warn about outdated training data (#29834) 2026-11-09 16:29:40 -07:00
template-browser-agent feat(templates): read the model from AGENT_MODEL in Browser Agent (#29748) 2026-11-09 18:02:27 +00:00
template-browsing-agent docs(templates): surface browsing-agent demo video and remove stray README header images (#23983) 2026-09-15 13:20:37 +02:00
template-chat-with-pdf docs(templates): surface browsing-agent demo video and remove stray README header images (#23983) 2026-09-15 13:20:37 +02:00
template-chat-with-youtube chore: migrate workspace to pnpm v11 (#17038) 2026-05-28 09:45:07 -07:00
template-claw-assistant feat(templates): read the model from AGENT_MODEL in Claw Assistant (#29747) 2026-11-09 18:02:00 +00:00
template-company-knowledge feat(templates): use Mastra Connect in the company knowledge template (#29745) 2026-11-09 18:02:19 +00:00
template-competitor-monitor-jev security: Vanta remediation pass 2026-10-14/15/19 (zod 4.6.7, @ai-sdk/provider-utils, @copilotkit template) (#27023) 2026-10-19 11:32:32 -07:00
template-connect-agent feat(templates): read the model from AGENT_MODEL in Personal Agent (#29749) 2026-11-09 18:02:10 +00:00
template-csv-to-questions draft: Add MastraPlatformExporter and MastraStorageExporter, deprecate CloudExporter and DefaultExporter (#16223) 2026-05-11 15:51:43 +02:00
template-customer-feedback-summarization chore: migrate workspace to pnpm v11 (#17038) 2026-05-28 09:45:07 -07:00
template-customer-refund-agent chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) 2026-11-12 07:20:12 -08:00
template-deep-search docs(templates): surface browsing-agent demo video and remove stray README header images (#23983) 2026-09-15 13:20:37 +02:00
template-docs-chatbot docs(templates): update template READMEs (#25469) 2026-09-29 23:14:55 -07:00
template-docs-expert feat(templates): read the model from AGENT_MODEL in Docs Expert (#29746) 2026-11-09 18:01:54 +00:00
template-factory chore(templates): tighten Factory template .env.example comments (#28749) 2026-11-10 21:24:55 -08:00
template-factory-self-hosted chore(templates): tighten Factory template .env.example comments (#28749) 2026-11-10 21:24:55 -08:00
template-flash-cards-from-pdf draft: Add MastraPlatformExporter and MastraStorageExporter, deprecate CloudExporter and DefaultExporter (#16223) 2026-05-11 15:51:43 +02:00
template-genui-data-explorer chore(deps): Vanta 2026-11-11 fixes (effect, fast-xml-parser, react-router-dom, @whatwg-node/fetch) (#30061) 2026-11-11 08:19:18 -08:00
template-github-review-agent docs(templates): update template READMEs (#25469) 2026-09-29 23:14:55 -07:00
template-google-sheets fix: bump vulnerable dependencies to patched releases (#24027) 2026-09-15 13:58:48 -07:00
template-insurance-policy-checking chore(deps): update build tools (major) (#29026) 2026-11-03 20:18:21 +01:00
template-kyc-customer-onboarding chore(security): Vanta 2026-10-30 - zod ^4.6.7, @hono/node-server 2.1.5 (direct bumps) (#28983) 2026-10-30 15:30:35 -04:00
template-lead-qualification feat(templates): add lead qualification template (#27839) 2026-10-21 09:44:58 +01:00
template-meeting-notes chore: unify built-in Gateway naming (#18691) 2026-07-13 17:26:20 +02:00
template-mongodb-bedrock-agent chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) 2026-11-12 07:20:12 -08:00
template-organization-intelligence chore(deps): Vanta 2026-11-11 fixes (effect, fast-xml-parser, react-router-dom, @whatwg-node/fetch) (#30061) 2026-11-11 08:19:18 -08:00
template-personal-assistant feat(templates): Add personal assistant template (#29886) 2026-11-11 08:23:18 -08:00
template-security-incident-triage chore(security): Vanta 2026-10-30 - zod ^4.6.7, @hono/node-server 2.1.5 (direct bumps) (#28983) 2026-10-30 15:30:35 -04:00
template-starter-agent feat(templates): read AGENT_INSTRUCTIONS and AGENT_MODEL in starter agent (#27282) 2026-10-16 10:48:12 -04:00
template-text-to-sql chore(repo): Use tsx catalog dep (#17605) 2026-06-05 13:44:28 +02:00
template-vendor-risk-questionnaire chore(deps): Vanta 2026-11-11 fixes (effect, fast-xml-parser, react-router-dom, @whatwg-node/fetch) (#30061) 2026-11-11 08:19:18 -08:00
weather-agent docs: fix onboarding quickstart, pnpm version, and template metadata (#23754) 2026-09-15 09:40:58 +02:00
.gitignore update pdf-to-audio-template (#7512) 2025-09-10 11:34:50 +01:00
README.md feat(templates): add template-starter-agent (#25451) 2026-09-30 10:01:12 -07:00

Mastra templates

This directory contains standalone Mastra project templates.

New Gateway-first templates

  • template-docs-expert: Answers documentation questions with Gateway web search, citations, memory, and structured responses.
  • template-browser-agent: Uses AgentBrowser to browse, inspect, and interact with web pages.
  • template-meeting-notes: Turns Zoom transcripts or uploaded transcripts into structured notes with decisions and action items.
  • template-company-knowledge: Indexes Linear and Notion content into pgvector and answers internal knowledge questions.
  • template-claw-assistant: Operates a workspace with filesystem, sandbox, browser, and web-search tools.
  • template-connect-agent: Turns Mastra platform integration connections into live agent tools with @mastra/connect, plus a cross-integration activity-digest workflow.
  • template-starter-agent: Starter Agent — durable agent harness with @mastra/connect tools and channels, a platform-backed workspace, Studio agent/workflow editing via @mastra/editor, Postgres storage, and Redis-backed resumable streams.

How to add a new template

To add a new template to the templates/ directory, follow these steps:

1. Create a new template folder

  • Inside the templates/ directory, create a new folder named after your template (e.g., my-new-template/).

2. Required files

Your template folder must include the following files:

a. package.json

  • Use OpenAI as the LLM provider in your code/config.
  • All @mastra/* dependencies should be set to "latest" in the dependencies section.
  • mastra devDependency should be set to "latest" in the devDependencies section.
  • The description field should clearly describe what the template does.

b. .env.example

  • List all required environment variables, such as API keys and configuration values.

c. README.md

Follow this template for your README.md:

# Title

Introductory paragraph describing what this template does.

## Why we built this

Explain the motivation behind creating this template and the problem it solves. And which features of Mastra it demonstrates.

## Demo

This demo runs in Mastra Studio, but you can connect this workflow to your React, Next.js, or Vue app using the [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) or agentic UI libraries like [AI SDK UI](https://mastra.ai/guides/build-your-ui/ai-sdk-ui), [CopilotKit](https://mastra.ai/guides/build-your-ui/copilotkit), or [Assistant UI](https://mastra.ai/guides/build-your-ui/assistant-ui).

## Prerequisites

- [OpenAI API key](https://platform.openai.com/api-keys): Used by default, but you can swap in any model

## Quickstart 🚀

1. **Clone the template**
   - Run `npx create-mastra@latest --template TEMPLATE_NAME` to scaffold the project locally.
2. **Add your API keys**
   - Copy `.env.example` to `.env` and fill in your keys.
3. **Start the dev server**
   - Run `npm run dev` and open [localhost:4111](http://localhost:4111) to try it out.

## Making it yours

Explain how they can use it and how they can customize it for their needs.

## About Mastra templates

[Mastra templates](https://mastra.ai/templates) are ready-to-use projects that show off what you can build — clone one, poke around, and make it yours. They live in the [Mastra monorepo](https://github.com/mastra-ai/mastra) and are automatically synced to standalone repositories for easier cloning.

Want to contribute? See [CONTRIBUTING.md](./CONTRIBUTING.md).

d. CONTRIBUTING.md

Create a CONTRIBUTING.md file:

# Contributing

This repository is auto-generated from the [Mastra monorepo](https://github.com/mastra-ai/mastra). Pull requests opened here will be ignored.

To contribute:

1. Fork the [Mastra monorepo](https://github.com/mastra-ai/mastra)
2. Find this template in `templates/TEMPLATE_NAME`
3. Make your changes
4. Open a pull request against the monorepo

A bot syncs accepted changes to this repository.