•
By Paul Scanlon Introducing File-Based Agents for Mastra
You can now build file-based agents in Mastra. Each agent is defined by a folder with model config, instructions, tools, skills, memory, and workspace as separate files.
We shipped file-based agents to give you a convention to follow and a faster path toward creating your first agent. Existing Mastra code-registered agents will continue to work and can be used alongside file-based agents.
File-based agents follow a defined file and folder structure.
Files are for one-of-a-kind pieces. The config.ts and instructions.md follow a new convention, while memory.ts and workspace.ts use existing Mastra classes.
Folders are for the many. tools/ remain the same, but subagents/ now follow the same convention as top-level file-based agents.