@mastra/mcp-docs-server 0.13.20 → 0.13.21-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +8 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +22 -22
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +17 -17
- package/.docs/organized/changelogs/create-mastra.md +5 -5
- package/.docs/organized/changelogs/mastra.md +21 -21
- package/.docs/organized/code-examples/agent.md +34 -9
- package/.docs/organized/code-examples/ai-sdk-v5.md +16 -14
- package/.docs/organized/code-examples/heads-up-game.md +3 -3
- package/.docs/raw/auth/clerk.mdx +142 -0
- package/.docs/raw/getting-started/installation.mdx +3 -1
- package/.docs/raw/getting-started/model-providers.mdx +31 -31
- package/.docs/raw/observability/ai-tracing.mdx +123 -24
- package/.docs/raw/reference/agents/ChunkType.mdx +857 -0
- package/.docs/raw/reference/agents/MastraModelOutput.mdx +321 -0
- package/.docs/raw/reference/agents/generateVNext.mdx +519 -0
- package/.docs/raw/reference/agents/streamVNext.mdx +6 -20
- package/.docs/raw/reference/auth/clerk.mdx +71 -0
- package/.docs/raw/reference/scorers/answer-similarity.mdx +179 -0
- package/.docs/raw/scorers/off-the-shelf-scorers.mdx +1 -0
- package/.docs/raw/server-db/production-server.mdx +27 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +144 -159
- package/.docs/raw/workflows/control-flow.mdx +1 -1
- package/.docs/raw/workflows/suspend-and-resume.mdx +5 -0
- package/CHANGELOG.md +9 -0
- package/dist/stdio.js +11 -4
- package/dist/tools/docs.d.ts.map +1 -1
- package/package.json +4 -4
- /package/.docs/raw/reference/{templates.mdx → templates/overview.mdx} +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/pg
|
|
2
2
|
|
|
3
|
+
## 0.15.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- remove debug logs ([#7708](https://github.com/mastra-ai/mastra/pull/7708))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
|
|
10
|
+
- @mastra/core@0.16.3-alpha.0
|
|
11
|
+
|
|
3
12
|
## 0.15.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -290,13 +299,4 @@
|
|
|
290
299
|
|
|
291
300
|
## 0.13.3-alpha.0
|
|
292
301
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
- 3e49b7a: Fix PostgreSQL vector metadata filtering for Memory system - changed default minScore to -1 to include all similarity results and added comprehensive metadata filtering tests
|
|
296
|
-
- Updated dependencies [cd0042e]
|
|
297
|
-
- @mastra/core@0.13.1-alpha.0
|
|
298
|
-
|
|
299
|
-
## 0.13.2
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
... 2283 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 2292 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 6.1.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- AN packages ([#7711](https://github.com/mastra-ai/mastra/pull/7711))
|
|
8
|
+
|
|
9
|
+
- fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`0666082`](https://github.com/mastra-ai/mastra/commit/06660820230dcb1fa7c1d51c8254107afd68cd67), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`779d469`](https://github.com/mastra-ai/mastra/commit/779d469366bb9f7fcb6d1638fdabb9f3acc49218), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
|
|
12
|
+
- @mastra/core@0.16.3-alpha.0
|
|
13
|
+
- @mastra/client-js@0.12.3-alpha.0
|
|
14
|
+
|
|
15
|
+
## 6.1.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
|
|
20
|
+
- @mastra/core@0.16.2
|
|
21
|
+
- @mastra/client-js@0.12.2
|
|
22
|
+
|
|
3
23
|
## 6.1.2-alpha.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -278,25 +298,5 @@
|
|
|
278
298
|
|
|
279
299
|
### Patch Changes
|
|
280
300
|
|
|
281
|
-
- [`95b2aa9`](https://github.com/mastra-ai/mastra/commit/95b2aa908230919e67efcac0d69005a2d5745298) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdeps @mastra/core
|
|
282
|
-
|
|
283
|
-
- Updated dependencies []:
|
|
284
|
-
- @mastra/core@0.15.1
|
|
285
|
-
- @mastra/client-js@0.11.1
|
|
286
|
-
|
|
287
|
-
## 5.2.2
|
|
288
|
-
|
|
289
|
-
### Patch Changes
|
|
290
|
-
|
|
291
|
-
- [#6995](https://github.com/mastra-ai/mastra/pull/6995) [`681252d`](https://github.com/mastra-ai/mastra/commit/681252d20e57fcee6821377dea96cacab3bc230f) Thanks [@wardpeet](https://github.com/wardpeet)! - Improve type resolving
|
|
292
|
-
|
|
293
|
-
- [#6967](https://github.com/mastra-ai/mastra/pull/6967) [`01be5d3`](https://github.com/mastra-ai/mastra/commit/01be5d358fad8faa101e5c69dfa54562c02cc0af) Thanks [@YujohnNattrass](https://github.com/YujohnNattrass)! - Implement AI traces for server apis and client sdk
|
|
294
|
-
|
|
295
|
-
- [#6944](https://github.com/mastra-ai/mastra/pull/6944) [`a93f3ba`](https://github.com/mastra-ai/mastra/commit/a93f3ba05eef4cf17f876d61d29cf0841a9e70b7) Thanks [@wardpeet](https://github.com/wardpeet)! - Add support for zod v4
|
|
296
|
-
|
|
297
|
-
- Updated dependencies [[`0778757`](https://github.com/mastra-ai/mastra/commit/07787570e4addbd501522037bd2542c3d9e26822), [`943a7f3`](https://github.com/mastra-ai/mastra/commit/943a7f3dbc6a8ab3f9b7bc7c8a1c5b319c3d7f56), [`01be5d3`](https://github.com/mastra-ai/mastra/commit/01be5d358fad8faa101e5c69dfa54562c02cc0af), [`bf504a8`](https://github.com/mastra-ai/mastra/commit/bf504a833051f6f321d832cc7d631f3cb86d657b), [`00ef6c1`](https://github.com/mastra-ai/mastra/commit/00ef6c1d3c76708712acd3de7f39c4d6b0f3b427), [`be49354`](https://github.com/mastra-ai/mastra/commit/be493546dca540101923ec700feb31f9a13939f2), [`d591ab3`](https://github.com/mastra-ai/mastra/commit/d591ab3ecc985c1870c0db347f8d7a20f7360536), [`ba82abe`](https://github.com/mastra-ai/mastra/commit/ba82abe76e869316bb5a9c95e8ea3946f3436fae), [`727f7e5`](https://github.com/mastra-ai/mastra/commit/727f7e5086e62e0dfe3356fb6dcd8bcb420af246), [`e6f5046`](https://github.com/mastra-ai/mastra/commit/e6f50467aff317e67e8bd74c485c3fbe2a5a6db1), [`82d9f64`](https://github.com/mastra-ai/mastra/commit/82d9f647fbe4f0177320e7c05073fce88599aa95), [`2e58325`](https://github.com/mastra-ai/mastra/commit/2e58325beb170f5b92f856e27d915cd26917e5e6), [`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c), [`4189486`](https://github.com/mastra-ai/mastra/commit/4189486c6718fda78347bdf4ce4d3fc33b2236e1), [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01), [`9613558`](https://github.com/mastra-ai/mastra/commit/9613558e6475f4710e05d1be7553a32ee7bddc20)]:
|
|
298
|
-
- @mastra/core@0.15.0
|
|
299
|
-
- @mastra/client-js@0.11.0
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 2917 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @mastra/schema-compat
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Change SchemaCompat zodToJsonSchema ref strategy from none to relative, leading to less schema warnings and smaller converted schema sizes ([#7697](https://github.com/mastra-ai/mastra/pull/7697))
|
|
8
|
+
|
|
3
9
|
## 0.11.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 0.16.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- an part 3 ([#7705](https://github.com/mastra-ai/mastra/pull/7705))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
|
|
10
|
+
- @mastra/core@0.16.3-alpha.0
|
|
11
|
+
|
|
12
|
+
## 0.16.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
|
|
17
|
+
- @mastra/core@0.16.2
|
|
18
|
+
|
|
3
19
|
## 0.16.2-alpha.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -283,20 +299,4 @@
|
|
|
283
299
|
|
|
284
300
|
## 0.15.0-alpha.4
|
|
285
301
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
- [#7032](https://github.com/mastra-ai/mastra/pull/7032) [`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump zod peerdep to 3.25.0 to support both v3/v4
|
|
289
|
-
|
|
290
|
-
### Patch Changes
|
|
291
|
-
|
|
292
|
-
- Updated dependencies [[`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c)]:
|
|
293
|
-
- @mastra/core@0.15.0-alpha.4
|
|
294
|
-
|
|
295
|
-
## 0.15.0-alpha.3
|
|
296
|
-
|
|
297
|
-
### Minor Changes
|
|
298
|
-
|
|
299
|
-
- [#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
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
... 3256 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 3272 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.12.3-alpha.0
|
|
4
|
+
|
|
5
|
+
## 0.12.2
|
|
6
|
+
|
|
3
7
|
## 0.12.2-alpha.0
|
|
4
8
|
|
|
5
9
|
## 0.12.1
|
|
@@ -294,9 +298,5 @@
|
|
|
294
298
|
|
|
295
299
|
## 0.10.13-alpha.0
|
|
296
300
|
|
|
297
|
-
### Patch Changes
|
|
298
|
-
|
|
299
|
-
- 0bf0bc8: fix link in shared components + add e2e tests
|
|
300
|
-
- 7827943: Handle streaming large data
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1374 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.12.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add new scorers to list ([#7614](https://github.com/mastra-ai/mastra/pull/7614))
|
|
8
|
+
|
|
9
|
+
- fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`0666082`](https://github.com/mastra-ai/mastra/commit/06660820230dcb1fa7c1d51c8254107afd68cd67), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
|
|
12
|
+
- @mastra/core@0.16.3-alpha.0
|
|
13
|
+
- @mastra/deployer@0.16.3-alpha.0
|
|
14
|
+
|
|
15
|
+
## 0.12.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
|
|
20
|
+
- @mastra/core@0.16.2
|
|
21
|
+
- @mastra/deployer@0.16.2
|
|
22
|
+
|
|
3
23
|
## 0.12.2-alpha.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -278,25 +298,5 @@
|
|
|
278
298
|
|
|
279
299
|
- [#7044](https://github.com/mastra-ai/mastra/pull/7044) [`3308c9f`](https://github.com/mastra-ai/mastra/commit/3308c9ff1da7594925d193a825f33da2880fb9c1) Thanks [@mfrachet](https://github.com/mfrachet)! - fix dev:playground command
|
|
280
300
|
|
|
281
|
-
- [#7101](https://github.com/mastra-ai/mastra/pull/7101) [`d99baf6`](https://github.com/mastra-ai/mastra/commit/d99baf6e69bbf83e9a286fbd18c47543de12cb58) Thanks [@mfrachet](https://github.com/mfrachet)! - change outline
|
|
282
|
-
|
|
283
|
-
- Updated dependencies [[`00c74e7`](https://github.com/mastra-ai/mastra/commit/00c74e73b1926be0d475693bb886fb67a22ff352), [`6f715fe`](https://github.com/mastra-ai/mastra/commit/6f715fe524296e1138a319e56bcf8e4214bd5dd5), [`3e0153a`](https://github.com/mastra-ai/mastra/commit/3e0153adcf2309f3ffb01c9ac9e0f5adc0caa259), [`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)]:
|
|
284
|
-
- @mastra/core@0.15.3-alpha.0
|
|
285
|
-
- @mastra/deployer@0.15.3-alpha.0
|
|
286
|
-
- @mastra/mcp@0.11.3-alpha.0
|
|
287
|
-
|
|
288
|
-
## 0.11.2
|
|
289
|
-
|
|
290
|
-
### Patch Changes
|
|
291
|
-
|
|
292
|
-
- [`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdpes for @mastra/core
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [[`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430)]:
|
|
295
|
-
- @mastra/deployer@0.15.2
|
|
296
|
-
- @mastra/loggers@0.10.9
|
|
297
|
-
- @mastra/mcp@0.11.2
|
|
298
|
-
- @mastra/core@0.15.2
|
|
299
|
-
|
|
300
|
-
## 0.11.1
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 5448 more lines hidden. See full changelog in package directory.
|
|
@@ -757,6 +757,32 @@ export const chefModelV2Agent = new Agent({
|
|
|
757
757
|
memory,
|
|
758
758
|
});
|
|
759
759
|
|
|
760
|
+
const weatherAgent = new Agent({
|
|
761
|
+
name: 'Weather Agent',
|
|
762
|
+
instructions: `You are a weather agent that can help you get weather information for a given city`,
|
|
763
|
+
description: `An agent that can help you get weather information for a given city`,
|
|
764
|
+
model: openai_v5('gpt-4o-mini'),
|
|
765
|
+
tools: { weatherInfo },
|
|
766
|
+
workflows: {
|
|
767
|
+
myWorkflow,
|
|
768
|
+
},
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
export const networkAgent = new Agent({
|
|
772
|
+
name: 'Chef Network',
|
|
773
|
+
description:
|
|
774
|
+
'A chef agent that can help you cook great meals with whatever ingredients you have available based on your location and current weather.',
|
|
775
|
+
instructions: `You are a the manager of several agent, tools, and workflows. Use the best primitives based on what the user wants to accomplish your task.`,
|
|
776
|
+
model: openai_v5('gpt-4o-mini'),
|
|
777
|
+
workflows: {
|
|
778
|
+
myWorkflow,
|
|
779
|
+
},
|
|
780
|
+
agents: {
|
|
781
|
+
weatherAgent,
|
|
782
|
+
},
|
|
783
|
+
memory,
|
|
784
|
+
});
|
|
785
|
+
|
|
760
786
|
```
|
|
761
787
|
|
|
762
788
|
### mastra/index.ts
|
|
@@ -768,7 +794,7 @@ import { LibSQLStore } from '@mastra/libsql';
|
|
|
768
794
|
import { agentThatHarassesYou, chefAgent, chefAgentResponses, dynamicAgent, evalAgent } from './agents/index';
|
|
769
795
|
import { myMcpServer, myMcpServerTwo } from './mcp/server';
|
|
770
796
|
import { myWorkflow } from './workflows';
|
|
771
|
-
import { chefModelV2Agent } from './agents/model-v2-agent';
|
|
797
|
+
import { chefModelV2Agent, networkAgent } from './agents/model-v2-agent';
|
|
772
798
|
import { createScorer } from '@mastra/core/scores';
|
|
773
799
|
|
|
774
800
|
const storage = new LibSQLStore({
|
|
@@ -790,6 +816,7 @@ export const mastra = new Mastra({
|
|
|
790
816
|
agentThatHarassesYou,
|
|
791
817
|
evalAgent,
|
|
792
818
|
chefModelV2Agent,
|
|
819
|
+
networkAgent,
|
|
793
820
|
},
|
|
794
821
|
logger: new PinoLogger({ name: 'Chef', level: 'debug' }),
|
|
795
822
|
storage,
|
|
@@ -1078,7 +1105,7 @@ import { z } from 'zod';
|
|
|
1078
1105
|
|
|
1079
1106
|
export const cookingTool = createTool({
|
|
1080
1107
|
id: 'cooking-tool',
|
|
1081
|
-
description: '
|
|
1108
|
+
description: 'Used to cook given an ingredient',
|
|
1082
1109
|
inputSchema: z.object({
|
|
1083
1110
|
ingredient: z.string(),
|
|
1084
1111
|
}),
|
|
@@ -1099,8 +1126,8 @@ import { createStep, createWorkflow } from '@mastra/core/workflows';
|
|
|
1099
1126
|
import { z } from 'zod';
|
|
1100
1127
|
|
|
1101
1128
|
export const myWorkflow = createWorkflow({
|
|
1102
|
-
id: '
|
|
1103
|
-
description: '
|
|
1129
|
+
id: 'recipe-maker',
|
|
1130
|
+
description: 'Returns a recipe based on an ingredient',
|
|
1104
1131
|
inputSchema: z.object({
|
|
1105
1132
|
ingredient: z.string(),
|
|
1106
1133
|
}),
|
|
@@ -1119,6 +1146,7 @@ const step = createStep({
|
|
|
1119
1146
|
result: z.string(),
|
|
1120
1147
|
}),
|
|
1121
1148
|
execute: async ({ inputData }) => {
|
|
1149
|
+
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
1122
1150
|
return {
|
|
1123
1151
|
result: inputData.ingredient,
|
|
1124
1152
|
};
|
|
@@ -1134,11 +1162,8 @@ const step2 = createStep({
|
|
|
1134
1162
|
outputSchema: z.object({
|
|
1135
1163
|
result: z.string(),
|
|
1136
1164
|
}),
|
|
1137
|
-
execute: async (
|
|
1138
|
-
|
|
1139
|
-
const response = await agent.generate(inputData.result, {
|
|
1140
|
-
tracingContext,
|
|
1141
|
-
});
|
|
1165
|
+
execute: async () => {
|
|
1166
|
+
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
1142
1167
|
return {
|
|
1143
1168
|
result: 'suh',
|
|
1144
1169
|
};
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
{
|
|
4
4
|
"name": "mastra-ai-sdk-v5-use-chat-example",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@ai-sdk/openai": "2.0.
|
|
7
|
-
"@ai-sdk/react": "2.0.
|
|
8
|
-
"@mastra/core": "
|
|
9
|
-
"@mastra/libsql": "
|
|
10
|
-
"@mastra/loggers": "
|
|
11
|
-
"@mastra/memory": "
|
|
12
|
-
"@mastra/pg": "
|
|
13
|
-
"@mastra/rag": "
|
|
14
|
-
"@mastra/server": "
|
|
6
|
+
"@ai-sdk/openai": "^2.0.28",
|
|
7
|
+
"@ai-sdk/react": "^2.0.39",
|
|
8
|
+
"@mastra/core": "latest",
|
|
9
|
+
"@mastra/libsql": "latest",
|
|
10
|
+
"@mastra/loggers": "latest",
|
|
11
|
+
"@mastra/memory": "latest",
|
|
12
|
+
"@mastra/pg": "latest",
|
|
13
|
+
"@mastra/rag": "latest",
|
|
14
|
+
"@mastra/server": "latest",
|
|
15
15
|
"next": "15.4.7",
|
|
16
16
|
"react": "^19.1.1",
|
|
17
17
|
"react-dom": "^19.1.1",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/react-dom": "^19.1.7",
|
|
26
26
|
"eslint": "^9",
|
|
27
27
|
"eslint-config-next": "15.1.7",
|
|
28
|
-
"mastra": "
|
|
28
|
+
"mastra": "latest",
|
|
29
29
|
"postcss": "^8",
|
|
30
30
|
"tailwindcss": "^3.4.1",
|
|
31
31
|
"typescript": "^5.8.3"
|
|
@@ -80,15 +80,17 @@ export const weatherAgent = new Agent({
|
|
|
80
80
|
|
|
81
81
|
### mastra/index.ts
|
|
82
82
|
```typescript
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
83
|
+
import { Mastra } from "@mastra/core";
|
|
84
|
+
import { PinoLogger } from "@mastra/loggers";
|
|
85
85
|
|
|
86
86
|
import { weatherAgent } from "./agents";
|
|
87
87
|
|
|
88
88
|
export const mastra = new Mastra({
|
|
89
89
|
agents: { weatherAgent },
|
|
90
|
-
logger: new
|
|
91
|
-
|
|
90
|
+
logger: new PinoLogger({
|
|
91
|
+
name: "Mastra",
|
|
92
|
+
level: "info",
|
|
93
|
+
}),
|
|
92
94
|
});
|
|
93
95
|
|
|
94
96
|
```
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ai-sdk/openai": "^1.3.23",
|
|
10
|
-
"@mastra/core": "^0.16.
|
|
10
|
+
"@mastra/core": "^0.16.2",
|
|
11
11
|
"@mastra/libsql": "^0.14.0",
|
|
12
12
|
"@mastra/loggers": "^0.10.11",
|
|
13
|
-
"@mastra/memory": "^0.
|
|
13
|
+
"@mastra/memory": "^0.15.0",
|
|
14
14
|
"zod": "^3.25.76"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/node": "^24.3.0",
|
|
18
|
-
"mastra": "^0.12.
|
|
18
|
+
"mastra": "^0.12.2",
|
|
19
19
|
"typescript": "^5.9.2"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MastraAuthClerk Class"
|
|
3
|
+
description: "Documentation for the MastraAuthClerk class, which authenticates Mastra applications using Clerk authentication."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { Tabs, Tab } from "@/components/tabs";
|
|
7
|
+
|
|
8
|
+
# MastraAuthClerk Class
|
|
9
|
+
|
|
10
|
+
The `MastraAuthClerk` class provides authentication for Mastra using Clerk. It verifies incoming requests using Clerk's authentication system and integrates with the Mastra server using the `experimental_auth` option.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
This example uses Clerk authentication. Make sure to add your Clerk credentials to your `.env` file and ensure your Clerk project is properly configured.
|
|
15
|
+
|
|
16
|
+
```env filename=".env" copy
|
|
17
|
+
CLERK_PUBLISHABLE_KEY=pk_test_...
|
|
18
|
+
CLERK_SECRET_KEY=sk_test_...
|
|
19
|
+
CLERK_JWKS_URI=https://your-clerk-domain.clerk.accounts.dev/.well-known/jwks.json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
> **Note:** You can find these keys in your Clerk Dashboard under "API Keys".
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
Before you can use the `MastraAuthClerk` class you have to install the `@mastra/clerk-auth` package.
|
|
27
|
+
|
|
28
|
+
```bash copy
|
|
29
|
+
npm install @mastra/clerk-auth@latest
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage example
|
|
33
|
+
|
|
34
|
+
```typescript {2,7-11} filename="src/mastra/index.ts" showLineNumbers copy
|
|
35
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
36
|
+
import { MastraAuthClerk } from '@mastra/clerk-auth';
|
|
37
|
+
|
|
38
|
+
export const mastra = new Mastra({
|
|
39
|
+
// ..
|
|
40
|
+
server: {
|
|
41
|
+
experimental_auth: new MastraAuthClerk({
|
|
42
|
+
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
|
|
43
|
+
secretKey: process.env.CLERK_SECRET_KEY,
|
|
44
|
+
jwksUri: process.env.CLERK_JWKS_URI
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **Note:** The default `authorizeUser` method allows all authenticated users. To customize user authorization, provide a custom `authorizeUser` function when constructing the provider.
|
|
51
|
+
|
|
52
|
+
> See the [MastraAuthClerk](/reference/auth/clerk.mdx) API reference for all available configuration options.
|
|
53
|
+
|
|
54
|
+
## Client-side setup
|
|
55
|
+
|
|
56
|
+
When using Clerk auth, you'll need to retrieve the access token from Clerk on the client side and pass it to your Mastra requests.
|
|
57
|
+
|
|
58
|
+
### Retrieving the access token
|
|
59
|
+
|
|
60
|
+
Use the Clerk React hooks to authenticate users and retrieve their access token:
|
|
61
|
+
|
|
62
|
+
```typescript filename="lib/auth.ts" showLineNumbers copy
|
|
63
|
+
import { useAuth } from "@clerk/nextjs";
|
|
64
|
+
|
|
65
|
+
export const useClerkAuth = () => {
|
|
66
|
+
const { getToken } = useAuth();
|
|
67
|
+
|
|
68
|
+
const getAccessToken = async () => {
|
|
69
|
+
const token = await getToken();
|
|
70
|
+
return token;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return { getAccessToken };
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> Refer to the [Clerk documentation](https://clerk.com/docs) for more information.
|
|
78
|
+
|
|
79
|
+
## Configuring `MastraClient`
|
|
80
|
+
|
|
81
|
+
When `experimental_auth` is enabled, all requests made with `MastraClient` must include a valid Clerk access token in the `Authorization` header:
|
|
82
|
+
|
|
83
|
+
```typescript {6} filename="lib/mastra/mastra-client.ts" showLineNumbers copy
|
|
84
|
+
import { MastraClient } from "@mastra/client-js";
|
|
85
|
+
|
|
86
|
+
export const mastraClient = new MastraClient({
|
|
87
|
+
baseUrl: "https://<mastra-api-url>",
|
|
88
|
+
headers: {
|
|
89
|
+
Authorization: `Bearer ${accessToken}`
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
> **Note:** The access token must be prefixed with `Bearer` in the Authorization header.
|
|
95
|
+
> See [Mastra Client SDK](/docs/server-db/mastra-client.mdx) for more configuration options.
|
|
96
|
+
|
|
97
|
+
### Making authenticated requests
|
|
98
|
+
|
|
99
|
+
Once `MastraClient` is configured with the Clerk access token, you can send authenticated requests:
|
|
100
|
+
|
|
101
|
+
<Tabs items={["MastraClient", "curl"]}>
|
|
102
|
+
<Tab>
|
|
103
|
+
```tsx filename="src/components/test-agent.tsx" showLineNumbers copy
|
|
104
|
+
"use client";
|
|
105
|
+
|
|
106
|
+
import { useAuth } from "@clerk/nextjs";
|
|
107
|
+
import { MastraClient } from "@mastra/client-js";
|
|
108
|
+
|
|
109
|
+
export const TestAgent = () => {
|
|
110
|
+
const { getToken } = useAuth();
|
|
111
|
+
|
|
112
|
+
async function handleClick() {
|
|
113
|
+
const token = await getToken();
|
|
114
|
+
|
|
115
|
+
const client = new MastraClient({
|
|
116
|
+
baseUrl: "http://localhost:4111",
|
|
117
|
+
headers: token ? { Authorization: `Bearer ${token}` } : undefined,
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const weatherAgent = client.getAgent("weatherAgent");
|
|
121
|
+
const response = await weatherAgent.generate({
|
|
122
|
+
messages: "What's the weather like in New York",
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
console.log({ response });
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return <button onClick={handleClick}>Test Agent</button>;
|
|
129
|
+
};
|
|
130
|
+
```
|
|
131
|
+
</Tab>
|
|
132
|
+
<Tab>
|
|
133
|
+
```bash copy
|
|
134
|
+
curl -X POST http://localhost:4111/api/agents/weatherAgent/generate \
|
|
135
|
+
-H "Content-Type: application/json" \
|
|
136
|
+
-H "Authorization: Bearer <your-clerk-access-token>" \
|
|
137
|
+
-d '{
|
|
138
|
+
"messages": "Weather in London"
|
|
139
|
+
}'
|
|
140
|
+
```
|
|
141
|
+
</Tab>
|
|
142
|
+
</Tabs>
|
|
@@ -228,7 +228,9 @@ touch tsconfig.json
|
|
|
228
228
|
|
|
229
229
|
Add the following configuration:
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
Mastra requires `module` and `moduleResolution` values that support modern Node.js versions. Older settings like `CommonJS` or `node` are incompatible with Mastra’s packages and will cause resolution errors.
|
|
232
|
+
|
|
233
|
+
```json {4-5} filename="tsconfig.json" copy
|
|
232
234
|
{
|
|
233
235
|
"compilerOptions": {
|
|
234
236
|
"target": "ES2022",
|
|
@@ -3,7 +3,7 @@ title: "Model Providers | Getting Started | Mastra Docs"
|
|
|
3
3
|
description: "Learn how to configure and use different model providers with Mastra."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { Callout } from
|
|
6
|
+
import { Callout } from "nextra/components"
|
|
7
7
|
|
|
8
8
|
# Model Providers
|
|
9
9
|
|
|
@@ -62,18 +62,18 @@ Here's an example using the OpenAI provider:
|
|
|
62
62
|
|
|
63
63
|
```typescript showLineNumbers copy filename="src/mastra/agents/weather-agent.ts" {1,4-8,13}
|
|
64
64
|
import { createOpenAI } from "@ai-sdk/openai";
|
|
65
|
-
import { Agent } from "@mastra/core/agent"
|
|
65
|
+
import { Agent } from "@mastra/core/agent";
|
|
66
66
|
|
|
67
67
|
const openai = createOpenAI({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
baseUrl: "<your-custom-base-url>",
|
|
69
|
+
apiKey: "<your-custom-api-key>",
|
|
70
|
+
...otherOptions,
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
const agent = new Agent({
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
name: "WeatherAgent",
|
|
75
|
+
instructions: "Instructions for the agent...",
|
|
76
|
+
model: openai("<model-name>"),
|
|
77
77
|
});
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -88,21 +88,21 @@ import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
|
|
|
88
88
|
import { Agent } from "@mastra/core/agent";
|
|
89
89
|
|
|
90
90
|
const openaiCompatible = createOpenAICompatible({
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
name: "<model-name>",
|
|
92
|
+
baseUrl: "<base-url>",
|
|
93
|
+
apiKey: "<api-key>",
|
|
94
|
+
headers: {},
|
|
95
|
+
queryParams: {},
|
|
96
|
+
fetch: async (url, options) => {
|
|
97
|
+
// custom fetch logic
|
|
98
|
+
return fetch(url, options);
|
|
99
|
+
},
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
const agent = new Agent({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
name: "WeatherAgent",
|
|
104
|
+
instructions: "Instructions for the agent...",
|
|
105
|
+
model: openaiCompatible("<model-name>"),
|
|
106
106
|
});
|
|
107
107
|
```
|
|
108
108
|
|
|
@@ -114,36 +114,36 @@ The AI SDK provides a [Language Model Specification](https://github.com/vercel/a
|
|
|
114
114
|
Following this specification, you can create your own model provider compatible with the AI SDK.
|
|
115
115
|
|
|
116
116
|
Some community providers have implemented this specification and are compatible with the AI SDK.
|
|
117
|
-
We will look at one such provider, the Ollama provider available in the [`ollama-ai-provider`](https://github.com/
|
|
117
|
+
We will look at one such provider, the Ollama provider available in the [`ollama-ai-provider-v2`](https://github.com/nordwestt/ollama-ai-provider-v2) package.
|
|
118
118
|
|
|
119
119
|
Here's an example:
|
|
120
120
|
|
|
121
121
|
```typescript showLineNumbers copy filename="src/mastra/agents/weather-agent.ts" {1,7}
|
|
122
|
-
import { ollama } from "ollama-ai-provider";
|
|
122
|
+
import { ollama } from "ollama-ai-provider-v2";
|
|
123
123
|
import { Agent } from "@mastra/core/agent";
|
|
124
124
|
|
|
125
125
|
const agent = new Agent({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
name: "WeatherAgent",
|
|
127
|
+
instructions: "Instructions for the agent...",
|
|
128
|
+
model: ollama("llama3.2:latest"),
|
|
129
129
|
});
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
You can also configure the Ollama provider like so:
|
|
133
133
|
|
|
134
134
|
```typescript showLineNumbers copy filename="src/mastra/agents/weather-agent.ts" {1,4-7,12}
|
|
135
|
-
import { createOllama } from "ollama-ai-provider";
|
|
135
|
+
import { createOllama } from "ollama-ai-provider-v2";
|
|
136
136
|
import { Agent } from "@mastra/core/agent";
|
|
137
137
|
|
|
138
138
|
const ollama = createOllama({
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
baseUrl: "<your-custom-base-url>",
|
|
140
|
+
...otherOptions,
|
|
141
141
|
});
|
|
142
142
|
|
|
143
143
|
const agent = new Agent({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
name: "WeatherAgent",
|
|
145
|
+
instructions: "Instructions for the agent...",
|
|
146
|
+
model: ollama("llama3.2:latest"),
|
|
147
147
|
});
|
|
148
148
|
```
|
|
149
149
|
|