Adding agent templates into existing projects

·

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.

 1npx mastra playground
 2# Navigate to Templates section
 3# 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).

templatemerger.gif

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.≈

Stay up to date