node-red-contrib-ai-agent 0.5.1 → 0.5.2
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/{agent-orchestrator/agent-orchestrator.html → orchestrator-agent/orchestrator-agent.html}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
|
-
RED.nodes.registerType('ai-agent
|
|
2
|
+
RED.nodes.registerType('ai-orchestrator-agent', {
|
|
3
3
|
category: 'AI Agent',
|
|
4
4
|
color: '#deb887',
|
|
5
5
|
defaults: {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
inputs: 1,
|
|
17
|
-
outputs:
|
|
17
|
+
outputs: 1,
|
|
18
18
|
icon: 'agent/ai-agent-icon.svg',
|
|
19
19
|
label: function () {
|
|
20
20
|
return this.name || 'AI Agent Orchestrator';
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
});
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
|
-
<script type="text/x-red" data-template-name="ai-agent
|
|
28
|
+
<script type="text/x-red" data-template-name="ai-orchestrator-agent">
|
|
29
29
|
<div class="form-row">
|
|
30
30
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
31
31
|
<input type="text" id="node-input-name" placeholder="AI Agent Orchestrator">
|
|
@@ -46,12 +46,11 @@
|
|
|
46
46
|
|
|
47
47
|
<div class="form-tips" style="background: #f8f9fa; border-left: 3px solid #3b78e7; padding: 10px;">
|
|
48
48
|
<p><b>Pipeline Node:</b> This node tags messages with its identity so a connected Orchestrator can use it.</p>
|
|
49
|
-
<p><b>Output
|
|
50
|
-
<p><b>Output 2:</b> Discovery Pipeline (Connect to Orchestrator).</p>
|
|
49
|
+
<p><b>Output:</b> Discovery Pipeline (Connect to Orchestrator).</p>
|
|
51
50
|
</div>
|
|
52
51
|
</script>
|
|
53
52
|
|
|
54
|
-
<script type="text/x-red" data-help-name="ai-agent
|
|
53
|
+
<script type="text/x-red" data-help-name="ai-orchestrator-agent">
|
|
55
54
|
<h3>AI Agent Orchestrator Node</h3>
|
|
56
55
|
<p>A specialized version of the AI Agent designed for multi-agent workflows.</p>
|
|
57
56
|
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
<h4>Usage</h4>
|
|
65
64
|
<ol>
|
|
66
65
|
<li>Place the node in front of an AI Orchestrator node.</li>
|
|
67
|
-
<li>Connect the
|
|
66
|
+
<li>Connect the output of this node to the input of the Orchestrator.</li>
|
|
68
67
|
<li>Define the agent's specific capabilities in the config.</li>
|
|
69
68
|
</ol>
|
|
70
|
-
</script>
|
|
69
|
+
</script>
|
package/{agent-orchestrator/agent-orchestrator.js → orchestrator-agent/orchestrator-agent.js}
RENAMED
|
@@ -120,7 +120,7 @@ async function callAI(node, aiConfig, messages) {
|
|
|
120
120
|
'Authorization': `Bearer ${aiConfig.apiKey}`,
|
|
121
121
|
'Content-Type': 'application/json',
|
|
122
122
|
'HTTP-Referer': 'https://nodered.org/',
|
|
123
|
-
'X-Title': 'Node-RED AI Agent
|
|
123
|
+
'X-Title': 'Node-RED AI Orchestrator-Agent'
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
);
|
|
@@ -186,10 +186,8 @@ async function processToolCalls(node, responseMessage, tools, messages, aiConfig
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
module.exports = function (RED) {
|
|
189
|
-
function
|
|
189
|
+
function AIOrchestratorAgent(config) {
|
|
190
190
|
RED.nodes.createNode(this, config);
|
|
191
|
-
const node = this;
|
|
192
|
-
|
|
193
191
|
this.name = config.name || 'AI Agent Orchestrator';
|
|
194
192
|
this.systemPrompt = config.systemPrompt || 'You are a helpful AI assistant.';
|
|
195
193
|
this.capabilities = (config.capabilities || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
@@ -217,6 +215,8 @@ module.exports = function (RED) {
|
|
|
217
215
|
}
|
|
218
216
|
};
|
|
219
217
|
|
|
218
|
+
const node = this;
|
|
219
|
+
|
|
220
220
|
node.on('close', function (done) {
|
|
221
221
|
node.status({});
|
|
222
222
|
if (done) done();
|
|
@@ -251,5 +251,5 @@ module.exports = function (RED) {
|
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
RED.nodes.registerType('ai-agent
|
|
254
|
+
RED.nodes.registerType('ai-orchestrator-agent', AIOrchestratorAgent);
|
|
255
255
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-ai-agent",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "AI Agent for Node-RED",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"license": "AGPL-3.0",
|
|
29
29
|
"files": [
|
|
30
30
|
"agent/*",
|
|
31
|
-
"
|
|
31
|
+
"memory-file/*",
|
|
32
|
+
"memory-inmem/*",
|
|
32
33
|
"model/*",
|
|
34
|
+
"orchestrator/*",
|
|
35
|
+
"orchestrator-agent/*",
|
|
33
36
|
"tool/*",
|
|
34
37
|
"tool-function/*",
|
|
35
|
-
"tool-http/*"
|
|
36
|
-
"memory-file/*",
|
|
37
|
-
"memory-inmem/*",
|
|
38
|
-
"orchestrator/*"
|
|
38
|
+
"tool-http/*"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"axios": "^1.6.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"ai-memory-file": "./memory-file/memory-file.js",
|
|
66
66
|
"ai-memory-inmem": "./memory-inmem/memory-inmem.js",
|
|
67
67
|
"ai-orchestrator": "./orchestrator/orchestrator.js",
|
|
68
|
-
"ai-agent
|
|
68
|
+
"ai-orchestrator-agent": "./orchestrator-agent/orchestrator-agent.js",
|
|
69
69
|
"ai-tool-approval": "./tool-approval/ai-tool-approval.js"
|
|
70
70
|
}
|
|
71
71
|
}
|