Welcome to your new Mastra project! We're excited to see what you build.
This starter provides you with a general-purpose Mastra agent that can research current information, manage multi-step tasks, work with local files, run approved shell commands, and create recurring schedules.
- A local
workspace/for files and command execution (created undersrc/mastra/public/workspace/when runningmastra dev) - Approval gates for file changes, deletions, and shell commands
- Conversation memory, generated thread titles, and task tracking
- Built-in web search and direct web page fetching
- Recurring schedules that persist across restarts
- Local libSQL storage and DuckDB observability, with optional Turso storage
- A bundled Mastra skill that helps coding agents use current Mastra APIs
Set your OPENAI_API_KEY in .env or in your environment, then run:
bun run devOpen http://localhost:4111 in your browser to access Mastra Studio.
Select Agent in Mastra Studio and try one of these prompts:
Get the weather forecast for Austin this weekend.Create a landing page for a Japanese sakura festival.Check the SPCX stock price now, then check it every minute.
The agent asks for approval before it changes files or runs commands. When it creates a schedule, it returns an ID that you can use to pause the schedule.
The local filesystem tools stay inside the workspace/ directory, which resolves relative to the server's working directory (src/mastra/public/workspace/ during mastra dev). Shell commands start in that directory, but LocalSandbox does not provide operating-system isolation by default. Review command approvals carefully, and do not expose this template through an unauthenticated public server.
The default file:./mastra.db database stores agent memory, tasks, and schedules locally. To use Turso, set TURSO_DATABASE_URL and TURSO_AUTH_TOKEN in .env.
Recurring schedules continue to use model tokens until you pause them. Ask the agent to pause a schedule with the ID returned by start_schedule.
- Edit
src/mastra/agents/agent.tsto change the model, instructions, memory, workspace, or approval policy. - Edit
src/mastra/tools/to customize scheduling. - Edit
src/mastra/index.tsto change storage and observability. - Add files or reusable skills under
src/mastra/public/workspace/for the agent to use duringmastra dev.
To learn more about Mastra, visit our documentation. If you're new to AI agents, check out our course and YouTube videos. You can also join our Discord community to get help and share your projects.
The Mastra platform provides two products for deploying and managing AI applications built with the Mastra framework. Learn more in the Mastra platform documentation.