@mastra/agent-builder 0.0.0-add-libsql-changeset-20250910154739

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/LICENSE.md +15 -0
  3. package/README.md +96 -0
  4. package/dist/agent/index.d.ts +31 -0
  5. package/dist/agent/index.d.ts.map +1 -0
  6. package/dist/defaults.d.ts +3548 -0
  7. package/dist/defaults.d.ts.map +1 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +6152 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/processors/tool-summary.d.ts +30 -0
  13. package/dist/processors/tool-summary.d.ts.map +1 -0
  14. package/dist/processors/write-file.d.ts +10 -0
  15. package/dist/processors/write-file.d.ts.map +1 -0
  16. package/dist/types.d.ts +1143 -0
  17. package/dist/types.d.ts.map +1 -0
  18. package/dist/utils.d.ts +71 -0
  19. package/dist/utils.d.ts.map +1 -0
  20. package/dist/workflows/index.d.ts +5 -0
  21. package/dist/workflows/index.d.ts.map +1 -0
  22. package/dist/workflows/shared/schema.d.ts +139 -0
  23. package/dist/workflows/shared/schema.d.ts.map +1 -0
  24. package/dist/workflows/task-planning/prompts.d.ts +37 -0
  25. package/dist/workflows/task-planning/prompts.d.ts.map +1 -0
  26. package/dist/workflows/task-planning/schema.d.ts +548 -0
  27. package/dist/workflows/task-planning/schema.d.ts.map +1 -0
  28. package/dist/workflows/task-planning/task-planning.d.ts +992 -0
  29. package/dist/workflows/task-planning/task-planning.d.ts.map +1 -0
  30. package/dist/workflows/template-builder/template-builder.d.ts +1968 -0
  31. package/dist/workflows/template-builder/template-builder.d.ts.map +1 -0
  32. package/dist/workflows/workflow-builder/prompts.d.ts +44 -0
  33. package/dist/workflows/workflow-builder/prompts.d.ts.map +1 -0
  34. package/dist/workflows/workflow-builder/schema.d.ts +1170 -0
  35. package/dist/workflows/workflow-builder/schema.d.ts.map +1 -0
  36. package/dist/workflows/workflow-builder/tools.d.ts +309 -0
  37. package/dist/workflows/workflow-builder/tools.d.ts.map +1 -0
  38. package/dist/workflows/workflow-builder/workflow-builder.d.ts +2714 -0
  39. package/dist/workflows/workflow-builder/workflow-builder.d.ts.map +1 -0
  40. package/dist/workflows/workflow-map.d.ts +3768 -0
  41. package/dist/workflows/workflow-map.d.ts.map +1 -0
  42. package/package.json +92 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,200 @@
1
+ # @mastra/agent-builder
2
+
3
+ ## 0.0.0-add-libsql-changeset-20250910154739
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`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)]:
8
+ - @mastra/core@0.0.0-add-libsql-changeset-20250910154739
9
+ - @mastra/memory@0.0.0-add-libsql-changeset-20250910154739
10
+
11
+ ## 0.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Move `zod` from `dependencies` to `devDependencies` and add it to `peerDependencies` ([#7585](https://github.com/mastra-ai/mastra/pull/7585))
16
+
17
+ - Updated dependencies [[`47b6dc9`](https://github.com/mastra-ai/mastra/commit/47b6dc94f4976d4f3d3882e8f19eb365bbc5976c), [`827d876`](https://github.com/mastra-ai/mastra/commit/827d8766f36a900afcaf64a040f7ba76249009b3), [`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`565d65f`](https://github.com/mastra-ai/mastra/commit/565d65fc16314a99f081975ec92f2636dff0c86d), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`4da3d68`](https://github.com/mastra-ai/mastra/commit/4da3d68a778e5c4d5a17351ef223289fe2f45a45), [`fd9bbfe`](https://github.com/mastra-ai/mastra/commit/fd9bbfee22484f8493582325f53e8171bf8e682b), [`7eaf1d1`](https://github.com/mastra-ai/mastra/commit/7eaf1d1cec7e828d7a98efc2a748ac395bbdba3b), [`6f046b5`](https://github.com/mastra-ai/mastra/commit/6f046b5ccc5c8721302a9a61d5d16c12374cc8d7), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`0b0bbb2`](https://github.com/mastra-ai/mastra/commit/0b0bbb24f4198ead69792e92b68a350f52b45cf3), [`d951f41`](https://github.com/mastra-ai/mastra/commit/d951f41771e4e5da8da4b9f870949f9509e38756), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`8049e2e`](https://github.com/mastra-ai/mastra/commit/8049e2e8cce80a00353c64894c62b695ac34e35e), [`f3427cd`](https://github.com/mastra-ai/mastra/commit/f3427cdaf9eecd63360dfc897a4acbf5f4143a4e), [`defed1c`](https://github.com/mastra-ai/mastra/commit/defed1ca8040cc8d42e645c5a50a1bc52a4918d7), [`79b39c1`](https://github.com/mastra-ai/mastra/commit/79b39c1def3bbd5d6ee2d2cc1e89ea378a940477), [`6991ced`](https://github.com/mastra-ai/mastra/commit/6991cedcb5a44a49d9fe58ef67926e1f96ba55b1), [`9cb9c42`](https://github.com/mastra-ai/mastra/commit/9cb9c422854ee81074989dd2d8dccc0500ba8d3e), [`8334859`](https://github.com/mastra-ai/mastra/commit/83348594d4f37b311ba4a94d679c5f8721d796d4), [`05f13b8`](https://github.com/mastra-ai/mastra/commit/05f13b8fb269ccfc4de98e9db58dbe16eae55a5e)]:
18
+ - @mastra/core@0.16.1
19
+ - @mastra/memory@0.15.0
20
+
21
+ ## 0.0.3-alpha.1
22
+
23
+ ### Patch Changes
24
+
25
+ - Move `zod` from `dependencies` to `devDependencies` and add it to `peerDependencies` ([#7585](https://github.com/mastra-ai/mastra/pull/7585))
26
+
27
+ - Updated dependencies [[`827d876`](https://github.com/mastra-ai/mastra/commit/827d8766f36a900afcaf64a040f7ba76249009b3), [`7eaf1d1`](https://github.com/mastra-ai/mastra/commit/7eaf1d1cec7e828d7a98efc2a748ac395bbdba3b), [`f3427cd`](https://github.com/mastra-ai/mastra/commit/f3427cdaf9eecd63360dfc897a4acbf5f4143a4e), [`05f13b8`](https://github.com/mastra-ai/mastra/commit/05f13b8fb269ccfc4de98e9db58dbe16eae55a5e)]:
28
+ - @mastra/core@0.16.1-alpha.2
29
+
30
+ ## 0.0.3-alpha.0
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`defed1c`](https://github.com/mastra-ai/mastra/commit/defed1ca8040cc8d42e645c5a50a1bc52a4918d7), [`79b39c1`](https://github.com/mastra-ai/mastra/commit/79b39c1def3bbd5d6ee2d2cc1e89ea378a940477), [`6991ced`](https://github.com/mastra-ai/mastra/commit/6991cedcb5a44a49d9fe58ef67926e1f96ba55b1), [`9cb9c42`](https://github.com/mastra-ai/mastra/commit/9cb9c422854ee81074989dd2d8dccc0500ba8d3e), [`8334859`](https://github.com/mastra-ai/mastra/commit/83348594d4f37b311ba4a94d679c5f8721d796d4)]:
35
+ - @mastra/core@0.16.1-alpha.0
36
+ - @mastra/memory@0.15.0-alpha.0
37
+
38
+ ## 0.0.2
39
+
40
+ ### Patch Changes
41
+
42
+ - cf4e353: Agent Builder Template - adding in UI components to use agent builder template actions
43
+ - 8b7dbbf: Various clean up in the agent builder package. Mark package as experimental.
44
+ - 376913a: Update peerdeps
45
+ - Updated dependencies [8fbf79e]
46
+ - Updated dependencies [fd83526]
47
+ - Updated dependencies [d0b90ab]
48
+ - Updated dependencies [6f5eb7a]
49
+ - Updated dependencies [a01cf14]
50
+ - Updated dependencies [a9e50ee]
51
+ - Updated dependencies [5397eb4]
52
+ - Updated dependencies [376913a]
53
+ - Updated dependencies [c9f4e4a]
54
+ - Updated dependencies [0acbc80]
55
+ - Updated dependencies [38020d5]
56
+ - @mastra/core@0.16.0
57
+ - @mastra/memory@0.14.4
58
+
59
+ ## 0.0.2-alpha.1
60
+
61
+ ### Patch Changes
62
+
63
+ - 376913a: Update peerdeps
64
+ - Updated dependencies [8fbf79e]
65
+ - Updated dependencies [376913a]
66
+ - Updated dependencies [38020d5]
67
+ - @mastra/core@0.16.0-alpha.1
68
+ - @mastra/memory@0.14.4-alpha.0
69
+
70
+ ## 0.0.2-alpha.0
71
+
72
+ ### Patch Changes
73
+
74
+ - cf4e353: Agent Builder Template - adding in UI components to use agent builder template actions
75
+ - 8b7dbbf: Various clean up in the agent builder package. Mark package as experimental.
76
+ - Updated dependencies [fd83526]
77
+ - Updated dependencies [d0b90ab]
78
+ - Updated dependencies [6f5eb7a]
79
+ - Updated dependencies [a01cf14]
80
+ - Updated dependencies [a9e50ee]
81
+ - Updated dependencies [5397eb4]
82
+ - Updated dependencies [c9f4e4a]
83
+ - Updated dependencies [0acbc80]
84
+ - @mastra/core@0.16.0-alpha.0
85
+
86
+ ## 0.0.1
87
+
88
+ ### Patch Changes
89
+
90
+ - ab48c97: dependencies updates:
91
+ - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
92
+ - de3cbc6: Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
93
+ - b8e1a83: Fix package.json
94
+ - 671a392: Fix core imports inside agent-builder
95
+ - 48b9e55: Add Agent Builder package with template installation workflow
96
+
97
+ Introduces a new package for programmatically building and managing Mastra agents with intelligent template merging capabilities. Features include automated dependency resolution, file conflict handling, and validation fixes.
98
+
99
+ - 48f0742: add deployer, server and clientjs handlers for agent builder template
100
+ - Updated dependencies [ab48c97]
101
+ - Updated dependencies [ab48c97]
102
+ - Updated dependencies [85ef90b]
103
+ - Updated dependencies [aedbbfa]
104
+ - Updated dependencies [ff89505]
105
+ - Updated dependencies [637f323]
106
+ - Updated dependencies [de3cbc6]
107
+ - Updated dependencies [c19bcf7]
108
+ - Updated dependencies [a5632dd]
109
+ - Updated dependencies [4474d04]
110
+ - Updated dependencies [183dc95]
111
+ - Updated dependencies [a1111e2]
112
+ - Updated dependencies [b42a961]
113
+ - Updated dependencies [61debef]
114
+ - Updated dependencies [9beaeff]
115
+ - Updated dependencies [29de0e1]
116
+ - Updated dependencies [f643c65]
117
+ - Updated dependencies [00c74e7]
118
+ - Updated dependencies [f0dfcac]
119
+ - Updated dependencies [fef7375]
120
+ - Updated dependencies [e3d8fea]
121
+ - Updated dependencies [45e4d39]
122
+ - Updated dependencies [9eee594]
123
+ - Updated dependencies [7149d8d]
124
+ - Updated dependencies [822c2e8]
125
+ - Updated dependencies [979912c]
126
+ - Updated dependencies [7dcf4c0]
127
+ - Updated dependencies [4106a58]
128
+ - Updated dependencies [ad78bfc]
129
+ - Updated dependencies [0302f50]
130
+ - Updated dependencies [6ac697e]
131
+ - Updated dependencies [74db265]
132
+ - Updated dependencies [0ce418a]
133
+ - Updated dependencies [af90672]
134
+ - Updated dependencies [8387952]
135
+ - Updated dependencies [7f3b8da]
136
+ - Updated dependencies [905352b]
137
+ - Updated dependencies [599d04c]
138
+ - Updated dependencies [56041d0]
139
+ - Updated dependencies [3412597]
140
+ - Updated dependencies [5eca5d2]
141
+ - Updated dependencies [f2cda47]
142
+ - Updated dependencies [5de1555]
143
+ - Updated dependencies [cfd377a]
144
+ - Updated dependencies [1ed5a3e]
145
+ - @mastra/core@0.15.3
146
+ - @mastra/memory@0.14.3
147
+
148
+ ## 0.0.1-alpha.5
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [[`f0dfcac`](https://github.com/mastra-ai/mastra/commit/f0dfcac4458bdf789b975e2d63e984f5d1e7c4d3), [`7149d8d`](https://github.com/mastra-ai/mastra/commit/7149d8d4bdc1edf0008e0ca9b7925eb0b8b60dbe)]:
153
+ - @mastra/memory@0.14.3-alpha.4
154
+ - @mastra/core@0.15.3-alpha.7
155
+
156
+ ## 0.0.1-alpha.4
157
+
158
+ ### Patch Changes
159
+
160
+ - [#7363](https://github.com/mastra-ai/mastra/pull/7363) [`671a392`](https://github.com/mastra-ai/mastra/commit/671a39248d90f7723d3fae93818e8077f7504ec3) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix core imports inside agent-builder
161
+
162
+ - Updated dependencies [[`c19bcf7`](https://github.com/mastra-ai/mastra/commit/c19bcf7b43542b02157b5e17303e519933a153ab), [`a5632dd`](https://github.com/mastra-ai/mastra/commit/a5632dd316a6246666662705404bda570b070af1), [`b42a961`](https://github.com/mastra-ai/mastra/commit/b42a961a5aefd19d6e938a7705fc0ecc90e8f756), [`45e4d39`](https://github.com/mastra-ai/mastra/commit/45e4d391a2a09fc70c48e4d60f505586ada1ba0e), [`0302f50`](https://github.com/mastra-ai/mastra/commit/0302f50861a53c66ff28801fc371b37c5f97e41e), [`74db265`](https://github.com/mastra-ai/mastra/commit/74db265b96aa01a72ffd91dcae0bc3b346cca0f2), [`7f3b8da`](https://github.com/mastra-ai/mastra/commit/7f3b8da6dd21c35d3672e44b4f5dd3502b8f8f92), [`905352b`](https://github.com/mastra-ai/mastra/commit/905352bcda134552400eb252bca1cb05a7975c14), [`f2cda47`](https://github.com/mastra-ai/mastra/commit/f2cda47ae911038c5d5489f54c36517d6f15bdcc), [`cfd377a`](https://github.com/mastra-ai/mastra/commit/cfd377a3a33a9c88b644f6540feed9cd9832db47)]:
163
+ - @mastra/core@0.15.3-alpha.6
164
+ - @mastra/memory@0.14.3-alpha.3
165
+
166
+ ## 0.0.1-alpha.3
167
+
168
+ ### Patch Changes
169
+
170
+ - [#7343](https://github.com/mastra-ai/mastra/pull/7343) [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e) Thanks [@LekoArts](https://github.com/LekoArts)! - Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
171
+
172
+ - Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
173
+ - @mastra/core@0.15.3-alpha.5
174
+ - @mastra/memory@0.14.3-alpha.2
175
+
176
+ ## 0.0.1-alpha.2
177
+
178
+ ### Patch Changes
179
+
180
+ - [#5816](https://github.com/mastra-ai/mastra/pull/5816) [`ab48c97`](https://github.com/mastra-ai/mastra/commit/ab48c979098ea571faf998a55d3a00e7acd7a715) Thanks [@dane-ai-mastra](https://github.com/apps/dane-ai-mastra)! - dependencies updates:
181
+ - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
182
+
183
+ - [#7330](https://github.com/mastra-ai/mastra/pull/7330) [`b8e1a83`](https://github.com/mastra-ai/mastra/commit/b8e1a8381b356f51bf7c3d525943095cc3c912cc) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix package.json
184
+
185
+ - [#7136](https://github.com/mastra-ai/mastra/pull/7136) [`48f0742`](https://github.com/mastra-ai/mastra/commit/48f0742662414610dc9a7a99d45902d059ee123d) Thanks [@NikAiyer](https://github.com/NikAiyer)! - add deployer, server and clientjs handlers for agent builder template
186
+
187
+ - Updated dependencies [[`ab48c97`](https://github.com/mastra-ai/mastra/commit/ab48c979098ea571faf998a55d3a00e7acd7a715), [`ab48c97`](https://github.com/mastra-ai/mastra/commit/ab48c979098ea571faf998a55d3a00e7acd7a715), [`ff89505`](https://github.com/mastra-ai/mastra/commit/ff895057c8c7e91a5535faef46c5e5391085ddfa), [`183dc95`](https://github.com/mastra-ai/mastra/commit/183dc95596f391b977bd1a2c050b8498dac74891), [`a1111e2`](https://github.com/mastra-ai/mastra/commit/a1111e24e705488adfe5e0a6f20c53bddf26cb22), [`61debef`](https://github.com/mastra-ai/mastra/commit/61debefd80ad3a7ed5737e19df6a23d40091689a), [`9beaeff`](https://github.com/mastra-ai/mastra/commit/9beaeffa4a97b1d5fd01a7f8af8708b16067f67c), [`9eee594`](https://github.com/mastra-ai/mastra/commit/9eee594e35e0ca2a650fcc33fa82009a142b9ed0), [`979912c`](https://github.com/mastra-ai/mastra/commit/979912cfd180aad53287cda08af771df26454e2c), [`7dcf4c0`](https://github.com/mastra-ai/mastra/commit/7dcf4c04f44d9345b1f8bc5d41eae3f11ac61611), [`ad78bfc`](https://github.com/mastra-ai/mastra/commit/ad78bfc4ea6a1fff140432bf4f638e01af7af668), [`0ce418a`](https://github.com/mastra-ai/mastra/commit/0ce418a1ccaa5e125d4483a9651b635046152569), [`8387952`](https://github.com/mastra-ai/mastra/commit/838795227b4edf758c84a2adf6f7fba206c27719), [`5eca5d2`](https://github.com/mastra-ai/mastra/commit/5eca5d2655788863ea0442a46c9ef5d3c6dbe0a8)]:
188
+ - @mastra/core@0.15.3-alpha.4
189
+ - @mastra/memory@0.14.3-alpha.1
190
+
191
+ ## 0.0.1-alpha.1
192
+
193
+ ### Patch Changes
194
+
195
+ - [#7135](https://github.com/mastra-ai/mastra/pull/7135) [`48b9e55`](https://github.com/mastra-ai/mastra/commit/48b9e553a39528dcc20fbbeb798c3b1a1961468e) Thanks [@NikAiyer](https://github.com/NikAiyer)! - Add Agent Builder package with template installation workflow
196
+
197
+ Introduces a new package for programmatically building and managing Mastra agents with intelligent template merging capabilities. Features include automated dependency resolution, file conflict handling, and validation fixes.
198
+
199
+ - Updated dependencies [[`aedbbfa`](https://github.com/mastra-ai/mastra/commit/aedbbfa064124ddde039111f12629daebfea7e48), [`f643c65`](https://github.com/mastra-ai/mastra/commit/f643c651bdaf57c2343cf9dbfc499010495701fb), [`fef7375`](https://github.com/mastra-ai/mastra/commit/fef737534574f41b432a7361a285f776c3bac42b), [`e3d8fea`](https://github.com/mastra-ai/mastra/commit/e3d8feaacfb8b5c5c03c13604cc06ea2873d45fe), [`3412597`](https://github.com/mastra-ai/mastra/commit/3412597a6644c0b6bf3236d6e319ed1450c5bae8)]:
200
+ - @mastra/core@0.15.3-alpha.3
package/LICENSE.md ADDED
@@ -0,0 +1,15 @@
1
+ # Apache License 2.0
2
+
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @mastra/agent-builder
2
+
3
+ This package is currently experimental and only meant to be used internally to Mastra at the moment, the APIs are subject to change in this period.
4
+
5
+ A specialized AI agent for building production-ready Mastra applications, agents, tools, and workflows from natural language requirements.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @mastra/agent-builder
11
+ ```
12
+
13
+ ## Overview
14
+
15
+ `@mastra/agent-builder` is a meta-agent that helps developers create Mastra applications by:
16
+
17
+ - **Agent Generation**: Create specialized AI agents from natural language descriptions
18
+ - **Tool Creation**: Generate custom tools with proper schemas and validation
19
+ - **Workflow Building**: Design and implement complex multi-step workflows
20
+ - **Project Management**: Handle dependencies, configuration, and project structure
21
+ - **Code Validation**: Ensure generated code follows best practices and passes linting
22
+
23
+ ## Key Features
24
+
25
+ - **Mastra Expert Knowledge**: Deep understanding of Mastra patterns and conventions
26
+ - **Production-Ready Code**: Generates complete, working implementations
27
+ - **Project Context Aware**: Understands existing codebase structure and integrates seamlessly
28
+ - **Quality Assurance**: Built-in validation and testing capabilities
29
+ - **MCP Integration**: Leverages Model Context Protocol for enhanced tooling
30
+
31
+ ## Quick Start
32
+
33
+ ```typescript
34
+ import { AgentBuilder } from '@mastra/agent-builder';
35
+ import { openai } from '@ai-sdk/openai';
36
+
37
+ const builder = new AgentBuilder({
38
+ model: openai('gpt-4'),
39
+ summaryModel: openai('gpt-4'),
40
+ projectPath: '/path/to/your/project',
41
+ });
42
+
43
+ // Generate an agent from natural language
44
+ const result = await builder.generate({ ... })
45
+ ```
46
+
47
+ ## Configuration
48
+
49
+ The AgentBuilder requires a configuration object with:
50
+
51
+ - `model`: The primary language model for code generation
52
+ - `summaryModel`: A model for summarizing tool calls and results
53
+ - `projectPath`: Path to your Mastra project
54
+ - `instructions`: Optional additional instructions
55
+ - `tools`: Optional additional tools to include
56
+
57
+ ## Advanced Usage
58
+
59
+ ### Custom Project Management
60
+
61
+ ```typescript
62
+ // Install packages
63
+ const result = await builder.generate('Install @mastra/workflows package with latest version');
64
+
65
+ // Validate generated code
66
+ const validation = await builder.generate('Validate the TypeScript types and linting for src/agents/my-agent.ts');
67
+ ```
68
+
69
+ ### Server Management
70
+
71
+ ```typescript
72
+ // Start development server
73
+ const serverResult = await builder.generate('Start the development server on port 4200');
74
+
75
+ // Test API endpoints
76
+ const testResult = await builder.generate('Test the /health endpoint at http://localhost:4200');
77
+ ```
78
+
79
+ ## Memory and Processing
80
+
81
+ The AgentBuilder includes specialized memory processors:
82
+
83
+ - **ToolSummaryProcessor**: Caches and summarizes tool call results
84
+ - **WriteToDiskProcessor**: Saves conversation history for debugging
85
+ - **TokenLimiter**: Manages context window size
86
+
87
+ ## Best Practices
88
+
89
+ 1. **Provide Clear Requirements**: The more specific your requirements, the better the generated code
90
+ 2. **Use Project Context**: Let the agent explore your existing codebase structure
91
+ 3. **Validate Output**: Always run the validation tools after code generation
92
+ 4. **Iterative Development**: Start with simple agents and add complexity incrementally
93
+
94
+ ## License
95
+
96
+ Apache-2.0
@@ -0,0 +1,31 @@
1
+ import { Agent } from '@mastra/core/agent';
2
+ import type { AgentExecutionOptions } from '@mastra/core/agent';
3
+ import type { MessageListInput } from '@mastra/core/agent/message-list';
4
+ import type { AISDKV5OutputStream, MastraModelOutput, OutputSchema } from '@mastra/core/stream';
5
+ import type { JSONSchema7 } from 'ai';
6
+ import type { ZodSchema } from 'zod';
7
+ import type { AgentBuilderConfig } from '../types.js';
8
+ export declare class AgentBuilder extends Agent {
9
+ private builderConfig;
10
+ /**
11
+ * Constructor for AgentBuilder
12
+ */
13
+ constructor(config: AgentBuilderConfig);
14
+ /**
15
+ * Enhanced generate method with AgentBuilder-specific configuration
16
+ * Overrides the base Agent generate method to provide additional project context
17
+ */
18
+ generate: Agent['generate'];
19
+ /**
20
+ * Enhanced stream method with AgentBuilder-specific configuration
21
+ * Overrides the base Agent stream method to provide additional project context
22
+ */
23
+ stream: Agent['stream'];
24
+ /**
25
+ * Enhanced stream method with AgentBuilder-specific configuration
26
+ * Overrides the base Agent stream method to provide additional project context
27
+ */
28
+ streamVNext<OUTPUT extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, FORMAT extends 'mastra' | 'aisdk' | undefined = undefined>(messages: MessageListInput, streamOptions?: AgentExecutionOptions<OUTPUT, STRUCTURED_OUTPUT, FORMAT>): Promise<FORMAT extends 'aisdk' ? AISDKV5OutputStream<OUTPUT> : MastraModelOutput<OUTPUT>>;
29
+ generateVNext<OUTPUT extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' = 'mastra'>(messages: MessageListInput, options?: AgentExecutionOptions<OUTPUT, STRUCTURED_OUTPUT, FORMAT>): Promise<FORMAT extends 'aisdk' ? Awaited<ReturnType<AISDKV5OutputStream<OUTPUT>['getFullOutput']>> : Awaited<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>>;
30
+ }
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAIV,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAGrC,OAAO,KAAK,EAAE,kBAAkB,EAAwB,MAAM,UAAU,CAAC;AA+BzE,qBAAa,YAAa,SAAQ,KAAK;IACrC,OAAO,CAAC,aAAa,CAAqB;IAE1C;;OAEG;gBACS,MAAM,EAAE,kBAAkB;IAgCtC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CA6BzB;IAEF;;;OAGG;IACH,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CA4BrB;IAEF;;;OAGG;IACG,WAAW,CACf,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,iBAAiB,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,EACzE,MAAM,SAAS,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,EAEzD,QAAQ,EAAE,gBAAgB,EAC1B,aAAa,CAAC,EAAE,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,GACvE,OAAO,CAAC,MAAM,SAAS,OAAO,GAAG,mBAAmB,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IA2BtF,aAAa,CACjB,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,iBAAiB,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,EACzE,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,QAAQ,EAE5C,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,GACjE,OAAO,CACR,MAAM,SAAS,OAAO,GAClB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,GACjE,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CACpE;CA0BF"}