@mastra/agent-builder 1.1.16-alpha.1 → 1.1.16-alpha.3
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/README.md +18 -65
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @mastra/agent-builder
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
A specialized AI agent for building production-ready Mastra applications, agents, tools, and workflows from natural language requirements.
|
|
3
|
+
`@mastra/agent-builder` is a specialized agent that turns natural-language requirements into Mastra applications, agents, tools, and workflows. This experimental package requires a Mastra Enterprise license for production use, and its APIs may change without notice.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -10,83 +8,38 @@ A specialized AI agent for building production-ready Mastra applications, agents
|
|
|
10
8
|
npm install @mastra/agent-builder
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
##
|
|
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
|
|
11
|
+
## Usage
|
|
24
12
|
|
|
25
|
-
|
|
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
|
|
13
|
+
Set a supported model and the path to a Mastra project.
|
|
32
14
|
|
|
33
15
|
```typescript
|
|
34
16
|
import { AgentBuilder } from '@mastra/agent-builder';
|
|
35
|
-
import { openai } from '@ai-sdk/openai';
|
|
36
17
|
|
|
37
18
|
const builder = new AgentBuilder({
|
|
38
|
-
model: openai
|
|
39
|
-
summaryModel: openai
|
|
40
|
-
projectPath:
|
|
19
|
+
model: 'openai/gpt-5.6-sol',
|
|
20
|
+
summaryModel: 'openai/gpt-5.6-sol',
|
|
21
|
+
projectPath: process.cwd(),
|
|
41
22
|
});
|
|
42
23
|
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
const result = await builder.generate('Create a weather agent with a typed forecast tool.');
|
|
25
|
+
console.log(result.text);
|
|
45
26
|
```
|
|
46
27
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
The AgentBuilder requires a configuration object with:
|
|
28
|
+
## Documentation
|
|
50
29
|
|
|
51
|
-
|
|
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
|
|
30
|
+
`AgentBuilder` extends Mastra's `Agent` with defaults intended for code generation. It can inspect an existing project, summarize available tools, write generated files to disk, and keep long builder sessions within the model's token limits.
|
|
56
31
|
|
|
57
|
-
|
|
32
|
+
The constructor accepts the primary `model`, an optional `summaryModel`, and the target `projectPath`. It configures memory and builder-oriented processors internally, then applies deterministic generation defaults for multi-step code changes.
|
|
58
33
|
|
|
59
|
-
|
|
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
|
-
```
|
|
34
|
+
This package is intended for the Mastra Agent Builder product rather than as a stable general-purpose public API. Production use of the Agent Builder experience is subject to the [Mastra Enterprise License](https://github.com/mastra-ai/mastra/blob/main/ee/LICENSE).
|
|
78
35
|
|
|
79
|
-
|
|
36
|
+
- [Agent Builder documentation](https://agent-builder.mastra.ai/)
|
|
37
|
+
- [`AgentBuilderOptions` reference](https://agent-builder.mastra.ai/reference/agent-builder-options)
|
|
80
38
|
|
|
81
|
-
|
|
39
|
+
## Changelog
|
|
82
40
|
|
|
83
|
-
-
|
|
84
|
-
- **WriteToDiskProcessor**: Saves conversation history for debugging
|
|
85
|
-
- **TokenLimiter**: Manages context window size
|
|
41
|
+
See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/packages/agent-builder/CHANGELOG.md) for version history and release notes.
|
|
86
42
|
|
|
87
|
-
##
|
|
43
|
+
## Support
|
|
88
44
|
|
|
89
|
-
|
|
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
|
|
45
|
+
We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/agent-builder",
|
|
3
|
-
"version": "1.1.16-alpha.
|
|
3
|
+
"version": "1.1.16-alpha.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@ai-sdk/xai-v5": "npm:@ai-sdk/xai@2.0.82",
|
|
35
35
|
"ignore": "^7.0.5",
|
|
36
36
|
"semver": "^7.7.4",
|
|
37
|
-
"@mastra/memory": "1.28.2-alpha.
|
|
38
|
-
"@mastra/schema-compat": "1.3.8-alpha.
|
|
37
|
+
"@mastra/memory": "1.28.2-alpha.3",
|
|
38
|
+
"@mastra/schema-compat": "1.3.8-alpha.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "22.20.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@internal/ai-sdk-v5": "0.0.76",
|
|
53
53
|
"@internal/lint": "0.0.129",
|
|
54
54
|
"@internal/types-builder": "0.0.104",
|
|
55
|
-
"@mastra/core": "1.64.0-alpha.
|
|
55
|
+
"@mastra/core": "1.64.0-alpha.8"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@mastra/core": ">=1.4.1-0 <2.0.0-0",
|