@mastra/mcp-docs-server 0.13.44 → 0.13.45
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 +201 -1
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +251 -51
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +422 -222
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Freact.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +72 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +104 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +49 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
- package/.docs/organized/changelogs/create-mastra.md +201 -1
- package/.docs/organized/changelogs/mastra.md +201 -1
- package/.docs/raw/agents/adding-voice.mdx +49 -0
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +23 -1
- package/.docs/raw/reference/client-js/memory.mdx +43 -0
- package/.docs/raw/reference/core/mastra-class.mdx +8 -0
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +223 -0
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +28 -98
- package/.docs/raw/reference/scorers/answer-similarity.mdx +12 -258
- package/.docs/raw/reference/scorers/bias.mdx +29 -87
- package/.docs/raw/reference/scorers/completeness.mdx +32 -91
- package/.docs/raw/reference/scorers/content-similarity.mdx +29 -99
- package/.docs/raw/reference/scorers/context-precision.mdx +28 -130
- package/.docs/raw/reference/scorers/faithfulness.mdx +28 -101
- package/.docs/raw/reference/scorers/hallucination.mdx +28 -103
- package/.docs/raw/reference/scorers/keyword-coverage.mdx +28 -107
- package/.docs/raw/reference/scorers/textual-difference.mdx +27 -100
- package/.docs/raw/reference/scorers/tone-consistency.mdx +25 -98
- package/.docs/raw/reference/scorers/toxicity.mdx +29 -92
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +37 -0
- package/.docs/raw/reference/storage/lance.mdx +33 -0
- package/.docs/raw/reference/storage/libsql.mdx +37 -0
- package/.docs/raw/reference/storage/mongodb.mdx +39 -0
- package/.docs/raw/reference/storage/mssql.mdx +37 -0
- package/.docs/raw/reference/storage/postgresql.mdx +37 -0
- package/.docs/raw/reference/streaming/agents/stream.mdx +7 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +71 -28
- package/.docs/raw/reference/voice/voice.listen.mdx +86 -52
- package/.docs/raw/reference/voice/voice.speak.mdx +75 -40
- package/.docs/raw/voice/overview.mdx +67 -0
- package/.docs/raw/workflows/control-flow.mdx +180 -0
- package/CHANGELOG.md +20 -0
- package/dist/{chunk-TUAHUTTB.js → chunk-VE65X75W.js} +24 -4
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.18.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Rename "Playground" to "Studio" ([#10467](https://github.com/mastra-ai/mastra/pull/10467))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ccb7552`](https://github.com/mastra-ai/mastra/commit/ccb75528339b4dbf3cf3adcf430f9b3a563948ff), [`5657314`](https://github.com/mastra-ai/mastra/commit/5657314a1f9d49019bb53f357fa48f75a69247ca), [`e5aca78`](https://github.com/mastra-ai/mastra/commit/e5aca78bb7f263bb8b470bedae81efe9805d7544), [`33a607a`](https://github.com/mastra-ai/mastra/commit/33a607a1f716c2029d4a1ff1603dd756129a33b3), [`cc10fc1`](https://github.com/mastra-ai/mastra/commit/cc10fc192d9f527c71a23cc9def10d8718935ee1), [`1f7ee84`](https://github.com/mastra-ai/mastra/commit/1f7ee841a643ef12d90392125881f06fdf877293), [`e7d5149`](https://github.com/mastra-ai/mastra/commit/e7d514995260b63b2108308e85c64de37dcd0f71), [`f195082`](https://github.com/mastra-ai/mastra/commit/f1950822a2425d5ccae78c5d010e02ddb027a869), [`d9986dd`](https://github.com/mastra-ai/mastra/commit/d9986dd3513f7ca3244a8e599a440ccf4d8bc28b), [`a45b0f0`](https://github.com/mastra-ai/mastra/commit/a45b0f0cd19eab1fe4deceae3abf029442c22f74), [`f6e8eb3`](https://github.com/mastra-ai/mastra/commit/f6e8eb3dac53b70b06e906b2818b1d2a5b0486d7), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`3236f35`](https://github.com/mastra-ai/mastra/commit/3236f352ae13cc8552c2965164e97bd125dae48d), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`0230321`](https://github.com/mastra-ai/mastra/commit/02303217870bedea0ef009bea9a952f24ed38aaf), [`7b541f4`](https://github.com/mastra-ai/mastra/commit/7b541f49eda6f5a87b738198edbd136927599475), [`0eea842`](https://github.com/mastra-ai/mastra/commit/0eea8423cbdd37f2111593c6f7d2efcde4b7e4ce), [`4ea5bc8`](https://github.com/mastra-ai/mastra/commit/4ea5bc8bab1b2ecd3e8cee62dbdd3a8dc081fd03), [`63ae8a2`](https://github.com/mastra-ai/mastra/commit/63ae8a22c0c09bbb8b9779f5f38934cd75f616af), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`ac7ef07`](https://github.com/mastra-ai/mastra/commit/ac7ef07633caee89707142171d2873c888ffef85), [`522f0b4`](https://github.com/mastra-ai/mastra/commit/522f0b45330719858794eabffffde4f343f55549), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`8b51d55`](https://github.com/mastra-ai/mastra/commit/8b51d55bae531edf7e383958d7ecee04df31f5d5), [`2131ac5`](https://github.com/mastra-ai/mastra/commit/2131ac571d5065f0a656c57494bca98691bb7609)]:
|
|
10
|
+
- @mastra/deployer@0.24.6
|
|
11
|
+
- @mastra/core@0.24.6
|
|
12
|
+
|
|
13
|
+
## 0.18.6-alpha.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Rename "Playground" to "Studio" ([#10467](https://github.com/mastra-ai/mastra/pull/10467))
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`ccb7552`](https://github.com/mastra-ai/mastra/commit/ccb75528339b4dbf3cf3adcf430f9b3a563948ff), [`5657314`](https://github.com/mastra-ai/mastra/commit/5657314a1f9d49019bb53f357fa48f75a69247ca), [`e5aca78`](https://github.com/mastra-ai/mastra/commit/e5aca78bb7f263bb8b470bedae81efe9805d7544), [`33a607a`](https://github.com/mastra-ai/mastra/commit/33a607a1f716c2029d4a1ff1603dd756129a33b3), [`cc10fc1`](https://github.com/mastra-ai/mastra/commit/cc10fc192d9f527c71a23cc9def10d8718935ee1), [`1f7ee84`](https://github.com/mastra-ai/mastra/commit/1f7ee841a643ef12d90392125881f06fdf877293), [`e7d5149`](https://github.com/mastra-ai/mastra/commit/e7d514995260b63b2108308e85c64de37dcd0f71), [`f195082`](https://github.com/mastra-ai/mastra/commit/f1950822a2425d5ccae78c5d010e02ddb027a869), [`d9986dd`](https://github.com/mastra-ai/mastra/commit/d9986dd3513f7ca3244a8e599a440ccf4d8bc28b), [`a45b0f0`](https://github.com/mastra-ai/mastra/commit/a45b0f0cd19eab1fe4deceae3abf029442c22f74), [`f6e8eb3`](https://github.com/mastra-ai/mastra/commit/f6e8eb3dac53b70b06e906b2818b1d2a5b0486d7), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`3236f35`](https://github.com/mastra-ai/mastra/commit/3236f352ae13cc8552c2965164e97bd125dae48d), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`0230321`](https://github.com/mastra-ai/mastra/commit/02303217870bedea0ef009bea9a952f24ed38aaf), [`7b541f4`](https://github.com/mastra-ai/mastra/commit/7b541f49eda6f5a87b738198edbd136927599475), [`0eea842`](https://github.com/mastra-ai/mastra/commit/0eea8423cbdd37f2111593c6f7d2efcde4b7e4ce), [`4ea5bc8`](https://github.com/mastra-ai/mastra/commit/4ea5bc8bab1b2ecd3e8cee62dbdd3a8dc081fd03), [`63ae8a2`](https://github.com/mastra-ai/mastra/commit/63ae8a22c0c09bbb8b9779f5f38934cd75f616af), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`ac7ef07`](https://github.com/mastra-ai/mastra/commit/ac7ef07633caee89707142171d2873c888ffef85), [`522f0b4`](https://github.com/mastra-ai/mastra/commit/522f0b45330719858794eabffffde4f343f55549), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`8b51d55`](https://github.com/mastra-ai/mastra/commit/8b51d55bae531edf7e383958d7ecee04df31f5d5), [`2131ac5`](https://github.com/mastra-ai/mastra/commit/2131ac571d5065f0a656c57494bca98691bb7609)]:
|
|
20
|
+
- @mastra/deployer@0.24.6-alpha.0
|
|
21
|
+
- @mastra/core@0.24.6-alpha.0
|
|
22
|
+
|
|
3
23
|
## 0.18.5
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -298,5 +318,185 @@
|
|
|
298
318
|
- - Remove the `mastra deploy` CLI command. Use the deploy instructions of your individual platform. ([#8798](https://github.com/mastra-ai/mastra/pull/8798))
|
|
299
319
|
- Remove `--env` flag from `mastra build` command
|
|
300
320
|
- Remove `--port` flag from `mastra dev`. Use `server.port` on the `new Mastra()` class instead.
|
|
321
|
+
- Validate `--components` and `--llm` flags for `mastra create` and `mastra init`
|
|
322
|
+
|
|
323
|
+
### Patch Changes
|
|
324
|
+
|
|
325
|
+
- Updated dependencies [[`5253cd2`](https://github.com/mastra-ai/mastra/commit/5253cd2d5b2cf4558963fa73c6a6b36c72f8875f), [`ca85c93`](https://github.com/mastra-ai/mastra/commit/ca85c932b232e6ad820c811ec176d98e68c59b0a), [`a1d40f8`](https://github.com/mastra-ai/mastra/commit/a1d40f88d4ce42c4508774ad22e38ac582157af2), [`11e9e8f`](https://github.com/mastra-ai/mastra/commit/11e9e8f4fb09a493ea00deda49081788f16e753b), [`00bf52b`](https://github.com/mastra-ai/mastra/commit/00bf52b89a93e6bffaaaf1714316870ad8af6572), [`01c4a25`](https://github.com/mastra-ai/mastra/commit/01c4a2506c514d5e861c004d3d2fb3791c6391f3), [`cce8aad`](https://github.com/mastra-ai/mastra/commit/cce8aad878a0dd98e5647680f3765caba0b1701c)]:
|
|
326
|
+
- @mastra/deployer@0.21.1
|
|
327
|
+
- @mastra/core@0.21.1
|
|
328
|
+
|
|
329
|
+
## 0.17.0-alpha.0
|
|
330
|
+
|
|
331
|
+
### Minor Changes
|
|
332
|
+
|
|
333
|
+
- - Remove the `mastra deploy` CLI command. Use the deploy instructions of your individual platform. ([#8798](https://github.com/mastra-ai/mastra/pull/8798))
|
|
334
|
+
- Remove `--env` flag from `mastra build` command
|
|
335
|
+
- Remove `--port` flag from `mastra dev`. Use `server.port` on the `new Mastra()` class instead.
|
|
336
|
+
- Validate `--components` and `--llm` flags for `mastra create` and `mastra init`
|
|
337
|
+
|
|
338
|
+
### Patch Changes
|
|
339
|
+
|
|
340
|
+
- Updated dependencies [[`5253cd2`](https://github.com/mastra-ai/mastra/commit/5253cd2d5b2cf4558963fa73c6a6b36c72f8875f), [`ca85c93`](https://github.com/mastra-ai/mastra/commit/ca85c932b232e6ad820c811ec176d98e68c59b0a), [`a1d40f8`](https://github.com/mastra-ai/mastra/commit/a1d40f88d4ce42c4508774ad22e38ac582157af2), [`11e9e8f`](https://github.com/mastra-ai/mastra/commit/11e9e8f4fb09a493ea00deda49081788f16e753b), [`00bf52b`](https://github.com/mastra-ai/mastra/commit/00bf52b89a93e6bffaaaf1714316870ad8af6572), [`01c4a25`](https://github.com/mastra-ai/mastra/commit/01c4a2506c514d5e861c004d3d2fb3791c6391f3), [`cce8aad`](https://github.com/mastra-ai/mastra/commit/cce8aad878a0dd98e5647680f3765caba0b1701c)]:
|
|
341
|
+
- @mastra/deployer@0.21.1-alpha.0
|
|
342
|
+
- @mastra/core@0.21.1-alpha.0
|
|
343
|
+
|
|
344
|
+
## 0.16.0
|
|
345
|
+
|
|
346
|
+
### Minor Changes
|
|
347
|
+
|
|
348
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
349
|
+
|
|
350
|
+
### Patch Changes
|
|
351
|
+
|
|
352
|
+
- Use model-router in create-mastra starter template ([#8631](https://github.com/mastra-ai/mastra/pull/8631))
|
|
353
|
+
|
|
354
|
+
- Fix typo in playground causing semantic recall to always be false when enabled. ([#8640](https://github.com/mastra-ai/mastra/pull/8640))
|
|
355
|
+
|
|
356
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8619](https://github.com/mastra-ai/mastra/pull/8619))
|
|
357
|
+
|
|
358
|
+
- Create unified Sidebar component to use on Playground and Cloud ([#8655](https://github.com/mastra-ai/mastra/pull/8655))
|
|
359
|
+
|
|
360
|
+
- Use only zod validation in dynamic form ([#8802](https://github.com/mastra-ai/mastra/pull/8802))
|
|
361
|
+
|
|
362
|
+
- Add support for --debug options to build/dev commands to add more logging ([#8792](https://github.com/mastra-ai/mastra/pull/8792))
|
|
363
|
+
|
|
364
|
+
- Add div wrapper around entity tables to fix table vertical position ([#8758](https://github.com/mastra-ai/mastra/pull/8758))
|
|
365
|
+
|
|
366
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8557](https://github.com/mastra-ai/mastra/pull/8557))
|
|
367
|
+
|
|
368
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8626](https://github.com/mastra-ai/mastra/pull/8626))
|
|
369
|
+
|
|
370
|
+
- Customize AITraces type to seamlessly work on Cloud too ([#8759](https://github.com/mastra-ai/mastra/pull/8759))
|
|
371
|
+
|
|
372
|
+
- Refactor EntryList component and Scorer and Observability pages ([#8652](https://github.com/mastra-ai/mastra/pull/8652))
|
|
373
|
+
|
|
374
|
+
- Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
375
|
+
|
|
376
|
+
- Improve README ([#8819](https://github.com/mastra-ai/mastra/pull/8819))
|
|
377
|
+
|
|
378
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8686](https://github.com/mastra-ai/mastra/pull/8686))
|
|
379
|
+
|
|
380
|
+
- Updated dependencies [[`0fb6616`](https://github.com/mastra-ai/mastra/commit/0fb66169600ed2a3dc1297b1bfa8a7693ebb6e3c), [`1ed9670`](https://github.com/mastra-ai/mastra/commit/1ed9670d3ca50cb60dc2e517738c5eef3968ed27), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`1dbd76a`](https://github.com/mastra-ai/mastra/commit/1dbd76aff29cc764d3a1ac7bb01172fe59cb5992), [`f59fc1e`](https://github.com/mastra-ai/mastra/commit/f59fc1e406b8912e692f6bff6cfd4754cc8d165c), [`ca5a01f`](https://github.com/mastra-ai/mastra/commit/ca5a01f0dd4dabdbfde3beeaf92c7333e0f9bb39), [`158381d`](https://github.com/mastra-ai/mastra/commit/158381d39335be934b81ef8a1947bccace492c25), [`a1799bc`](https://github.com/mastra-ai/mastra/commit/a1799bcc1b5a1cdc188f2ac0165f17a1c4ac6f7b), [`6ff6094`](https://github.com/mastra-ai/mastra/commit/6ff60946f4ecfebdeef6e21d2b230c2204f2c9b8), [`2ddb851`](https://github.com/mastra-ai/mastra/commit/2ddb8519c4b6f1d31be10ffd33b41d2b649a04ff), [`fb703b9`](https://github.com/mastra-ai/mastra/commit/fb703b9634eeaff1a6eb2b5531ce0f9e8fb04727), [`dfe856f`](https://github.com/mastra-ai/mastra/commit/dfe856f7f60ff4765b75930e7b5d82dd0f0f7d89), [`37a2314`](https://github.com/mastra-ai/mastra/commit/37a23148e0e5a3b40d4f9f098b194671a8a49faf), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`05a9dee`](https://github.com/mastra-ai/mastra/commit/05a9dee3d355694d28847bfffb6289657fcf7dfa), [`e3c1077`](https://github.com/mastra-ai/mastra/commit/e3c107763aedd1643d3def5df450c235da9ff76c), [`1908ca0`](https://github.com/mastra-ai/mastra/commit/1908ca0521f90e43779cc29ab590173ca560443c), [`1bccdb3`](https://github.com/mastra-ai/mastra/commit/1bccdb33eb90cbeba2dc5ece1c2561fb774b26b6), [`5ef944a`](https://github.com/mastra-ai/mastra/commit/5ef944a3721d93105675cac2b2311432ff8cc393), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`d6b186f`](https://github.com/mastra-ai/mastra/commit/d6b186fb08f1caf1b86f73d3a5ee88fb999ca3be), [`ee68e82`](https://github.com/mastra-ai/mastra/commit/ee68e8289ea4408d29849e899bc6e78b3bd4e843), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`ea33930`](https://github.com/mastra-ai/mastra/commit/ea339301e82d6318257720d811b043014ee44064), [`65493b3`](https://github.com/mastra-ai/mastra/commit/65493b31c36f6fdb78f9679f7e1ecf0c250aa5ee), [`a998b8f`](https://github.com/mastra-ai/mastra/commit/a998b8f858091c2ec47683e60766cf12d03001e4), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`8a37bdd`](https://github.com/mastra-ai/mastra/commit/8a37bddb6d8614a32c5b70303d583d80c620ea61), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`e0e1cf1`](https://github.com/mastra-ai/mastra/commit/e0e1cf1e37b9dc61099ab331a6d386e44b816310), [`135d6f2`](https://github.com/mastra-ai/mastra/commit/135d6f22a326ed1dffff858700669dff09d2c9eb)]:
|
|
381
|
+
- @mastra/deployer@0.21.0
|
|
382
|
+
- @mastra/core@0.21.0
|
|
383
|
+
- @mastra/loggers@0.10.16
|
|
384
|
+
- @mastra/mcp@0.13.5
|
|
385
|
+
|
|
386
|
+
## 0.16.0-alpha.1
|
|
387
|
+
|
|
388
|
+
### Minor Changes
|
|
389
|
+
|
|
390
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
391
|
+
|
|
392
|
+
### Patch Changes
|
|
393
|
+
|
|
394
|
+
- Create unified Sidebar component to use on Playground and Cloud ([#8655](https://github.com/mastra-ai/mastra/pull/8655))
|
|
395
|
+
|
|
396
|
+
- Use only zod validation in dynamic form ([#8802](https://github.com/mastra-ai/mastra/pull/8802))
|
|
397
|
+
|
|
398
|
+
- Add support for --debug options to build/dev commands to add more logging ([#8792](https://github.com/mastra-ai/mastra/pull/8792))
|
|
399
|
+
|
|
400
|
+
- Add div wrapper around entity tables to fix table vertical position ([#8758](https://github.com/mastra-ai/mastra/pull/8758))
|
|
401
|
+
|
|
402
|
+
- Customize AITraces type to seamlessly work on Cloud too ([#8759](https://github.com/mastra-ai/mastra/pull/8759))
|
|
403
|
+
|
|
404
|
+
- Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
405
|
+
|
|
406
|
+
- Improve README ([#8819](https://github.com/mastra-ai/mastra/pull/8819))
|
|
407
|
+
|
|
408
|
+
- Updated dependencies [[`1ed9670`](https://github.com/mastra-ai/mastra/commit/1ed9670d3ca50cb60dc2e517738c5eef3968ed27), [`ca5a01f`](https://github.com/mastra-ai/mastra/commit/ca5a01f0dd4dabdbfde3beeaf92c7333e0f9bb39), [`158381d`](https://github.com/mastra-ai/mastra/commit/158381d39335be934b81ef8a1947bccace492c25), [`fb703b9`](https://github.com/mastra-ai/mastra/commit/fb703b9634eeaff1a6eb2b5531ce0f9e8fb04727), [`dfe856f`](https://github.com/mastra-ai/mastra/commit/dfe856f7f60ff4765b75930e7b5d82dd0f0f7d89), [`37a2314`](https://github.com/mastra-ai/mastra/commit/37a23148e0e5a3b40d4f9f098b194671a8a49faf), [`05a9dee`](https://github.com/mastra-ai/mastra/commit/05a9dee3d355694d28847bfffb6289657fcf7dfa), [`e3c1077`](https://github.com/mastra-ai/mastra/commit/e3c107763aedd1643d3def5df450c235da9ff76c), [`1bccdb3`](https://github.com/mastra-ai/mastra/commit/1bccdb33eb90cbeba2dc5ece1c2561fb774b26b6), [`5ef944a`](https://github.com/mastra-ai/mastra/commit/5ef944a3721d93105675cac2b2311432ff8cc393), [`d6b186f`](https://github.com/mastra-ai/mastra/commit/d6b186fb08f1caf1b86f73d3a5ee88fb999ca3be), [`65493b3`](https://github.com/mastra-ai/mastra/commit/65493b31c36f6fdb78f9679f7e1ecf0c250aa5ee), [`a998b8f`](https://github.com/mastra-ai/mastra/commit/a998b8f858091c2ec47683e60766cf12d03001e4), [`8a37bdd`](https://github.com/mastra-ai/mastra/commit/8a37bddb6d8614a32c5b70303d583d80c620ea61), [`e0e1cf1`](https://github.com/mastra-ai/mastra/commit/e0e1cf1e37b9dc61099ab331a6d386e44b816310)]:
|
|
409
|
+
- @mastra/core@0.21.0-alpha.1
|
|
410
|
+
- @mastra/deployer@0.21.0-alpha.1
|
|
411
|
+
|
|
412
|
+
## 0.15.2-alpha.0
|
|
413
|
+
|
|
414
|
+
### Patch Changes
|
|
415
|
+
|
|
416
|
+
- Use model-router in create-mastra starter template ([#8631](https://github.com/mastra-ai/mastra/pull/8631))
|
|
417
|
+
|
|
418
|
+
- Fix typo in playground causing semantic recall to always be false when enabled. ([#8640](https://github.com/mastra-ai/mastra/pull/8640))
|
|
419
|
+
|
|
420
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8619](https://github.com/mastra-ai/mastra/pull/8619))
|
|
421
|
+
|
|
422
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8557](https://github.com/mastra-ai/mastra/pull/8557))
|
|
423
|
+
|
|
424
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8626](https://github.com/mastra-ai/mastra/pull/8626))
|
|
425
|
+
|
|
426
|
+
- Refactor EntryList component and Scorer and Observability pages ([#8652](https://github.com/mastra-ai/mastra/pull/8652))
|
|
427
|
+
|
|
428
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8686](https://github.com/mastra-ai/mastra/pull/8686))
|
|
429
|
+
|
|
430
|
+
- Updated dependencies [[`0fb6616`](https://github.com/mastra-ai/mastra/commit/0fb66169600ed2a3dc1297b1bfa8a7693ebb6e3c), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`1dbd76a`](https://github.com/mastra-ai/mastra/commit/1dbd76aff29cc764d3a1ac7bb01172fe59cb5992), [`2ddb851`](https://github.com/mastra-ai/mastra/commit/2ddb8519c4b6f1d31be10ffd33b41d2b649a04ff), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`ee68e82`](https://github.com/mastra-ai/mastra/commit/ee68e8289ea4408d29849e899bc6e78b3bd4e843), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`ea33930`](https://github.com/mastra-ai/mastra/commit/ea339301e82d6318257720d811b043014ee44064), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`135d6f2`](https://github.com/mastra-ai/mastra/commit/135d6f22a326ed1dffff858700669dff09d2c9eb), [`59d036d`](https://github.com/mastra-ai/mastra/commit/59d036d4c2706b430b0e3f1f1e0ee853ce16ca04)]:
|
|
431
|
+
- @mastra/deployer@0.21.0-alpha.0
|
|
432
|
+
- @mastra/core@0.21.0-alpha.0
|
|
433
|
+
- @mastra/loggers@0.10.16-alpha.0
|
|
434
|
+
- @mastra/mcp@0.13.5-alpha.0
|
|
435
|
+
|
|
436
|
+
## 0.15.1
|
|
437
|
+
|
|
438
|
+
### Patch Changes
|
|
439
|
+
|
|
440
|
+
- Marked telemetry as disabled in the default template, in preperation for the Nov 4th deprecation. ([#8618](https://github.com/mastra-ai/mastra/pull/8618))
|
|
441
|
+
|
|
442
|
+
- Improve the overall flow of the `create-mastra` CLI by first asking all questions and then creating the project structure. If you skip entering an API key during the wizard, the `your-api-key` placeholder will now be added to an `.env.example` file instead of `.env`. ([#8603](https://github.com/mastra-ai/mastra/pull/8603))
|
|
443
|
+
|
|
444
|
+
- Updated dependencies [[`07eaf25`](https://github.com/mastra-ai/mastra/commit/07eaf25aada9e42235dbf905854de53da4d8121b), [`0d71771`](https://github.com/mastra-ai/mastra/commit/0d71771f5711164c79f8e80919bc84d6bffeb6bc), [`0d6e55e`](https://github.com/mastra-ai/mastra/commit/0d6e55ecc5a2e689cd4fc9c86525e0eb54d82372), [`68b1111`](https://github.com/mastra-ai/mastra/commit/68b11118a1303f93e9c0c157850c0751309304c5)]:
|
|
445
|
+
- @mastra/core@0.20.2
|
|
446
|
+
- @mastra/deployer@0.20.2
|
|
447
|
+
|
|
448
|
+
## 0.15.1-alpha.1
|
|
449
|
+
|
|
450
|
+
### Patch Changes
|
|
451
|
+
|
|
452
|
+
- Marked telemetry as disabled in the default template, in preperation for the Nov 4th deprecation. ([#8618](https://github.com/mastra-ai/mastra/pull/8618))
|
|
453
|
+
|
|
454
|
+
## 0.15.1-alpha.0
|
|
455
|
+
|
|
456
|
+
### Patch Changes
|
|
457
|
+
|
|
458
|
+
- Improve the overall flow of the `create-mastra` CLI by first asking all questions and then creating the project structure. If you skip entering an API key during the wizard, the `your-api-key` placeholder will now be added to an `.env.example` file instead of `.env`. ([#8603](https://github.com/mastra-ai/mastra/pull/8603))
|
|
459
|
+
|
|
460
|
+
- Updated dependencies [[`0d71771`](https://github.com/mastra-ai/mastra/commit/0d71771f5711164c79f8e80919bc84d6bffeb6bc), [`0d6e55e`](https://github.com/mastra-ai/mastra/commit/0d6e55ecc5a2e689cd4fc9c86525e0eb54d82372)]:
|
|
461
|
+
- @mastra/core@0.20.2-alpha.0
|
|
462
|
+
- @mastra/deployer@0.20.2-alpha.0
|
|
463
|
+
|
|
464
|
+
## 0.15.0
|
|
465
|
+
|
|
466
|
+
### Minor Changes
|
|
467
|
+
|
|
468
|
+
- Update peer dependencies to match core package version bump (0.20.1) ([#8589](https://github.com/mastra-ai/mastra/pull/8589))
|
|
469
|
+
|
|
470
|
+
### Patch Changes
|
|
471
|
+
|
|
472
|
+
- workflow run thread more visible ([#8539](https://github.com/mastra-ai/mastra/pull/8539))
|
|
473
|
+
|
|
474
|
+
- Mutable shared workflow run state ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
|
|
475
|
+
|
|
476
|
+
- streamLegacy/generateLegacy clarification in playground ([#8468](https://github.com/mastra-ai/mastra/pull/8468))
|
|
477
|
+
|
|
478
|
+
- avoid refetching memory threads and messages on window focus ([#8519](https://github.com/mastra-ai/mastra/pull/8519))
|
|
479
|
+
|
|
480
|
+
- add tripwire reason in playground ([#8568](https://github.com/mastra-ai/mastra/pull/8568))
|
|
481
|
+
|
|
482
|
+
- Save waiting step status in snapshot ([#8576](https://github.com/mastra-ai/mastra/pull/8576))
|
|
483
|
+
|
|
484
|
+
- Added AI SDK provider packages to model router for anthropic/google/openai/openrouter/xai ([#8559](https://github.com/mastra-ai/mastra/pull/8559))
|
|
485
|
+
|
|
486
|
+
- Convert WorkflowWatchResult to WorkflowResult in workflow graph ([#8541](https://github.com/mastra-ai/mastra/pull/8541))
|
|
487
|
+
|
|
488
|
+
- add new deploy to cloud button ([#8549](https://github.com/mastra-ai/mastra/pull/8549))
|
|
489
|
+
|
|
490
|
+
- remove icons in entity lists ([#8520](https://github.com/mastra-ai/mastra/pull/8520))
|
|
491
|
+
|
|
492
|
+
- add client search to all entities ([#8523](https://github.com/mastra-ai/mastra/pull/8523))
|
|
493
|
+
|
|
494
|
+
- Fixed an issue where model router was adding /chat/completions to API urls when it shouldn't. ([#8589](https://github.com/mastra-ai/mastra/pull/8589))
|
|
495
|
+
fixed an issue with provider ID rendering in playground UI
|
|
496
|
+
|
|
497
|
+
- Fix useStreamWorkflow unmounting breaking stream call ([#8449](https://github.com/mastra-ai/mastra/pull/8449))
|
|
498
|
+
|
|
499
|
+
- Remove shell from dev ([#8466](https://github.com/mastra-ai/mastra/pull/8466))
|
|
500
|
+
|
|
301
501
|
|
|
302
|
-
...
|
|
502
|
+
... 6329 more lines hidden. See full changelog in package directory.
|
|
@@ -280,6 +280,55 @@ export const agent = new Agent({
|
|
|
280
280
|
});
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
+
### Using AI SDK
|
|
284
|
+
|
|
285
|
+
Mastra supports using AI SDK's transcription and speech models directly in `CompositeVoice`, giving you access to a wide range of providers through the AI SDK ecosystem:
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
import { Agent } from "@mastra/core/agent";
|
|
289
|
+
import { CompositeVoice } from "@mastra/core/voice";
|
|
290
|
+
import { openai } from "@ai-sdk/openai";
|
|
291
|
+
import { elevenlabs } from "@ai-sdk/elevenlabs";
|
|
292
|
+
import { groq } from "@ai-sdk/groq";
|
|
293
|
+
|
|
294
|
+
export const agent = new Agent({
|
|
295
|
+
id: "aisdk-voice-agent",
|
|
296
|
+
name: "AI SDK Voice Agent",
|
|
297
|
+
instructions: `You are a helpful assistant with voice capabilities.`,
|
|
298
|
+
model: openai("gpt-4o"),
|
|
299
|
+
|
|
300
|
+
// Pass AI SDK models directly to CompositeVoice
|
|
301
|
+
voice: new CompositeVoice({
|
|
302
|
+
input: openai.transcription('whisper-1'), // AI SDK transcription model
|
|
303
|
+
output: elevenlabs.speech('eleven_turbo_v2'), // AI SDK speech model
|
|
304
|
+
}),
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
// Use voice capabilities as usual
|
|
308
|
+
const audioStream = await agent.voice.speak("Hello!");
|
|
309
|
+
const transcribedText = await agent.voice.listen(audioStream);
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
#### Mix and Match Providers
|
|
313
|
+
|
|
314
|
+
You can mix AI SDK models with Mastra voice providers:
|
|
315
|
+
|
|
316
|
+
```typescript
|
|
317
|
+
import { CompositeVoice } from "@mastra/core/voice";
|
|
318
|
+
import { PlayAIVoice } from "@mastra/voice-playai";
|
|
319
|
+
import { openai } from "@ai-sdk/openai";
|
|
320
|
+
|
|
321
|
+
// Use AI SDK for transcription and Mastra provider for speech
|
|
322
|
+
const voice = new CompositeVoice({
|
|
323
|
+
input: openai.transcription('whisper-1'), // AI SDK
|
|
324
|
+
output: new PlayAIVoice(), // Mastra provider
|
|
325
|
+
});
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
For the complete list of supported AI SDK providers and their capabilities:
|
|
329
|
+
* [Transcription](https://ai-sdk.dev/docs/providers/openai/transcription)
|
|
330
|
+
* [Speech](https://ai-sdk.dev/docs/providers/elevenlabs/speech)
|
|
331
|
+
|
|
283
332
|
## Supported Voice Providers
|
|
284
333
|
|
|
285
334
|
Mastra supports multiple voice providers for text-to-speech (TTS) and speech-to-text (STT) capabilities:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Running
|
|
1
|
+
# Running Mastra Studio
|
|
2
2
|
|
|
3
|
-
To test your agent as you build it, you'll need to run the Mastra
|
|
3
|
+
To test your agent as you build it, you'll need to run the Mastra Studio:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm run dev
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
This will start the
|
|
9
|
+
This will start the studio at `http://localhost:4111`, where you can interact with your agent and test its capabilities.
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The studio provides a user-friendly interface for testing your agent, allowing you to:
|
|
12
12
|
|
|
13
13
|
- Send messages to your agent
|
|
14
14
|
- See the agent's responses
|
|
@@ -16,4 +16,4 @@ The playground provides a user-friendly interface for testing your agent, allowi
|
|
|
16
16
|
- Test tools directly
|
|
17
17
|
- Debug any issues that arise
|
|
18
18
|
|
|
19
|
-
In the next step, we'll create our first agent with a simple system prompt and test it in the
|
|
19
|
+
In the next step, we'll create our first agent with a simple system prompt and test it in the studio.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Testing Your Agent
|
|
2
2
|
|
|
3
|
-
Now let's test our agent in
|
|
3
|
+
Now let's test our agent in Mastra Studio:
|
|
4
4
|
|
|
5
5
|
1. Make sure your development server is running with `npm run dev`
|
|
6
|
-
2. Open the
|
|
6
|
+
2. Open the studio at http://localhost:4111/
|
|
7
7
|
3. You should see your "Financial Assistant Agent" in the list of agents
|
|
8
8
|
4. Try sending a message like "Hello, can you help me analyze my spending?"
|
|
9
9
|
|
|
10
10
|
At this point, your agent can respond to basic questions but doesn't have access to any transaction data. In the next step, we'll create a custom tool to fetch transaction data from a Google Sheet.
|
|
11
11
|
|
|
12
|
-
Testing your agent in the
|
|
12
|
+
Testing your agent in the studio is an important step in the development process. It allows you to see how your agent responds to different inputs and identify any issues that need to be addressed before deploying it to production.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Testing Your Tool
|
|
2
2
|
|
|
3
|
-
Let's test our tool and agent in
|
|
3
|
+
Let's test our tool and agent in Mastra Studio:
|
|
4
4
|
|
|
5
5
|
1. Make sure your development server is running with `npm run dev`
|
|
6
|
-
2. Open the
|
|
6
|
+
2. Open the studio at http://localhost:4111/
|
|
7
7
|
3. You can test the tool directly in the Tools tab to make sure it's working
|
|
8
8
|
4. Then, try asking your agent questions like:
|
|
9
9
|
- "Can you show me my recent transactions?"
|
|
@@ -12,4 +12,4 @@ Let's test our tool and agent in the playground:
|
|
|
12
12
|
|
|
13
13
|
Your agent should now be able to fetch the transaction data and answer questions about it. However, it doesn't yet have memory, so it won't remember previous conversations. We'll add that in the next step.
|
|
14
14
|
|
|
15
|
-
Testing your tool directly in the
|
|
15
|
+
Testing your tool directly in the studio is a great way to verify that it's working correctly before integrating it with your agent. This helps you identify and fix any issues with the tool itself before troubleshooting potential issues with the agent's use of the tool.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Testing Your Agent with Memory
|
|
2
2
|
|
|
3
|
-
Let's test our agent's memory capabilities in
|
|
3
|
+
Let's test our agent's memory capabilities in Mastra Studio:
|
|
4
4
|
|
|
5
5
|
1. Make sure your development server is running with `npm run dev`
|
|
6
|
-
2. Open the
|
|
6
|
+
2. Open the studio at http://localhost:4111/
|
|
7
7
|
3. Start a conversation with your agent by asking about transactions
|
|
8
8
|
4. Then, ask a follow-up question that references the previous conversation, like:
|
|
9
9
|
- "What was that largest transaction again?"
|
|
@@ -118,7 +118,7 @@ export const mastra = new Mastra({
|
|
|
118
118
|
apiRoutes: [
|
|
119
119
|
workflowRoute({
|
|
120
120
|
path: "/workflow",
|
|
121
|
-
|
|
121
|
+
workflow: "weatherWorkflow",
|
|
122
122
|
}),
|
|
123
123
|
],
|
|
124
124
|
},
|
|
@@ -148,6 +148,28 @@ const { error, status, sendMessage, messages, regenerate, stop } = useChat({
|
|
|
148
148
|
});
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
+
To enable agent text chunks and tool calls streaming when a workflow step pipes an agent's stream to the workflow writer (see [Workflow Streaming](/docs/streaming/workflow-streaming#workflow-using-an-agent)).
|
|
152
|
+
|
|
153
|
+
Set the `includeTextStreamParts` `workflowRoute` option to `true`
|
|
154
|
+
```typescript title="src/mastra/index.ts" copy
|
|
155
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
156
|
+
import { workflowRoute } from "@mastra/ai-sdk";
|
|
157
|
+
|
|
158
|
+
export const mastra = new Mastra({
|
|
159
|
+
server: {
|
|
160
|
+
apiRoutes: [
|
|
161
|
+
workflowRoute({
|
|
162
|
+
path: "/workflow",
|
|
163
|
+
workflow: "weatherWorkflow",
|
|
164
|
+
//This provides a seamless streaming experience even when agents are running inside workflow steps.
|
|
165
|
+
includeTextStreamParts: true
|
|
166
|
+
}),
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
|
|
151
173
|
### `networkRoute()`
|
|
152
174
|
|
|
153
175
|
Use the `networkRoute()` utility to create a route handler that automatically formats the agent network stream into an AI SDK-compatible format.
|
|
@@ -125,6 +125,49 @@ const result = await thread.deleteMessages([
|
|
|
125
125
|
// Returns: { success: true, message: "3 messages deleted successfully" }
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
## Working Memory
|
|
129
|
+
|
|
130
|
+
Working memory allows agents to maintain persistent information about users across interactions. It can be scoped to either a specific thread or across all threads for a resource (user).
|
|
131
|
+
|
|
132
|
+
### Get Working Memory
|
|
133
|
+
|
|
134
|
+
Retrieve the current working memory for a thread:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
const workingMemory = await mastraClient.getWorkingMemory({
|
|
138
|
+
agentId: "agent-1",
|
|
139
|
+
threadId: "thread-1",
|
|
140
|
+
resourceId: "user-123", // Optional, required for resource-scoped memory
|
|
141
|
+
});
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The response includes:
|
|
145
|
+
- `workingMemory`: The current working memory content (string or null)
|
|
146
|
+
- `source`: Whether the memory is from `"thread"` or `"resource"` scope
|
|
147
|
+
- `workingMemoryTemplate`: The template used for working memory (if configured)
|
|
148
|
+
- `threadExists`: Whether the thread exists
|
|
149
|
+
|
|
150
|
+
### Update Working Memory
|
|
151
|
+
|
|
152
|
+
Update the working memory content for a thread:
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
await mastraClient.updateWorkingMemory({
|
|
156
|
+
agentId: "agent-1",
|
|
157
|
+
threadId: "thread-1",
|
|
158
|
+
workingMemory: `# User Profile
|
|
159
|
+
- Name: John Doe
|
|
160
|
+
- Location: New York
|
|
161
|
+
- Preferences: Prefers formal communication
|
|
162
|
+
`,
|
|
163
|
+
resourceId: "user-123", // Optional, required for resource-scoped memory
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Returns: { success: true }
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Note:** For resource-scoped working memory, you must provide the `resourceId` parameter. This allows the memory to persist across all conversation threads for that user.
|
|
170
|
+
|
|
128
171
|
### Get Memory Status
|
|
129
172
|
|
|
130
173
|
Check the status of the memory system:
|
|
@@ -139,5 +139,13 @@ export const mastra = new Mastra({
|
|
|
139
139
|
isOptional: true,
|
|
140
140
|
defaultValue: "{}",
|
|
141
141
|
},
|
|
142
|
+
{
|
|
143
|
+
name: "gateways",
|
|
144
|
+
type: "Record<string, MastraModelGateway>",
|
|
145
|
+
description:
|
|
146
|
+
"Custom model gateways to register for accessing AI models through alternative providers or private deployments. Structured as a key-value pair, with keys being the registry key (used for getGateway()) and values being gateway instances.",
|
|
147
|
+
isOptional: true,
|
|
148
|
+
defaultValue: "{}",
|
|
149
|
+
},
|
|
142
150
|
]}
|
|
143
151
|
/>
|