Adding agent templates into existing projects

You can now easily merge Mastra agent templates into your existing projects with just a few clicks.

·

Sep 26, 2025

Two months ago, we shipped templates to help users initialize new projects. But sometimes, you may want to add a template’s functionality to an existing project.

So we built template merge functionality into the Mastra playground. Now, you can merge Mastra templates into existing projects with LLM-driven conflict resolution and validation.

 1npm create mastra@latest
 2npm run dev
 3# Navigate to Playground
 4# Navigate to Templates section
 5# Select any template and click "Install"

In the playground, you can install the relevant agents and workflows into the appropriate place in your local file structure. The merge agent fixes integration issues like import paths, type mismatches, and missing exports. You can choose a model with a selector, and it uses your API token. We recommend using more capable models (like GPT-5 or Claude 4 Opus).

And that should be it! We hope to add more templates to our library soon. You can also always build and submit your own for consideration to our community templates library.≈

Share:
Nik Aiyer
Nik AiyerFounding Engineer

Nik Aiyer is a founding engineer at Mastra, working on agent networks, workflows, storage, and RAG. A UC San Diego graduate, he previously worked as an engineer at Netlify.

All articles by Nik Aiyer