@mastra/mcp-docs-server 0.13.31 → 0.13.32-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/%40mastra%2Fai-sdk.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Freact.md +7 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +11 -11
- package/.docs/organized/changelogs/create-mastra.md +3 -3
- package/.docs/organized/changelogs/mastra.md +11 -11
- package/.docs/organized/code-examples/agui.md +2 -2
- package/.docs/organized/code-examples/ai-elements.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-v5.md +2 -2
- package/.docs/organized/code-examples/assistant-ui.md +2 -2
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +2 -2
- package/.docs/organized/code-examples/client-side-tools.md +2 -2
- package/.docs/organized/code-examples/crypto-chatbot.md +2 -2
- package/.docs/organized/code-examples/heads-up-game.md +2 -2
- package/.docs/organized/code-examples/openapi-spec-writer.md +2 -2
- package/.docs/raw/agents/agent-memory.mdx +48 -31
- package/.docs/raw/agents/guardrails.mdx +8 -1
- package/.docs/raw/agents/networks.mdx +197 -128
- package/.docs/raw/agents/overview.mdx +10 -9
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +92 -1
- package/.docs/raw/getting-started/installation.mdx +61 -68
- package/.docs/raw/memory/conversation-history.mdx +2 -2
- package/.docs/raw/memory/semantic-recall.mdx +36 -10
- package/.docs/raw/rag/chunking-and-embedding.mdx +19 -7
- package/.docs/raw/reference/client-js/agents.mdx +44 -25
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +3 -6
- package/.docs/raw/reference/scorers/answer-similarity.mdx +7 -13
- package/.docs/raw/reference/scorers/bias.mdx +3 -6
- package/.docs/raw/reference/scorers/completeness.mdx +3 -6
- package/.docs/raw/reference/scorers/context-precision.mdx +6 -9
- package/.docs/raw/reference/scorers/context-relevance.mdx +12 -18
- package/.docs/raw/reference/scorers/faithfulness.mdx +3 -6
- package/.docs/raw/reference/scorers/hallucination.mdx +3 -6
- package/.docs/raw/reference/scorers/noise-sensitivity.mdx +13 -23
- package/.docs/raw/reference/scorers/prompt-alignment.mdx +16 -20
- package/.docs/raw/reference/scorers/tool-call-accuracy.mdx +4 -5
- package/.docs/raw/reference/scorers/toxicity.mdx +3 -6
- package/.docs/raw/reference/workflows/step.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +23 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +22 -4
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +14 -4
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +18 -1
- package/.docs/raw/server-db/runtime-context.mdx +13 -3
- package/.docs/raw/streaming/tool-streaming.mdx +30 -0
- package/.docs/raw/tools-mcp/overview.mdx +1 -1
- package/.docs/raw/workflows/overview.mdx +1 -1
- package/.docs/raw/workflows/suspend-and-resume.mdx +34 -23
- package/CHANGELOG.md +7 -0
- package/package.json +4 -4
- package/.docs/raw/workflows/pausing-execution.mdx +0 -142
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 0.21.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Generate a title for Agent.network() threads ([#8853](https://github.com/mastra-ai/mastra/pull/8853))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`c67ca32`](https://github.com/mastra-ai/mastra/commit/c67ca32e3c2cf69bfc146580770c720220ca44ac), [`dbc9e12`](https://github.com/mastra-ai/mastra/commit/dbc9e1216ba575ba59ead4afb727a01215f7de4f), [`99e41b9`](https://github.com/mastra-ai/mastra/commit/99e41b94957cdd25137d3ac12e94e8b21aa01b68), [`c28833c`](https://github.com/mastra-ai/mastra/commit/c28833c5b6d8e10eeffd7f7d39129d53b8bca240), [`f053e89`](https://github.com/mastra-ai/mastra/commit/f053e89160dbd0bd3333fc3492f68231b5c7c349), [`9a1a485`](https://github.com/mastra-ai/mastra/commit/9a1a4859b855e37239f652bf14b1ecd1029b8c4e), [`9257233`](https://github.com/mastra-ai/mastra/commit/9257233c4ffce09b2bedc2a9adbd70d7a83fa8e2), [`0f1a4c9`](https://github.com/mastra-ai/mastra/commit/0f1a4c984fb4b104b2f0b63ba18c9fa77f567700), [`2db6160`](https://github.com/mastra-ai/mastra/commit/2db6160e2022ff8827c15d30157e684683b934b5), [`8aeea37`](https://github.com/mastra-ai/mastra/commit/8aeea37efdde347c635a67fed56794943b7f74ec), [`02fe153`](https://github.com/mastra-ai/mastra/commit/02fe15351d6021d214da48ec982a0e9e4150bcee), [`74567b3`](https://github.com/mastra-ai/mastra/commit/74567b3d237ae3915cd0bca3cf55fa0a64e4e4a4), [`15a1733`](https://github.com/mastra-ai/mastra/commit/15a1733074cee8bd37370e1af34cd818e89fa7ac), [`fc2a774`](https://github.com/mastra-ai/mastra/commit/fc2a77468981aaddc3e77f83f0c4ad4a4af140da), [`4e08933`](https://github.com/mastra-ai/mastra/commit/4e08933625464dfde178347af5b6278fcf34188e)]:
|
|
10
|
+
- @mastra/core@0.21.2-alpha.0
|
|
11
|
+
|
|
3
12
|
## 0.21.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -290,13 +299,4 @@
|
|
|
290
299
|
|
|
291
300
|
- Delayed streamVNext breaking change notice by 1 week ([#8121](https://github.com/mastra-ai/mastra/pull/8121))
|
|
292
301
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
- Add server api to score traces ([#8064](https://github.com/mastra-ai/mastra/pull/8064))
|
|
296
|
-
|
|
297
|
-
- Updated dependencies [[`cf34503`](https://github.com/mastra-ai/mastra/commit/cf345031de4e157f29087946449e60b965e9c8a9), [`6b4b1e4`](https://github.com/mastra-ai/mastra/commit/6b4b1e4235428d39e51cbda9832704c0ba70ab32), [`3469fca`](https://github.com/mastra-ai/mastra/commit/3469fca7bb7e5e19369ff9f7044716a5e4b02585), [`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`c45298a`](https://github.com/mastra-ai/mastra/commit/c45298a0a0791db35cf79f1199d77004da0704cb), [`c4a8204`](https://github.com/mastra-ai/mastra/commit/c4a82046bfd241d6044e234bc5917d5a01fe6b55), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad), [`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)]:
|
|
298
|
-
- @mastra/core@0.18.0
|
|
299
|
-
|
|
300
|
-
## 0.18.0-alpha.3
|
|
301
|
-
|
|
302
|
-
... 3756 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 3765 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-google
|
|
2
2
|
|
|
3
|
+
## 0.11.10-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dependencies updates: ([#8936](https://github.com/mastra-ai/mastra/pull/8936))
|
|
8
|
+
- Updated dependency [`@google-cloud/text-to-speech@^6.3.1` ↗︎](https://www.npmjs.com/package/@google-cloud/text-to-speech/v/6.3.1) (from `^6.3.0`, in `dependencies`)
|
|
9
|
+
- Updated dependencies [[`c67ca32`](https://github.com/mastra-ai/mastra/commit/c67ca32e3c2cf69bfc146580770c720220ca44ac), [`dbc9e12`](https://github.com/mastra-ai/mastra/commit/dbc9e1216ba575ba59ead4afb727a01215f7de4f), [`99e41b9`](https://github.com/mastra-ai/mastra/commit/99e41b94957cdd25137d3ac12e94e8b21aa01b68), [`c28833c`](https://github.com/mastra-ai/mastra/commit/c28833c5b6d8e10eeffd7f7d39129d53b8bca240), [`f053e89`](https://github.com/mastra-ai/mastra/commit/f053e89160dbd0bd3333fc3492f68231b5c7c349), [`9a1a485`](https://github.com/mastra-ai/mastra/commit/9a1a4859b855e37239f652bf14b1ecd1029b8c4e), [`9257233`](https://github.com/mastra-ai/mastra/commit/9257233c4ffce09b2bedc2a9adbd70d7a83fa8e2), [`0f1a4c9`](https://github.com/mastra-ai/mastra/commit/0f1a4c984fb4b104b2f0b63ba18c9fa77f567700), [`2db6160`](https://github.com/mastra-ai/mastra/commit/2db6160e2022ff8827c15d30157e684683b934b5), [`8aeea37`](https://github.com/mastra-ai/mastra/commit/8aeea37efdde347c635a67fed56794943b7f74ec), [`02fe153`](https://github.com/mastra-ai/mastra/commit/02fe15351d6021d214da48ec982a0e9e4150bcee), [`74567b3`](https://github.com/mastra-ai/mastra/commit/74567b3d237ae3915cd0bca3cf55fa0a64e4e4a4), [`15a1733`](https://github.com/mastra-ai/mastra/commit/15a1733074cee8bd37370e1af34cd818e89fa7ac), [`fc2a774`](https://github.com/mastra-ai/mastra/commit/fc2a77468981aaddc3e77f83f0c4ad4a4af140da), [`4e08933`](https://github.com/mastra-ai/mastra/commit/4e08933625464dfde178347af5b6278fcf34188e)]:
|
|
10
|
+
- @mastra/core@0.21.2-alpha.0
|
|
11
|
+
|
|
3
12
|
## 0.11.9
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- Updated dependencies [227c7e6]
|
|
290
299
|
- Updated dependencies [12cae67]
|
|
291
300
|
- Updated dependencies [fd3a3eb]
|
|
292
|
-
|
|
293
|
-
|
|
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
|
-
... 1408 more lines hidden. See full changelog in package directory.
|
|
301
|
+
|
|
302
|
+
... 1417 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.17.1-alpha.0
|
|
4
|
+
|
|
3
5
|
## 0.17.0
|
|
4
6
|
|
|
5
7
|
### Patch Changes
|
|
@@ -297,6 +299,4 @@
|
|
|
297
299
|
|
|
298
300
|
### Patch Changes
|
|
299
301
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
... 1750 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 1752 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.17.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Use newer model id for anthropic during `create-mastra` ([#8996](https://github.com/mastra-ai/mastra/pull/8996))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`c67ca32`](https://github.com/mastra-ai/mastra/commit/c67ca32e3c2cf69bfc146580770c720220ca44ac), [`dbc9e12`](https://github.com/mastra-ai/mastra/commit/dbc9e1216ba575ba59ead4afb727a01215f7de4f), [`99e41b9`](https://github.com/mastra-ai/mastra/commit/99e41b94957cdd25137d3ac12e94e8b21aa01b68), [`c28833c`](https://github.com/mastra-ai/mastra/commit/c28833c5b6d8e10eeffd7f7d39129d53b8bca240), [`f053e89`](https://github.com/mastra-ai/mastra/commit/f053e89160dbd0bd3333fc3492f68231b5c7c349), [`1eb156a`](https://github.com/mastra-ai/mastra/commit/1eb156ace499b34ab48bf23fb16f1affe6bb9c1c), [`9a1a485`](https://github.com/mastra-ai/mastra/commit/9a1a4859b855e37239f652bf14b1ecd1029b8c4e), [`9257233`](https://github.com/mastra-ai/mastra/commit/9257233c4ffce09b2bedc2a9adbd70d7a83fa8e2), [`0f1a4c9`](https://github.com/mastra-ai/mastra/commit/0f1a4c984fb4b104b2f0b63ba18c9fa77f567700), [`2db6160`](https://github.com/mastra-ai/mastra/commit/2db6160e2022ff8827c15d30157e684683b934b5), [`8aeea37`](https://github.com/mastra-ai/mastra/commit/8aeea37efdde347c635a67fed56794943b7f74ec), [`02fe153`](https://github.com/mastra-ai/mastra/commit/02fe15351d6021d214da48ec982a0e9e4150bcee), [`74567b3`](https://github.com/mastra-ai/mastra/commit/74567b3d237ae3915cd0bca3cf55fa0a64e4e4a4), [`15a1733`](https://github.com/mastra-ai/mastra/commit/15a1733074cee8bd37370e1af34cd818e89fa7ac), [`fc2a774`](https://github.com/mastra-ai/mastra/commit/fc2a77468981aaddc3e77f83f0c4ad4a4af140da), [`4e08933`](https://github.com/mastra-ai/mastra/commit/4e08933625464dfde178347af5b6278fcf34188e)]:
|
|
10
|
+
- @mastra/core@0.21.2-alpha.0
|
|
11
|
+
- @mastra/deployer@0.21.2-alpha.0
|
|
12
|
+
|
|
3
13
|
## 0.17.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -289,14 +299,4 @@
|
|
|
289
299
|
|
|
290
300
|
- add refetch interval to traces to make it feel "instant" ([#8386](https://github.com/mastra-ai/mastra/pull/8386))
|
|
291
301
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Add doc url to netlify gateway ([#8356](https://github.com/mastra-ai/mastra/pull/8356))
|
|
295
|
-
|
|
296
|
-
- fix codeblock line number color contrast for legacy traces ([#8385](https://github.com/mastra-ai/mastra/pull/8385))
|
|
297
|
-
|
|
298
|
-
- Model router documentation and playground UI improvements ([#8372](https://github.com/mastra-ai/mastra/pull/8372))
|
|
299
|
-
|
|
300
|
-
**Documentation generation (`@mastra/core`):**
|
|
301
|
-
|
|
302
|
-
... 6218 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 6228 more lines hidden. See full changelog in package directory.
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
25
25
|
"@typescript-eslint/parser": "^8.38.0",
|
|
26
26
|
"@vitejs/plugin-react": "^5.0.4",
|
|
27
|
-
"eslint": "^9.
|
|
27
|
+
"eslint": "^9.37.0",
|
|
28
28
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
29
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
29
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
30
30
|
"globals": "^16.0.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
32
|
"vite": "^7.1.9"
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@types/react": "^19",
|
|
38
38
|
"@types/react-dom": "^19",
|
|
39
39
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
40
|
-
"eslint": "^9.
|
|
41
|
-
"eslint-config-next": "15.5.
|
|
40
|
+
"eslint": "^9.37.0",
|
|
41
|
+
"eslint-config-next": "15.5.6",
|
|
42
42
|
"tailwindcss": "^4",
|
|
43
43
|
"tw-animate-css": "^1.4.0",
|
|
44
44
|
"typescript": "^5"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@types/node": "^20.17.57",
|
|
17
17
|
"@types/react": "^19.1.9",
|
|
18
18
|
"@types/react-dom": "^19.1.7",
|
|
19
|
-
"eslint": "^9.
|
|
20
|
-
"eslint-config-next": "15.5.
|
|
19
|
+
"eslint": "^9.37.0",
|
|
20
|
+
"eslint-config-next": "15.5.6",
|
|
21
21
|
"postcss": "^8.5.3",
|
|
22
22
|
"tailwindcss": "^3.4.17",
|
|
23
23
|
"typescript": "^5.8.3"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@types/node": "^20",
|
|
24
24
|
"@types/react": "^19.1.9",
|
|
25
25
|
"@types/react-dom": "^19.1.7",
|
|
26
|
-
"eslint": "^9.
|
|
27
|
-
"eslint-config-next": "15.5.
|
|
26
|
+
"eslint": "^9.37.0",
|
|
27
|
+
"eslint-config-next": "15.5.6",
|
|
28
28
|
"mastra": "latest",
|
|
29
29
|
"postcss": "^8",
|
|
30
30
|
"tailwindcss": "^3.4.1",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"@types/node": "^20.17.57",
|
|
19
19
|
"@types/react": "^19.1.9",
|
|
20
20
|
"@types/react-dom": "^19.1.7",
|
|
21
|
-
"eslint": "^9.
|
|
22
|
-
"eslint-config-next": "15.5.
|
|
21
|
+
"eslint": "^9.37.0",
|
|
22
|
+
"eslint-config-next": "15.5.6",
|
|
23
23
|
"postcss": "^8.5.3",
|
|
24
24
|
"tailwindcss": "^3.4.17",
|
|
25
25
|
"typescript": "^5.8.3"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@types/node": "^20.17.57",
|
|
24
24
|
"@types/react": "^19.1.12",
|
|
25
25
|
"@types/react-dom": "^19.1.9",
|
|
26
|
-
"eslint": "^9.
|
|
27
|
-
"eslint-config-next": "15.5.
|
|
26
|
+
"eslint": "^9.37.0",
|
|
27
|
+
"eslint-config-next": "15.5.6",
|
|
28
28
|
"postcss": "^8.5.3",
|
|
29
29
|
"tailwindcss": "^3.4.17",
|
|
30
30
|
"typescript": "^5.8.3"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@types/node": "^20.17.57",
|
|
24
24
|
"@types/react": "^19.1.9",
|
|
25
25
|
"@types/react-dom": "^19.1.7",
|
|
26
|
-
"eslint": "^9.
|
|
27
|
-
"eslint-config-next": "15.5.
|
|
26
|
+
"eslint": "^9.37.0",
|
|
27
|
+
"eslint-config-next": "15.5.6",
|
|
28
28
|
"postcss": "^8.5.3",
|
|
29
29
|
"tailwindcss": "^3.4.17",
|
|
30
30
|
"typescript": "^5.8.3"
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"@types/react": "^19.1.9",
|
|
16
16
|
"@types/react-dom": "^19.1.7",
|
|
17
17
|
"@vitejs/plugin-react": "^5.0.4",
|
|
18
|
-
"eslint": "^9.
|
|
18
|
+
"eslint": "^9.37.0",
|
|
19
19
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
20
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
20
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
21
21
|
"globals": "^15.15.0",
|
|
22
22
|
"typescript": "~5.8.3",
|
|
23
23
|
"typescript-eslint": "^8.38.0",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@types/react": "^19.1.9",
|
|
72
72
|
"@types/react-dom": "^19.1.7",
|
|
73
73
|
"drizzle-kit": "^0.31.0",
|
|
74
|
-
"eslint": "^9.
|
|
75
|
-
"eslint-config-next": "15.5.
|
|
74
|
+
"eslint": "^9.37.0",
|
|
75
|
+
"eslint-config-next": "15.5.6",
|
|
76
76
|
"eslint-config-prettier": "^10.1.8",
|
|
77
77
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
78
78
|
"eslint-plugin-import": "^2.32.0",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ai-sdk/openai": "^1.3.23",
|
|
10
|
-
"@mastra/core": "^0.21.
|
|
10
|
+
"@mastra/core": "^0.21.1",
|
|
11
11
|
"@mastra/libsql": "^0.15.2",
|
|
12
12
|
"@mastra/loggers": "^0.10.16",
|
|
13
13
|
"@mastra/memory": "^0.15.7",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/node": "^24.3.0",
|
|
18
|
-
"mastra": "^0.
|
|
18
|
+
"mastra": "^0.17.0",
|
|
19
19
|
"typescript": "^5.9.2"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@types/react": "^19.1.9",
|
|
34
34
|
"@types/react-dom": "^19.1.7",
|
|
35
35
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
36
|
-
"eslint": "^9.
|
|
37
|
-
"eslint-config-next": "15.5.
|
|
36
|
+
"eslint": "^9.37.0",
|
|
37
|
+
"eslint-config-next": "15.5.6",
|
|
38
38
|
"postcss": "^8.5.3",
|
|
39
39
|
"tailwindcss": "^3.4.17",
|
|
40
40
|
"typescript": "^5.8.3"
|
|
@@ -3,46 +3,57 @@ title: "Agent Memory | Agents | Mastra Docs"
|
|
|
3
3
|
description: Learn how to add memory to agents to store conversation history and maintain context across interactions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Steps } from "nextra/components";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Agent memory
|
|
9
9
|
|
|
10
|
-
Agents
|
|
10
|
+
Agents use memory to maintain context across interactions. LLMs are stateless and don't retain information between calls, so agents need memory to track conversation history and recall relevant information.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Use memory when an agent needs to retain information across multiple user interactions. This includes recalling user-specific details, facts, or tool calls and their results. Without memory, the agent handles each request in isolation, with no awareness of previous messages or responses.
|
|
15
|
-
|
|
16
|
-
For more information about the different ways memory works in Mastra see the following pages.
|
|
12
|
+
Mastra agents can be configured to store conversation history, with optional [working memory](../memory/working-memory) to maintain recent context or [semantic recall](../memory/semantic-recall) to retrieve past messages based on meaning.
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
- [Semantic Recall](../memory/semantic-recall.mdx)
|
|
14
|
+
## When to use memory
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
Use memory when your agent needs to maintain multi-turn conversations that reference prior exchanges, recall user preferences or facts from earlier in a session, or build context over time within a conversation thread. Skip memory for single-turn requests where each interaction is independent.
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
## Setting up memory
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
To enable memory in Mastra, install the `@mastra/memory` package along with a storage provider.
|
|
26
21
|
|
|
27
22
|
```bash npm2yarn copy
|
|
28
23
|
npm install @mastra/memory@latest @mastra/libsql@latest
|
|
29
24
|
```
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
## Storage providers
|
|
27
|
+
|
|
28
|
+
Memory requires a storage provider to persist conversation history, including user messages and agent responses. For more details on available providers and how storage works in Mastra, see the [Storage](../server-db/storage.mdx) documentation.
|
|
29
|
+
|
|
30
|
+
## Configuring memory
|
|
31
|
+
|
|
32
|
+
<Steps>
|
|
33
|
+
|
|
34
|
+
### Agent memory
|
|
35
|
+
|
|
36
|
+
Enable memory by creating a `Memory` instance and passing it to the agent’s `memory` option.
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
```typescript {6-9} filename="src/mastra/agents/memory-agent.ts" showLineNumbers copy
|
|
39
|
+
import { Agent } from "@mastra/core/agent";
|
|
40
|
+
import { Memory } from "@mastra/memory";
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
export const memoryAgent = new Agent({
|
|
43
|
+
// ...
|
|
44
|
+
memory: new Memory({
|
|
45
|
+
options: {
|
|
46
|
+
lastMessages: 20
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
```
|
|
38
51
|
|
|
39
|
-
|
|
40
|
-
`LibSQLStore` works well for local development and when deploying to [Mastra Cloud](../mastra-cloud/overview.mdx), but may not be supported by some [serverless platforms](../deployment/serverless-platforms) or [cloud providers](../deployment/cloud-providers).
|
|
41
|
-
</Callout>
|
|
52
|
+
> See the [Memory Class](../../reference/memory/Memory.mdx) for a full list of configuration options.
|
|
42
53
|
|
|
43
|
-
###
|
|
54
|
+
### Mastra storage
|
|
44
55
|
|
|
45
|
-
|
|
56
|
+
Add a storage provider to your main Mastra instance to enable memory across all configured agents.
|
|
46
57
|
|
|
47
58
|
```typescript {6-8} filename="src/mastra/index.ts" showLineNumbers copy
|
|
48
59
|
import { Mastra } from "@mastra/core/mastra";
|
|
@@ -56,9 +67,11 @@ export const mastra = new Mastra({
|
|
|
56
67
|
});
|
|
57
68
|
```
|
|
58
69
|
|
|
59
|
-
|
|
70
|
+
> See the [LibSQL Storage](../../reference/storage/libsql.mdx) for a full list of configuration options.
|
|
71
|
+
|
|
72
|
+
</Steps>
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
Alternatively, add storage directly to an agent’s memory to keep data separate or use different providers per agent.
|
|
62
75
|
|
|
63
76
|
```typescript {7-10} filename="src/mastra/agents/memory-agent.ts" showLineNumbers copy
|
|
64
77
|
import { Agent } from "@mastra/core/agent";
|
|
@@ -69,20 +82,20 @@ export const memoryAgent = new Agent({
|
|
|
69
82
|
// ...
|
|
70
83
|
memory: new Memory({
|
|
71
84
|
storage: new LibSQLStore({
|
|
72
|
-
url: "
|
|
85
|
+
url: ":memory:"
|
|
73
86
|
})
|
|
74
87
|
})
|
|
75
88
|
});
|
|
76
89
|
```
|
|
77
90
|
|
|
78
|
-
##
|
|
91
|
+
## Conversation history
|
|
79
92
|
|
|
80
|
-
|
|
93
|
+
Include a `memory` object with both `resource` and `thread` to track conversation history during agent calls.
|
|
81
94
|
|
|
82
95
|
- `resource`: A stable identifier for the user or entity.
|
|
83
96
|
- `thread`: An ID that isolates a specific conversation or session.
|
|
84
97
|
|
|
85
|
-
These fields tell the agent where to store and retrieve context, enabling persistent, thread-aware memory across
|
|
98
|
+
These fields tell the agent where to store and retrieve context, enabling persistent, thread-aware memory across a conversation.
|
|
86
99
|
|
|
87
100
|
```typescript {3-4}
|
|
88
101
|
const response = await memoryAgent.generate("Remember my favorite color is blue.", {
|
|
@@ -93,7 +106,7 @@ const response = await memoryAgent.generate("Remember my favorite color is blue.
|
|
|
93
106
|
});
|
|
94
107
|
```
|
|
95
108
|
|
|
96
|
-
To recall information stored in memory, call the agent with the same `resource` and `thread` values used in the original
|
|
109
|
+
To recall information stored in memory, call the agent with the same `resource` and `thread` values used in the original conversation.
|
|
97
110
|
|
|
98
111
|
```typescript {3-4}
|
|
99
112
|
const response = await memoryAgent.generate("What's my favorite color?", {
|
|
@@ -104,9 +117,11 @@ const response = await memoryAgent.generate("What's my favorite color?", {
|
|
|
104
117
|
});
|
|
105
118
|
```
|
|
106
119
|
|
|
120
|
+
To learn more about memory see the [Memory](../memory/overview.mdx) documentation.
|
|
121
|
+
|
|
107
122
|
## Using `RuntimeContext`
|
|
108
123
|
|
|
109
|
-
Use
|
|
124
|
+
Use [RuntimeContext](../server-db/runtime-context.mdx) to access request-specific values. This lets you conditionally select different memory or storage configurations based on the context of the request.
|
|
110
125
|
|
|
111
126
|
```typescript filename="src/mastra/agents/memory-agent.ts" showLineNumbers
|
|
112
127
|
export type UserTier = {
|
|
@@ -133,6 +148,8 @@ export const memoryAgent = new Agent({
|
|
|
133
148
|
});
|
|
134
149
|
```
|
|
135
150
|
|
|
151
|
+
> See [Runtime Context](../server-db/runtime-context.mdx) for more information.
|
|
152
|
+
|
|
136
153
|
## Related
|
|
137
154
|
|
|
138
155
|
- [Working Memory](../memory/working-memory.mdx)
|
|
@@ -325,11 +325,18 @@ for await (const chunk of stream.fullStream) {
|
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
```
|
|
328
|
-
|
|
329
328
|
In this case, the `tripwireReason` indicates that a credit card number was detected:
|
|
330
329
|
|
|
331
330
|
```text
|
|
332
331
|
PII detected. Types: credit-card
|
|
333
332
|
```
|
|
334
333
|
|
|
334
|
+
## Custom processors
|
|
335
|
+
|
|
336
|
+
If the built-in processors don’t cover your needs, you can create your own by extending the `Processor` class.
|
|
337
|
+
|
|
338
|
+
Available examples:
|
|
335
339
|
|
|
340
|
+
- [Message Length Limiter](../../examples/processors/message-length-limiter)
|
|
341
|
+
- [Response Length Limiter](../../examples/rocessors/response-length-limiter)
|
|
342
|
+
- [Response Validator](../../examples/processors/response-validator)
|