@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
@@ -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
 
@@ -243,4 +243,4 @@ new MastraStorageExporter({
243
243
  - [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview)
244
244
  - [MastraPlatformExporter](https://mastra.ai/docs/observability/integrations/exporters/mastra-platform)
245
245
  - [Composite Storage](https://mastra.ai/reference/storage/composite): Combine multiple storage providers
246
- - [Storage Configuration](https://mastra.ai/docs/memory/storage)
246
+ - [Storage Configuration](https://mastra.ai/docs/storage/overview)
@@ -22,7 +22,7 @@ export const mastra = new Mastra({
22
22
  })
23
23
  ```
24
24
 
25
- > **Info:** Visit [PinoLogger](https://mastra.ai/reference/logging/pino-logger) for all available configuration options.
25
+ Visit [PinoLogger](https://mastra.ai/reference/logging/pino-logger) for all available configuration options.
26
26
 
27
27
  ## Logging to observability storage
28
28
 
@@ -325,7 +325,7 @@ const result = await agent.generate([{ role: 'user', content: 'Sensitive operati
325
325
  })
326
326
  ```
327
327
 
328
- > **Tip:** For more granular control over sensitive data, consider using the [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter) processor, which can redact specific fields (like passwords, tokens, and keys) while preserving the rest of the input/output.
328
+ For more granular control over sensitive data, consider using the [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter) processor, which can redact specific fields (like passwords, tokens, and keys) while preserving the rest of the input/output.
329
329
 
330
330
  #### Child spans and metadata extraction
331
331
 
@@ -14,7 +14,7 @@ import { MongoDBVector } from '@mastra/mongodb'
14
14
  const store = new MongoDBVector({
15
15
  id: 'mongodb-vector',
16
16
  uri: process.env.MONGODB_URI,
17
- dbName: process.env.MONGODB_DATABASE,
17
+ dbName: process.env.MONGODB_DB_NAME,
18
18
  })
19
19
  await store.createIndex({
20
20
  indexName: 'myCollection',
@@ -27,10 +27,14 @@ await store.upsert({
27
27
  })
28
28
  ```
29
29
 
30
- ### Using MongoDB Atlas Vector search
30
+ ### Using MongoDB Atlas Vector Search
31
31
 
32
32
  For detailed setup instructions and best practices, see the [official MongoDB Atlas Vector Search documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/?utm_campaign=devrel\&utm_source=third-party-content\&utm_medium=cta\&utm_content=mastra-docs).
33
33
 
34
+ ### Using VoyageAI with MongoDB
35
+
36
+ MongoDB works seamlessly with VoyageAI's embedding models, which are optimized for retrieval tasks. For complete examples and specialized models, see the [VoyageAI embeddings documentation](https://mastra.ai/models/embeddings) and [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb).
37
+
34
38
  **PgVector**:
35
39
 
36
40
  ```ts
@@ -359,6 +363,7 @@ The dimension size must match the output dimension of your chosen embedding mode
359
363
 
360
364
  - `OpenAI text-embedding-3-small`: 1536 dimensions (or custom, e.g., 256)
361
365
  - `Cohere embed-multilingual-v3`: 1024 dimensions
366
+ - `VoyageAI voyage-3.5`: 1024 dimensions (or custom: 256, 512, 1024, 2048)
362
367
  - `Google gemini-embedding-001`: 768 dimensions (or custom)
363
368
 
364
369
  > **Warning:** Index dimensions can't be changed after creation. To use a different model, delete and recreate the index with the new dimension size.
@@ -105,7 +105,7 @@ const auth0Provider = new MastraAuthAuth0({
105
105
  })
106
106
  ```
107
107
 
108
- > **Info:** Visit [MastraAuthAuth0](https://mastra.ai/reference/auth/auth0) for all available configuration options.
108
+ Visit [MastraAuthAuth0](https://mastra.ai/reference/auth/auth0) for all available configuration options.
109
109
 
110
110
  ## Client-side setup
111
111
 
@@ -87,7 +87,7 @@ export const mastra = new Mastra({
87
87
  })
88
88
  ```
89
89
 
90
- > **Info:** Visit [MastraAuthBetterAuth](https://mastra.ai/reference/auth/better-auth) for all available configuration options.
90
+ Visit [MastraAuthBetterAuth](https://mastra.ai/reference/auth/better-auth) for all available configuration options.
91
91
 
92
92
  ## Custom authorization
93
93
 
@@ -180,7 +180,7 @@ export const mastraClient = new MastraClient({
180
180
  })
181
181
  ```
182
182
 
183
- > **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
183
+ Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
184
184
 
185
185
  ### Making authenticated requests
186
186
 
@@ -88,7 +88,7 @@ export const useClerkAuth = () => {
88
88
  }
89
89
  ```
90
90
 
91
- > **Info:** Refer to the [Clerk documentation](https://clerk.com/docs) for more information.
91
+ Refer to the [Clerk documentation](https://clerk.com/docs) for more information.
92
92
 
93
93
  ## Configuring `MastraClient`
94
94
 
@@ -118,7 +118,7 @@ const firebaseAuth = new MastraAuthFirebase({
118
118
  })
119
119
  ```
120
120
 
121
- > **Info:** Visit [MastraAuthFirebase](https://mastra.ai/reference/auth/firebase) for all available configuration options.
121
+ Visit [MastraAuthFirebase](https://mastra.ai/reference/auth/firebase) for all available configuration options.
122
122
 
123
123
  ## Client-side setup
124
124
 
@@ -168,7 +168,7 @@ export const mastra = new Mastra({
168
168
  })
169
169
  ```
170
170
 
171
- > **Info:** Visit [MastraAuthGoogle](https://mastra.ai/reference/auth/google) for all available configuration options.
171
+ Visit [MastraAuthGoogle](https://mastra.ai/reference/auth/google) for all available configuration options.
172
172
 
173
173
  ## Role mapping
174
174
 
@@ -242,7 +242,7 @@ export const createMastraClient = (idToken: string) => {
242
242
  }
243
243
  ```
244
244
 
245
- > **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
245
+ Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
246
246
 
247
247
  ### Making authenticated requests
248
248
 
@@ -273,7 +273,7 @@ curl -X POST http://localhost:4111/api/agents/weatherAgent/generate \
273
273
  - **Workspace users are rejected**: Verify `GOOGLE_ALLOWED_DOMAINS` matches the Google ID token `hd` claim.
274
274
  - **Consumer Gmail accounts are rejected**: This is expected when `allowedDomains` is configured because Gmail accounts don't have a Workspace `hd` claim.
275
275
  - **RBAC returns default permissions**: No roles were resolved for the user. Verify the user email or custom `getUserKey`, Google group membership, and `roleMapping`. If the Directory API lookup fails, the provider throws an error instead of returning `_default`.
276
- - **Cookies are not sent cross-origin**: Set `credentials: "include"` in `MastraClient` and configure `server.cors` with your frontend origin and `credentials: true`.
276
+ - **Cookies aren't sent cross-origin**: Set `credentials: "include"` in `MastraClient` and configure `server.cors` with your frontend origin and `credentials: true`.
277
277
  - **Session lost on restart**: Set `GOOGLE_COOKIE_PASSWORD` to a stable value of at least 32 characters. Without it, an auto-generated key is used in development and changes on each restart.
278
278
 
279
279
  ## Related
@@ -61,7 +61,7 @@ export const mastra = new Mastra({
61
61
  })
62
62
  ```
63
63
 
64
- > **Info:** Visit [MastraJwtAuth](https://mastra.ai/reference/auth/jwt) for all available configuration options.
64
+ Visit [MastraJwtAuth](https://mastra.ai/reference/auth/jwt) for all available configuration options.
65
65
 
66
66
  Inside [Studio](https://mastra.ai/docs/studio/overview), go to **Settings** and under **Headers** select the **"Add Header"** button. Enter `Authorization` as the header name and `Bearer <your-jwt>` as the value.
67
67
 
@@ -80,7 +80,7 @@ export const mastraClient = new MastraClient({
80
80
  })
81
81
  ```
82
82
 
83
- > **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
83
+ Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
84
84
 
85
85
  ### Making authenticated requests
86
86
 
@@ -120,7 +120,7 @@ export const mastra = new Mastra({
120
120
 
121
121
  > **Note:** To link users between providers, store the Okta user ID in the other provider's user metadata. Mastra uses this ID to fetch groups from Okta.
122
122
 
123
- > **Info:** Visit [MastraAuthOkta](https://mastra.ai/reference/auth/okta) for all available configuration options.
123
+ Visit [MastraAuthOkta](https://mastra.ai/reference/auth/okta) for all available configuration options.
124
124
 
125
125
  ## Role mapping
126
126
 
@@ -194,7 +194,7 @@ export const createMastraClient = (accessToken: string) => {
194
194
  }
195
195
  ```
196
196
 
197
- > **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
197
+ Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
198
198
 
199
199
  ### Making authenticated requests
200
200
 
@@ -149,7 +149,7 @@ const workosAuth = new AdminOnlyWorkosAuth({
149
149
  })
150
150
  ```
151
151
 
152
- > **Info:** Visit [MastraAuthWorkos](https://mastra.ai/reference/auth/workos) for all available configuration options.
152
+ Visit [MastraAuthWorkos](https://mastra.ai/reference/auth/workos) for all available configuration options.
153
153
 
154
154
  ## Client-side setup
155
155
 
@@ -134,7 +134,7 @@ export const mastraClient = new MastraClient({
134
134
  })
135
135
  ```
136
136
 
137
- > **Info:** Visit [MastraClient](https://mastra.ai/reference/client-js/mastra-client) for more configuration options.
137
+ Visit [MastraClient](https://mastra.ai/reference/client-js/mastra-client) for more configuration options.
138
138
 
139
139
  ## Credentials and session cookies
140
140
 
@@ -32,7 +32,7 @@ export const mastra = new Mastra({
32
32
  })
33
33
  ```
34
34
 
35
- > **Info:** Visit the [configuration reference](https://mastra.ai/reference/configuration) for a full list of available server options.
35
+ Visit the [configuration reference](https://mastra.ai/reference/configuration) for a full list of available server options.
36
36
 
37
37
  ## Deploy your server
38
38
 
@@ -116,7 +116,7 @@ export const mastra = new Mastra({
116
116
  })
117
117
  ```
118
118
 
119
- > **Note:** Visit the [PubSub reference](https://mastra.ai/reference/pubsub/base) for the full delivery contract and the configuration options for each backend.
119
+ Visit the [PubSub reference](https://mastra.ai/reference/pubsub/base) for the full delivery contract and the configuration options for each backend.
120
120
 
121
121
  ## Related
122
122
 
@@ -82,7 +82,7 @@ export const mastra = new Mastra({
82
82
  })
83
83
  ```
84
84
 
85
- > **Info:** Visit [Middleware](https://mastra.ai/docs/server/middleware) for how to use server middleware.
85
+ Visit [Middleware](https://mastra.ai/docs/server/middleware) for how to use server middleware.
86
86
 
87
87
  ## Studio
88
88
 
@@ -188,7 +188,7 @@ export const registryAgent = new Agent({
188
188
  })
189
189
  ```
190
190
 
191
- > **Info:** Visit [Agent](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
191
+ Visit [Agent](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
192
192
 
193
193
  ## Accessing values from workflow steps
194
194
 
@@ -210,7 +210,7 @@ const stepOne = createStep({
210
210
  })
211
211
  ```
212
212
 
213
- > **Info:** Visit [createStep()](https://mastra.ai/reference/workflows/step) for a full list of configuration options.
213
+ Visit [createStep()](https://mastra.ai/reference/workflows/step) for a full list of configuration options.
214
214
 
215
215
  ## Accessing values with tools
216
216
 
@@ -232,7 +232,7 @@ export const weatherTool = createTool({
232
232
  })
233
233
  ```
234
234
 
235
- > **Info:** Visit [createTool()](https://mastra.ai/reference/tools/create-tool) for a full list of configuration options.
235
+ Visit [createTool()](https://mastra.ai/reference/tools/create-tool) for a full list of configuration options.
236
236
 
237
237
  ## Reserved keys
238
238
 
@@ -303,7 +303,7 @@ app.listen(4111, () => {
303
303
  })
304
304
  ```
305
305
 
306
- > **Info:** See the [Express Adapter](https://mastra.ai/reference/server/express-adapter) documentation for full configuration options.
306
+ See the [Express Adapter](https://mastra.ai/reference/server/express-adapter) documentation for full configuration options.
307
307
 
308
308
  **Hono**:
309
309
 
@@ -324,7 +324,7 @@ serve({ fetch: app.fetch, port: 4111 }, () => {
324
324
  })
325
325
  ```
326
326
 
327
- > **Info:** See the [Hono Adapter](https://mastra.ai/reference/server/hono-adapter) documentation for full configuration options.
327
+ See the [Hono Adapter](https://mastra.ai/reference/server/hono-adapter) documentation for full configuration options.
328
328
 
329
329
  **Fastify**:
330
330
 
@@ -352,7 +352,7 @@ app.listen({ port }, () => {
352
352
  })
353
353
  ```
354
354
 
355
- > **Info:** See the [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter) documentation for full configuration options.
355
+ See the [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter) documentation for full configuration options.
356
356
 
357
357
  **Koa**:
358
358
 
@@ -387,7 +387,7 @@ app.listen(port, () => {
387
387
  })
388
388
  ```
389
389
 
390
- > **Info:** See the [Koa Adapter](https://mastra.ai/reference/server/koa-adapter) documentation for full configuration options.
390
+ See the [Koa Adapter](https://mastra.ai/reference/server/koa-adapter) documentation for full configuration options.
391
391
 
392
392
  **NestJS**:
393
393
 
@@ -418,7 +418,7 @@ async function bootstrap() {
418
418
  bootstrap()
419
419
  ```
420
420
 
421
- > **Info:** See the [NestJS Adapter](https://mastra.ai/reference/server/nestjs-adapter) documentation for full configuration options.
421
+ See the [NestJS Adapter](https://mastra.ai/reference/server/nestjs-adapter) documentation for full configuration options.
422
422
 
423
423
  ## Initialization flow
424
424
 
@@ -460,7 +460,7 @@ You can add your own routes to the app alongside Mastra's routes.
460
460
  - When you want Mastra-managed auth and route metadata such as `requiresAuth`, prefer `registerApiRoute()`.
461
461
  - When you mount routes directly on the framework app, use the adapter's exported `createAuthMiddleware()` helper if those routes need Mastra auth.
462
462
 
463
- > **Info:** Visit "Adding custom routes" for [Express](https://mastra.ai/reference/server/express-adapter) and [Hono](https://mastra.ai/reference/server/hono-adapter) for more information.
463
+ Visit "Adding custom routes" for [Express](https://mastra.ai/reference/server/express-adapter) and [Hono](https://mastra.ai/reference/server/hono-adapter) for more information.
464
464
 
465
465
  ## Route prefixes
466
466
 
@@ -513,7 +513,7 @@ const server = new MastraServer({
513
513
  })
514
514
  ```
515
515
 
516
- > **Info:** See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
516
+ See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
517
517
 
518
518
  ## Per-route auth overrides
519
519
 
@@ -540,7 +540,7 @@ const server = new MastraServer({
540
540
  })
541
541
  ```
542
542
 
543
- > **Info:** See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
543
+ See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
544
544
 
545
545
  ## Accessing the app
546
546
 
@@ -0,0 +1,214 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # Storage overview
4
+
5
+ Storage is the persistence layer for the Mastra runtime. It keeps memory, workflow state, observability data, eval results, schedules, and long-running agent state available after a process restarts.
6
+
7
+ Storage powers:
8
+
9
+ - [Memory](https://mastra.ai/docs/memory/overview): Message history, threads, resources, and working memory.
10
+ - [Workflows](https://mastra.ai/docs/workflows/overview): Durable snapshots for suspended and resumed workflow runs.
11
+ - [Observability](https://mastra.ai/docs/observability/overview): Traces, spans, metrics, logs, and feedback.
12
+ - [Evals](https://mastra.ai/docs/evals/overview): Scores, datasets, experiments, and evaluation results.
13
+ - [Long-running agents](https://mastra.ai/docs/long-running-agents/durable-agents): Background tasks, schedules, goals, and thread state.
14
+
15
+ ## When to configure storage
16
+
17
+ Configure a persistent storage adapter when state must survive restarts, be shared across processes, or be visible in Studio across sessions. The default in-memory store is useful for tests and short local experiments, but it loses data when the process exits.
18
+
19
+ Use storage when your application needs any of these behaviors:
20
+
21
+ - Agents remember past messages or user facts.
22
+ - Workflows suspend and resume after a restart.
23
+ - Traces, metrics, logs, scores, or feedback stay available for analysis.
24
+ - Schedules and background tasks continue across deployments.
25
+ - Multiple runtime processes read and write the same state.
26
+
27
+ ## How storage works
28
+
29
+ Mastra storage is organized into **domains**. A domain owns one type of runtime data, and a storage adapter implements one or more domains.
30
+
31
+ | Domain | What it stores |
32
+ | ----------------- | --------------------------------------------------------------------------- |
33
+ | `memory` | Threads, messages, resources, working memory, and other agent memory state. |
34
+ | `workflows` | Workflow snapshots used to suspend and resume runs. |
35
+ | `observability` | Traces, spans, metrics, logs, and feedback. |
36
+ | `scores` | Eval score records. |
37
+ | `datasets` | Dataset records and dataset items used by evals and experiments. |
38
+ | `experiments` | Experiment runs and per-item experiment results. |
39
+ | `backgroundTasks` | Background task records and execution state. |
40
+ | `schedules` | Schedule definitions and trigger history. |
41
+ | `threadState` | Durable task, goal, and thread state. |
42
+
43
+ Adapter support varies by domain. For the full domain list and built-in schemas, see the [storage overview reference](https://mastra.ai/reference/storage/overview).
44
+
45
+ ## Choose a backend by data shape
46
+
47
+ Different domains write and query different kinds of data. Pick a backend based on the domain's access pattern:
48
+
49
+ - `memory`: Reads and writes rows during every remembered agent call. Use a transactional database such as libSQL, PostgreSQL, or MongoDB.
50
+ - `observability`: Writes high-volume telemetry and often queries aggregations. Use a dedicated observability store or an online analytical processing (OLAP) backend such as ClickHouse or DuckDB.
51
+ - `workflows`: Stores durable snapshots that must be available when a run resumes. Use a reliable persistent database.
52
+ - `scores`, `datasets`, and `experiments`: Store lower-frequency evaluation data that's often read later for analysis.
53
+ - `schedules`: Stores schedule definitions and fire history. Use an adapter that implements the schedules domain.
54
+
55
+ When domains have different operational needs, use [composite storage](#composite-storage) to route each domain to the right backend.
56
+
57
+ ## Get started locally
58
+
59
+ For local development, use libSQL with a file-backed database. It doesn't require a separate database server and persists state between restarts.
60
+
61
+ ```typescript
62
+ import { Mastra } from '@mastra/core'
63
+ import { LibSQLStore } from '@mastra/libsql'
64
+
65
+ export const mastra = new Mastra({
66
+ storage: new LibSQLStore({
67
+ id: 'mastra-storage',
68
+ url: 'file:./mastra.db',
69
+ }),
70
+ })
71
+ ```
72
+
73
+ > **Sharing the database with Studio:** When running `mastra dev` alongside your application, use an absolute path so both processes access the same database:
74
+ >
75
+ > ```typescript
76
+ > url: 'file:/absolute/path/to/your/project/mastra.db'
77
+ > ```
78
+ >
79
+ > Relative paths like `file:./mastra.db` resolve based on each process's working directory, which may differ.
80
+
81
+ Mastra initializes the required storage structures on first use.
82
+
83
+ ## Configure for production
84
+
85
+ For production, use a persistent managed database. PostgreSQL is a good default for most teams because it works well for transactional runtime state and is widely available as a managed service.
86
+
87
+ Production guidance:
88
+
89
+ - Use a managed database with backups, monitoring, and connection pooling.
90
+ - Keep local file databases such as `file:./mastra.db` out of multi-process production deployments.
91
+ - Route high-volume domains, especially `observability`, to a dedicated backend with [composite storage](#composite-storage).
92
+ - Configure [retention](https://mastra.ai/reference/storage/retention) policies on the storage adapter or composite store, then call `storage.prune()` from a scheduler or maintenance job.
93
+ - Choose providers based on the domains your application uses. For example, schedules require an adapter that implements the `schedules` domain.
94
+
95
+ ## Configuration scope
96
+
97
+ Storage can be configured at the Mastra instance level or at the agent level.
98
+
99
+ ### Instance-level storage
100
+
101
+ Instance-level storage is shared by agents, workflows, observability, evals, schedules, and other runtime features registered on the same Mastra instance.
102
+
103
+ **PostgreSQL**:
104
+
105
+ ```typescript
106
+ import { Mastra } from '@mastra/core'
107
+ import { PostgresStore } from '@mastra/pg'
108
+
109
+ export const mastra = new Mastra({
110
+ storage: new PostgresStore({
111
+ id: 'mastra-storage',
112
+ connectionString: process.env.DATABASE_URL,
113
+ }),
114
+ })
115
+ ```
116
+
117
+ **MongoDB**:
118
+
119
+ ```typescript
120
+ import { Mastra } from '@mastra/core'
121
+ import { MongoDBStore } from '@mastra/mongodb'
122
+
123
+ export const mastra = new Mastra({
124
+ storage: new MongoDBStore({
125
+ id: 'mastra-storage',
126
+ uri: process.env.MONGODB_URI,
127
+ dbName: process.env.MONGODB_DB_NAME,
128
+ }),
129
+ })
130
+ ```
131
+
132
+ Use instance-level storage when most runtime domains can share the same database.
133
+
134
+ ### Agent-level storage
135
+
136
+ Agent-level storage is configured on a `Memory` instance. It overrides instance-level storage for that agent's memory data only.
137
+
138
+ ```typescript
139
+ import { Agent } from '@mastra/core/agent'
140
+ import { Memory } from '@mastra/memory'
141
+ import { PostgresStore } from '@mastra/pg'
142
+
143
+ export const supportAgent = new Agent({
144
+ id: 'support-agent',
145
+ name: 'Support agent',
146
+ instructions: 'Answer customer support questions.',
147
+ model: 'openai/gpt-5.5',
148
+ memory: new Memory({
149
+ storage: new PostgresStore({
150
+ id: 'support-agent-storage',
151
+ connectionString: process.env.SUPPORT_AGENT_DATABASE_URL,
152
+ }),
153
+ }),
154
+ })
155
+ ```
156
+
157
+ Use agent-level storage when an agent needs an isolated memory boundary or a different memory backend.
158
+
159
+ ## Composite storage
160
+
161
+ [`MastraCompositeStore`](https://mastra.ai/reference/storage/composite) routes domains to different backends. Use it when one database isn't the right fit for every domain.
162
+
163
+ The following example uses libSQL as the default store and routes workflow state to PostgreSQL:
164
+
165
+ ```typescript
166
+ import { Mastra } from '@mastra/core'
167
+ import { MastraCompositeStore } from '@mastra/core/storage'
168
+ import { LibSQLStore } from '@mastra/libsql'
169
+ import { WorkflowsPG } from '@mastra/pg'
170
+
171
+ export const mastra = new Mastra({
172
+ storage: new MastraCompositeStore({
173
+ id: 'composite-storage',
174
+ default: new LibSQLStore({
175
+ id: 'default-storage',
176
+ url: 'file:./mastra.db',
177
+ }),
178
+ domains: {
179
+ workflows: new WorkflowsPG({
180
+ connectionString: process.env.DATABASE_URL,
181
+ }),
182
+ },
183
+ }),
184
+ })
185
+ ```
186
+
187
+ You can also route `observability` to a dedicated analytics backend. See [observability storage](https://mastra.ai/docs/observability/storage) for an observability-specific example.
188
+
189
+ ## Supported providers
190
+
191
+ Each provider page includes installation instructions, configuration parameters, and usage examples:
192
+
193
+ - [libSQL](https://mastra.ai/reference/storage/libsql)
194
+ - [PostgreSQL](https://mastra.ai/reference/storage/postgresql)
195
+ - [MongoDB](https://mastra.ai/reference/storage/mongodb)
196
+ - [Upstash](https://mastra.ai/reference/storage/upstash)
197
+ - [Redis](https://mastra.ai/reference/storage/redis)
198
+ - [Cloudflare D1](https://mastra.ai/reference/storage/cloudflare-d1)
199
+ - [Cloudflare KV & Durable Objects](https://mastra.ai/reference/storage/cloudflare)
200
+ - [Convex](https://mastra.ai/reference/storage/convex)
201
+ - [DynamoDB](https://mastra.ai/reference/storage/dynamodb)
202
+ - [LanceDB](https://mastra.ai/reference/storage/lance)
203
+ - [Microsoft SQL Server](https://mastra.ai/reference/storage/mssql)
204
+ - [Google Cloud Spanner](https://mastra.ai/reference/storage/spanner)
205
+
206
+ > **Tip:** libSQL is the fastest path for local development because it doesn't require running a separate database server.
207
+
208
+ ## Next steps
209
+
210
+ - [Composite storage](https://mastra.ai/reference/storage/composite)
211
+ - [Storage retention](https://mastra.ai/reference/storage/retention)
212
+ - [Storage schemas](https://mastra.ai/reference/storage/overview)
213
+ - [Memory](https://mastra.ai/docs/memory/overview)
214
+ - [Observability storage](https://mastra.ai/docs/observability/storage)
@@ -35,9 +35,7 @@ export const mastra = new Mastra({
35
35
  })
36
36
  ```
37
37
 
38
- Once configured, Studio shows a login screen and requires authentication for all API requests.
39
-
40
- > **Note:** Visit the [Auth docs](https://mastra.ai/docs/server/auth) for a full list of supported providers.
38
+ Once configured, Studio shows a login screen and requires authentication for all API requests. Visit the [Auth docs](https://mastra.ai/docs/server/auth) for a full list of supported providers.
41
39
 
42
40
  ## How it works
43
41