@mastra/mcp-docs-server 1.2.7-alpha.1 → 1.2.7-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/.docs/docs/agent-builder/integrations.md +45 -3
  2. package/.docs/docs/agent-builder/overview.md +4 -3
  3. package/.docs/docs/agent-builder/skill-registries.md +1 -3
  4. package/.docs/docs/agent-controller/modes.md +1 -1
  5. package/.docs/docs/agent-controller/overview.md +4 -3
  6. package/.docs/docs/agent-controller/session.md +3 -5
  7. package/.docs/docs/agents/a2a.md +2 -1
  8. package/.docs/docs/agents/agent-approval.md +2 -2
  9. package/.docs/docs/agents/code-mode.md +1 -1
  10. package/.docs/docs/agents/guardrails.md +10 -9
  11. package/.docs/docs/agents/networks.md +1 -1
  12. package/.docs/docs/agents/overview.md +5 -5
  13. package/.docs/docs/agents/skills.md +3 -5
  14. package/.docs/docs/agents/structured-output.md +1 -1
  15. package/.docs/docs/agents/supervisor-agents.md +3 -4
  16. package/.docs/docs/agents/using-tools.md +2 -4
  17. package/.docs/docs/browser/agent-browser.md +1 -3
  18. package/.docs/docs/browser/browser-viewer.md +1 -3
  19. package/.docs/docs/browser/overview.md +2 -1
  20. package/.docs/docs/browser/recording.md +1 -1
  21. package/.docs/docs/browser/stagehand.md +1 -1
  22. package/.docs/docs/capabilities/channels/discord.md +98 -0
  23. package/.docs/docs/capabilities/channels/other-adapters.md +68 -0
  24. package/.docs/docs/capabilities/channels/overview.md +255 -0
  25. package/.docs/docs/capabilities/channels/slack.md +225 -0
  26. package/.docs/docs/capabilities/channels/teams.md +100 -0
  27. package/.docs/docs/capabilities/channels/telegram.md +98 -0
  28. package/.docs/docs/capabilities/channels/whatsapp.md +99 -0
  29. package/.docs/docs/deployment/mastra-server.md +2 -4
  30. package/.docs/docs/editor/overview.md +2 -6
  31. package/.docs/docs/editor/prompts.md +1 -1
  32. package/.docs/docs/editor/tools.md +3 -5
  33. package/.docs/docs/evals/built-in-scorers.md +2 -2
  34. package/.docs/docs/evals/custom-scorers.md +1 -3
  35. package/.docs/docs/evals/datasets/overview.md +4 -5
  36. package/.docs/docs/evals/datasets/running-experiments.md +10 -8
  37. package/.docs/docs/evals/evals-with-memory.md +1 -3
  38. package/.docs/docs/evals/gates-and-verdicts.md +2 -4
  39. package/.docs/docs/evals/overview.md +4 -1
  40. package/.docs/docs/evals/quick-checks.md +3 -5
  41. package/.docs/docs/getting-started/file-based-agents.md +116 -0
  42. package/.docs/docs/getting-started/manual-install.md +17 -4
  43. package/.docs/docs/index.md +1 -1
  44. package/.docs/docs/long-running-agents/background-tasks.md +3 -3
  45. package/.docs/docs/long-running-agents/durable-agents.md +5 -7
  46. package/.docs/docs/long-running-agents/goals.md +5 -7
  47. package/.docs/docs/long-running-agents/schedules.md +1 -1
  48. package/.docs/docs/long-running-agents/signal-providers.md +1 -3
  49. package/.docs/docs/long-running-agents/signals.md +12 -23
  50. package/.docs/docs/mastra-platform/database.md +2 -2
  51. package/.docs/docs/mastra-platform/github.md +1 -1
  52. package/.docs/docs/mastra-platform/observability.md +5 -1
  53. package/.docs/docs/mcp/mcp-apps.md +3 -3
  54. package/.docs/docs/mcp/overview.md +6 -10
  55. package/.docs/docs/memory/memory-processors.md +67 -0
  56. package/.docs/docs/memory/message-history.md +56 -2
  57. package/.docs/docs/memory/observational-memory.md +5 -4
  58. package/.docs/docs/memory/overview.md +8 -6
  59. package/.docs/docs/memory/semantic-recall.md +36 -2
  60. package/.docs/docs/memory/working-memory.md +3 -3
  61. package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -3
  62. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
  63. package/.docs/docs/observability/logging.md +1 -1
  64. package/.docs/docs/observability/tracing/overview.md +1 -1
  65. package/.docs/docs/rag/vector-databases.md +7 -2
  66. package/.docs/docs/server/auth/auth0.md +1 -1
  67. package/.docs/docs/server/auth/better-auth.md +2 -2
  68. package/.docs/docs/server/auth/clerk.md +1 -1
  69. package/.docs/docs/server/auth/firebase.md +1 -1
  70. package/.docs/docs/server/auth/google.md +3 -3
  71. package/.docs/docs/server/auth/jwt.md +2 -2
  72. package/.docs/docs/server/auth/okta.md +2 -2
  73. package/.docs/docs/server/auth/workos.md +1 -1
  74. package/.docs/docs/server/mastra-client.md +1 -1
  75. package/.docs/docs/server/mastra-server.md +1 -1
  76. package/.docs/docs/server/pubsub.md +1 -1
  77. package/.docs/docs/server/request-context.md +4 -4
  78. package/.docs/docs/server/server-adapters.md +8 -8
  79. package/.docs/docs/storage/overview.md +214 -0
  80. package/.docs/docs/studio/auth.md +1 -3
  81. package/.docs/docs/studio/overview.md +1 -1
  82. package/.docs/docs/voice/livekit.md +101 -4
  83. package/.docs/docs/workflows/agents-and-tools.md +3 -5
  84. package/.docs/docs/workflows/control-flow.md +1 -3
  85. package/.docs/docs/workflows/overview.md +6 -7
  86. package/.docs/docs/workflows/snapshots.md +1 -1
  87. package/.docs/docs/workspace/overview.md +2 -1
  88. package/.docs/docs/workspace/sandbox.md +2 -0
  89. package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
  90. package/.docs/guides/build-your-ui/copilotkit/channels.md +1 -1
  91. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +2 -2
  92. package/.docs/guides/build-your-ui/copilotkit/overview.md +1 -1
  93. package/.docs/guides/concepts/streaming.md +3 -3
  94. package/.docs/guides/getting-started/quickstart.md +4 -2
  95. package/.docs/guides/guide/chef-michel.md +0 -2
  96. package/.docs/guides/guide/slack-assistant.md +2 -2
  97. package/.docs/guides/guide/stock-agent.md +0 -2
  98. package/.docs/models/embeddings.md +119 -0
  99. package/.docs/models/environment-variables.md +7 -0
  100. package/.docs/models/gateways/netlify.md +4 -1
  101. package/.docs/models/gateways/openrouter.md +10 -7
  102. package/.docs/models/gateways/vercel.md +8 -1
  103. package/.docs/models/index.md +1 -1
  104. package/.docs/models/providers/abacus.md +44 -14
  105. package/.docs/models/providers/crossmodel.md +109 -0
  106. package/.docs/models/providers/empiriolabs.md +106 -0
  107. package/.docs/models/providers/google.md +2 -1
  108. package/.docs/models/providers/llmgateway.md +185 -181
  109. package/.docs/models/providers/meta.md +101 -0
  110. package/.docs/models/providers/model-oracle-ai.md +87 -0
  111. package/.docs/models/providers/nano-gpt.md +2 -2
  112. package/.docs/models/providers/neon.md +40 -29
  113. package/.docs/models/providers/nvidia.md +1 -3
  114. package/.docs/models/providers/openai.md +6 -1
  115. package/.docs/models/providers/opencode.md +6 -2
  116. package/.docs/models/providers/pioneer.md +148 -0
  117. package/.docs/models/providers/poolside.md +6 -5
  118. package/.docs/models/providers/routing-run.md +23 -34
  119. package/.docs/models/providers/the-grid-ai.md +3 -3
  120. package/.docs/models/providers/unorouter.md +95 -0
  121. package/.docs/models/providers/wandb.md +21 -14
  122. package/.docs/models/providers/xai.md +2 -1
  123. package/.docs/models/providers/zenifra.md +73 -0
  124. package/.docs/models/providers.md +7 -0
  125. package/.docs/reference/agent-controller/agent-controller-class.md +3 -3
  126. package/.docs/reference/agent-controller/session.md +4 -4
  127. package/.docs/reference/agents/agent.md +1 -1
  128. package/.docs/reference/agents/channels.md +2 -2
  129. package/.docs/reference/agents/inngest-agent.md +1 -1
  130. package/.docs/reference/agents/listSkills.md +1 -1
  131. package/.docs/reference/agents/listSuspendedRuns.md +3 -3
  132. package/.docs/reference/auth/google.md +5 -5
  133. package/.docs/reference/channels/channel-provider.md +1 -1
  134. package/.docs/reference/channels/slack-provider.md +3 -3
  135. package/.docs/reference/cli/mastra.md +119 -12
  136. package/.docs/reference/code-sdk/mount-agent-controller.md +76 -0
  137. package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
  138. package/.docs/reference/configuration.md +1 -1
  139. package/.docs/reference/evals/checks.md +4 -4
  140. package/.docs/reference/evals/create-scorer.md +8 -0
  141. package/.docs/reference/file-based-agents/config.md +97 -0
  142. package/.docs/reference/file-based-agents/instructions.md +54 -0
  143. package/.docs/reference/file-based-agents/logger.md +26 -0
  144. package/.docs/reference/file-based-agents/memory.md +58 -0
  145. package/.docs/reference/file-based-agents/observability.md +32 -0
  146. package/.docs/reference/file-based-agents/processors.md +56 -0
  147. package/.docs/reference/file-based-agents/scorers.md +54 -0
  148. package/.docs/reference/file-based-agents/server.md +37 -0
  149. package/.docs/reference/file-based-agents/skills.md +56 -0
  150. package/.docs/reference/file-based-agents/storage.md +30 -0
  151. package/.docs/reference/file-based-agents/studio.md +56 -0
  152. package/.docs/reference/file-based-agents/subagents.md +123 -0
  153. package/.docs/reference/file-based-agents/tools.md +63 -0
  154. package/.docs/reference/file-based-agents/workflows.md +52 -0
  155. package/.docs/reference/file-based-agents/workspace.md +74 -0
  156. package/.docs/reference/index.md +18 -0
  157. package/.docs/reference/memory/memory-class.md +1 -1
  158. package/.docs/reference/memory/observational-memory.md +1 -1
  159. package/.docs/reference/memory/serialized-memory-config.md +1 -1
  160. package/.docs/reference/memory/summarizeConversation.md +99 -0
  161. package/.docs/reference/memory/summarizeThread.md +93 -0
  162. package/.docs/{docs/getting-started → reference}/project-structure.md +3 -10
  163. package/.docs/reference/pubsub/lease-provider.md +5 -5
  164. package/.docs/reference/server/express-adapter.md +1 -3
  165. package/.docs/reference/server/fastify-adapter.md +1 -3
  166. package/.docs/reference/server/hono-adapter.md +1 -3
  167. package/.docs/reference/server/koa-adapter.md +1 -3
  168. package/.docs/reference/server/nestjs-adapter.md +1 -3
  169. package/.docs/reference/signals/task-signal-provider.md +1 -1
  170. package/.docs/reference/storage/clickhouse.md +34 -2
  171. package/.docs/reference/storage/cloudflare-d1.md +1 -1
  172. package/.docs/reference/storage/composite.md +64 -6
  173. package/.docs/reference/storage/convex.md +1 -1
  174. package/.docs/reference/storage/dynamodb.md +1 -1
  175. package/.docs/reference/storage/mongodb.md +46 -46
  176. package/.docs/reference/storage/retention.md +74 -6
  177. package/.docs/reference/tools/create-tool.md +2 -2
  178. package/.docs/reference/tools/mcp-client.md +22 -0
  179. package/.docs/reference/tools/mcp-server.md +161 -4
  180. package/.docs/reference/vectors/mongodb.md +93 -4
  181. package/.docs/reference/voice/livekit.md +272 -8
  182. package/.docs/reference/workspace/agentcore-runtime-sandbox.md +1 -3
  183. package/.docs/reference/workspace/agentfs-filesystem.md +1 -3
  184. package/.docs/reference/workspace/apple-container-sandbox.md +6 -8
  185. package/.docs/reference/workspace/archil-filesystem.md +1 -3
  186. package/.docs/reference/workspace/azure-blob-filesystem.md +1 -3
  187. package/.docs/reference/workspace/blaxel-sandbox.md +1 -3
  188. package/.docs/reference/workspace/daytona-sandbox.md +1 -3
  189. package/.docs/reference/workspace/docker-sandbox.md +1 -3
  190. package/.docs/reference/workspace/e2b-sandbox.md +1 -3
  191. package/.docs/reference/workspace/files-sdk-filesystem.md +1 -3
  192. package/.docs/reference/workspace/gcs-filesystem.md +1 -3
  193. package/.docs/reference/workspace/google-drive-filesystem.md +1 -3
  194. package/.docs/reference/workspace/local-filesystem.md +1 -3
  195. package/.docs/reference/workspace/local-sandbox.md +1 -3
  196. package/.docs/reference/workspace/mesa-filesystem.md +4 -4
  197. package/.docs/reference/workspace/modal-sandbox.md +1 -3
  198. package/.docs/reference/workspace/railway-sandbox.md +2 -4
  199. package/.docs/reference/workspace/s3-filesystem.md +1 -3
  200. package/.docs/reference/workspace/vercel-sandbox.md +5 -7
  201. package/.docs/reference/workspace/vercel-serverless.md +2 -4
  202. package/CHANGELOG.md +36 -0
  203. package/package.json +5 -5
  204. package/.docs/docs/agents/channels.md +0 -225
  205. package/.docs/docs/agents/file-based-agents.md +0 -297
  206. package/.docs/docs/memory/storage.md +0 -267
@@ -0,0 +1,98 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # Telegram
4
+
5
+ Telegram channels let a Mastra agent receive direct messages, group messages, and bot mentions from Telegram. Mastra handles the agent wiring and webhook route; the Chat SDK Telegram adapter docs cover bot setup, webhook registration, and polling behavior.
6
+
7
+ ## Install the adapter
8
+
9
+ Install the Telegram adapter from the Chat SDK:
10
+
11
+ **npm**:
12
+
13
+ ```bash
14
+ npm install @chat-adapter/telegram
15
+ ```
16
+
17
+ **pnpm**:
18
+
19
+ ```bash
20
+ pnpm add @chat-adapter/telegram
21
+ ```
22
+
23
+ **Yarn**:
24
+
25
+ ```bash
26
+ yarn add @chat-adapter/telegram
27
+ ```
28
+
29
+ **Bun**:
30
+
31
+ ```bash
32
+ bun add @chat-adapter/telegram
33
+ ```
34
+
35
+ ## Agent configuration
36
+
37
+ Add `createTelegramAdapter()` to the agent's `channels.adapters` object:
38
+
39
+ ```typescript
40
+ import { Agent } from '@mastra/core/agent'
41
+ import { createTelegramAdapter } from '@chat-adapter/telegram'
42
+
43
+ export const telegramAgent = new Agent({
44
+ id: 'telegram-agent',
45
+ name: 'Telegram Agent',
46
+ instructions: 'Answer questions and help with tasks in Telegram.',
47
+ model: 'openai/gpt-5.5',
48
+ channels: {
49
+ adapters: {
50
+ telegram: createTelegramAdapter(),
51
+ },
52
+ },
53
+ })
54
+ ```
55
+
56
+ Register the agent on the Mastra instance:
57
+
58
+ ```typescript
59
+ import { Mastra } from '@mastra/core'
60
+ import { telegramAgent } from './agents/telegram-agent'
61
+
62
+ export const mastra = new Mastra({
63
+ agents: { telegramAgent },
64
+ })
65
+ ```
66
+
67
+ ## Adapter setup
68
+
69
+ Follow the [Chat SDK Telegram adapter docs](https://chat-sdk.dev/adapters/official/telegram) for Telegram-specific setup, including BotFather, webhook registration, secret tokens, and polling mode.
70
+
71
+ The adapter reads Telegram credentials from environment variables such as:
72
+
73
+ ```bash
74
+ TELEGRAM_BOT_TOKEN=your-telegram-bot-token
75
+ TELEGRAM_WEBHOOK_SECRET_TOKEN=your-webhook-secret-token
76
+ TELEGRAM_BOT_USERNAME=your_bot_username
77
+ ```
78
+
79
+ ## Webhook URL
80
+
81
+ Mastra generates the Telegram webhook route from the agent ID and adapter key:
82
+
83
+ ```text
84
+ /api/agents/telegram-agent/channels/telegram/webhook
85
+ ```
86
+
87
+ Use your public Mastra server URL as the base URL:
88
+
89
+ ```text
90
+ https://your-app.example.com/api/agents/telegram-agent/channels/telegram/webhook
91
+ ```
92
+
93
+ Use this URL anywhere the Telegram adapter docs ask for the webhook URL. Telegram also supports polling mode; follow the Chat SDK adapter docs if you want to use polling for local development.
94
+
95
+ ## Related
96
+
97
+ - [Channels overview](https://mastra.ai/docs/capabilities/channels/overview)
98
+ - [More](https://mastra.ai/docs/capabilities/channels/other-adapters)
@@ -0,0 +1,99 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # WhatsApp
4
+
5
+ WhatsApp channels let a Mastra agent receive customer messages through WhatsApp Business Cloud. Mastra handles the agent wiring and webhook route; the Chat SDK WhatsApp adapter docs cover Meta app setup, credentials, and webhook configuration.
6
+
7
+ ## Install the adapter
8
+
9
+ Install the WhatsApp adapter from the Chat SDK:
10
+
11
+ **npm**:
12
+
13
+ ```bash
14
+ npm install @chat-adapter/whatsapp
15
+ ```
16
+
17
+ **pnpm**:
18
+
19
+ ```bash
20
+ pnpm add @chat-adapter/whatsapp
21
+ ```
22
+
23
+ **Yarn**:
24
+
25
+ ```bash
26
+ yarn add @chat-adapter/whatsapp
27
+ ```
28
+
29
+ **Bun**:
30
+
31
+ ```bash
32
+ bun add @chat-adapter/whatsapp
33
+ ```
34
+
35
+ ## Agent configuration
36
+
37
+ Add `createWhatsAppAdapter()` to the agent's `channels.adapters` object:
38
+
39
+ ```typescript
40
+ import { Agent } from '@mastra/core/agent'
41
+ import { createWhatsAppAdapter } from '@chat-adapter/whatsapp'
42
+
43
+ export const whatsappAgent = new Agent({
44
+ id: 'whatsapp-agent',
45
+ name: 'WhatsApp Agent',
46
+ instructions: 'Answer customer questions and help with tasks in WhatsApp.',
47
+ model: 'openai/gpt-5.5',
48
+ channels: {
49
+ adapters: {
50
+ whatsapp: createWhatsAppAdapter(),
51
+ },
52
+ },
53
+ })
54
+ ```
55
+
56
+ Register the agent on the Mastra instance:
57
+
58
+ ```typescript
59
+ import { Mastra } from '@mastra/core'
60
+ import { whatsappAgent } from './agents/whatsapp-agent'
61
+
62
+ export const mastra = new Mastra({
63
+ agents: { whatsappAgent },
64
+ })
65
+ ```
66
+
67
+ ## Adapter setup
68
+
69
+ Follow the [Chat SDK WhatsApp adapter docs](https://chat-sdk.dev/adapters/official/whatsapp) for WhatsApp-specific setup, including Meta app configuration, access tokens, phone number IDs, webhook verification, and message limits.
70
+
71
+ The adapter reads WhatsApp credentials from environment variables such as:
72
+
73
+ ```bash
74
+ WHATSAPP_ACCESS_TOKEN=your-meta-access-token
75
+ WHATSAPP_APP_SECRET=your-meta-app-secret
76
+ WHATSAPP_PHONE_NUMBER_ID=your-whatsapp-phone-number-id
77
+ WHATSAPP_VERIFY_TOKEN=your-webhook-verify-token
78
+ ```
79
+
80
+ ## Webhook URL
81
+
82
+ Mastra generates the WhatsApp webhook route from the agent ID and adapter key:
83
+
84
+ ```text
85
+ /api/agents/whatsapp-agent/channels/whatsapp/webhook
86
+ ```
87
+
88
+ Use your public Mastra server URL as the base URL:
89
+
90
+ ```text
91
+ https://your-app.example.com/api/agents/whatsapp-agent/channels/whatsapp/webhook
92
+ ```
93
+
94
+ Use this URL for incoming WhatsApp event delivery. The generated Mastra route handles POST events from WhatsApp; follow the Chat SDK WhatsApp adapter docs for the Meta callback and webhook verification flow.
95
+
96
+ ## Related
97
+
98
+ - [Channels overview](https://mastra.ai/docs/capabilities/channels/overview)
99
+ - [More](https://mastra.ai/docs/capabilities/channels/other-adapters)
@@ -14,9 +14,7 @@ Run the build command from your project root:
14
14
  mastra build
15
15
  ```
16
16
 
17
- This creates a `.mastra` directory containing your production-ready server.
18
-
19
- > **Info:** Read the [`mastra build`](https://mastra.ai/reference/cli/mastra) reference for all available flags.
17
+ This creates a `.mastra` directory containing your production-ready server. Read the [`mastra build`](https://mastra.ai/reference/cli/mastra) reference for all available flags.
20
18
 
21
19
  ## Build output
22
20
 
@@ -59,7 +57,7 @@ The `mastra start` command provides additional features:
59
57
  - Provides helpful error messages for missing modules
60
58
  - Handles process signals for graceful shutdown
61
59
 
62
- > **Info:** Read the [`mastra start`](https://mastra.ai/reference/cli/mastra) reference for all available flags.
60
+ Read the [`mastra start`](https://mastra.ai/reference/cli/mastra) reference for all available flags.
63
61
 
64
62
  ## Build configuration
65
63
 
@@ -64,9 +64,7 @@ export const mastra = new Mastra({
64
64
  })
65
65
  ```
66
66
 
67
- Once registered, you can manage agents through [Studio](https://mastra.ai/docs/studio/overview) or programmatically through the server API and Client SDK.
68
-
69
- > **Note:** See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for all configuration options.
67
+ Once registered, you can manage agents through [Studio](https://mastra.ai/docs/studio/overview) or programmatically through the server API and Client SDK. See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for all configuration options.
70
68
 
71
69
  ## Code and database sources
72
70
 
@@ -173,9 +171,7 @@ Because stored agents are data, you can build automation loops that tune agents
173
171
  - Re-run the experiment against the draft and compare scores to the baseline.
174
172
  - Promote the draft to the published version when the scores improve.
175
173
 
176
- This turns agent tuning into a closed feedback loop. One agent owns the production configuration, another agent iterates on it, and every change is versioned so you can roll back if a round of automated edits makes things worse. Combine this with [version targeting](#version-targeting-and-experimentation) to keep production traffic on the published version while the draft is being tested.
177
-
178
- > **Note:** See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full namespace API.
174
+ This turns agent tuning into a closed feedback loop. One agent owns the production configuration, another agent iterates on it, and every change is versioned so you can roll back if a round of automated edits makes things worse. Combine this with [version targeting](#version-targeting-and-experimentation) to keep production traffic on the published version while the draft is being tested. See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full namespace API.
179
175
 
180
176
  ## What can be overridden
181
177
 
@@ -122,7 +122,7 @@ await editor.agent.update({
122
122
  })
123
123
  ```
124
124
 
125
- > **Note:** See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full `editor.prompt` API.
125
+ See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full `editor.prompt` API.
126
126
 
127
127
  ## Versioning
128
128
 
@@ -52,7 +52,7 @@ Integration providers connect external tool platforms to the editor. Once regist
52
52
 
53
53
  [Composio](https://composio.dev) gives access to hundreds of integration tools organized into toolkits (GitHub, Slack, Gmail, and others).
54
54
 
55
- 1. Get an API key from your Composio dashboard.
55
+ 1. Get a **project** API key (the `x-api-key` type) from your [Composio dashboard](https://dashboard.composio.dev).
56
56
 
57
57
  2. Register the provider in your Editor configuration:
58
58
 
@@ -75,7 +75,7 @@ Integration providers connect external tool platforms to the editor. Once regist
75
75
  })
76
76
  ```
77
77
 
78
- Composio tool slugs use a format like `GITHUB_CREATE_ISSUE`. Tool calls are scoped to the `resourceId` passed through request context for per-user authentication.
78
+ Composio tool slugs use a format like `GITHUB_CREATE_ISSUE`. By default, tool calls use the connection pinned by the agent's author. To route calls to each end user's own account instead, see [connection scope](https://mastra.ai/docs/agent-builder/integrations) in the Agent Builder docs.
79
79
 
80
80
  ### Arcade
81
81
 
@@ -142,9 +142,7 @@ When an agent runs, tools from all sources are merged in this order:
142
142
  2. Integration tools
143
143
  3. MCP tools
144
144
 
145
- If a tool ID exists in multiple sources, later sources take precedence. Description overrides set at the agent level always take priority over the original tool description.
146
-
147
- > **Note:** See the [ToolProvider reference](https://mastra.ai/reference/editor/tool-provider) for the full provider API.
145
+ If a tool ID exists in multiple sources, later sources take precedence. Description overrides set at the agent level always take priority over the original tool description. See the [ToolProvider reference](https://mastra.ai/reference/editor/tool-provider) for the full provider API.
148
146
 
149
147
  ## Related
150
148
 
@@ -54,12 +54,12 @@ These scorers evaluate adherence to format, style, and safety requirements:
54
54
  Zero-LLM micro-scorers for fast, deterministic assertions. See the [Quick Checks](https://mastra.ai/docs/evals/quick-checks) guide for usage details.
55
55
 
56
56
  - [`checks.includes`](https://mastra.ai/reference/evals/checks): Scores 1 if output contains a substring (`0` or `1`)
57
- - [`checks.excludes`](https://mastra.ai/reference/evals/checks): Scores 1 if output does not contain a substring (`0` or `1`)
57
+ - [`checks.excludes`](https://mastra.ai/reference/evals/checks): Scores 1 if output doesn't contain a substring (`0` or `1`)
58
58
  - [`checks.equals`](https://mastra.ai/reference/evals/checks): Scores 1 if output exactly matches a string (`0` or `1`)
59
59
  - [`checks.matches`](https://mastra.ai/reference/evals/checks): Scores 1 if output matches a regex (`0` or `1`)
60
60
  - [`checks.similarity`](https://mastra.ai/reference/evals/checks): String similarity via Dice coefficient (`0-1`, or binary with threshold)
61
61
  - [`checks.calledTool`](https://mastra.ai/reference/evals/checks): Scores 1 if a tool was called at least N times (`0` or `1`)
62
- - [`checks.didNotCall`](https://mastra.ai/reference/evals/checks): Scores 1 if a tool was not called (`0` or `1`)
62
+ - [`checks.didNotCall`](https://mastra.ai/reference/evals/checks): Scores 1 if a tool wasn't called (`0` or `1`)
63
63
  - [`checks.toolOrder`](https://mastra.ai/reference/evals/checks): Scores 1 if tools were called in order (`0` or `1`)
64
64
  - [`checks.maxToolCalls`](https://mastra.ai/reference/evals/checks): Scores 1 if tool call count is within limit (`0` or `1`)
65
65
  - [`checks.usedNoTools`](https://mastra.ai/reference/evals/checks): Scores 1 if no tools were called (`0` or `1`)
@@ -341,9 +341,7 @@ A custom scorer in Mastra uses `createScorer` with four core components:
341
341
  3. [**Score Generation**](#score-generation)
342
342
  4. [**Reason Generation**](#reason-generation)
343
343
 
344
- Together, these components allow you to define custom evaluation logic using LLMs as judges.
345
-
346
- > **Info:** Visit [createScorer](https://mastra.ai/reference/evals/create-scorer) for the full API and configuration options.
344
+ Together, these components allow you to define custom evaluation logic using LLMs as judges. Visit [createScorer](https://mastra.ai/reference/evals/create-scorer) for the full API and configuration options.
347
345
 
348
346
  ```typescript
349
347
  import { createScorer } from '@mastra/core/evals'
@@ -41,7 +41,7 @@ const existing = await datasets.get({ id: 'dataset-id' })
41
41
  const { datasets: all } = await datasets.list()
42
42
  ```
43
43
 
44
- > **Info:** Visit the [`DatasetsManager` reference](https://mastra.ai/reference/datasets/datasets-manager) for the full list of methods.
44
+ Visit the [`DatasetsManager` reference](https://mastra.ai/reference/datasets/datasets-manager) for the full list of methods.
45
45
 
46
46
  ## Studio
47
47
 
@@ -196,13 +196,12 @@ Fetch the exact items that existed at a past version:
196
196
  const items = await dataset.listItems({ version: 2 })
197
197
  ```
198
198
 
199
- You can also pin experiments to a version, see [running experiments](https://mastra.ai/docs/evals/datasets/running-experiments).
200
-
201
- > **Info:** Visit the [`Dataset` reference](https://mastra.ai/reference/datasets/dataset) for the full list of methods and parameters.
199
+ You can also pin experiments to a version, see [running experiments](https://mastra.ai/docs/evals/datasets/running-experiments). Visit the [`Dataset` reference](https://mastra.ai/reference/datasets/dataset) for the full list of methods and parameters.
202
200
 
203
201
  ## Related
204
202
 
205
203
  - [Running experiments](https://mastra.ai/docs/evals/datasets/running-experiments)
206
204
  - [Scorers overview](https://mastra.ai/docs/evals/overview)
207
205
  - [DatasetsManager reference](https://mastra.ai/reference/datasets/datasets-manager)
208
- - [Dataset reference](https://mastra.ai/reference/datasets/dataset)
206
+ - [Dataset reference](https://mastra.ai/reference/datasets/dataset)
207
+ - 📹 [Mastra evals, datasets, and experiments workshop](https://www.youtube.com/watch?v=Vla5LfmOOrM)
@@ -127,7 +127,7 @@ for (const item of summary.results) {
127
127
  }
128
128
  ```
129
129
 
130
- > **Info:** Visit the [Scorers overview](https://mastra.ai/docs/evals/overview) for details on available and custom scorers.
130
+ Visit the [Scorers overview](https://mastra.ai/docs/evals/overview) for details on available and custom scorers.
131
131
 
132
132
  ## Tool mocks
133
133
 
@@ -154,11 +154,11 @@ Tool mocks are supported for `agent` targets only.
154
154
 
155
155
  Arguments are matched strictly: object key order is ignored, array order is significant, and there is no type coercion. A mock is served only when the agent calls the tool with arguments that deep-equal the mock's `args`.
156
156
 
157
- When an item declares several mocks for the same tool and arguments, they are consumed in order — the first call gets the first mock, the next call gets the second, and so on. Ordering is tracked per `(toolName, args)` group and is independent across different arguments.
157
+ When an item declares several mocks for the same tool and arguments, they're consumed in order — the first call gets the first mock, the next call gets the second, and so on. Ordering is tracked per `(toolName, args)` group and is independent across different arguments.
158
158
 
159
159
  ### Matching mode
160
160
 
161
- By default each mock matches strictly on its `args`. Set `matchArgs: 'ignore'` to match on the tool name only — the mock's `args` are not compared and the next unconsumed mock for that tool is served regardless of how the agent called it:
161
+ By default each mock matches strictly on its `args`. Set `matchArgs: 'ignore'` to match on the tool name only — the mock's `args` aren't compared and the next unconsumed mock for that tool is served regardless of how the agent called it:
162
162
 
163
163
  ```typescript
164
164
  const subAgentMock = {
@@ -173,12 +173,12 @@ This is useful when a tool's arguments are noisy or generated by the model. The
173
173
 
174
174
  ### Failures
175
175
 
176
- A mocked tool call fails the item when the arguments do not match or all matching mocks have been consumed:
176
+ A mocked tool call fails the item when the arguments don't match or all matching mocks have been consumed:
177
177
 
178
178
  - `TOOL_MOCK_MISMATCH` — the tool was called with arguments that no mock matches.
179
179
  - `TOOL_MOCK_EXHAUSTED` — every matching mock has already been consumed.
180
180
 
181
- When a mocked tool is mis-called, the agent run is aborted immediately, so the model cannot go on to call any further tools — including unmocked, side-effecting tools that would otherwise run live. These failures are deterministic, so they are not retried. Mocks that are declared but never used do not fail the item — they are reported as unconsumed.
181
+ When a mocked tool is mis-called, the agent run is aborted immediately, so the model can't go on to call any further tools — including unmocked, side-effecting tools that would otherwise run live. These failures are deterministic, so they're not retried. Mocks that are declared but never used don't fail the item — they're reported as unconsumed.
182
182
 
183
183
  While an item has mocks, the agent's tools execute sequentially so repeated `(toolName, args)` mocks are consumed in the provider's call order. This serialization applies only to items that declare mocks.
184
184
 
@@ -202,8 +202,8 @@ In [Studio](https://mastra.ai/docs/studio/overview), edit a dataset item to auth
202
202
 
203
203
  ### Limitations
204
204
 
205
- - **No tool span for mocked calls.** A mocked call returns its output before the tool executes, so it does not create a tool span. Trajectory scorers backed by stored traces may therefore not see mocked tool calls. Trajectory extraction that falls back to the agent's message output still sees them, so trajectory scoring can differ depending on your observability configuration.
206
- - **Storage support.** Tool mocks and tool mock reports are persisted by the LibSQL, PostgreSQL, MongoDB, and Spanner adapters. The MySQL adapter does not support them and rejects writes that carry tool mocks or a tool mock report so the feature never silently runs tools live.
205
+ - **No tool span for mocked calls.** A mocked call returns its output before the tool executes, so it doesn't create a tool span. Trajectory scorers backed by stored traces may therefore not see mocked tool calls. Trajectory extraction that falls back to the agent's message output still sees them, so trajectory scoring can differ depending on your observability configuration.
206
+ - **Storage support.** Tool mocks and tool mock reports are persisted by the LibSQL, PostgreSQL, MongoDB, and Spanner adapters. The MySQL adapter doesn't support them and rejects writes that carry tool mocks or a tool mock report so the feature never silently runs tools live.
207
207
 
208
208
  ## Async experiments
209
209
 
@@ -321,6 +321,8 @@ console.log(experiment.startedAt)
321
321
  console.log(experiment.completedAt)
322
322
  ```
323
323
 
324
+ > **📹 Watch:** Watch [Mastra datasets and experiments workflow](https://www.youtube.com/watch?v=R6pjAdGhxhQ) to see how datasets and experiments help improve reliability.
325
+
324
326
  ### Item-level results
325
327
 
326
328
  ```typescript
@@ -342,7 +344,7 @@ for (const result of results) {
342
344
  - `completedWithErrors` is `true` when the experiment finished but some items failed.
343
345
  - Items cancelled via `signal` appear in `skippedCount`.
344
346
 
345
- > **Info:** Visit the [`startExperiment` reference](https://mastra.ai/reference/datasets/startExperiment) for the full parameter and return type documentation.
347
+ Visit the [`startExperiment` reference](https://mastra.ai/reference/datasets/startExperiment) for the full parameter and return type documentation.
346
348
 
347
349
  ## Related
348
350
 
@@ -136,9 +136,7 @@ const summary = await dataset.startExperiment({
136
136
  })
137
137
  ```
138
138
 
139
- The inline `task` receives the item's `metadata`, so each row can drive its own thread without changing the agent or any scorer.
140
-
141
- > **Note:** Visit [runEvals reference](https://mastra.ai/reference/evals/run-evals) and [Dataset reference](https://mastra.ai/reference/datasets/dataset) for full configuration.
139
+ The inline `task` receives the item's `metadata`, so each row can drive its own thread without changing the agent or any scorer. Visit [runEvals reference](https://mastra.ai/reference/evals/run-evals) and [Dataset reference](https://mastra.ai/reference/datasets/dataset) for full configuration.
142
140
 
143
141
  ## Related
144
142
 
@@ -64,9 +64,7 @@ const result = await runEvals({
64
64
  // result.gateResults: [{ id: 'check-called-tool', passed: true, score: 1 }]
65
65
  ```
66
66
 
67
- Any scorer works as a gate. Quick Checks are a natural fit because they return binary 1/0 scores.
68
-
69
- > **Note:** Visit [runEvals() reference](https://mastra.ai/reference/evals/run-evals) for the full parameter and return type documentation.
67
+ Any scorer works as a gate. Quick Checks are a natural fit because they return binary 1/0 scores. Visit [runEvals() reference](https://mastra.ai/reference/evals/run-evals) for the full parameter and return type documentation.
70
68
 
71
69
  ## Thresholds
72
70
 
@@ -101,7 +99,7 @@ const result = await runEvals({
101
99
  // ]
102
100
  ```
103
101
 
104
- A bare scorer (no threshold) still appears in `result.scores` but does not affect the verdict.
102
+ A bare scorer (no threshold) still shows up in `result.scores` but doesn't affect the verdict.
105
103
 
106
104
  ## Using verdicts in CI
107
105
 
@@ -8,6 +8,8 @@ Scorers are automated tests that evaluate Agents outputs using model-graded, rul
8
8
 
9
9
  Scorers can be run in the cloud, capturing real-time results. But scorers can also be part of your CI/CD pipeline, allowing you to test and monitor your agents over time.
10
10
 
11
+ > **📹 Watch:** Watch [Mastra evals overview](https://www.youtube.com/watch?v=12WN6u2DrBk) for an introduction to evals and how to reason about agent quality.
12
+
11
13
  ## Types of scorers
12
14
 
13
15
  Mastra provides different kinds of scorers, each serving a specific purpose. Here are some common types:
@@ -142,4 +144,5 @@ Once registered, you can score traces interactively within Studio under the **Ob
142
144
  - Add [gates and verdicts](https://mastra.ai/docs/evals/gates-and-verdicts) to enforce hard requirements and quality thresholds
143
145
  - Learn how to create your own scorers in the [Creating Custom Scorers](https://mastra.ai/docs/evals/custom-scorers) guide
144
146
  - Explore built-in scorers in the [Built-in Scorers](https://mastra.ai/docs/evals/built-in-scorers) section
145
- - Test scorers with [Studio](https://mastra.ai/docs/studio/overview)
147
+ - Test scorers with [Studio](https://mastra.ai/docs/studio/overview)
148
+ - 📹 [Mastra evals workshop](https://www.youtube.com/watch?v=OHOZ5PgPj5M\&t=3578s)
@@ -44,7 +44,7 @@ These scorers evaluate the agent's text output:
44
44
  | Check | What it does | Score |
45
45
  | ------------------------ | ------------------------------------- | -------------------------------- |
46
46
  | `checks.includes(str)` | Output contains substring | 1 or 0 |
47
- | `checks.excludes(str)` | Output does not contain substring | 1 or 0 |
47
+ | `checks.excludes(str)` | Output doesn't contain substring | 1 or 0 |
48
48
  | `checks.equals(str)` | Output exactly equals string | 1 or 0 |
49
49
  | `checks.matches(regex)` | Output matches regular expression | 1 or 0 |
50
50
  | `checks.similarity(str)` | Dice coefficient similarity to string | 0-1 (or binary with `threshold`) |
@@ -56,7 +56,7 @@ These scorers evaluate tool usage from the agent's run:
56
56
  | Check | What it does | Score |
57
57
  | ------------------------- | -------------------------------- | ------ |
58
58
  | `checks.calledTool(name)` | Tool was called at least N times | 1 or 0 |
59
- | `checks.didNotCall(name)` | Tool was not called | 1 or 0 |
59
+ | `checks.didNotCall(name)` | Tool wasn't called | 1 or 0 |
60
60
  | `checks.toolOrder([...])` | Tools called in expected order | 1 or 0 |
61
61
  | `checks.maxToolCalls(n)` | No more than N tool calls total | 1 or 0 |
62
62
  | `checks.usedNoTools()` | No tools called at all | 1 or 0 |
@@ -127,9 +127,7 @@ Each check is a standard `createScorer()` instance with a `preprocess` step and
127
127
  1. **preprocess**: Extracts and normalizes relevant data from the agent run (text content, tool calls)
128
128
  2. **generateScore**: Converts the preprocessed result into a score (typically binary 1 or 0)
129
129
 
130
- Because checks skip the `analyze` and `generateReason` steps and make no LLM calls, they run in microseconds.
131
-
132
- > **Note:** Visit the [Quick Checks reference](https://mastra.ai/reference/evals/checks) for the full API, including all parameters and options for each check.
130
+ Because checks skip the `analyze` and `generateReason` steps and make no LLM calls, they run in microseconds. Visit the [Quick Checks reference](https://mastra.ai/reference/evals/checks) for the full API, including all parameters and options for each check.
133
131
 
134
132
  ## Related
135
133
 
@@ -0,0 +1,116 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # File-based agents
4
+
5
+ **Added in:** `@mastra/core@1.50.0`
6
+
7
+ > **Beta:** This feature is in beta. Breaking changes may occur without a major version bump until the API is stable.
8
+
9
+ File-based agents are a new, convention-based way to define Mastra agents and project primitives from a directory structure under `src/mastra/`. You'll like this approach if you want an agent to be self-contained, easy to scan and extend.
10
+
11
+ Adopting this feature is a fundamental decision about how to structure your project. You'll need to follow the file conventions and be aware of its limitations, namely that you can't use dynamic configuration or runtime wiring.
12
+
13
+ However, you can use file-based agents, code-defined agents, or both in the same project. All Mastra docs currently use code-first examples. As file-based agents mature, more examples may use this structure where it makes sense.
14
+
15
+ Under the hood Mastra is assembling code-defined agents and primitives from the files you create. So explanations and concepts you can find on other docs pages apply to file-based agents as well.
16
+
17
+ ## Basic layout
18
+
19
+ A small file-based agent looks like this:
20
+
21
+ ```text
22
+ src/mastra/
23
+ agents/
24
+ weather/
25
+ config.ts
26
+ instructions.md
27
+ tools/
28
+ get-weather.ts
29
+ skills/
30
+ forecast-review.md
31
+ ```
32
+
33
+ The main files in an agent directory are:
34
+
35
+ - [`config.ts`](https://mastra.ai/reference/file-based-agents/config): Model selection and runtime options
36
+ - [`instructions.md`](https://mastra.ai/reference/file-based-agents/instructions): The prompt that applies to every response
37
+ - [`tools/`](https://mastra.ai/reference/file-based-agents/tools): Typed functions the model can call
38
+ - [`skills/`](https://mastra.ai/reference/file-based-agents/skills): Reusable instructions
39
+
40
+ You need to define `config.ts` and `instructions.md` at a minimum. Add optional files as needed. Learn more in the [add capabilities](#add-capabilities) section.
41
+
42
+ ## Quickstart
43
+
44
+ Create a folder at `src/mastra/agents/weather`. Inside, add a `config.ts` and an `instructions.md` file with these contents:
45
+
46
+ ```typescript
47
+ import { agentConfig } from '@mastra/core/agent'
48
+
49
+ export default agentConfig({
50
+ model: 'openai/gpt-5.5',
51
+ })
52
+ ```
53
+
54
+ ```markdown
55
+ You are a helpful weather assistant. Answer questions about current conditions and forecasts.
56
+ ```
57
+
58
+ Start Mastra's development server with `mastra dev`. Inside Studio, you can now call the `weather` agent and ask it about the weather.
59
+
60
+ ## Add capabilities
61
+
62
+ Map each primitive or feature to its file convention:
63
+
64
+ | Primitive or feature | File convention |
65
+ | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
66
+ | [Agent config](https://mastra.ai/reference/file-based-agents/config) | `src/mastra/agents/<agent-id>/config.ts` |
67
+ | [Agent instructions](https://mastra.ai/reference/file-based-agents/instructions) | `src/mastra/agents/<agent-id>/instructions.md` |
68
+ | [Tools](https://mastra.ai/reference/file-based-agents/tools) | `src/mastra/agents/<agent-id>/tools/` |
69
+ | [Skills](https://mastra.ai/reference/file-based-agents/skills) | `src/mastra/agents/<agent-id>/skills/` |
70
+ | [Memory](https://mastra.ai/reference/file-based-agents/memory) | `src/mastra/agents/<agent-id>/memory.ts` |
71
+ | [Workspace](https://mastra.ai/reference/file-based-agents/workspace) | `src/mastra/agents/<agent-id>/workspace.ts` and `src/mastra/agents/<agent-id>/workspace/` |
72
+ | [Processors](https://mastra.ai/reference/file-based-agents/processors) | `src/mastra/agents/<agent-id>/processors/` |
73
+ | [Scorers](https://mastra.ai/reference/file-based-agents/scorers) | `src/mastra/agents/<agent-id>/scorers/` |
74
+ | [Subagents](https://mastra.ai/reference/file-based-agents/subagents) | `src/mastra/agents/<agent-id>/subagents/` |
75
+ | [Workflows](https://mastra.ai/reference/file-based-agents/workflows) | `src/mastra/workflows/` |
76
+ | [Storage](https://mastra.ai/reference/file-based-agents/storage) | `src/mastra/storage.ts` |
77
+ | [Observability](https://mastra.ai/reference/file-based-agents/observability) | `src/mastra/observability.ts` |
78
+ | [Logger](https://mastra.ai/reference/file-based-agents/logger) | `src/mastra/logger.ts` |
79
+ | [Server config](https://mastra.ai/reference/file-based-agents/server) | `src/mastra/server.ts` |
80
+ | [Studio config](https://mastra.ai/reference/file-based-agents/studio) | `src/mastra/studio.ts` |
81
+
82
+ ## Discovery lifecycle
83
+
84
+ File-based primitives are discovered by the Mastra bundler under `mastra dev` and `mastra build`. During discovery, Mastra reads supported files under `src/mastra/`, imports TypeScript and JavaScript modules, reads markdown instructions and skills, copies workspace seed files, and registers the assembled primitives with your Mastra app.
85
+
86
+ After discovery, a file-based agent runs as a normal [`Agent`](https://mastra.ai/reference/agents/agent). Calling it from the Agent API, Studio, workflows, or your application code uses the same runtime as a code-defined agent.
87
+
88
+ Discovery is source-based and conservative. It skips symlinks, ignores test files, treats workflows and singleton project files as file-routed only when they have a default export, and ignores directories that aren't agent directories.
89
+
90
+ Start your app through the Mastra CLI so discovery runs:
91
+
92
+ **npm**:
93
+
94
+ ```bash
95
+ npx mastra dev
96
+ ```
97
+
98
+ **pnpm**:
99
+
100
+ ```bash
101
+ pnpm dlx mastra dev
102
+ ```
103
+
104
+ **Yarn**:
105
+
106
+ ```bash
107
+ yarn dlx mastra dev
108
+ ```
109
+
110
+ **Bun**:
111
+
112
+ ```bash
113
+ bun x mastra dev
114
+ ```
115
+
116
+ If you import your `mastra` instance directly, `agents/<name>/` directories and the other conventions aren't discovered. When you consume Mastra as a library, register those primitives in code instead.
@@ -2,9 +2,11 @@
2
2
 
3
3
  # Manual install
4
4
 
5
- **For AI agents:** Use this guide when tasked to create a runnable Mastra project from scratch without a CLI/boilerplate. It provides code examples for agents, tools, model configuration and how to install dependencies. Do not navigate to the quickstart guide, which is for humans.
5
+ **For AI agents:** Use this guide when tasked to create a runnable Mastra project from scratch without a CLI/boilerplate. It provides code examples for agents, tools, model configuration and how to install dependencies. Do not navigate to the quickstart guide, which is for humans. The model string is Mastra's model router format ('provider/model'; use / and not : to separate provider and model). Do not install any ai-sdk packages.
6
6
 
7
- > **Info:** Use this guide to manually build a standalone Mastra server step by step. In most cases, it's quicker to follow the [quickstart guide](https://mastra.ai/guides/getting-started/quickstart), which achieves the same result using the [`mastra create`](https://mastra.ai/reference/cli/create-mastra) command. For existing projects, you can also use [`mastra init`](https://mastra.ai/reference/cli/mastra).
7
+ Use this guide to manually build a standalone Mastra server step by step. In most cases, it's quicker to follow the [quickstart guide](https://mastra.ai/guides/getting-started/quickstart), which achieves the same result using the [`mastra create`](https://mastra.ai/reference/cli/create-mastra) command. For existing projects, you can also use [`mastra init`](https://mastra.ai/reference/cli/mastra).
8
+
9
+ ## Instructions
8
10
 
9
11
  If you prefer not to use our automatic CLI tool, you can set up your project yourself by following the guide below.
10
12
 
@@ -163,7 +165,7 @@ If you prefer not to use our automatic CLI tool, you can set up your project you
163
165
  mkdir -p src/mastra/agents && touch src/mastra/agents/weather-agent.ts
164
166
  ```
165
167
 
166
- Use `import { Agent } from "@mastra/core/agent"`. Constructor takes `{ id, name, instructions, model: 'openai/gpt-5.5' }`. The model string is Mastra's model router format ('provider/model'; use / and not : to separate provider and model). Do not install any ai-sdk package unless Mastra's documentation says otherwise.
168
+ Use `import { Agent } from "@mastra/core/agent"`. Constructor takes `{ id, name, instructions, model: 'openai/gpt-5.5' }`. The model string is Mastra's model router format ('provider/model'; use / and not : to separate provider and model). Do not install any ai-sdk packages.
167
169
 
168
170
  Add the following code:
169
171
 
@@ -234,4 +236,15 @@ If you prefer not to use our automatic CLI tool, you can set up your project you
234
236
 
235
237
  ```bash
236
238
  bun run dev
237
- ```
239
+ ```
240
+
241
+ **For AI agents:** To validate your work, run a build and do a typecheck with `tsc --noEmit`.
242
+
243
+ ## Next steps
244
+
245
+ - [Review the project structure](https://mastra.ai/reference/project-structure): Understand how `src/mastra/` files map to agents, tools, workflows, storage, and configuration.
246
+ - [Test your agent in Studio](https://mastra.ai/docs/studio/overview): Open the local Studio UI and run the weather agent.
247
+ - [Use tools with agents](https://mastra.ai/docs/agents/using-tools): Replace the example weather tool with a real tool that calls an API or service.
248
+ - [Add memory](https://mastra.ai/docs/memory/overview): Persist conversation history and user-specific context.
249
+ - [Configure storage](https://mastra.ai/docs/storage/overview): Add a persistent storage adapter for memory, workflows, observability, and other runtime state.
250
+ - [Build and deploy](https://mastra.ai/docs/deployment/overview): Build the Mastra server and deploy it to a hosting platform.