@mastra/agent-builder 0.0.0-consolidate-changesets-20250904042643

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 +137 -0
  2. package/LICENSE.md +15 -0
  3. package/README.md +96 -0
  4. package/dist/agent/index.d.ts +5885 -0
  5. package/dist/agent/index.d.ts.map +1 -0
  6. package/dist/defaults.d.ts +6529 -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 +6122 -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 +1121 -0
  17. package/dist/types.d.ts.map +1 -0
  18. package/dist/utils.d.ts +63 -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 +1910 -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 +3735 -0
  41. package/dist/workflows/workflow-map.d.ts.map +1 -0
  42. package/package.json +83 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,137 @@
1
+ # @mastra/agent-builder
2
+
3
+ ## 0.0.0-consolidate-changesets-20250904042643
4
+
5
+ ### Patch Changes
6
+
7
+ - de3cbc6: Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
8
+ - a32248b: dependencies updates:
9
+ - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
10
+ dependencies updates:
11
+ - Updated dependency [`zod-to-json-schema@^3.24.6` ↗︎](https://www.npmjs.com/package/zod-to-json-schema/v/3.24.6) (from `^3.24.5`, in `dependencies`)
12
+ dependencies updates:
13
+ - Updated dependency [`rollup@~4.49.0` ↗︎](https://www.npmjs.com/package/rollup/v/4.49.0) (from `~4.47.1`, in `dependencies`)
14
+ dependencies updates:
15
+ - Updated dependency [`rollup@~4.50.0` ↗︎](https://www.npmjs.com/package/rollup/v/4.50.0) (from `~4.49.0`, in `dependencies`)
16
+ dependencies updates:
17
+ - Updated dependency [`redis@^5.8.2` ↗︎](https://www.npmjs.com/package/redis/v/5.8.2) (from `^5.8.0`, in `dependencies`)
18
+ dependencies updates:
19
+ - Updated dependency [`@libsql/client@^0.15.14` ↗︎](https://www.npmjs.com/package/@libsql/client/v/0.15.14) (from `^0.15.12`, in `dependencies`)
20
+ dependencies updates:
21
+ - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
22
+ - Updated dependency [`zod-to-json-schema@^3.24.6` ↗︎](https://www.npmjs.com/package/zod-to-json-schema/v/3.24.6) (from `^3.24.5`, in `dependencies`)
23
+ dependencies updates:
24
+ - Updated dependency [`zod@^4.1.5` ↗︎](https://www.npmjs.com/package/zod/v/4.1.5) (from `^4.0.15`, in `dependencies`)
25
+ dependencies updates:
26
+ - Updated dependency [`@assistant-ui/react@^0.10.44` ↗︎](https://www.npmjs.com/package/@assistant-ui/react/v/0.10.44) (from `^0.7.91`, in `dependencies`)
27
+ - Updated dependency [`@assistant-ui/react-markdown@^0.10.9` ↗︎](https://www.npmjs.com/package/@assistant-ui/react-markdown/v/0.10.9) (from `^0.7.21`, in `dependencies`)
28
+ - Updated dependency [`@assistant-ui/react-syntax-highlighter@^0.10.10` ↗︎](https://www.npmjs.com/package/@assistant-ui/react-syntax-highlighter/v/0.10.10) (from `^0.7.10`, in `dependencies`)
29
+ - Added dependency [`@assistant-ui/react-ui@^0.1.8` ↗︎](https://www.npmjs.com/package/@assistant-ui/react-ui/v/0.1.8) (to `dependencies`)
30
+ dependencies updates:
31
+ - Updated dependency [`@xyflow/react@^12.8.4` ↗︎](https://www.npmjs.com/package/@xyflow/react/v/12.8.4) (from `^12.8.2`, in `dependencies`)
32
+ dependencies updates:
33
+ - Updated dependency [`@assistant-ui/react@^0.10.45` ↗︎](https://www.npmjs.com/package/@assistant-ui/react/v/0.10.45) (from `^0.10.44`, in `dependencies`)
34
+ dependencies updates:
35
+ - Updated dependency [`@qdrant/js-client-rest@^1.15.1` ↗︎](https://www.npmjs.com/package/@qdrant/js-client-rest/v/1.15.1) (from `^1.15.0`, in `dependencies`)
36
+ dependencies updates:
37
+ - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
38
+ - Updated dependency [`zod-to-json-schema@^3.24.6` ↗︎](https://www.npmjs.com/package/zod-to-json-schema/v/3.24.6) (from `^3.23.5`, in `dependencies`)
39
+ - b8e1a83: Fix package.json
40
+ - 671a392: Fix core imports inside agent-builder
41
+ - 48b9e55: Add Agent Builder package with template installation workflow
42
+
43
+ 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.
44
+
45
+ - Updated dependencies [85ef90b]
46
+ - Updated dependencies [aedbbfa]
47
+ - Updated dependencies [ff89505]
48
+ - Updated dependencies [637f323]
49
+ - Updated dependencies [de3cbc6]
50
+ - Updated dependencies [c19bcf7]
51
+ - Updated dependencies [a5632dd]
52
+ - Updated dependencies [4474d04]
53
+ - Updated dependencies [183dc95]
54
+ - Updated dependencies [f5e7282]
55
+ - Updated dependencies [a32248b]
56
+ - Updated dependencies [a1111e2]
57
+ - Updated dependencies [b42a961]
58
+ - Updated dependencies [61debef]
59
+ - Updated dependencies [9beaeff]
60
+ - Updated dependencies [00c74e7]
61
+ - Updated dependencies [f0dfcac]
62
+ - Updated dependencies [fef7375]
63
+ - Updated dependencies [e3d8fea]
64
+ - Updated dependencies [45e4d39]
65
+ - Updated dependencies [9eee594]
66
+ - Updated dependencies [822c2e8]
67
+ - Updated dependencies [979912c]
68
+ - Updated dependencies [4106a58]
69
+ - Updated dependencies [ad78bfc]
70
+ - Updated dependencies [0302f50]
71
+ - Updated dependencies [74db265]
72
+ - Updated dependencies [8387952]
73
+ - Updated dependencies [7f3b8da]
74
+ - Updated dependencies [905352b]
75
+ - Updated dependencies [599d04c]
76
+ - Updated dependencies [56041d0]
77
+ - Updated dependencies [5eca5d2]
78
+ - Updated dependencies [f2cda47]
79
+ - Updated dependencies [5de1555]
80
+ - Updated dependencies [cfd377a]
81
+ - Updated dependencies [1ed5a3e]
82
+ - @mastra/core@0.0.0-consolidate-changesets-20250904042643
83
+ - @mastra/memory@0.0.0-consolidate-changesets-20250904042643
84
+
85
+ ## 0.0.1-alpha.5
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies [[`f0dfcac`](https://github.com/mastra-ai/mastra/commit/f0dfcac4458bdf789b975e2d63e984f5d1e7c4d3), [`7149d8d`](https://github.com/mastra-ai/mastra/commit/7149d8d4bdc1edf0008e0ca9b7925eb0b8b60dbe)]:
90
+ - @mastra/memory@0.14.3-alpha.4
91
+ - @mastra/core@0.15.3-alpha.7
92
+
93
+ ## 0.0.1-alpha.4
94
+
95
+ ### Patch Changes
96
+
97
+ - [#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
98
+
99
+ - 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)]:
100
+ - @mastra/core@0.15.3-alpha.6
101
+ - @mastra/memory@0.14.3-alpha.3
102
+
103
+ ## 0.0.1-alpha.3
104
+
105
+ ### Patch Changes
106
+
107
+ - [#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`.
108
+
109
+ - Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
110
+ - @mastra/core@0.15.3-alpha.5
111
+ - @mastra/memory@0.14.3-alpha.2
112
+
113
+ ## 0.0.1-alpha.2
114
+
115
+ ### Patch Changes
116
+
117
+ - [#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:
118
+ - Updated dependency [`zod@^3.25.76` ↗︎](https://www.npmjs.com/package/zod/v/3.25.76) (from `^3.25.67`, in `dependencies`)
119
+
120
+ - [#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
121
+
122
+ - [#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
123
+
124
+ - 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)]:
125
+ - @mastra/core@0.15.3-alpha.4
126
+ - @mastra/memory@0.14.3-alpha.1
127
+
128
+ ## 0.0.1-alpha.1
129
+
130
+ ### Patch Changes
131
+
132
+ - [#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
133
+
134
+ 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.
135
+
136
+ - 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)]:
137
+ - @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
+ A specialized AI agent for building production-ready Mastra applications, agents, tools, and workflows from natural language requirements.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @mastra/agent-builder
9
+ ```
10
+
11
+ ## Overview
12
+
13
+ `@mastra/agent-builder` is a meta-agent that helps developers create Mastra applications by:
14
+
15
+ - **Agent Generation**: Create specialized AI agents from natural language descriptions
16
+ - **Tool Creation**: Generate custom tools with proper schemas and validation
17
+ - **Workflow Building**: Design and implement complex multi-step workflows
18
+ - **Project Management**: Handle dependencies, configuration, and project structure
19
+ - **Code Validation**: Ensure generated code follows best practices and passes linting
20
+
21
+ ## Key Features
22
+
23
+ - **Mastra Expert Knowledge**: Deep understanding of Mastra patterns and conventions
24
+ - **Production-Ready Code**: Generates complete, working implementations
25
+ - **Project Context Aware**: Understands existing codebase structure and integrates seamlessly
26
+ - **Quality Assurance**: Built-in validation and testing capabilities
27
+ - **MCP Integration**: Leverages Model Context Protocol for enhanced tooling
28
+
29
+ ## Quick Start
30
+
31
+ ```typescript
32
+ import { AgentBuilder } from '@mastra/agent-builder';
33
+ import { openai } from '@ai-sdk/openai';
34
+
35
+ const builder = new AgentBuilder({
36
+ model: openai('gpt-4'),
37
+ summaryModel: openai('gpt-4'),
38
+ projectPath: '/path/to/your/project',
39
+ });
40
+
41
+ // Generate an agent from natural language
42
+ const result = await builder.generateAgent(
43
+ 'Create a weather agent that can get current weather and suggest activities',
44
+ );
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