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

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 (198) hide show
  1. package/.docs/docs/agent-builder/integrations.md +1 -1
  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 +1 -3
  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 +114 -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 +3 -0
  100. package/.docs/models/gateways/netlify.md +4 -1
  101. package/.docs/models/gateways/openrouter.md +10 -6
  102. package/.docs/models/gateways/vercel.md +7 -1
  103. package/.docs/models/index.md +1 -1
  104. package/.docs/models/providers/crossmodel.md +109 -0
  105. package/.docs/models/providers/google.md +2 -1
  106. package/.docs/models/providers/llmgateway.md +184 -181
  107. package/.docs/models/providers/meta.md +101 -0
  108. package/.docs/models/providers/nano-gpt.md +2 -2
  109. package/.docs/models/providers/neon.md +40 -29
  110. package/.docs/models/providers/openai.md +5 -1
  111. package/.docs/models/providers/opencode.md +2 -1
  112. package/.docs/models/providers/poolside.md +6 -5
  113. package/.docs/models/providers/routing-run.md +20 -34
  114. package/.docs/models/providers/the-grid-ai.md +3 -3
  115. package/.docs/models/providers/wandb.md +21 -14
  116. package/.docs/models/providers/xai.md +2 -1
  117. package/.docs/models/providers/zenifra.md +73 -0
  118. package/.docs/models/providers.md +3 -0
  119. package/.docs/reference/agent-controller/agent-controller-class.md +3 -3
  120. package/.docs/reference/agent-controller/session.md +4 -4
  121. package/.docs/reference/agents/agent.md +1 -1
  122. package/.docs/reference/agents/channels.md +2 -2
  123. package/.docs/reference/agents/inngest-agent.md +1 -1
  124. package/.docs/reference/agents/listSkills.md +1 -1
  125. package/.docs/reference/agents/listSuspendedRuns.md +3 -3
  126. package/.docs/reference/auth/google.md +5 -5
  127. package/.docs/reference/channels/channel-provider.md +1 -1
  128. package/.docs/reference/channels/slack-provider.md +3 -3
  129. package/.docs/reference/cli/mastra.md +119 -12
  130. package/.docs/reference/code-sdk/mount-agent-controller.md +76 -0
  131. package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
  132. package/.docs/reference/configuration.md +1 -1
  133. package/.docs/reference/evals/checks.md +4 -4
  134. package/.docs/reference/evals/create-scorer.md +8 -0
  135. package/.docs/reference/file-based-agents/config.md +97 -0
  136. package/.docs/reference/file-based-agents/instructions.md +54 -0
  137. package/.docs/reference/file-based-agents/memory.md +58 -0
  138. package/.docs/reference/file-based-agents/observability.md +32 -0
  139. package/.docs/reference/file-based-agents/processors.md +56 -0
  140. package/.docs/reference/file-based-agents/server.md +37 -0
  141. package/.docs/reference/file-based-agents/skills.md +56 -0
  142. package/.docs/reference/file-based-agents/storage.md +30 -0
  143. package/.docs/reference/file-based-agents/studio.md +56 -0
  144. package/.docs/reference/file-based-agents/subagents.md +123 -0
  145. package/.docs/reference/file-based-agents/tools.md +63 -0
  146. package/.docs/reference/file-based-agents/workflows.md +52 -0
  147. package/.docs/reference/file-based-agents/workspace.md +74 -0
  148. package/.docs/reference/index.md +16 -0
  149. package/.docs/reference/memory/memory-class.md +1 -1
  150. package/.docs/reference/memory/observational-memory.md +1 -1
  151. package/.docs/reference/memory/serialized-memory-config.md +1 -1
  152. package/.docs/reference/memory/summarizeConversation.md +99 -0
  153. package/.docs/reference/memory/summarizeThread.md +93 -0
  154. package/.docs/{docs/getting-started → reference}/project-structure.md +3 -10
  155. package/.docs/reference/pubsub/lease-provider.md +5 -5
  156. package/.docs/reference/server/express-adapter.md +1 -3
  157. package/.docs/reference/server/fastify-adapter.md +1 -3
  158. package/.docs/reference/server/hono-adapter.md +1 -3
  159. package/.docs/reference/server/koa-adapter.md +1 -3
  160. package/.docs/reference/server/nestjs-adapter.md +1 -3
  161. package/.docs/reference/signals/task-signal-provider.md +1 -1
  162. package/.docs/reference/storage/clickhouse.md +34 -2
  163. package/.docs/reference/storage/cloudflare-d1.md +1 -1
  164. package/.docs/reference/storage/composite.md +64 -6
  165. package/.docs/reference/storage/convex.md +1 -1
  166. package/.docs/reference/storage/dynamodb.md +1 -1
  167. package/.docs/reference/storage/mongodb.md +46 -46
  168. package/.docs/reference/storage/retention.md +74 -6
  169. package/.docs/reference/tools/create-tool.md +2 -2
  170. package/.docs/reference/tools/mcp-client.md +22 -0
  171. package/.docs/reference/tools/mcp-server.md +161 -4
  172. package/.docs/reference/vectors/mongodb.md +93 -4
  173. package/.docs/reference/voice/livekit.md +272 -8
  174. package/.docs/reference/workspace/agentcore-runtime-sandbox.md +1 -3
  175. package/.docs/reference/workspace/agentfs-filesystem.md +1 -3
  176. package/.docs/reference/workspace/apple-container-sandbox.md +6 -8
  177. package/.docs/reference/workspace/archil-filesystem.md +1 -3
  178. package/.docs/reference/workspace/azure-blob-filesystem.md +1 -3
  179. package/.docs/reference/workspace/blaxel-sandbox.md +1 -3
  180. package/.docs/reference/workspace/daytona-sandbox.md +1 -3
  181. package/.docs/reference/workspace/docker-sandbox.md +1 -3
  182. package/.docs/reference/workspace/e2b-sandbox.md +1 -3
  183. package/.docs/reference/workspace/files-sdk-filesystem.md +1 -3
  184. package/.docs/reference/workspace/gcs-filesystem.md +1 -3
  185. package/.docs/reference/workspace/google-drive-filesystem.md +1 -3
  186. package/.docs/reference/workspace/local-filesystem.md +1 -3
  187. package/.docs/reference/workspace/local-sandbox.md +1 -3
  188. package/.docs/reference/workspace/mesa-filesystem.md +4 -4
  189. package/.docs/reference/workspace/modal-sandbox.md +1 -3
  190. package/.docs/reference/workspace/railway-sandbox.md +2 -4
  191. package/.docs/reference/workspace/s3-filesystem.md +1 -3
  192. package/.docs/reference/workspace/vercel-sandbox.md +5 -7
  193. package/.docs/reference/workspace/vercel-serverless.md +2 -4
  194. package/CHANGELOG.md +29 -0
  195. package/package.json +5 -5
  196. package/.docs/docs/agents/channels.md +0 -225
  197. package/.docs/docs/agents/file-based-agents.md +0 -297
  198. package/.docs/docs/memory/storage.md +0 -267
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **Beta:** The Goals feature is in beta stage and subject to breaking changes in minor versions until it graduates from its beta status.
8
8
 
9
- A goal is a durable, thread-scoped objective: a standing instruction the agent keeps working toward across loop iterations until a judge model decides it is satisfied or a run budget is exhausted. The objective is persisted in thread state, so it survives reloads and is evaluated in-loop — even when a new message arrives in the middle of an already-running turn.
9
+ A goal is a durable, thread-scoped objective: a standing instruction the agent keeps working toward across loop iterations until a judge model decides it's satisfied or a run budget is exhausted. The objective is persisted in thread state, so it survives reloads and is evaluated in-loop — even when a new message arrives in the middle of an already-running turn.
10
10
 
11
11
  Goals build on the same machinery as [`isTaskComplete`](https://mastra.ai/docs/agents/supervisor-agents): an LLM-as-judge scores the agent's output each iteration and gates the loop. The difference is that a goal is **durable** (stored in thread state, not passed per call) and is set and updated through `Agent` methods rather than per-`stream()` options.
12
12
 
@@ -22,7 +22,7 @@ For a one-off completion check within a single `stream()` call, use [`isTaskComp
22
22
 
23
23
  ## Quickstart
24
24
 
25
- Goals require a configured [storage](https://mastra.ai/docs/memory/storage) backend and a memory-backed thread. Add a `goal` config to the agent — a judge model is required for the goal to do anything — then set an objective for a thread:
25
+ Goals require a configured [storage](https://mastra.ai/docs/storage/overview) backend and a memory-backed thread. Add a `goal` config to the agent — a judge model is required for the goal to do anything — then set an objective for a thread:
26
26
 
27
27
  ```typescript
28
28
  import { Agent } from '@mastra/core/agent'
@@ -89,7 +89,7 @@ Each evaluation emits a typed `goal` stream chunk (`GoalEvaluationPayload`: `obj
89
89
 
90
90
  ## Managing the objective
91
91
 
92
- Control the objective for a thread with `Agent` methods. All of them no-op when the run is not memory-backed (they require storage and a `threadId`):
92
+ Control the objective for a thread with `Agent` methods. All of them no-op when the run isn't memory-backed (they require storage and a `threadId`):
93
93
 
94
94
  ```typescript
95
95
  // Read the current objective record.
@@ -103,12 +103,10 @@ await worker.updateObjectiveOptions({ threadId, maxRuns: 100 })
103
103
  await worker.clearObjective({ threadId })
104
104
  ```
105
105
 
106
- Per-objective values written by `setObjective` / `updateObjectiveOptions` take precedence over the agent's `goal` config, and that precedence is remembered in thread state.
107
-
108
- > **Note:** See the [`GoalEvaluationPayload` in the ChunkType reference](https://mastra.ai/reference/streaming/ChunkType) for the full goal chunk shape.
106
+ Per-objective values written by `setObjective` / `updateObjectiveOptions` take precedence over the agent's `goal` config, and that precedence is remembered in thread state. See the [`GoalEvaluationPayload` in the ChunkType reference](https://mastra.ai/reference/streaming/ChunkType) for the full goal chunk shape.
109
107
 
110
108
  ## Related
111
109
 
112
110
  - [Supervisor agents](https://mastra.ai/docs/agents/supervisor-agents) — `isTaskComplete` and the rubric scorer
113
111
  - [Signal providers](https://mastra.ai/docs/long-running-agents/signal-providers) — how the objective is projected into context
114
- - [Memory storage](https://mastra.ai/docs/memory/storage) — the storage backend goals require
112
+ - [Memory storage](https://mastra.ai/docs/storage/overview) — the storage backend goals require
@@ -10,7 +10,7 @@ A schedule runs an agent on a cron cadence. On each fire, Mastra sends a prompt
10
10
 
11
11
  Schedules are persisted, so they survive restarts and redeploys. Manage them at runtime through [`mastra.schedules`](https://mastra.ai/reference/schedules/overview), the canonical create, read, update, and delete (CRUD) surface. The same surface also manages [workflow schedules](https://mastra.ai/docs/workflows/scheduled-workflows) (pass `workflowId` instead of `agentId` to schedule a workflow).
12
12
 
13
- > **Note:** Schedules require a [storage](https://mastra.ai/docs/memory/storage) adapter that implements the schedules domain. See the [`mastra.schedules` reference](https://mastra.ai/reference/schedules/overview) for supported adapters and API behavior.
13
+ > **Note:** Schedules require a [storage](https://mastra.ai/docs/storage/overview) adapter that implements the schedules domain. See the [`mastra.schedules` reference](https://mastra.ai/reference/schedules/overview) for supported adapters and API behavior.
14
14
 
15
15
  ## Quickstart
16
16
 
@@ -157,9 +157,7 @@ export class CiSignals extends SignalProvider<'ci-signals'> {
157
157
  }
158
158
  ```
159
159
 
160
- `handleWebhook()` is a provider method, not an auto-mounted HTTP route. Invoke it from your own endpoint, passing the request body, headers, and any route params.
161
-
162
- > **Note:** Visit [`SignalProvider` reference](https://mastra.ai/reference/signals/signal-provider) for subscription, polling, lifecycle, and `notify()` details. For the complete notification payload shape, including deduplication and coalescing fields, visit [`Agent.sendNotificationSignal()` reference](https://mastra.ai/reference/agents/agent).
160
+ `handleWebhook()` is a provider method, not an auto-mounted HTTP route. Invoke it from your own endpoint, passing the request body, headers, and any route params. Visit [`SignalProvider` reference](https://mastra.ai/reference/signals/signal-provider) for subscription, polling, lifecycle, and `notify()` details. For the complete notification payload shape, including deduplication and coalescing fields, visit [`Agent.sendNotificationSignal()` reference](https://mastra.ai/reference/agents/agent).
163
161
 
164
162
  ## Built-in webhook provider
165
163
 
@@ -10,6 +10,8 @@ Signals are a way to interact with an agent through a thread. Instead of startin
10
10
 
11
11
  Use message APIs for user-authored input. Use `sendSignal()` for lower-level system context, such as background task notifications, policy reminders, or processor-generated context.
12
12
 
13
+ > **📹 Watch:** Watch [Mastra signals overview](https://www.youtube.com/watch?v=7It2y89TVP4) to see how signals wake and steer long-running agents.
14
+
13
15
  ## When to use signals
14
16
 
15
17
  Use signals when an agent thread needs new input or context outside the original `stream()` call. Signals are useful when users send follow-up messages while a run is active, when background systems need to add context to a thread, or when external events should wake, update, or notify the agent.
@@ -110,9 +112,7 @@ const result = agent.sendSignal(
110
112
  await result.persisted
111
113
  ```
112
114
 
113
- Pass `ifIdle.streamOptions` when the idle wake-up stream needs options such as model settings, tools, or runtime context.
114
-
115
- > **Note:** Visit [`Agent.sendSignal()` reference](https://mastra.ai/reference/agents/agent) for `ifActive`, `ifIdle`, branch attributes, and `streamOptions`.
115
+ Pass `ifIdle.streamOptions` when the idle wake-up stream needs options such as model settings, tools, or runtime context. Visit [`Agent.sendSignal()` reference](https://mastra.ai/reference/agents/agent) for `ifActive`, `ifIdle`, branch attributes, and `streamOptions`.
116
116
 
117
117
  ### Send notification context
118
118
 
@@ -197,9 +197,7 @@ Awaiting `sendSignal()` preserves stream echo ordering when a subscribed thread
197
197
 
198
198
  ### Conditional attributes
199
199
 
200
- Use `ifActive.attributes` and `ifIdle.attributes` to tag input with context that depends on whether the agent is active or idle at delivery time. Top-level `attributes` always apply, and Mastra merges the selected branch's `attributes` into them when the input is accepted.
201
-
202
- > **Note:** Visit [`Agent.sendMessage()` reference](https://mastra.ai/reference/agents/agent) and [`Agent.sendSignal()` reference](https://mastra.ai/reference/agents/agent) for branch-specific attributes.
200
+ Use `ifActive.attributes` and `ifIdle.attributes` to tag input with context that depends on whether the agent is active or idle at delivery time. Top-level `attributes` always apply, and Mastra merges the selected branch's `attributes` into them when the input is accepted. Visit [`Agent.sendMessage()` reference](https://mastra.ai/reference/agents/agent) and [`Agent.sendSignal()` reference](https://mastra.ai/reference/agents/agent) for branch-specific attributes.
203
201
 
204
202
  ## State and notification signals
205
203
 
@@ -274,9 +272,7 @@ Notification signals represent external events such as GitHub activity, email, S
274
272
 
275
273
  Notification delivery has two phases. During ingress, `agent.sendNotificationSignal()` stores a notification record and resolves the agent's delivery policy. During dispatch, Mastra consumes due records and emits full notification or summary signals.
276
274
 
277
- The default delivery policy is priority-aware. Urgent notifications deliver immediately, while lower-priority notifications may be batched into summaries or wait until the thread is idle.
278
-
279
- > **Note:** Visit [`Agent.sendNotificationSignal()` reference](https://mastra.ai/reference/agents/agent) for notification fields, [`Agent` constructor reference](https://mastra.ai/reference/agents/agent) for `notifications.deliveryPolicy` configuration, and [`createNotificationInboxTool()` reference](https://mastra.ai/reference/signals/create-notification-inbox-tool) for inbox tool actions.
275
+ The default delivery policy is priority-aware. Urgent notifications deliver immediately, while lower-priority notifications may be batched into summaries or wait until the thread is idle. Visit [`Agent.sendNotificationSignal()` reference](https://mastra.ai/reference/agents/agent) for notification fields, [`Agent` constructor reference](https://mastra.ai/reference/agents/agent) for `notifications.deliveryPolicy` configuration, and [`createNotificationInboxTool()` reference](https://mastra.ai/reference/signals/create-notification-inbox-tool) for inbox tool actions.
280
276
 
281
277
  ```typescript
282
278
  await agent.sendNotificationSignal(
@@ -312,15 +308,11 @@ Notification summaries tell the model that inbox records are waiting:
312
308
 
313
309
  When Mastra emits a summary, it clears `summaryAt` and sets `summarySignalId` on each summarized record. The records stay pending and readable. When Mastra emits a full notification, it sets `deliveredSignalId` and marks the record `delivered`. If the inbox tool reads a notification first, it can inject the full notification signal and mark the record `seen`, which prevents duplicate full delivery.
314
310
 
315
- Configure a delivery policy on the agent when some notifications should wait for a different dispatch window or summary rollup. Enable scheduled dispatch at the Mastra level when deferred notifications and summary rollups should be delivered automatically.
316
-
317
- > **Note:** Visit [`Agent` constructor reference](https://mastra.ai/reference/agents/agent) for `notifications.deliveryPolicy` and [`Mastra` class reference](https://mastra.ai/reference/core/mastra-class) for runtime notification dispatch configuration.
311
+ Configure a delivery policy on the agent when some notifications should wait for a different dispatch window or summary rollup. Enable scheduled dispatch at the Mastra level when deferred notifications and summary rollups should be delivered automatically. Visit [`Agent` constructor reference](https://mastra.ai/reference/agents/agent) for `notifications.deliveryPolicy` and [`Mastra` class reference](https://mastra.ai/reference/core/mastra-class) for runtime notification dispatch configuration.
318
312
 
319
313
  #### Notification inbox tool
320
314
 
321
- Use `createNotificationInboxTool()` to give agents one tool for inbox actions instead of many CRUD tools. Use `read` after a `<notification-summary>` signal when the agent needs the full records behind the summary. The notification contents are delivered as signals, not as normal tool output.
322
-
323
- > **Note:** Visit [`createNotificationInboxTool()` reference](https://mastra.ai/reference/signals/create-notification-inbox-tool) for the setup example, input schema, and action behavior.
315
+ Use `createNotificationInboxTool()` to give agents one tool for inbox actions instead of many CRUD tools. Use `read` after a `<notification-summary>` signal when the agent needs the full records behind the summary. The notification contents are delivered as signals, not as normal tool output. Visit [`createNotificationInboxTool()` reference](https://mastra.ai/reference/signals/create-notification-inbox-tool) for the setup example, input schema, and action behavior.
324
316
 
325
317
  `sendNotificationSignal()` requires a storage domain with `notifications` support. Use `sendSignal({ type: 'notification' })` only for lower-level notification-shaped context that should bypass inbox storage.
326
318
 
@@ -345,7 +337,7 @@ export const mastra = new Mastra({
345
337
  })
346
338
  ```
347
339
 
348
- `RedisStreamsPubSub` implements both the event delivery contract and distributed leasing, so a single backend handles cross-instance signal delivery and lease ownership. Vercel's one-click Redis integration and Upstash Redis both work well. For more on when a distributed pub/sub is needed, see the [PubSub guide](https://mastra.ai/docs/server/pubsub) and the [`RedisStreamsPubSub` reference](https://mastra.ai/reference/pubsub/redis-streams).
340
+ `RedisStreamsPubSub` implements both the event delivery contract and distributed leasing, so a single backend handles cross-instance signal delivery and lease ownership. Vercel's managed Redis integration and Upstash Redis both work well. For more on when a distributed pub/sub is needed, see the [PubSub guide](https://mastra.ai/docs/server/pubsub) and the [`RedisStreamsPubSub` reference](https://mastra.ai/reference/pubsub/redis-streams).
349
341
 
350
342
  ## Compatibility and APIs
351
343
 
@@ -356,15 +348,11 @@ Mastra still accepts legacy signal payloads such as `type: 'user-message'` and `
356
348
  - `type: 'user-message'`: Normalizes to `type: 'user'` and `tagName: 'user'`
357
349
  - `type: 'system-reminder'`: Normalizes to `type: 'reactive'` and `tagName: 'system-reminder'`
358
350
 
359
- Existing stored signal rows and older clients continue to load through the compatibility layer. New clients call the message routes when the server supports them; React's thread signal path falls back to the legacy `/signals` route when it detects an older server.
360
-
361
- > **Note:** Visit [Agent signals reference](https://mastra.ai/reference/agents/agent) for the full message, signal, and subscription types.
351
+ Existing stored signal rows and older clients continue to load through the compatibility layer. New clients call the message routes when the server supports them; React's thread signal path falls back to the legacy `/signals` route when it detects an older server. Visit [Agent signals reference](https://mastra.ai/reference/agents/agent) for the full message, signal, and subscription types.
362
352
 
363
353
  ### Approve tool calls
364
354
 
365
- When a subscribed run pauses for tool approval, approve or decline the tool call with the subscription-native methods. The resumed chunks arrive through the existing thread subscription.
366
-
367
- > **Note:** Visit [`client.getAgent().sendToolApproval()` reference](https://mastra.ai/reference/client-js/agents) and [server agent routes](https://mastra.ai/reference/server/routes) for request and response shapes.
355
+ When a subscribed run pauses for tool approval, approve or decline the tool call with the subscription-native methods. The resumed chunks arrive through the existing thread subscription. Visit [`client.getAgent().sendToolApproval()` reference](https://mastra.ai/reference/client-js/agents) and [server agent routes](https://mastra.ai/reference/server/routes) for request and response shapes.
368
356
 
369
357
  ### Use HTTP routes
370
358
 
@@ -430,4 +418,5 @@ Use heartbeats together with client-side reconnect logic. Heartbeats reduce idle
430
418
  - [Server agent routes](https://mastra.ai/reference/server/routes)
431
419
  - [`client.getAgent().subscribeToThread()`](https://mastra.ai/reference/client-js/agents)
432
420
  - [`client.getAgent().sendToolApproval()`](https://mastra.ai/reference/client-js/agents)
433
- - [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams)
421
+ - [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams)
422
+ - 📹 [Mastra signals workshop](https://www.youtube.com/watch?v=KLg6uFKz9aw\&t=3020s)
@@ -10,7 +10,7 @@ Use a hosted database when your project needs durable storage that's managed by
10
10
 
11
11
  - **Agent memory**: Persist conversation history, working memory, and semantic recall across sessions.
12
12
  - **Application data**: Store and retrieve relational or structured data your project needs at runtime.
13
- - **Vector search**: Store embeddings for retrieval-augmented generation and semantic search.
13
+ - **Vector search**: Store embeddings for Retrieval-Augmented Generation and semantic search.
14
14
 
15
15
  ## Providers
16
16
 
@@ -41,7 +41,7 @@ For most agent-focused projects, **Turso** is the simplest starting point. It pr
41
41
 
42
42
  5. Select **Attach database**. Provisioning runs in the background. The database starts in a `provisioning` state and moves to `ready` once the provider finishes setup. Connection details are injected into your project as server runtime environment variables automatically.
43
43
 
44
- > **Note:** Hosted databases are created from your platform project settings. There is currently no CLI or public API for provisioning them.
44
+ > **Note:** Hosted databases are created from your platform project settings. No CLI or public API currently provisions them.
45
45
 
46
46
  ## Connect from your code
47
47
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  The GitHub integration links a Mastra platform project to a GitHub repository. When you push changes to your repository Studio and Server will automatically be deployed.
6
6
 
7
- > **Note:** The integration only works with repositories hosted on GitHub.com. Self-hosted GitHub Enterprise instances are not currently supported.
7
+ > **Note:** The integration only works with repositories hosted on GitHub.com. Self-hosted GitHub Enterprise instances aren't currently supported.
8
8
 
9
9
  After a repository is linked, the platform:
10
10
 
@@ -128,4 +128,8 @@ yarn dlx mastra api trace list
128
128
  bun x mastra api trace list
129
129
  ```
130
130
 
131
- For observability commands, the CLI targets the hosted observability API and can infer credentials from your project environment. See the [`mastra api` CLI reference](https://mastra.ai/reference/cli/mastra) for available observability commands, filtering, pagination, credential resolution, and direct `curl` examples.
131
+ For observability commands, the CLI targets the hosted observability API and can infer credentials from your project environment. See the [`mastra api` CLI reference](https://mastra.ai/reference/cli/mastra) for available observability commands, filtering, pagination, credential resolution, and direct `curl` examples.
132
+
133
+ ## Related
134
+
135
+ - 📹 [Mastra observability and Studio workshop](https://www.youtube.com/watch?v=dKO_a3RPra0)
@@ -81,7 +81,7 @@ calculatorTool._meta = {
81
81
  }
82
82
  ```
83
83
 
84
- > **Note:** Visit [MCPServer reference](https://mastra.ai/reference/tools/mcp-server) for the full `appResources` configuration.
84
+ Visit [MCPServer reference](https://mastra.ai/reference/tools/mcp-server) for the full `appResources` configuration.
85
85
 
86
86
  ## Connecting MCP Apps to agents
87
87
 
@@ -249,7 +249,7 @@ Establishes the connection to the host. Call this after registering all event ha
249
249
  await app.connect()
250
250
  ```
251
251
 
252
- > **Note:** See the [`App` class API reference](https://apps.extensions.modelcontextprotocol.io/api/classes/app.App.html) for the full list of methods, callbacks, and lifecycle hooks.
252
+ See the [`App` class API reference](https://apps.extensions.modelcontextprotocol.io/api/classes/app.App.html) for the full list of methods, callbacks, and lifecycle hooks.
253
253
 
254
254
  ## Using external MCP servers with apps
255
255
 
@@ -284,7 +284,7 @@ export const mastra = new Mastra({
284
284
  })
285
285
  ```
286
286
 
287
- > **Note:** Visit [MCPClient reference](https://mastra.ai/reference/tools/mcp-client) for more details on proxying external servers.
287
+ Visit [MCPClient reference](https://mastra.ai/reference/tools/mcp-client) for more details on proxying external servers.
288
288
 
289
289
  ## Sandbox security
290
290
 
@@ -62,7 +62,7 @@ export const testMcpClient = new MCPClient({
62
62
  })
63
63
  ```
64
64
 
65
- > **Info:** Visit [MCPClient](https://mastra.ai/reference/tools/mcp-client) for a full list of configuration options.
65
+ Visit [MCPClient](https://mastra.ai/reference/tools/mcp-client) for a full list of configuration options.
66
66
 
67
67
  > **Authentication:** For connecting to OAuth-protected MCP servers, see the [OAuth Authentication](https://mastra.ai/reference/tools/mcp-client) section.
68
68
 
@@ -89,7 +89,7 @@ export const testAgent = new Agent({
89
89
  })
90
90
  ```
91
91
 
92
- > **Info:** Visit [Agent Class](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
92
+ Visit [Agent Class](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
93
93
 
94
94
  ## Tool approval
95
95
 
@@ -129,7 +129,7 @@ export const testMcpServer = new MCPServer({
129
129
  })
130
130
  ```
131
131
 
132
- > **Info:** Visit [MCPServer](https://mastra.ai/reference/tools/mcp-server) for a full list of configuration options.
132
+ Visit [MCPServer](https://mastra.ai/reference/tools/mcp-server) for a full list of configuration options.
133
133
 
134
134
  > **Authentication:** To protect your MCP server with OAuth, see the [OAuth Protection](https://mastra.ai/reference/tools/mcp-server) section.
135
135
 
@@ -160,9 +160,7 @@ export const mastra = new Mastra({
160
160
 
161
161
  ### Static tools
162
162
 
163
- Use the `.listTools()` method to fetch tools from all configured MCP servers. This is suitable when configuration (such as API keys) is static and consistent across users or requests. Call it once and pass the result to the `tools` property when defining your agent.
164
-
165
- > **Info:** Visit [listTools()](https://mastra.ai/reference/tools/mcp-client) for more information.
163
+ Use the `.listTools()` method to fetch tools from all configured MCP servers. This is suitable when configuration (such as API keys) is static and consistent across users or requests. Call it once and pass the result to the `tools` property when defining your agent. Visit [listTools()](https://mastra.ai/reference/tools/mcp-client) for more information.
166
164
 
167
165
  ```typescript
168
166
  import { Agent } from '@mastra/core/agent'
@@ -211,7 +209,7 @@ async function handleRequest(userPrompt: string, userApiKey: string) {
211
209
  }
212
210
  ```
213
211
 
214
- > **Info:** Visit [listToolsets()](https://mastra.ai/reference/tools/mcp-client) for more information.
212
+ Visit [listToolsets()](https://mastra.ai/reference/tools/mcp-client) for more information.
215
213
 
216
214
  ## Connecting to an MCP registry
217
215
 
@@ -412,9 +410,7 @@ As an alternative to MCP, Ampersand's AI SDK also has an adapter for Mastra, so
412
410
 
413
411
  ## MCP Apps
414
412
 
415
- MCP servers can serve interactive HTML UIs via the MCP Apps extension. Tools with associated `ui://` resources render sandboxed iframes in Studio — both on tool detail pages and inline in agent chat. The app iframe can call server tools and inject messages into the conversation.
416
-
417
- > **Note:** Visit [MCP Apps](https://mastra.ai/docs/mcp/mcp-apps) for setup instructions and the app bridge API.
413
+ MCP servers can serve interactive HTML UIs via the MCP Apps extension. Tools with associated `ui://` resources render sandboxed iframes in Studio — both on tool detail pages and inline in agent chat. The app iframe can call server tools and inject messages into the conversation. Visit [MCP Apps](https://mastra.ai/docs/mcp/mcp-apps) for setup instructions and the app bridge API.
418
414
 
419
415
  ## Related
420
416
 
@@ -309,6 +309,73 @@ const agent = new Agent({
309
309
 
310
310
  Both scenarios are safe - guardrails prevent inappropriate content from being persisted to memory
311
311
 
312
+ ## Handling large attachments
313
+
314
+ Some storage providers enforce record size limits that base64-encoded file attachments can exceed:
315
+
316
+ | Provider | Record size limit |
317
+ | ------------------------------------------------------------------ | ----------------- |
318
+ | [DynamoDB](https://mastra.ai/reference/storage/dynamodb) | 400 KB |
319
+ | [Convex](https://mastra.ai/reference/storage/convex) | 1 MiB |
320
+ | [Cloudflare D1](https://mastra.ai/reference/storage/cloudflare-d1) | 1 MiB |
321
+
322
+ PostgreSQL, MongoDB, and libSQL have higher limits and are usually unaffected.
323
+
324
+ Use an input processor to upload attachments to external storage, then replace them with URL references before messages are persisted.
325
+
326
+ ```typescript
327
+ import type { Processor } from '@mastra/core/processors'
328
+ import type { MastraDBMessage } from '@mastra/core/memory'
329
+
330
+ export class AttachmentUploader implements Processor {
331
+ id = 'attachment-uploader'
332
+
333
+ async processInput({ messages }: { messages: MastraDBMessage[] }) {
334
+ return Promise.all(messages.map(message => this.processMessage(message)))
335
+ }
336
+
337
+ async processMessage(message: MastraDBMessage) {
338
+ const attachments = message.content.experimental_attachments
339
+ if (!attachments?.length) return message
340
+
341
+ const uploaded = await Promise.all(
342
+ attachments.map(async attachment => {
343
+ if (!attachment.url?.startsWith('data:')) return attachment
344
+
345
+ const url = await this.upload(attachment.url, attachment.contentType)
346
+ return { ...attachment, url }
347
+ }),
348
+ )
349
+
350
+ return { ...message, content: { ...message.content, experimental_attachments: uploaded } }
351
+ }
352
+
353
+ async upload(dataUri: string, contentType?: string): Promise<string> {
354
+ const base64 = dataUri.split(',')[1]
355
+ const buffer = Buffer.from(base64, 'base64')
356
+
357
+ throw new Error('Implement upload() with your storage provider')
358
+ }
359
+ }
360
+ ```
361
+
362
+ Use the processor with your agent:
363
+
364
+ ```typescript
365
+ import { Agent } from '@mastra/core/agent'
366
+ import { Memory } from '@mastra/memory'
367
+ import { AttachmentUploader } from '../processors/attachment-uploader'
368
+
369
+ export const supportAgent = new Agent({
370
+ id: 'support-agent',
371
+ name: 'Support agent',
372
+ instructions: 'Answer customer support questions.',
373
+ model: 'openai/gpt-5.5',
374
+ memory: new Memory({ lastMessages: 10 }),
375
+ inputProcessors: [new AttachmentUploader()],
376
+ })
377
+ ```
378
+
312
379
  ## Related documentation
313
380
 
314
381
  - [Processors](https://mastra.ai/docs/agents/processors): General processor concepts and custom processor creation
@@ -6,7 +6,7 @@ Message history is the most basic and important form of memory. It gives the LLM
6
6
 
7
7
  You can also retrieve message history to display past conversations in your UI.
8
8
 
9
- > **Info:** Each message belongs to a thread (the conversation) and a resource (the user or entity it's associated with). See [Threads and resources](https://mastra.ai/docs/memory/storage) for more detail.
9
+ > **Info:** Each message belongs to a thread (the conversation) and a resource (the user or entity it's associated with). See [Threads and resources](#threads-and-resources) for more detail.
10
10
 
11
11
  > **Warning:** When you use memory with a client application, send **only the new message** from the client instead of the full conversation history.
12
12
  >
@@ -14,9 +14,18 @@ You can also retrieve message history to display past conversations in your UI.
14
14
  >
15
15
  > For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/guides/build-your-ui/ai-sdk-ui).
16
16
 
17
+ ## Threads and resources
18
+
19
+ Mastra organizes conversations using two identifiers:
20
+
21
+ - **Thread**: A conversation session containing a sequence of messages.
22
+ - **Resource**: The entity that owns the thread, such as a user, organization, project, or another domain entity in your application.
23
+
24
+ Studio automatically generates a thread and resource ID for you. When calling `stream()` or `generate()` yourself, provide these identifiers explicitly.
25
+
17
26
  ## Getting started
18
27
 
19
- Install the Mastra memory module along with a [storage adapter](https://mastra.ai/docs/memory/storage) for your database. The examples below use `@mastra/libsql`, which stores data locally in a `mastra.db` file.
28
+ Install the Mastra memory module along with a [storage adapter](https://mastra.ai/docs/storage/overview) for your database. The examples below use `@mastra/libsql`, which stores data locally in a `mastra.db` file.
20
29
 
21
30
  **npm**:
22
31
 
@@ -113,6 +122,51 @@ You can use this history in two ways:
113
122
 
114
123
  > **Tip:** When memory is enabled, [Studio](https://mastra.ai/docs/studio/overview) uses message history to display past conversations in the chat sidebar.
115
124
 
125
+ ## Thread title generation
126
+
127
+ Mastra can automatically generate descriptive thread titles based on the user's first message when `generateTitle` is enabled. Use this option when you build a chat interface that renders conversation titles in a thread list or sidebar.
128
+
129
+ ```typescript
130
+ import { Agent } from '@mastra/core/agent'
131
+ import { Memory } from '@mastra/memory'
132
+
133
+ export const supportAgent = new Agent({
134
+ id: 'support-agent',
135
+ name: 'Support agent',
136
+ instructions: 'Answer customer support questions.',
137
+ model: 'openai/gpt-5.5',
138
+ memory: new Memory({
139
+ options: {
140
+ generateTitle: true,
141
+ },
142
+ }),
143
+ })
144
+ ```
145
+
146
+ Title generation runs asynchronously after the agent responds and doesn't affect response time.
147
+
148
+ To optimize cost or behavior, provide a smaller [`model`](https://mastra.ai/models) and custom `instructions`:
149
+
150
+ ```typescript
151
+ import { Agent } from '@mastra/core/agent'
152
+ import { Memory } from '@mastra/memory'
153
+
154
+ export const supportAgent = new Agent({
155
+ id: 'support-agent',
156
+ name: 'Support agent',
157
+ instructions: 'Answer customer support questions.',
158
+ model: 'openai/gpt-5.5',
159
+ memory: new Memory({
160
+ options: {
161
+ generateTitle: {
162
+ model: 'openai/gpt-5-mini',
163
+ instructions: 'Generate a one-word title.',
164
+ },
165
+ },
166
+ }),
167
+ })
168
+ ```
169
+
116
170
  ## Accessing memory
117
171
 
118
172
  To access memory functions for querying, cloning, or deleting threads and messages, call `getMemory()` on an agent:
@@ -217,7 +217,7 @@ new Extractor({
217
217
  })
218
218
  ```
219
219
 
220
- By default, OM shows the last extracted value to the extractor on later runs. Set `includePreviousExtraction: false` when the Observer should not see the previous value.
220
+ By default, OM shows the last extracted value to the extractor on later runs. Set `includePreviousExtraction: false` when the Observer shouldn't see the previous value.
221
221
 
222
222
  ```typescript
223
223
  new Extractor({
@@ -263,7 +263,7 @@ const memory = new Memory({
263
263
 
264
264
  This setting adds `WorkingMemoryExtractor`, defaults `workingMemory.agentManaged` to `false`, and defaults `workingMemory.useStateSignals` to `true`. Set `workingMemory.agentManaged: true` if the main agent should still receive working memory tool and instruction injection.
265
265
 
266
- Use `onExtracted` to normalize or react to custom extracted values before they are persisted:
266
+ Use `onExtracted` to normalize or react to custom extracted values before they're persisted:
267
267
 
268
268
  ```typescript
269
269
  new Extractor({
@@ -280,7 +280,7 @@ new Extractor({
280
280
  })
281
281
  ```
282
282
 
283
- Extractor failures are reported in OM markers and do not block other successful extractor values. See [the API reference](https://mastra.ai/reference/memory/observational-memory) for the full `Extractor` shape.
283
+ Extractor failures are reported in OM markers and don't block other successful extractor values. See [the API reference](https://mastra.ai/reference/memory/observational-memory) for the full `Extractor` shape.
284
284
 
285
285
  If your Observer model is text-only or its API rejects multimodal input, set `observation.observeAttachments` to `false` to drop attachments before they reach the Observer. The readable placeholders (`[Image #1: ...]`, `[File #1: ...]`) are kept in the transcript so the Observer can still reason about what was shared without receiving the binary payload. The same filter applies to tool results that contain image or file parts:
286
286
 
@@ -714,4 +714,5 @@ In practical terms, OM replaces both working memory and message history, and has
714
714
  - [Memory Overview](https://mastra.ai/docs/memory/overview)
715
715
  - [Message History](https://mastra.ai/docs/memory/message-history)
716
716
  - [Memory Processors](https://mastra.ai/docs/memory/memory-processors)
717
- - [Mastra Code](https://code.mastra.ai/): A coding agent using Observational Memory
717
+ - [Mastra Code](https://code.mastra.ai/): A coding agent using Observational Memory
718
+ - 📹 [Mastra processors and Observational Memory workshop](https://www.youtube.com/watch?v=4Vpp7xQYvl0)
@@ -13,7 +13,9 @@ Mastra agents can be configured to store [message history](https://mastra.ai/doc
13
13
 
14
14
  If the combined memory exceeds the model's context limit, [memory processors](https://mastra.ai/docs/memory/memory-processors) can filter, trim, or prioritize content so the most relevant information is preserved.
15
15
 
16
- Memory results will be stored in one or more of your configured [storage providers](https://mastra.ai/docs/memory/storage).
16
+ Memory results will be stored in one or more of your configured [storage providers](https://mastra.ai/docs/storage/overview).
17
+
18
+ > **📹 Watch:** Watch [Mastra memory concepts](https://www.youtube.com/watch?v=18iIHQtIPmc) for a conceptual overview of the memory layers agents can use.
17
19
 
18
20
  ## When to use memory
19
21
 
@@ -75,7 +77,7 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
75
77
  bun add @mastra/libsql@latest
76
78
  ```
77
79
 
78
- > **Note:** For more details on available providers and how storage works in Mastra, visit the [storage](https://mastra.ai/docs/memory/storage) documentation.
80
+ For more details on available providers and how storage works in Mastra, visit the [storage](https://mastra.ai/docs/storage/overview) documentation.
79
81
 
80
82
  3. Add the storage provider to your main Mastra instance to enable memory across all configured agents.
81
83
 
@@ -108,7 +110,7 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
108
110
  })
109
111
  ```
110
112
 
111
- > **Note:** Visit [Memory Class](https://mastra.ai/reference/memory/memory-class) for a full list of configuration options.
113
+ Visit [Memory Class](https://mastra.ai/reference/memory/memory-class) for a full list of configuration options.
112
114
 
113
115
  5. Call your agent, for example in [Studio](https://mastra.ai/docs/studio/overview). Inside Studio, start a new chat with your agent and take a look at the right sidebar. It'll now display various memory-related information.
114
116
 
@@ -164,7 +166,7 @@ export const memoryAgent = new Agent({
164
166
  })
165
167
  ```
166
168
 
167
- > **Note:** See [Observational Memory](https://mastra.ai/docs/memory/observational-memory) for details on how observations and reflections work, and [the reference](https://mastra.ai/reference/memory/observational-memory) for all configuration options.
169
+ See [Observational Memory](https://mastra.ai/docs/memory/observational-memory) for details on how observations and reflections work, and [the reference](https://mastra.ai/reference/memory/observational-memory) for all configuration options.
168
170
 
169
171
  ## Memory in multi-agent systems
170
172
 
@@ -178,7 +180,7 @@ Each delegation creates a fresh `threadId` and a deterministic `resourceId` for
178
180
  - **Resource ID**: Derived as `{parentResourceId}-{agentName}`. Because the resource ID is stable across delegations, resource-scoped memory persists between calls. A subagent remembers facts from previous delegations by the same user.
179
181
  - **Memory instance**: If a subagent has no memory configured, it inherits the supervisor's `Memory` instance, including all of its options. If the subagent defines its own, that takes precedence.
180
182
 
181
- > **Note:** Title generation (`generateTitle`) is a top-level thread concern and is **not** applied to inherited subagent threads. Because each delegation creates an ephemeral thread that no one sees, running title generation for it would waste an LLM call per delegation. To generate titles for a subagent's own threads, give that subagent its own memory configuration.
183
+ > **Note:** Title generation (`generateTitle`) is a top-level thread concern and **isn't** applied to inherited subagent threads. Because each delegation creates an ephemeral thread that no one sees, running title generation for it would waste an LLM call per delegation. To generate titles for a subagent's own threads, give that subagent its own memory configuration.
182
184
 
183
185
  The supervisor forwards its conversation context to the subagent so it has enough background to complete the task. Only the delegation prompt and the subagent's response are saved — the full parent conversation isn't stored. You can control which messages reach the subagent with the [`messageFilter`](https://mastra.ai/docs/agents/supervisor-agents) callback.
184
186
 
@@ -236,7 +238,7 @@ export const memoryAgent = new Agent({
236
238
  })
237
239
  ```
238
240
 
239
- > **Note:** Visit [Request Context](https://mastra.ai/docs/server/request-context) for more information.
241
+ Visit [Request Context](https://mastra.ai/docs/server/request-context) for more information.
240
242
 
241
243
  ## Related
242
244
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  If you ask your friend what they did last weekend, they will search in their memory for events associated with "last weekend" and then tell you what they did. That's sort of like how semantic recall works in Mastra.
6
6
 
7
- > **Watch 📹:** What semantic recall is, how it works, and how to configure it in Mastra [YouTube (5 minutes)](https://youtu.be/UVZtK8cK8xQ)
7
+ > **📹 Watch:** Watch [Mastra semantic recall](https://www.youtube.com/watch?v=UVZtK8cK8xQ\&pp=ygUVbWFzdHJhIHdvcmtpbmcgbWVtb3J5) to see how agents retrieve relevant messages from past conversations.
8
8
 
9
9
  ## How semantic recall works
10
10
 
@@ -22,6 +22,8 @@ After getting a response from the LLM, all new messages (user, assistant, and to
22
22
 
23
23
  Semantic recall is disabled by default. To enable it, set `semanticRecall: true` in `options` and provide a `vector` store and `embedder`:
24
24
 
25
+ **LibSQL**:
26
+
25
27
  ```typescript
26
28
  import { Agent } from '@mastra/core/agent'
27
29
  import { Memory } from '@mastra/memory'
@@ -50,6 +52,38 @@ const agent = new Agent({
50
52
  })
51
53
  ```
52
54
 
55
+ **MongoDB**:
56
+
57
+ ```typescript
58
+ import { Agent } from '@mastra/core/agent'
59
+ import { Memory } from '@mastra/memory'
60
+ import { MongoDBStore, MongoDBVector } from '@mastra/mongodb'
61
+ import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
62
+
63
+ const agent = new Agent({
64
+ id: 'support-agent',
65
+ name: 'SupportAgent',
66
+ instructions: 'You are a helpful support agent.',
67
+ model: 'openai/gpt-5.5',
68
+ memory: new Memory({
69
+ storage: new MongoDBStore({
70
+ id: 'agent-storage',
71
+ uri: process.env.MONGODB_URI,
72
+ dbName: process.env.MONGODB_DB_NAME,
73
+ }),
74
+ vector: new MongoDBVector({
75
+ id: 'agent-vector',
76
+ uri: process.env.MONGODB_URI,
77
+ dbName: process.env.MONGODB_DB_NAME,
78
+ }),
79
+ embedder: new ModelRouterEmbeddingModel('openai/text-embedding-3-small'),
80
+ options: {
81
+ semanticRecall: true,
82
+ },
83
+ }),
84
+ })
85
+ ```
86
+
53
87
  ## Using the `recall()` method
54
88
 
55
89
  While `listMessages` retrieves messages by thread ID with basic pagination, [`recall()`](https://mastra.ai/reference/memory/recall) adds support for **semantic search**. When you need to find messages by meaning rather than recency, use `recall()` with a `vectorSearchString`:
@@ -146,7 +180,7 @@ const agent = new Agent({
146
180
  })
147
181
  ```
148
182
 
149
- > **Note:** `scope: 'resource'` is supported by the LibSQL, PostgreSQL, and Upstash storage adapters.
183
+ > **Note:** `scope: 'resource'` is supported by the LibSQL, PostgreSQL, MongoDB, and Upstash storage adapters.
150
184
 
151
185
  ### Metadata filtering
152
186
 
@@ -10,6 +10,8 @@ This is useful for maintaining ongoing state that's always relevant and should a
10
10
 
11
11
  If you use [Observational Memory](https://mastra.ai/docs/memory/observational-memory), `observationalMemory.observation.manageWorkingMemory` lets OM update working memory for the agent.
12
12
 
13
+ > **📹 Watch:** Watch [Mastra working memory](https://www.youtube.com/watch?v=UMy_JHLf1n8\&pp=ygUVbWFzdHJhIHdvcmtpbmcgbWVtb3J5) to see how agents keep persistent user context available across interactions.
14
+
13
15
  Working memory can persist at two different scopes:
14
16
 
15
17
  - **Resource-scoped** (default): Memory persists across all conversation threads for the same user
@@ -43,9 +45,7 @@ const agent = new Agent({
43
45
 
44
46
  ## How it works
45
47
 
46
- Working memory is a block of Markdown text that the agent is able to update over time to store continuously relevant information:
47
-
48
- [YouTube video player](https://www.youtube-nocookie.com/embed/UMy_JHLf1n8)
48
+ Working memory is a block of Markdown text that the agent is able to update over time to store continuously relevant information.
49
49
 
50
50
  ## Memory persistence scopes
51
51
 
@@ -126,9 +126,7 @@ If you prefer, rely entirely on environment variables:
126
126
  new MastraPlatformExporter()
127
127
  ```
128
128
 
129
- With `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `MastraPlatformExporter` sends data to the Mastra platform project you configured. If you also set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`, it sends data to that collector instead.
130
-
131
- > **Note:** Visit [MastraPlatformExporter reference](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter) for the full list of configuration options.
129
+ With `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `MastraPlatformExporter` sends data to the Mastra platform project you configured. If you also set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`, it sends data to that collector instead. Visit [MastraPlatformExporter reference](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter) for the full list of configuration options.
132
130
 
133
131
  ## Recommended configuration
134
132