@mastra/mcp-docs-server 0.13.24-alpha.2 → 0.13.24-alpha.3

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 (26) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +8 -0
  2. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +14 -14
  3. package/.docs/organized/changelogs/%40mastra%2Fcore.md +20 -20
  4. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +11 -11
  5. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +11 -11
  6. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +11 -11
  7. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +11 -11
  8. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +13 -13
  9. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +9 -9
  10. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +16 -16
  11. package/.docs/organized/changelogs/%40mastra%2Fpg.md +15 -15
  12. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +15 -15
  13. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
  14. package/.docs/organized/changelogs/%40mastra%2Fserver.md +14 -14
  15. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +10 -10
  16. package/.docs/organized/changelogs/create-mastra.md +9 -9
  17. package/.docs/organized/changelogs/mastra.md +17 -17
  18. package/.docs/raw/getting-started/installation.mdx +1 -1
  19. package/.docs/raw/memory/conversation-history.mdx +23 -0
  20. package/.docs/raw/memory/overview.mdx +35 -150
  21. package/.docs/raw/memory/semantic-recall.mdx +36 -0
  22. package/.docs/raw/memory/threads-and-resources.mdx +94 -0
  23. package/.docs/raw/reference/memory/Memory.mdx +41 -0
  24. package/.docs/raw/reference/rag/pg.mdx +28 -1
  25. package/CHANGELOG.md +7 -0
  26. package/package.json +4 -4
@@ -1,5 +1,13 @@
1
1
  # @mastra/agent-builder
2
2
 
3
+ ## 0.0.6-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`6b7e804`](https://github.com/mastra-ai/mastra/commit/6b7e80406ba91bd6c6f5789f90e33551a48e66b1), [`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
8
+ - @mastra/memory@0.15.3-alpha.1
9
+ - @mastra/core@0.18.0-alpha.3
10
+
3
11
  ## 0.0.6-alpha.1
4
12
 
5
13
  ### Patch Changes
@@ -1,5 +1,18 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.13.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
8
+
9
+ - Delayed streamVNext breaking change notice by 1 week ([#8121](https://github.com/mastra-ai/mastra/pull/8121))
10
+
11
+ - Add server api to score traces ([#8064](https://github.com/mastra-ai/mastra/pull/8064))
12
+
13
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
14
+ - @mastra/core@0.18.0-alpha.3
15
+
3
16
  ## 0.13.2-alpha.2
4
17
 
5
18
  ### Patch Changes
@@ -285,18 +298,5 @@
285
298
 
286
299
  ### Minor Changes
287
300
 
288
- - 6155cfc: Remove AGUI implementation from client-js
289
-
290
- ### Patch Changes
291
-
292
- - cf4e353: Agent Builder Template - adding in UI components to use agent builder template actions
293
- - 5397eb4: Add public URL support when adding files in Multi Modal
294
- - Updated dependencies [fd83526]
295
- - Updated dependencies [d0b90ab]
296
- - Updated dependencies [6f5eb7a]
297
- - Updated dependencies [a01cf14]
298
- - Updated dependencies [a9e50ee]
299
- - Updated dependencies [5397eb4]
300
- - Updated dependencies [c9f4e4a]
301
301
 
302
- ... 2642 more lines hidden. See full changelog in package directory.
302
+ ... 2655 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,24 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 0.18.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
8
+
9
+ - Fix PostgreSQL vector index recreation issue and add optional index configuration ([#8020](https://github.com/mastra-ai/mastra/pull/8020))
10
+ - Fixed critical bug where memory vector indexes were unnecessarily recreated on every operation
11
+ - Added support for configuring vector index types (HNSW, IVFFlat, flat) and parameters
12
+
13
+ - Fix navigating between scores and entity types ([#8129](https://github.com/mastra-ai/mastra/pull/8129))
14
+
15
+ - Delayed streamVNext breaking change notice by 1 week ([#8121](https://github.com/mastra-ai/mastra/pull/8121))
16
+
17
+ - Tool hitl ([#8084](https://github.com/mastra-ai/mastra/pull/8084))
18
+
19
+ - Updated dependencies [[`b61b8e0`](https://github.com/mastra-ai/mastra/commit/b61b8e0b0e93a7e6e9d82e6f0b620bb919a20bdb)]:
20
+ - @mastra/schema-compat@0.11.4-alpha.0
21
+
3
22
  ## 0.18.0-alpha.2
4
23
 
5
24
  ### Minor Changes
@@ -279,24 +298,5 @@
279
298
 
280
299
  - fix workflows runs fetching and displaying ([#7852](https://github.com/mastra-ai/mastra/pull/7852))
281
300
 
282
- - fix empty state for scorers on agent page ([#7846](https://github.com/mastra-ai/mastra/pull/7846))
283
-
284
- ## 0.16.4-alpha.2
285
-
286
- ### Patch Changes
287
-
288
- - Postgresql Storage Query Index Performance: Adds index operations and automatic indexing for Postgresql ([#7757](https://github.com/mastra-ai/mastra/pull/7757))
289
-
290
- - Fixes assistant message ids when using toUIMessageStream, preserves the original messageId rather than creating a new id for this message. ([#7783](https://github.com/mastra-ai/mastra/pull/7783))
291
-
292
- ## 0.16.4-alpha.1
293
-
294
- ### Patch Changes
295
-
296
- - Add resource id to workflow run snapshots ([#7740](https://github.com/mastra-ai/mastra/pull/7740))
297
-
298
- ## 0.16.4-alpha.0
299
-
300
- ### Patch Changes
301
301
 
302
- ... 3579 more lines hidden. See full changelog in package directory.
302
+ ... 3598 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,15 @@
1
1
  # @mastra/deployer-cloud
2
2
 
3
+ ## 0.18.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
8
+
9
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
10
+ - @mastra/core@0.18.0-alpha.3
11
+ - @mastra/deployer@0.18.0-alpha.3
12
+
3
13
  ## 0.18.0-alpha.2
4
14
 
5
15
  ### Patch Changes
@@ -288,15 +298,5 @@
288
298
  ### Patch Changes
289
299
 
290
300
  - Updated dependencies [cf4e353]
291
- - Updated dependencies [fd83526]
292
- - Updated dependencies [d0b90ab]
293
- - Updated dependencies [6f5eb7a]
294
- - Updated dependencies [a01cf14]
295
- - Updated dependencies [a9e50ee]
296
- - Updated dependencies [5397eb4]
297
- - Updated dependencies [c9f4e4a]
298
- - Updated dependencies [0acbc80]
299
- - @mastra/deployer@0.16.0-alpha.0
300
- - @mastra/core@0.16.0-alpha.0
301
301
 
302
- ... 212 more lines hidden. See full changelog in package directory.
302
+ ... 222 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,15 @@
1
1
  # @mastra/deployer-cloudflare
2
2
 
3
+ ## 0.14.2-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
8
+
9
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
10
+ - @mastra/core@0.18.0-alpha.3
11
+ - @mastra/deployer@0.18.0-alpha.3
12
+
3
13
  ## 0.14.2-alpha.1
4
14
 
5
15
  ### Patch Changes
@@ -288,15 +298,5 @@
288
298
  - @mastra/core@0.15.3-alpha.4
289
299
  - @mastra/deployer@0.15.3-alpha.4
290
300
 
291
- ## 0.13.3-alpha.0
292
-
293
- ### Patch Changes
294
-
295
- - Updated dependencies [[`00c74e7`](https://github.com/mastra-ai/mastra/commit/00c74e73b1926be0d475693bb886fb67a22ff352), [`6f715fe`](https://github.com/mastra-ai/mastra/commit/6f715fe524296e1138a319e56bcf8e4214bd5dd5), [`af90672`](https://github.com/mastra-ai/mastra/commit/af906722d8da28688882193b1e531026f9e2e81e), [`a6e2254`](https://github.com/mastra-ai/mastra/commit/a6e225469159950bb69e8d240d510ec57dc0d79a), [`56041d0`](https://github.com/mastra-ai/mastra/commit/56041d018863a3da6b98c512e47348647c075fb3), [`5de1555`](https://github.com/mastra-ai/mastra/commit/5de15554d3d6695211945a36928f6657e76cddc9), [`1ed5a3e`](https://github.com/mastra-ai/mastra/commit/1ed5a3e19330374c4347a4237cd2f4b9ffb60376)]:
296
- - @mastra/core@0.15.3-alpha.0
297
- - @mastra/deployer@0.15.3-alpha.0
298
-
299
- ## 0.13.2
300
-
301
301
 
302
- ... 3662 more lines hidden. See full changelog in package directory.
302
+ ... 3672 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,15 @@
1
1
  # @mastra/deployer-netlify
2
2
 
3
+ ## 0.13.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
8
+
9
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
10
+ - @mastra/core@0.18.0-alpha.3
11
+ - @mastra/deployer@0.18.0-alpha.3
12
+
3
13
  ## 0.13.2-alpha.2
4
14
 
5
15
  ### Patch Changes
@@ -288,15 +298,5 @@
288
298
  - [`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdpes for @mastra/core
289
299
 
290
300
  - Updated dependencies [[`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430)]:
291
- - @mastra/deployer@0.15.2
292
- - @mastra/core@0.15.2
293
-
294
- ## 0.12.1
295
-
296
- ### Patch Changes
297
-
298
- - [`95b2aa9`](https://github.com/mastra-ai/mastra/commit/95b2aa908230919e67efcac0d69005a2d5745298) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdeps @mastra/core
299
-
300
- - Updated dependencies [[`95b2aa9`](https://github.com/mastra-ai/mastra/commit/95b2aa908230919e67efcac0d69005a2d5745298)]:
301
301
 
302
- ... 3404 more lines hidden. See full changelog in package directory.
302
+ ... 3414 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,15 @@
1
1
  # @mastra/deployer-vercel
2
2
 
3
+ ## 0.12.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
8
+
9
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
10
+ - @mastra/core@0.18.0-alpha.3
11
+ - @mastra/deployer@0.18.0-alpha.3
12
+
3
13
  ## 0.12.2-alpha.2
4
14
 
5
15
  ### Patch Changes
@@ -289,14 +299,4 @@
289
299
 
290
300
  ## 0.11.18
291
301
 
292
- ### Patch Changes
293
-
294
- - [`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdpes for @mastra/core
295
-
296
- - Updated dependencies [[`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430)]:
297
- - @mastra/deployer@0.15.2
298
- - @mastra/core@0.15.2
299
-
300
- ## 0.11.17
301
-
302
- ... 3358 more lines hidden. See full changelog in package directory.
302
+ ... 3368 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,17 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.18.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
8
+
9
+ - Add server api to score traces ([#8064](https://github.com/mastra-ai/mastra/pull/8064))
10
+
11
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
12
+ - @mastra/core@0.18.0-alpha.3
13
+ - @mastra/server@0.18.0-alpha.3
14
+
3
15
  ## 0.18.0-alpha.2
4
16
 
5
17
  ### Patch Changes
@@ -286,17 +298,5 @@
286
298
  {
287
299
  path: '/api/protected-endpoint',
288
300
  method: 'GET',
289
- requiresAuth: true, // Authentication required (default)
290
- handler: async c => c.json({ message: 'Protected access' }),
291
- },
292
- ];
293
- ```
294
-
295
- This addresses issue #7674 where custom endpoints were not being protected by the authentication system.
296
-
297
- - Playground ui -pass runtimeContext to client SDK get methods ([#7767](https://github.com/mastra-ai/mastra/pull/7767))
298
-
299
- - Updated dependencies [[`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`b6688b7`](https://github.com/mastra-ai/mastra/commit/b6688b75e49a4286d612aa2098e39c6118db2d07), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11)]:
300
- - @mastra/core@0.16.4-alpha.0
301
301
 
302
- ... 4316 more lines hidden. See full changelog in package directory.
302
+ ... 4328 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.24-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
8
+ - @mastra/core@0.18.0-alpha.3
9
+
3
10
  ## 0.13.24-alpha.2
4
11
 
5
12
  ### Patch Changes
@@ -291,12 +298,5 @@
291
298
  - Updated dependencies [905352b]
292
299
  - Updated dependencies [599d04c]
293
300
  - Updated dependencies [56041d0]
294
- - Updated dependencies [3412597]
295
- - Updated dependencies [5eca5d2]
296
- - Updated dependencies [f2cda47]
297
- - Updated dependencies [5de1555]
298
- - Updated dependencies [cfd377a]
299
- - Updated dependencies [1ed5a3e]
300
- - @mastra/core@0.15.3
301
-
302
- ... 1845 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 1852 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,20 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 0.15.3-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dependencies updates: ([#8088](https://github.com/mastra-ai/mastra/pull/8088))
8
+ - Updated dependency [`@upstash/redis@^1.35.4` ↗︎](https://www.npmjs.com/package/@upstash/redis/v/1.35.4) (from `^1.35.3`, in `dependencies`)
9
+
10
+ - Fix PostgreSQL vector index recreation issue and add optional index configuration ([#8020](https://github.com/mastra-ai/mastra/pull/8020))
11
+ - Fixed critical bug where memory vector indexes were unnecessarily recreated on every operation
12
+ - Added support for configuring vector index types (HNSW, IVFFlat, flat) and parameters
13
+
14
+ - Updated dependencies [[`b61b8e0`](https://github.com/mastra-ai/mastra/commit/b61b8e0b0e93a7e6e9d82e6f0b620bb919a20bdb), [`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
15
+ - @mastra/schema-compat@0.11.4-alpha.0
16
+ - @mastra/core@0.18.0-alpha.3
17
+
3
18
  ## 0.15.3-alpha.0
4
19
 
5
20
  ### Patch Changes
@@ -284,19 +299,4 @@
284
299
  - @mastra/schema-compat@0.11.0-alpha.2
285
300
  - @mastra/core@0.15.0-alpha.4
286
301
 
287
- ## 0.14.0-alpha.2
288
-
289
- ### Minor Changes
290
-
291
- - [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
292
-
293
- ### Patch Changes
294
-
295
- - Updated dependencies [[`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec)]:
296
- - @mastra/schema-compat@0.10.6-alpha.1
297
- - @mastra/core@0.15.0-alpha.3
298
-
299
- ## 0.13.2-alpha.1
300
-
301
-
302
- ... 3035 more lines hidden. See full changelog in package directory.
302
+ ... 3050 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,18 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 0.16.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix PostgreSQL vector index recreation issue and add optional index configuration ([#8020](https://github.com/mastra-ai/mastra/pull/8020))
8
+ - Fixed critical bug where memory vector indexes were unnecessarily recreated on every operation
9
+ - Added support for configuring vector index types (HNSW, IVFFlat, flat) and parameters
10
+
11
+ - fix(pg-vector): Fix vector type qualification for custom schemas on RDS ([#8070](https://github.com/mastra-ai/mastra/pull/8070))
12
+
13
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
14
+ - @mastra/core@0.18.0-alpha.3
15
+
3
16
  ## 0.16.1-alpha.0
4
17
 
5
18
  ### Patch Changes
@@ -285,18 +298,5 @@
285
298
  ### Patch Changes
286
299
 
287
300
  - 03997ae: Update peerdeps
288
- - d6e39da: Load most recent snapshot from storage
289
- - Updated dependencies [227c7e6]
290
- - Updated dependencies [12cae67]
291
- - Updated dependencies [fd3a3eb]
292
- - Updated dependencies [6faaee5]
293
- - Updated dependencies [4232b14]
294
- - Updated dependencies [a89de7e]
295
- - Updated dependencies [5a37d0c]
296
- - Updated dependencies [4bde0cb]
297
- - Updated dependencies [cf4f357]
298
- - Updated dependencies [ad888a2]
299
- - Updated dependencies [481751d]
300
- - Updated dependencies [2454423]
301
-
302
- ... 2367 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 2380 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,19 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 6.2.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix DateTimePicker style issue ([#8106](https://github.com/mastra-ai/mastra/pull/8106))
8
+
9
+ - Fix navigating between scores and entity types ([#8129](https://github.com/mastra-ai/mastra/pull/8129))
10
+
11
+ - Add UI for scoring traces ([#8089](https://github.com/mastra-ai/mastra/pull/8089))
12
+
13
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
14
+ - @mastra/core@0.18.0-alpha.3
15
+ - @mastra/client-js@0.13.2-alpha.3
16
+
3
17
  ## 6.2.2-alpha.2
4
18
 
5
19
  ### Patch Changes
@@ -284,19 +298,5 @@
284
298
 
285
299
  - Updated dependencies [[`fd9bbfe`](https://github.com/mastra-ai/mastra/commit/fd9bbfee22484f8493582325f53e8171bf8e682b)]:
286
300
  - @mastra/core@0.16.1-alpha.3
287
- - @mastra/client-js@0.12.1-alpha.3
288
-
289
- ## 6.1.1-alpha.1
290
-
291
- ### Patch Changes
292
-
293
- - Use workflow streamVNext in playground ([#7575](https://github.com/mastra-ai/mastra/pull/7575))
294
-
295
- - add workflow streaming in agent thread ([#7506](https://github.com/mastra-ai/mastra/pull/7506))
296
-
297
- - Updated dependencies [[`47b6dc9`](https://github.com/mastra-ai/mastra/commit/47b6dc94f4976d4f3d3882e8f19eb365bbc5976c), [`565d65f`](https://github.com/mastra-ai/mastra/commit/565d65fc16314a99f081975ec92f2636dff0c86d), [`4da3d68`](https://github.com/mastra-ai/mastra/commit/4da3d68a778e5c4d5a17351ef223289fe2f45a45), [`0b0bbb2`](https://github.com/mastra-ai/mastra/commit/0b0bbb24f4198ead69792e92b68a350f52b45cf3), [`d951f41`](https://github.com/mastra-ai/mastra/commit/d951f41771e4e5da8da4b9f870949f9509e38756), [`8049e2e`](https://github.com/mastra-ai/mastra/commit/8049e2e8cce80a00353c64894c62b695ac34e35e), [`9ad094f`](https://github.com/mastra-ai/mastra/commit/9ad094fe813b115734a0c1f4859fe4191e05b186)]:
298
- - @mastra/core@0.16.1-alpha.1
299
- - @mastra/client-js@0.12.1-alpha.1
300
-
301
301
 
302
- ... 3151 more lines hidden. See full changelog in package directory.
302
+ ... 3165 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,11 @@
1
1
  # @mastra/schema-compat
2
2
 
3
+ ## 0.11.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixes an issue when the OpenAI reasoning schema compatibility layer was calling defaultValue() as a function, which works in Zod v3 but fails in Zod v4 where defaultValue is stored directly as a value. ([#8090](https://github.com/mastra-ai/mastra/pull/8090))
8
+
3
9
  ## 0.11.3
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,18 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 0.18.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
8
+
9
+ - Delayed streamVNext breaking change notice by 1 week ([#8121](https://github.com/mastra-ai/mastra/pull/8121))
10
+
11
+ - Add server api to score traces ([#8064](https://github.com/mastra-ai/mastra/pull/8064))
12
+
13
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
14
+ - @mastra/core@0.18.0-alpha.3
15
+
3
16
  ## 0.18.0-alpha.2
4
17
 
5
18
  ### Patch Changes
@@ -285,18 +298,5 @@
285
298
  - Updated dependencies [6f5eb7a]
286
299
  - Updated dependencies [a01cf14]
287
300
  - Updated dependencies [a9e50ee]
288
- - Updated dependencies [5397eb4]
289
- - Updated dependencies [c9f4e4a]
290
- - Updated dependencies [0acbc80]
291
- - @mastra/core@0.16.0-alpha.0
292
-
293
- ## 0.15.3
294
-
295
- ### Patch Changes
296
-
297
- - ff89505: Add deprecation warnings and add legacy routes
298
- - de3cbc6: Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
299
- - f0dfcac: updated core peerdep
300
- - 48f0742: add deployer, server and clientjs handlers for agent builder template
301
301
 
302
- ... 3446 more lines hidden. See full changelog in package directory.
302
+ ... 3459 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,14 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 0.15.2-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dependencies updates: ([#8088](https://github.com/mastra-ai/mastra/pull/8088))
8
+ - Updated dependency [`@upstash/redis@^1.35.4` ↗︎](https://www.npmjs.com/package/@upstash/redis/v/1.35.4) (from `^1.35.3`, in `dependencies`)
9
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
10
+ - @mastra/core@0.18.0-alpha.3
11
+
3
12
  ## 0.15.2-alpha.0
4
13
 
5
14
  ### Patch Changes
@@ -289,14 +298,5 @@
289
298
 
290
299
  ### Patch Changes
291
300
 
292
- - Updated dependencies [ea0c5f2]
293
- - Updated dependencies [b0e43c1]
294
- - Updated dependencies [1fb812e]
295
- - Updated dependencies [35c5798]
296
- - @mastra/core@0.13.0-alpha.1
297
-
298
- ## 0.13.0
299
-
300
- ### Minor Changes
301
301
 
302
- ... 2082 more lines hidden. See full changelog in package directory.
302
+ ... 2091 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # create-mastra
2
2
 
3
+ ## 0.13.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
8
+
9
+ - Fix DateTimePicker style issue ([#8106](https://github.com/mastra-ai/mastra/pull/8106))
10
+
3
11
  ## 0.13.2-alpha.2
4
12
 
5
13
  ## 0.13.2-alpha.1
@@ -290,13 +298,5 @@
290
298
 
291
299
  ## 0.10.19-alpha.1
292
300
 
293
- ## 0.10.19-alpha.0
294
-
295
- ## 0.10.15
296
-
297
- ### Patch Changes
298
-
299
- - ad04455: Missed changeset in last release, needed to include create-mastra
300
-
301
301
 
302
- ... 1443 more lines hidden. See full changelog in package directory.
302
+ ... 1451 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,21 @@
1
1
  # mastra
2
2
 
3
+ ## 0.13.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
8
+
9
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
10
+
11
+ - Fix DateTimePicker style issue ([#8106](https://github.com/mastra-ai/mastra/pull/8106))
12
+
13
+ - Fix navigating between scores and entity types ([#8129](https://github.com/mastra-ai/mastra/pull/8129))
14
+
15
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
16
+ - @mastra/core@0.18.0-alpha.3
17
+ - @mastra/deployer@0.18.0-alpha.3
18
+
3
19
  ## 0.13.2-alpha.2
4
20
 
5
21
  ### Patch Changes
@@ -282,21 +298,5 @@
282
298
 
283
299
  ### Patch Changes
284
300
 
285
- - dependencies updates: ([#7544](https://github.com/mastra-ai/mastra/pull/7544))
286
- - Updated dependency [`fs-extra@^11.3.1` ↗︎](https://www.npmjs.com/package/fs-extra/v/11.3.1) (from `^11.3.0`, in `dependencies`)
287
-
288
- - Use workflow streamVNext in playground ([#7575](https://github.com/mastra-ai/mastra/pull/7575))
289
-
290
- - add workflow streaming in agent thread ([#7506](https://github.com/mastra-ai/mastra/pull/7506))
291
-
292
- - Fix template slug when getting template environment variables ([#7650](https://github.com/mastra-ai/mastra/pull/7650))
293
-
294
- - Update cli dev copy from "Local" - ([#7579](https://github.com/mastra-ai/mastra/pull/7579))
295
-
296
- - Updated dependencies [[`6d6e5dd`](https://github.com/mastra-ai/mastra/commit/6d6e5dd00edd5f4d2f310d347c615aef3ed7f609), [`0f7b8c0`](https://github.com/mastra-ai/mastra/commit/0f7b8c0c22d2a677a0f71c35ad1bc2d60b063d39), [`47b6dc9`](https://github.com/mastra-ai/mastra/commit/47b6dc94f4976d4f3d3882e8f19eb365bbc5976c), [`827d876`](https://github.com/mastra-ai/mastra/commit/827d8766f36a900afcaf64a040f7ba76249009b3), [`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`565d65f`](https://github.com/mastra-ai/mastra/commit/565d65fc16314a99f081975ec92f2636dff0c86d), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`4da3d68`](https://github.com/mastra-ai/mastra/commit/4da3d68a778e5c4d5a17351ef223289fe2f45a45), [`90cab34`](https://github.com/mastra-ai/mastra/commit/90cab347db71359dc5f3d001b1e8d63fd958879a), [`fd9bbfe`](https://github.com/mastra-ai/mastra/commit/fd9bbfee22484f8493582325f53e8171bf8e682b), [`e75360a`](https://github.com/mastra-ai/mastra/commit/e75360a134d722df969777abcf36092fadad1f12), [`7eaf1d1`](https://github.com/mastra-ai/mastra/commit/7eaf1d1cec7e828d7a98efc2a748ac395bbdba3b), [`6f046b5`](https://github.com/mastra-ai/mastra/commit/6f046b5ccc5c8721302a9a61d5d16c12374cc8d7), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`0b0bbb2`](https://github.com/mastra-ai/mastra/commit/0b0bbb24f4198ead69792e92b68a350f52b45cf3), [`d951f41`](https://github.com/mastra-ai/mastra/commit/d951f41771e4e5da8da4b9f870949f9509e38756), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`8049e2e`](https://github.com/mastra-ai/mastra/commit/8049e2e8cce80a00353c64894c62b695ac34e35e), [`f3427cd`](https://github.com/mastra-ai/mastra/commit/f3427cdaf9eecd63360dfc897a4acbf5f4143a4e), [`defed1c`](https://github.com/mastra-ai/mastra/commit/defed1ca8040cc8d42e645c5a50a1bc52a4918d7), [`79b39c1`](https://github.com/mastra-ai/mastra/commit/79b39c1def3bbd5d6ee2d2cc1e89ea378a940477), [`6991ced`](https://github.com/mastra-ai/mastra/commit/6991cedcb5a44a49d9fe58ef67926e1f96ba55b1), [`9cb9c42`](https://github.com/mastra-ai/mastra/commit/9cb9c422854ee81074989dd2d8dccc0500ba8d3e), [`f36343e`](https://github.com/mastra-ai/mastra/commit/f36343e02935b9a112a45b2dc3de7b562cc3aa68), [`8334859`](https://github.com/mastra-ai/mastra/commit/83348594d4f37b311ba4a94d679c5f8721d796d4), [`05f13b8`](https://github.com/mastra-ai/mastra/commit/05f13b8fb269ccfc4de98e9db58dbe16eae55a5e)]:
297
- - @mastra/deployer@0.16.1
298
- - @mastra/mcp@0.12.0
299
- - @mastra/core@0.16.1
300
-
301
301
 
302
- ... 5698 more lines hidden. See full changelog in package directory.
302
+ ... 5714 more lines hidden. See full changelog in package directory.
@@ -8,7 +8,7 @@ import { Tabs, Tab } from "@/components/tabs";
8
8
 
9
9
  # Install Mastra
10
10
 
11
- To get started with Mastra, youll need access to a large language model (LLM). By default, Mastra is set up to work with [OpenAI](https://platform.openai.com/), so youll need an API key to begin.
11
+ To get started with Mastra, you'll need access to a large language model (LLM). By default, Mastra is set up to work with [OpenAI](https://platform.openai.com/), so you'll need an API key to begin.
12
12
 
13
13
  Mastra also supports other LLM providers. For a full list of supported models and setup instructions, see [Model Providers](/docs/getting-started/model-providers).
14
14
 
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: "Conversation History | Memory | Mastra Docs"
3
+ description: "Learn how to configure conversation history in Mastra to store recent messages from the current conversation."
4
+ ---
5
+
6
+ # Conversation History
7
+
8
+ Conversation history is the simplest kind of memory. It is a list of messages from the current conversation.
9
+
10
+ By default, each request includes the last 10 messages from the current memory thread, giving the agent short-term conversational context. This limit can be increased using the `lastMessages` parameter.
11
+
12
+ You can increase this limit by passing the `lastMessages` parameter to the `Memory` instance.
13
+
14
+ ```typescript {3-7} showLineNumbers
15
+ export const testAgent = new Agent({
16
+ // ...
17
+ memory: new Memory({
18
+ options: {
19
+ lastMessages: 100
20
+ },
21
+ })
22
+ });
23
+ ```
@@ -3,54 +3,25 @@ title: "Memory Overview | Memory | Mastra Docs"
3
3
  description: "Learn how Mastra's memory system works with working memory, conversation history, and semantic recall."
4
4
  ---
5
5
 
6
- import { Steps, Callout } from "nextra/components";
6
+ import { Steps } from "nextra/components";
7
7
 
8
8
  # Memory overview
9
9
 
10
- Memory in Mastra helps agents manage context across conversations by condensing relevant information into the language models context window.
10
+ Memory in Mastra helps agents manage context across conversations by condensing relevant information into the language model's context window.
11
11
 
12
- Mastra supports three complementary memory systems: [working memory](./working-memory.mdx), [conversation history](#conversation-history), and [semantic recall](./semantic-recall.mdx). Together, they allow agents to track preferences, maintain conversational flow, and retrieve relevant historical messages.
12
+ Mastra supports three types of memory: working memory, conversation history, and semantic recall. It uses a two-tier scoping system where memory can be isolated per conversation thread (thread-scoped) or shared across all conversations for the same user (resource-scoped).
13
13
 
14
- To persist and recall information between conversations, memory requires a storage adapter.
15
-
16
- Supported options include:
17
-
18
- - [Memory with LibSQL](/examples/memory/memory-with-libsql)
19
- - [Memory with Postgres](/examples/memory/memory-with-pg)
20
- - [Memory with Upstash](/examples/memory/memory-with-upstash)
21
-
22
- ## Types of memory
23
-
24
- All memory types are [thread-scoped](./working-memory.mdx#thread-scoped-memory-default) by default, meaning they apply only to a single conversation. [Resource-scoped](./working-memory.mdx#resource-scoped-memory) configuration allows working memory and semantic recall to persist across all threads that use the same user or entity.
25
-
26
-
27
- ### Working memory
28
-
29
- Stores persistent user-specific details such as names, preferences, goals, and other structured data. Uses [Markdown templates](./working-memory.mdx) or [Zod schemas](./working-memory.mdx#structured-working-memory) to define structure.
30
-
31
- ### Conversation history
32
-
33
- Captures recent messages from the current conversation, providing short-term continuity and maintaining dialogue flow.
34
-
35
- ### Semantic recall
36
-
37
- Retrieves older messages from past conversations based on semantic relevance. Matches are retrieved using vector search and can include surrounding context for better comprehension.
38
-
39
- ## How memory works together
40
-
41
- Mastra combines all memory types into a single context window. If the total exceeds the model’s token limit, use [memory processors](./memory-processors.mdx) to trim or filter messages before sending them to the model.
14
+ Mastra's memory system uses [storage providers](#memory-storage-adapters) to persist conversation threads, messages, and working memory across application restarts.
42
15
 
43
16
  ## Getting started
44
17
 
45
- To use memory, install the required dependencies:
18
+ First install the required dependencies:
46
19
 
47
20
  ```bash copy
48
21
  npm install @mastra/core @mastra/memory @mastra/libsql
49
22
  ```
50
23
 
51
- ### Shared storage
52
-
53
- To share memory across agents, add a storage adapter to the main Mastra instance. Any agent with memory enabled will use this shared storage to store and recall interactions.
24
+ Then add a storage adapter to the main Mastra instance. Any agent with memory enabled will use this shared storage to store and recall interactions.
54
25
 
55
26
  ```typescript {6-8} filename="src/mastra/index.ts" showLineNumbers copy
56
27
  import { Mastra } from "@mastra/core/mastra";
@@ -64,150 +35,65 @@ export const mastra = new Mastra({
64
35
  });
65
36
  ```
66
37
 
67
- ### Adding working memory to agents
68
-
69
- Enable working memory by passing a `Memory` instance to the agent's `memory` parameter and setting `workingMemory.enabled` to `true`:
70
-
71
- ```typescript {1,6-12} filename="src/mastra/agents/test-agent.ts" showLineNumbers copy
72
- import { Memory } from "@mastra/memory";
73
- import { Agent } from "@mastra/core/agent";
74
-
75
- export const testAgent = new Agent({
76
- // ..
77
- memory: new Memory({
78
- options: {
79
- workingMemory: {
80
- enabled: true
81
- }
82
- }
83
- })
84
- })
85
- ```
86
-
87
- ## Dedicated storage
88
-
89
- Agents can be configured with their own dedicated storage, keeping tasks, conversations, and recalled information separate across agents.
90
-
91
- ### Adding storage to agents
38
+ Now, enable memory by passing a `Memory` instance to the agent's `memory` parameter:
92
39
 
93
- To assign dedicated storage to an agent, install and import the required dependency and pass a `storage` instance to the `Memory` constructor:
94
-
95
- ```typescript {3, 9-11} filename="src/mastra/agents/test-agent.ts" showLineNumbers copy
40
+ ```typescript {3-5} filename="src/mastra/agents/test-agent.ts" showLineNumbers copy
96
41
  import { Memory } from "@mastra/memory";
97
42
  import { Agent } from "@mastra/core/agent";
98
- import { LibSQLStore } from "@mastra/libsql";
99
43
 
100
44
  export const testAgent = new Agent({
101
45
  // ...
102
- memory: new Memory({
103
- // ...
104
- storage: new LibSQLStore({
105
- url: "file:agent-memory.db"
106
- })
107
- // ...
108
- })
46
+ memory: new Memory()
109
47
  });
110
48
  ```
111
49
 
112
- ## Memory threads
50
+ That memory instance has options you can configure for working memory, conversation history, and semantic recall.
113
51
 
114
- Mastra organizes memory into threads, which are records that group related interactions, using two identifiers:
52
+ ## Different types of memory
115
53
 
116
- 1. **`thread`**: A globally unique ID representing the conversation (e.g., `support_123`). Must be unique across all resources.
117
- 2. **`resource`**: The user or entity that owns the thread (e.g., `user_123`, `org_456`).
54
+ Mastra supports three types of memory: working memory, conversation history, and semantic recall.
118
55
 
119
- The `resource` is especially important for [resource-scoped memory](./working-memory.mdx#resource-scoped-memory), which allows memory to persist across all threads associated with the same user or entity.
120
-
121
- ```typescript {4} showLineNumbers
122
- const stream = await agent.stream("message for agent", {
123
- memory: {
124
- thread: "user-123",
125
- resource: "test-123"
126
- }
127
- });
128
- ```
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)
129
57
 
130
- <Callout type="warning">
131
- Even with memory configured, agents won’t store or recall information unless both `thread` and `resource` are provided.
132
- </Callout>
58
+ [**Conversation history**](./conversation-history.mdx) captures recent messages from the current conversation, providing short-term continuity and maintaining dialogue flow.
133
59
 
134
- > Mastra Playground sets `thread` and `resource` IDs automatically. In your own application, you must provide them manually as part of each `.generate()` or `.stream()` call.
60
+ [**Semantic recall**](./semantic-recall.mdx) retrieves older messages from past conversations based on semantic relevance. Matches are retrieved using vector search and can include surrounding context for better comprehension.
135
61
 
136
- ### Thread title generation
62
+ Mastra combines all memory types into a single context window. If the total exceeds the model’s token limit, use [memory processors](./memory-processors.mdx) to trim or filter messages before sending them to the model.
137
63
 
138
- Mastra can automatically generate descriptive thread titles based on the user's first message. Enable this by setting `generateTitle` to `true`. This improves organization and makes it easier to display conversations in your UI.
64
+ ## Scoping memory with threads and resources
139
65
 
140
- ```typescript {3-7} showLineNumbers
141
- export const testAgent = new Agent({
142
- memory: new Memory({
143
- options: {
144
- threads: {
145
- generateTitle: true,
146
- }
147
- },
148
- })
149
- });
150
- ```
66
+ All memory types are [thread-scoped](./working-memory.mdx#thread-scoped-memory-default) by default, meaning they apply only to a single conversation. [Resource-scoped](./working-memory.mdx#resource-scoped-memory) configuration allows working memory and semantic recall to persist across all threads that use the same user or entity.
151
67
 
152
- > Title generation runs asynchronously after the agent responds and does not affect response time. See the [full configuration reference](../../reference/memory/Memory.mdx#thread-title-generation) for details and examples.
68
+ ## Memory Storage Adapters
153
69
 
154
- #### Optimizing title generation
70
+ To persist and recall information between conversations, memory requires a storage adapter.
155
71
 
156
- Titles are generated using your agent's model by default. To optimize cost or behavior, provide a smaller `model` and custom `instructions`. This keeps title generation separate from main conversation logic.
72
+ Supported options include [LibSQL](/examples/memory/memory-with-libsql), [Postgres](/examples/memory/memory-with-pg), and [Upstash](/examples/memory/memory-with-upstash)
157
73
 
158
- ```typescript {5-9} showLineNumbers
159
- export const testAgent = new Agent({
160
- // ...
161
- memory: new Memory({
162
- options: {
163
- threads: {
164
- generateTitle: {
165
- model: openai("gpt-4.1-nano"),
166
- instructions: "Generate a concise title based on the user's first message",
167
- },
168
- },
169
- }
170
- })
171
- });
172
- ```
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.
173
75
 
174
- #### Dynamic model selection and instructions
76
+ ## Dedicated storage
175
77
 
176
- You can configure thread title generation dynamically by passing functions to `model` and `instructions`. These functions receive the `runtimeContext` object, allowing you to adapt title generation based on user-specific values.
78
+ Agents can be configured with their own dedicated storage, keeping tasks, conversations, and recalled information separate across agents.
177
79
 
178
- ```typescript {7-16} showLineNumbers
179
- export const testAgent = new Agent({
180
- // ...
181
- memory: new Memory({
182
- options: {
183
- threads: {
184
- generateTitle: {
185
- model: ({ runtimeContext }) => {
186
- const userTier = runtimeContext.get("userTier");
187
- return userTier === "premium" ? openai("gpt-4.1") : openai("gpt-4.1-nano");
188
- },
189
- instructions: ({ runtimeContext }) => {
190
- const language = runtimeContext.get("userLanguage") || "English";
191
- return `Generate a concise, engaging title in ${language} based on the user's first message.`;
192
- }
193
- }
194
- }
195
- }
196
- })
197
- });
198
- ```
80
+ ### Adding storage to agents
199
81
 
200
- ## Increasing conversation history
82
+ To assign dedicated storage to an agent, install and import the required dependency and pass a `storage` instance to the `Memory` constructor:
201
83
 
202
- By default, each request includes the last 10 messages from the current memory thread, giving the agent short-term conversational context. This limit can be increased using the `lastMessages` parameter.
84
+ ```typescript {3, 9-11} filename="src/mastra/agents/test-agent.ts" showLineNumbers copy
85
+ import { Memory } from "@mastra/memory";
86
+ import { Agent } from "@mastra/core/agent";
87
+ import { LibSQLStore } from "@mastra/libsql";
203
88
 
204
- ```typescript {3-7} showLineNumbers
205
89
  export const testAgent = new Agent({
206
90
  // ...
207
91
  memory: new Memory({
208
- options: {
209
- lastMessages: 100
210
- },
92
+ // ...
93
+ storage: new LibSQLStore({
94
+ url: "file:agent-memory.db"
95
+ })
96
+ // ...
211
97
  })
212
98
  });
213
99
  ```
@@ -226,7 +112,6 @@ For local development with `LibSQLStore`, you can inspect stored memory using th
226
112
 
227
113
  ![SQLite Viewer](/image/memory/memory-sqlite-viewer.jpg)
228
114
 
229
-
230
115
  ## Next Steps
231
116
 
232
117
  Now that you understand the core concepts, continue to [semantic recall](./semantic-recall.mdx) to learn how to add RAG memory to your Mastra agents.
@@ -136,6 +136,42 @@ const agent = new Agent({
136
136
  });
137
137
  ```
138
138
 
139
+ ### PostgreSQL Index Optimization
140
+
141
+ When using PostgreSQL as your vector store, you can optimize semantic recall performance by configuring the vector index. This is particularly important for large-scale deployments with thousands of messages.
142
+
143
+ PostgreSQL supports both IVFFlat and HNSW indexes. By default, Mastra creates an IVFFlat index, but HNSW indexes typically provide better performance, especially with OpenAI embeddings which use inner product distance.
144
+
145
+ ```typescript {9-18}
146
+ import { Memory } from "@mastra/memory";
147
+ import { PgStore, PgVector } from "@mastra/pg";
148
+
149
+ const agent = new Agent({
150
+ memory: new Memory({
151
+ storage: new PgStore({
152
+ connectionString: process.env.DATABASE_URL,
153
+ }),
154
+ vector: new PgVector({
155
+ connectionString: process.env.DATABASE_URL,
156
+ }),
157
+ options: {
158
+ semanticRecall: {
159
+ topK: 5,
160
+ messageRange: 2,
161
+ indexConfig: {
162
+ type: 'hnsw', // Use HNSW for better performance
163
+ metric: 'dotproduct', // Best for OpenAI embeddings
164
+ m: 16, // Number of bi-directional links (default: 16)
165
+ efConstruction: 64, // Size of candidate list during construction (default: 64)
166
+ },
167
+ },
168
+ },
169
+ }),
170
+ });
171
+ ```
172
+
173
+ For detailed information about index configuration options and performance tuning, see the [PgVector configuration guide](/reference/rag/pg#index-configuration-guide).
174
+
139
175
  ### Disabling
140
176
 
141
177
  There is a performance impact to using semantic recall. New messages are converted into embeddings and used to query a vector database before new messages are sent to the LLM.
@@ -0,0 +1,94 @@
1
+ ---
2
+ title: "Memory Threads and Resources | Memory | Mastra Docs"
3
+ description: "Learn how Mastra's memory system works with working memory, conversation history, and semantic recall."
4
+ ---
5
+
6
+ import { Callout } from "nextra/components";
7
+
8
+ # Memory threads and resources
9
+
10
+ Mastra organizes memory into threads, which are records that group related interactions, using two identifiers:
11
+
12
+ 1. **`thread`**: A globally unique ID representing the conversation (e.g., `support_123`). Must be unique across all resources.
13
+ 2. **`resource`**: The user or entity that owns the thread (e.g., `user_123`, `org_456`).
14
+
15
+ The `resource` is especially important for [resource-scoped memory](./working-memory.mdx#resource-scoped-memory), which allows memory to persist across all threads associated with the same user or entity.
16
+
17
+ ```typescript {4} showLineNumbers
18
+ const stream = await agent.stream("message for agent", {
19
+ memory: {
20
+ thread: "user-123",
21
+ resource: "test-123"
22
+ }
23
+ });
24
+ ```
25
+
26
+ <Callout type="warning">
27
+ Even with memory configured, agents won’t store or recall information unless both `thread` and `resource` are provided.
28
+ </Callout>
29
+
30
+ > Mastra Playground sets `thread` and `resource` IDs automatically. In your own application, you must provide them manually as part of each `.generate()` or `.stream()` call.
31
+
32
+ ### Thread title generation
33
+
34
+ Mastra can automatically generate descriptive thread titles based on the user's first message. Enable this by setting `generateTitle` to `true`. This improves organization and makes it easier to display conversations in your UI.
35
+
36
+ ```typescript {3-7} showLineNumbers
37
+ export const testAgent = new Agent({
38
+ memory: new Memory({
39
+ options: {
40
+ threads: {
41
+ generateTitle: true,
42
+ }
43
+ },
44
+ })
45
+ });
46
+ ```
47
+
48
+ > Title generation runs asynchronously after the agent responds and does not affect response time. See the [full configuration reference](../../reference/memory/Memory.mdx#thread-title-generation) for details and examples.
49
+
50
+ #### Optimizing title generation
51
+
52
+ Titles are generated using your agent's model by default. To optimize cost or behavior, provide a smaller `model` and custom `instructions`. This keeps title generation separate from main conversation logic.
53
+
54
+ ```typescript {5-9} showLineNumbers
55
+ export const testAgent = new Agent({
56
+ // ...
57
+ memory: new Memory({
58
+ options: {
59
+ threads: {
60
+ generateTitle: {
61
+ model: openai("gpt-4.1-nano"),
62
+ instructions: "Generate a concise title based on the user's first message",
63
+ },
64
+ },
65
+ }
66
+ })
67
+ });
68
+ ```
69
+
70
+ #### Dynamic model selection and instructions
71
+
72
+ You can configure thread title generation dynamically by passing functions to `model` and `instructions`. These functions receive the `runtimeContext` object, allowing you to adapt title generation based on user-specific values.
73
+
74
+ ```typescript {7-16} showLineNumbers
75
+ export const testAgent = new Agent({
76
+ // ...
77
+ memory: new Memory({
78
+ options: {
79
+ threads: {
80
+ generateTitle: {
81
+ model: ({ runtimeContext }) => {
82
+ const userTier = runtimeContext.get("userTier");
83
+ return userTier === "premium" ? openai("gpt-4.1") : openai("gpt-4.1-nano");
84
+ },
85
+ instructions: ({ runtimeContext }) => {
86
+ const language = runtimeContext.get("userLanguage") || "English";
87
+ return `Generate a concise, engaging title in ${language} based on the user's first message.`;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ })
93
+ });
94
+ ```
@@ -152,6 +152,47 @@ export const agent = new Agent({
152
152
  });
153
153
  ```
154
154
 
155
+ ## PostgreSQL with index configuration
156
+
157
+ ```typescript filename="src/mastra/agents/pg-agent.ts" showLineNumbers copy
158
+ import { Memory } from "@mastra/memory";
159
+ import { Agent } from "@mastra/core/agent";
160
+ import { openai } from "@ai-sdk/openai";
161
+ import { PgStore, PgVector } from "@mastra/pg";
162
+
163
+ export const agent = new Agent({
164
+ name: "pg-agent",
165
+ instructions: "You are an agent with optimized PostgreSQL memory.",
166
+ model: openai("gpt-4o"),
167
+ memory: new Memory({
168
+ storage: new PgStore({
169
+ connectionString: process.env.DATABASE_URL
170
+ }),
171
+ vector: new PgVector({
172
+ connectionString: process.env.DATABASE_URL
173
+ }),
174
+ embedder: openai.embedding("text-embedding-3-small"),
175
+ options: {
176
+ lastMessages: 20,
177
+ semanticRecall: {
178
+ topK: 5,
179
+ messageRange: 3,
180
+ scope: 'resource',
181
+ indexConfig: {
182
+ type: 'hnsw', // Use HNSW for better performance
183
+ metric: 'dotproduct', // Optimal for OpenAI embeddings
184
+ m: 16, // Number of bi-directional links
185
+ efConstruction: 64 // Construction-time candidate list size
186
+ }
187
+ },
188
+ workingMemory: {
189
+ enabled: true
190
+ }
191
+ }
192
+ })
193
+ });
194
+ ```
195
+
155
196
  ### Related
156
197
 
157
198
  - [Getting Started with Memory](/docs/memory/overview.mdx)
@@ -498,11 +498,38 @@ try {
498
498
  }
499
499
  ```
500
500
 
501
+ ## Index Configuration Guide
502
+
503
+ ### Performance Optimization
504
+
505
+ #### IVFFlat Tuning
506
+ - **lists parameter**: Set to `sqrt(n) * 2` where n is the number of vectors
507
+ - More lists = better accuracy but slower build time
508
+ - Fewer lists = faster build but potentially lower accuracy
509
+
510
+ #### HNSW Tuning
511
+ - **m parameter**:
512
+ - 8-16: Moderate accuracy, lower memory
513
+ - 16-32: High accuracy, moderate memory
514
+ - 32-64: Very high accuracy, high memory
515
+ - **efConstruction**:
516
+ - 32-64: Fast build, good quality
517
+ - 64-128: Slower build, better quality
518
+ - 128-256: Slowest build, best quality
519
+
520
+ ### Index Recreation Behavior
521
+
522
+ The system automatically detects configuration changes and only rebuilds indexes when necessary:
523
+ - Same configuration: Index is kept (no recreation)
524
+ - Changed configuration: Index is dropped and rebuilt
525
+ - This prevents the performance issues from unnecessary index recreations
526
+
501
527
  ## Best Practices
502
528
 
503
529
  - Regularly evaluate your index configuration to ensure optimal performance.
504
530
  - Adjust parameters like `lists` and `m` based on dataset size and query requirements.
505
- - Rebuild indexes periodically to maintain efficiency, especially after significant data changes.
531
+ - **Monitor index performance** using `describeIndex()` to track usage
532
+ - Rebuild indexes periodically to maintain efficiency, especially after significant data changes
506
533
 
507
534
  ## Direct Pool Access
508
535
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.24-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
8
+ - @mastra/core@0.18.0-alpha.3
9
+
3
10
  ## 0.13.24-alpha.2
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.24-alpha.2",
3
+ "version": "0.13.24-alpha.3",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,11 +33,11 @@
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.18.0-alpha.2",
36
+ "@mastra/core": "0.18.0-alpha.3",
37
37
  "@mastra/mcp": "^0.13.1-alpha.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@hono/node-server": "^1.19.3",
40
+ "@hono/node-server": "^1.19.4",
41
41
  "@types/jsdom": "^21.1.7",
42
42
  "@types/node": "^20.19.0",
43
43
  "@types/turndown": "^5.0.5",
@@ -50,7 +50,7 @@
50
50
  "typescript": "^5.8.3",
51
51
  "vitest": "^3.2.4",
52
52
  "@internal/lint": "0.0.41",
53
- "@mastra/core": "0.18.0-alpha.2"
53
+ "@mastra/core": "0.18.0-alpha.3"
54
54
  },
55
55
  "homepage": "https://mastra.ai",
56
56
  "repository": {