@mastra/mcp-docs-server 0.13.35 → 0.13.37-alpha.0
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.
- package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +36 -36
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +40 -40
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Frag.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Freact.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +13 -13
- package/.docs/organized/changelogs/mastra.md +26 -26
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +10 -7
- package/.docs/raw/memory/overview.mdx +2 -2
- package/.docs/raw/memory/semantic-recall.mdx +4 -4
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +148 -0
- package/CHANGELOG.md +17 -0
- package/package.json +5 -5
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-openai
|
|
2
2
|
|
|
3
|
+
## 0.11.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @mastra/core@0.23.1
|
|
11
|
+
|
|
3
12
|
## 0.11.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- Updated dependencies [12cae67]
|
|
290
299
|
- Updated dependencies [fd3a3eb]
|
|
291
300
|
- Updated dependencies [6faaee5]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [5a37d0c]
|
|
295
|
-
- Updated dependencies [4bde0cb]
|
|
296
|
-
- Updated dependencies [cf4f357]
|
|
297
|
-
- Updated dependencies [ad888a2]
|
|
298
|
-
- Updated dependencies [481751d]
|
|
299
|
-
- Updated dependencies [2454423]
|
|
300
|
-
- Updated dependencies [194e395]
|
|
301
|
-
|
|
302
|
-
... 1431 more lines hidden. See full changelog in package directory.
|
|
301
|
+
|
|
302
|
+
... 1440 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-playai
|
|
2
2
|
|
|
3
|
+
## 0.11.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @mastra/core@0.23.1
|
|
11
|
+
|
|
3
12
|
## 0.11.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- Updated dependencies [a89de7e]
|
|
290
299
|
- Updated dependencies [5a37d0c]
|
|
291
300
|
- Updated dependencies [4bde0cb]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [481751d]
|
|
295
|
-
- Updated dependencies [2454423]
|
|
296
|
-
- Updated dependencies [194e395]
|
|
297
|
-
- Updated dependencies [a722c0b]
|
|
298
|
-
- Updated dependencies [c30bca8]
|
|
299
|
-
- Updated dependencies [3b5fec7]
|
|
300
|
-
- Updated dependencies [a8f129d]
|
|
301
|
-
|
|
302
|
-
... 1367 more lines hidden. See full changelog in package directory.
|
|
301
|
+
|
|
302
|
+
... 1376 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-sarvam
|
|
2
2
|
|
|
3
|
+
## 0.11.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @mastra/core@0.23.1
|
|
11
|
+
|
|
3
12
|
## 0.11.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- Updated dependencies [a89de7e]
|
|
290
299
|
- Updated dependencies [5a37d0c]
|
|
291
300
|
- Updated dependencies [4bde0cb]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [481751d]
|
|
295
|
-
- Updated dependencies [2454423]
|
|
296
|
-
- Updated dependencies [194e395]
|
|
297
|
-
- Updated dependencies [a722c0b]
|
|
298
|
-
- Updated dependencies [c30bca8]
|
|
299
|
-
- Updated dependencies [3b5fec7]
|
|
300
|
-
- Updated dependencies [a8f129d]
|
|
301
|
-
|
|
302
|
-
... 1017 more lines hidden. See full changelog in package directory.
|
|
301
|
+
|
|
302
|
+
... 1026 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-speechify
|
|
2
2
|
|
|
3
|
+
## 0.11.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @mastra/core@0.23.1
|
|
11
|
+
|
|
3
12
|
## 0.11.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
|
|
290
299
|
## 0.10.8
|
|
291
300
|
|
|
292
|
-
### Patch Changes
|
|
293
|
-
|
|
294
|
-
- 03997ae: Update peerdeps
|
|
295
|
-
- Updated dependencies [227c7e6]
|
|
296
|
-
- Updated dependencies [12cae67]
|
|
297
|
-
- Updated dependencies [fd3a3eb]
|
|
298
|
-
- Updated dependencies [6faaee5]
|
|
299
|
-
- Updated dependencies [4232b14]
|
|
300
|
-
- Updated dependencies [a89de7e]
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1391 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.17.6-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update MainSidebar component to fit required changes in Cloud CTA link ([#9364](https://github.com/mastra-ai/mastra/pull/9364))
|
|
8
|
+
|
|
9
|
+
## 0.17.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
14
|
+
|
|
3
15
|
## 0.17.4
|
|
4
16
|
|
|
5
17
|
## 0.17.4-alpha.0
|
|
@@ -286,17 +298,5 @@
|
|
|
286
298
|
|
|
287
299
|
- Add conditional chaining to scorer.agentNames return ([#8199](https://github.com/mastra-ai/mastra/pull/8199))
|
|
288
300
|
|
|
289
|
-
- Show model that worked when there are model fallbacks ([#8167](https://github.com/mastra-ai/mastra/pull/8167))
|
|
290
|
-
|
|
291
|
-
- Add types in the streamVNext codepath, fixes for various issues across multiple packages surfaced from type issues, align return types. ([#8010](https://github.com/mastra-ai/mastra/pull/8010))
|
|
292
|
-
|
|
293
|
-
- Add model fallbacks to playground ([#7427](https://github.com/mastra-ai/mastra/pull/7427))
|
|
294
|
-
|
|
295
|
-
## 0.13.3-alpha.1
|
|
296
|
-
|
|
297
|
-
### Patch Changes
|
|
298
|
-
|
|
299
|
-
- Fixed an issue in playground where text-start/end parts were ignored in handleStreamChunk and tool ordering vs text wasn't retained ([#8234](https://github.com/mastra-ai/mastra/pull/8234))
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1792 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.17.6-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Use dynamic model for scorers in create cli ([#9342](https://github.com/mastra-ai/mastra/pull/9342))
|
|
8
|
+
|
|
9
|
+
- Update MainSidebar component to fit required changes in Cloud CTA link ([#9364](https://github.com/mastra-ai/mastra/pull/9364))
|
|
10
|
+
|
|
11
|
+
- Better handle errors during `mastra start` and throw them with Mastra's logger. Also add special error handling for `ERR_MODULE_NOT_FOUND` cases. ([#9338](https://github.com/mastra-ai/mastra/pull/9338))
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`17e5a4e`](https://github.com/mastra-ai/mastra/commit/17e5a4e828a8ebc6148c76b42a139c0f9bf7e25f), [`2afd345`](https://github.com/mastra-ai/mastra/commit/2afd3450825b76e41f7973baddf13867ea042e40), [`eefc89e`](https://github.com/mastra-ai/mastra/commit/eefc89ee69f05bb71661473a807fc7dc03d56f17), [`0fe7adb`](https://github.com/mastra-ai/mastra/commit/0fe7adb0f20f59a6bb41f235d01f8b7a880ea6e7), [`a42e496`](https://github.com/mastra-ai/mastra/commit/a42e49686a7486e2e9e9397fa98e5ff7a71dc1b0), [`3670db7`](https://github.com/mastra-ai/mastra/commit/3670db7e8e798f9d65fac5bfb732134a1f26ba7b), [`fc843ff`](https://github.com/mastra-ai/mastra/commit/fc843ff4d1d149317b6324553ce5ad7972062a78), [`30f92b5`](https://github.com/mastra-ai/mastra/commit/30f92b5b3aa224289f2f0eff56babcfa7a87b772)]:
|
|
14
|
+
- @mastra/deployer@0.23.2-alpha.0
|
|
15
|
+
- @mastra/core@0.23.2-alpha.0
|
|
16
|
+
|
|
17
|
+
## 0.17.5
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de)]:
|
|
24
|
+
- @mastra/deployer@0.23.1
|
|
25
|
+
- @mastra/loggers@0.10.18
|
|
26
|
+
- @mastra/core@0.23.1
|
|
27
|
+
|
|
3
28
|
## 0.17.4
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -274,29 +299,4 @@
|
|
|
274
299
|
|
|
275
300
|
- add client search to all entities ([#8523](https://github.com/mastra-ai/mastra/pull/8523))
|
|
276
301
|
|
|
277
|
-
|
|
278
|
-
fixed an issue with provider ID rendering in playground UI
|
|
279
|
-
|
|
280
|
-
- Fix useStreamWorkflow unmounting breaking stream call ([#8449](https://github.com/mastra-ai/mastra/pull/8449))
|
|
281
|
-
|
|
282
|
-
- Remove shell from dev ([#8466](https://github.com/mastra-ai/mastra/pull/8466))
|
|
283
|
-
|
|
284
|
-
- UX for the agents page ([#8517](https://github.com/mastra-ai/mastra/pull/8517))
|
|
285
|
-
|
|
286
|
-
- add icons into playground titles + a link to the entity doc ([#8518](https://github.com/mastra-ai/mastra/pull/8518))
|
|
287
|
-
|
|
288
|
-
- Updated dependencies [[`c621613`](https://github.com/mastra-ai/mastra/commit/c621613069173c69eb2c3ef19a5308894c6549f0), [`ee17cec`](https://github.com/mastra-ai/mastra/commit/ee17cec065f4454740c9cc8f8a841027a5990f57), [`12b1189`](https://github.com/mastra-ai/mastra/commit/12b118942445e4de0dd916c593e33ec78dc3bc73), [`42ffed3`](https://github.com/mastra-ai/mastra/commit/42ffed311b9d8750652bbc55c773be62c989fcc6), [`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`076b092`](https://github.com/mastra-ai/mastra/commit/076b0924902ff0f49d5712d2df24c4cca683713f), [`2aee9e7`](https://github.com/mastra-ai/mastra/commit/2aee9e7d188b8b256a4ddc203ccefb366b4867fa), [`c582906`](https://github.com/mastra-ai/mastra/commit/c5829065a346260f96c4beb8af131b94804ae3ad), [`fa2eb96`](https://github.com/mastra-ai/mastra/commit/fa2eb96af16c7d433891a73932764960d3235c1d), [`ee9108f`](https://github.com/mastra-ai/mastra/commit/ee9108fa29bb8368fc23df158c9f0645b2d7b65c), [`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`a739d0c`](https://github.com/mastra-ai/mastra/commit/a739d0c8b37cd89569e04a6ca0827083c6167e19), [`a9c4cb7`](https://github.com/mastra-ai/mastra/commit/a9c4cb7d6a35de23ca51066f166a66e0e4cca418), [`603e927`](https://github.com/mastra-ai/mastra/commit/603e9279db8bf8a46caf83881c6b7389ccffff7e), [`cd45982`](https://github.com/mastra-ai/mastra/commit/cd4598291cda128a88738734ae6cbef076ebdebd), [`874f74d`](https://github.com/mastra-ai/mastra/commit/874f74da4b1acf6517f18132d035612c3ecc394a), [`b728a45`](https://github.com/mastra-ai/mastra/commit/b728a45ab3dba59da0f5ee36b81fe246659f305d), [`0baf2ba`](https://github.com/mastra-ai/mastra/commit/0baf2bab8420277072ef1f95df5ea7b0a2f61fe7), [`10e633a`](https://github.com/mastra-ai/mastra/commit/10e633a07d333466d9734c97acfc3dbf757ad2d0), [`a6d69c5`](https://github.com/mastra-ai/mastra/commit/a6d69c5fb50c0875b46275811fece5862f03c6a0), [`84199af`](https://github.com/mastra-ai/mastra/commit/84199af8673f6f9cb59286ffb5477a41932775de), [`7f431af`](https://github.com/mastra-ai/mastra/commit/7f431afd586b7d3265075e73106eb73167edbb86), [`26e968d`](https://github.com/mastra-ai/mastra/commit/26e968db2171ded9e4d47aa1b4f19e1e771158d0), [`cbd3fb6`](https://github.com/mastra-ai/mastra/commit/cbd3fb65adb03a7c0df193cb998aed5ac56675ee)]:
|
|
289
|
-
- @mastra/core@0.20.1
|
|
290
|
-
- @mastra/deployer@0.20.1
|
|
291
|
-
- @mastra/mcp@0.13.4
|
|
292
|
-
|
|
293
|
-
## 0.15.0-alpha.3
|
|
294
|
-
|
|
295
|
-
### Minor Changes
|
|
296
|
-
|
|
297
|
-
- Update peer dependencies to match core package version bump (0.20.1) ([#8589](https://github.com/mastra-ai/mastra/pull/8589))
|
|
298
|
-
|
|
299
|
-
### Patch Changes
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
... 6312 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 6337 more lines hidden. See full changelog in package directory.
|
|
@@ -23,13 +23,13 @@ export const weatherAgent = new Agent({
|
|
|
23
23
|
});
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
> See [
|
|
26
|
+
> See [Using AI SDK with Mastra](/models#use-ai-sdk-with-mastra) for more information.
|
|
27
27
|
|
|
28
28
|
## Streaming
|
|
29
29
|
|
|
30
30
|
The recommended way of using Mastra and AI SDK together is by installing the `@mastra/ai-sdk` package. `@mastra/ai-sdk` provides custom API routes and utilities for streaming Mastra agents in AI SDK-compatible formats. Including chat, workflow, and network route handlers, along with utilities and exported types for UI integrations.
|
|
31
31
|
|
|
32
|
-
<Tabs items={["npm", "
|
|
32
|
+
<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
|
|
33
33
|
<Tabs.Tab>
|
|
34
34
|
```bash copy
|
|
35
35
|
npm install @mastra/ai-sdk
|
|
@@ -37,12 +37,12 @@ The recommended way of using Mastra and AI SDK together is by installing the `@m
|
|
|
37
37
|
</Tabs.Tab>
|
|
38
38
|
<Tabs.Tab>
|
|
39
39
|
```bash copy
|
|
40
|
-
|
|
40
|
+
pnpm add @mastra/ai-sdk
|
|
41
41
|
```
|
|
42
42
|
</Tabs.Tab>
|
|
43
43
|
<Tabs.Tab>
|
|
44
44
|
```bash copy
|
|
45
|
-
|
|
45
|
+
yarn add @mastra/ai-sdk
|
|
46
46
|
```
|
|
47
47
|
</Tabs.Tab>
|
|
48
48
|
<Tabs.Tab>
|
|
@@ -197,6 +197,7 @@ Here's an example: For a [nested agent stream within a tool](/docs/streaming/too
|
|
|
197
197
|
|
|
198
198
|
import { useChat } from "@ai-sdk/react";
|
|
199
199
|
import { AgentTool } from '../ui/agent-tool';
|
|
200
|
+
import { DefaultChatTransport } from 'ai';
|
|
200
201
|
import type { AgentDataPart } from "@mastra/ai-sdk";
|
|
201
202
|
|
|
202
203
|
export default function Page() {
|
|
@@ -349,7 +350,7 @@ Mastra supports AI SDK UI hooks for connecting frontend components directly to a
|
|
|
349
350
|
|
|
350
351
|
Install the required AI SDK React package:
|
|
351
352
|
|
|
352
|
-
<Tabs items={["npm", "
|
|
353
|
+
<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
|
|
353
354
|
<Tabs.Tab>
|
|
354
355
|
```bash copy
|
|
355
356
|
npm install @ai-sdk/react
|
|
@@ -357,12 +358,12 @@ Install the required AI SDK React package:
|
|
|
357
358
|
</Tabs.Tab>
|
|
358
359
|
<Tabs.Tab>
|
|
359
360
|
```bash copy
|
|
360
|
-
|
|
361
|
+
pnpm add @ai-sdk/react
|
|
361
362
|
```
|
|
362
363
|
</Tabs.Tab>
|
|
363
364
|
<Tabs.Tab>
|
|
364
365
|
```bash copy
|
|
365
|
-
|
|
366
|
+
yarn add @ai-sdk/react
|
|
366
367
|
```
|
|
367
368
|
</Tabs.Tab>
|
|
368
369
|
<Tabs.Tab>
|
|
@@ -382,6 +383,7 @@ The `useChat()` hook handles real-time chat interactions between your frontend a
|
|
|
382
383
|
|
|
383
384
|
import { useChat } from "@ai-sdk/react";
|
|
384
385
|
import { useState } from "react";
|
|
386
|
+
import { DefaultChatTransport } from 'ai';
|
|
385
387
|
|
|
386
388
|
export function Chat() {
|
|
387
389
|
const [inputValue, setInputValue] = useState('')
|
|
@@ -471,6 +473,7 @@ export async function POST(req: Request) {
|
|
|
471
473
|
|
|
472
474
|
import { useChat } from "@ai-sdk/react";
|
|
473
475
|
import { useState } from "react";
|
|
476
|
+
import { DefaultChatTransport } from 'ai';
|
|
474
477
|
|
|
475
478
|
export function ChatExtra() {
|
|
476
479
|
const [inputValue, setInputValue] = useState('')
|
|
@@ -51,7 +51,7 @@ That memory instance has options you can configure for working memory, conversat
|
|
|
51
51
|
|
|
52
52
|
## Different types of memory
|
|
53
53
|
|
|
54
|
-
Mastra supports three types of memory: working memory, conversation history, and semantic recall.
|
|
54
|
+
Mastra supports three types of memory: working memory, conversation history, and semantic recall.
|
|
55
55
|
|
|
56
56
|
[**Working memory**](./working-memory.mdx) stores persistent user-specific details such as names, preferences, goals, and other structured data. (Compare this to ChatGPT where you can ask it to tell you about yourself). This is implemented as a block of Markdown text that the agent is able to update over time (or alternately, as a Zod schema)
|
|
57
57
|
|
|
@@ -69,7 +69,7 @@ All memory types are [thread-scoped](./working-memory.mdx#thread-scoped-memory-d
|
|
|
69
69
|
|
|
70
70
|
To persist and recall information between conversations, memory requires a storage adapter.
|
|
71
71
|
|
|
72
|
-
Supported options include [LibSQL](/docs/memory/storage/memory-with-libsql), [MongoDB](/docs/memory/storage/memory-with-mongodb), [Postgres](/docs/memory/storage/memory-with-pg), and [Upstash](/docs/memory/storage/memory-with-upstash)
|
|
72
|
+
Supported options include [LibSQL](/docs/memory/storage/memory-with-libsql.mdx), [MongoDB](/docs/memory/storage/memory-with-mongodb.mdx), [Postgres](/docs/memory/storage/memory-with-pg.mdx), and [Upstash](/docs/memory/storage/memory-with-upstash.mdx)
|
|
73
73
|
|
|
74
74
|
We use LibSQL out of the box because it is file-based or in-memory, so it is easy to install and works well with the playground.
|
|
75
75
|
|
|
@@ -92,10 +92,10 @@ const agent = new Agent({
|
|
|
92
92
|
|
|
93
93
|
**Storage/vector code Examples**:
|
|
94
94
|
|
|
95
|
-
- [LibSQL](/docs/memory/storage/memory-with-libsql)
|
|
96
|
-
- [MongoDB](/docs/memory/storage/memory-with-mongodb)
|
|
97
|
-
- [Postgres](/docs/memory/storage/memory-with-pg)
|
|
98
|
-
- [Upstash](/docs/memory/storage/memory-with-upstash)
|
|
95
|
+
- [LibSQL](/docs/memory/storage/memory-with-libsql.mdx)
|
|
96
|
+
- [MongoDB](/docs/memory/storage/memory-with-mongodb.mdx)
|
|
97
|
+
- [Postgres](/docs/memory/storage/memory-with-pg.mdx)
|
|
98
|
+
- [Upstash](/docs/memory/storage/memory-with-upstash.mdx)
|
|
99
99
|
|
|
100
100
|
### Embedder configuration
|
|
101
101
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Example: Memory with MongoDB | Memory | Mastra Docs"
|
|
3
|
+
description: Example for how to use Mastra's memory system with MongoDB storage and vector capabilities.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Memory with MongoDB
|
|
7
|
+
|
|
8
|
+
This example demonstrates how to use Mastra's memory system with MongoDB as the storage backend.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
This example uses the `openai` model and requires a MongoDB database. Make sure to add the following to your `.env` file:
|
|
13
|
+
|
|
14
|
+
```bash filename=".env" copy
|
|
15
|
+
OPENAI_API_KEY=<your-api-key>
|
|
16
|
+
MONGODB_URI=<your-connection-string>
|
|
17
|
+
MONGODB_DB_NAME=<your-db-name>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
And install the following package:
|
|
21
|
+
|
|
22
|
+
```bash copy
|
|
23
|
+
npm install @mastra/mongodb
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Adding memory to an agent
|
|
27
|
+
|
|
28
|
+
To add MongoDB memory to an agent use the `Memory` class and create a new `storage` key using `MongoDBStore`. The configuration supports both local and remote MongoDB instances.
|
|
29
|
+
|
|
30
|
+
```typescript filename="src/mastra/agents/example-mongodb-agent.ts" showLineNumbers copy
|
|
31
|
+
import { Memory } from "@mastra/memory";
|
|
32
|
+
import { Agent } from "@mastra/core/agent";
|
|
33
|
+
import { openai } from "@ai-sdk/openai";
|
|
34
|
+
import { MongoDBStore } from "@mastra/mongodb";
|
|
35
|
+
|
|
36
|
+
export const mongodbAgent = new Agent({
|
|
37
|
+
name: "mongodb-agent",
|
|
38
|
+
instructions: "You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
39
|
+
model: openai("gpt-4o"),
|
|
40
|
+
memory: new Memory({
|
|
41
|
+
storage: new MongoDBStore({
|
|
42
|
+
url: process.env.MONGODB_URI!,
|
|
43
|
+
dbName: process.env.MONGODB_DB_NAME!
|
|
44
|
+
}),
|
|
45
|
+
options: {
|
|
46
|
+
threads: {
|
|
47
|
+
generateTitle: true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Vector embeddings with MongoDB
|
|
55
|
+
|
|
56
|
+
Embeddings are numeric vectors used by memory's `semanticRecall` to retrieve related messages by meaning (not keywords).
|
|
57
|
+
|
|
58
|
+
> Note: You must use a deployment hosted on MongoDB Atlas to successfully use the MongoDB Vector database.
|
|
59
|
+
|
|
60
|
+
This setup uses FastEmbed, a local embedding model, to generate vector embeddings.
|
|
61
|
+
To use this, install `@mastra/fastembed`:
|
|
62
|
+
|
|
63
|
+
```bash copy
|
|
64
|
+
npm install @mastra/fastembed
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Add the following to your agent:
|
|
68
|
+
|
|
69
|
+
```typescript filename="src/mastra/agents/example-mongodb-agent.ts" showLineNumbers copy
|
|
70
|
+
import { Memory } from "@mastra/memory";
|
|
71
|
+
import { Agent } from "@mastra/core/agent";
|
|
72
|
+
import { openai } from "@ai-sdk/openai";
|
|
73
|
+
import { MongoDBStore, MongoDBVector } from "@mastra/mongodb";
|
|
74
|
+
import { fastembed } from "@mastra/fastembed";
|
|
75
|
+
|
|
76
|
+
export const mongodbAgent = new Agent({
|
|
77
|
+
name: "mongodb-agent",
|
|
78
|
+
instructions: "You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
79
|
+
model: openai("gpt-4o"),
|
|
80
|
+
memory: new Memory({
|
|
81
|
+
storage: new MongoDBStore({
|
|
82
|
+
url: process.env.MONGODB_URI!,
|
|
83
|
+
dbName: process.env.MONGODB_DB_NAME!
|
|
84
|
+
}),
|
|
85
|
+
vector: new MongoDBVector({
|
|
86
|
+
uri: process.env.MONGODB_URI!,
|
|
87
|
+
dbName: process.env.MONGODB_DB_NAME!
|
|
88
|
+
}),
|
|
89
|
+
embedder: fastembed,
|
|
90
|
+
options: {
|
|
91
|
+
lastMessages: 10,
|
|
92
|
+
semanticRecall: {
|
|
93
|
+
topK: 3,
|
|
94
|
+
messageRange: 2
|
|
95
|
+
},
|
|
96
|
+
threads: {
|
|
97
|
+
generateTitle: true // generates descriptive thread titles automatically
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Usage example
|
|
105
|
+
|
|
106
|
+
Use `memoryOptions` to scope recall for this request. Set `lastMessages: 5` to limit recency-based recall, and use `semanticRecall` to fetch the `topK: 3` most relevant messages, including `messageRange: 2` neighboring messages for context around each match.
|
|
107
|
+
|
|
108
|
+
```typescript filename="src/test-mongodb-agent.ts" showLineNumbers copy
|
|
109
|
+
import "dotenv/config";
|
|
110
|
+
|
|
111
|
+
import { mastra } from "./mastra";
|
|
112
|
+
|
|
113
|
+
const threadId = "123";
|
|
114
|
+
const resourceId = "user-456";
|
|
115
|
+
|
|
116
|
+
const agent = mastra.getAgent("mongodbAgent");
|
|
117
|
+
|
|
118
|
+
const message = await agent.stream("My name is Mastra", {
|
|
119
|
+
memory: {
|
|
120
|
+
thread: threadId,
|
|
121
|
+
resource: resourceId
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
await message.textStream.pipeTo(new WritableStream());
|
|
126
|
+
|
|
127
|
+
const stream = await agent.stream("What's my name?", {
|
|
128
|
+
memory: {
|
|
129
|
+
thread: threadId,
|
|
130
|
+
resource: resourceId
|
|
131
|
+
},
|
|
132
|
+
memoryOptions: {
|
|
133
|
+
lastMessages: 5,
|
|
134
|
+
semanticRecall: {
|
|
135
|
+
topK: 3,
|
|
136
|
+
messageRange: 2
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
for await (const chunk of stream.textStream) {
|
|
142
|
+
process.stdout.write(chunk);
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Related
|
|
147
|
+
|
|
148
|
+
- [Calling Agents](../agents/calling-agents.mdx)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 0.13.37-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`2afd345`](https://github.com/mastra-ai/mastra/commit/2afd3450825b76e41f7973baddf13867ea042e40), [`eefc89e`](https://github.com/mastra-ai/mastra/commit/eefc89ee69f05bb71661473a807fc7dc03d56f17), [`0fe7adb`](https://github.com/mastra-ai/mastra/commit/0fe7adb0f20f59a6bb41f235d01f8b7a880ea6e7), [`a42e496`](https://github.com/mastra-ai/mastra/commit/a42e49686a7486e2e9e9397fa98e5ff7a71dc1b0), [`3670db7`](https://github.com/mastra-ai/mastra/commit/3670db7e8e798f9d65fac5bfb732134a1f26ba7b), [`fc843ff`](https://github.com/mastra-ai/mastra/commit/fc843ff4d1d149317b6324553ce5ad7972062a78)]:
|
|
8
|
+
- @mastra/core@0.23.2-alpha.0
|
|
9
|
+
|
|
10
|
+
## 0.13.36
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de)]:
|
|
17
|
+
- @mastra/mcp@0.14.1
|
|
18
|
+
- @mastra/core@0.23.1
|
|
19
|
+
|
|
3
20
|
## 0.13.35
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.37-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"uuid": "^11.1.0",
|
|
34
34
|
"zod": "^3.25.76",
|
|
35
35
|
"zod-to-json-schema": "^3.24.6",
|
|
36
|
-
"@mastra/core": "0.23.0",
|
|
37
|
-
"@mastra/mcp": "^0.14.
|
|
36
|
+
"@mastra/core": "0.23.2-alpha.0",
|
|
37
|
+
"@mastra/mcp": "^0.14.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hono/node-server": "^1.19.5",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"tsx": "^4.19.4",
|
|
50
50
|
"typescript": "^5.8.3",
|
|
51
51
|
"vitest": "^3.2.4",
|
|
52
|
-
"@internal/lint": "0.0.
|
|
53
|
-
"@mastra/core": "0.23.0"
|
|
52
|
+
"@internal/lint": "0.0.55",
|
|
53
|
+
"@mastra/core": "0.23.2-alpha.0"
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://mastra.ai",
|
|
56
56
|
"repository": {
|