@illuma-ai/agents 1.1.15 → 1.1.17
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/dist/cjs/common/enum.cjs +15 -13
- package/dist/cjs/common/enum.cjs.map +1 -1
- package/dist/cjs/graphs/MultiAgentGraph.cjs +173 -150
- package/dist/cjs/graphs/MultiAgentGraph.cjs.map +1 -1
- package/dist/cjs/main.cjs +2 -2
- package/dist/cjs/types/graph.cjs.map +1 -1
- package/dist/esm/common/enum.mjs +14 -12
- package/dist/esm/common/enum.mjs.map +1 -1
- package/dist/esm/graphs/MultiAgentGraph.mjs +174 -151
- package/dist/esm/graphs/MultiAgentGraph.mjs.map +1 -1
- package/dist/esm/main.mjs +1 -1
- package/dist/esm/types/graph.mjs.map +1 -1
- package/dist/types/common/enum.d.ts +13 -11
- package/dist/types/graphs/MultiAgentGraph.d.ts +38 -36
- package/dist/types/types/graph.d.ts +22 -7
- package/package.json +1 -1
- package/src/common/__tests__/enum.test.ts +14 -6
- package/src/common/enum.ts +13 -11
- package/src/graphs/MultiAgentGraph.ts +190 -152
- package/src/graphs/__tests__/multi-agent-delegate.test.ts +44 -44
- package/src/graphs/__tests__/multi-agent-edges.test.ts +83 -85
- package/src/scripts/multi-agent-chain.js +1 -1
- package/src/scripts/multi-agent-chain.ts +1 -1
- package/src/scripts/multi-agent-document-review-chain.js +1 -1
- package/src/scripts/multi-agent-document-review-chain.ts +1 -1
- package/src/scripts/multi-agent-hybrid-flow.js +3 -3
- package/src/scripts/multi-agent-hybrid-flow.ts +3 -3
- package/src/scripts/multi-agent-parallel.js +2 -2
- package/src/scripts/multi-agent-parallel.ts +2 -2
- package/src/scripts/multi-agent-sequence.js +2 -2
- package/src/scripts/multi-agent-sequence.ts +2 -2
- package/src/scripts/multi-agent-supervisor.js +5 -5
- package/src/scripts/multi-agent-supervisor.ts +5 -5
- package/src/scripts/poc-multi-agent-comprehensive.ts +7 -7
- package/src/scripts/sequential-full-metadata-test.js +1 -1
- package/src/scripts/sequential-full-metadata-test.ts +1 -1
- package/src/scripts/test-custom-prompt-key.js +3 -3
- package/src/scripts/test-custom-prompt-key.ts +3 -3
- package/src/scripts/test-handoff-input.js +1 -1
- package/src/scripts/test-handoff-input.ts +1 -1
- package/src/scripts/test-handoff-preamble.js +1 -1
- package/src/scripts/test-handoff-preamble.ts +1 -1
- package/src/scripts/test-handoff-steering.js +3 -3
- package/src/scripts/test-handoff-steering.ts +3 -3
- package/src/scripts/test-multi-agent-list-handoff.js +1 -1
- package/src/scripts/test-multi-agent-list-handoff.ts +1 -1
- package/src/scripts/test-parallel-agent-labeling.js +2 -2
- package/src/scripts/test-parallel-agent-labeling.ts +2 -2
- package/src/scripts/test-parallel-handoffs.js +2 -2
- package/src/scripts/test-parallel-handoffs.ts +2 -2
- package/src/scripts/test-thinking-handoff-bedrock.js +1 -1
- package/src/scripts/test-thinking-handoff-bedrock.ts +1 -1
- package/src/scripts/test-thinking-handoff.js +1 -1
- package/src/scripts/test-thinking-handoff.ts +1 -1
- package/src/scripts/test-thinking-to-thinking-handoff-bedrock.js +1 -1
- package/src/scripts/test-thinking-to-thinking-handoff-bedrock.ts +1 -1
- package/src/scripts/test-tool-before-handoff-role-order.js +1 -1
- package/src/scripts/test-tool-before-handoff-role-order.ts +1 -1
- package/src/scripts/test-tools-before-handoff.js +1 -1
- package/src/scripts/test-tools-before-handoff.ts +1 -1
- package/src/specs/agent-handoffs-bedrock.integration.test.ts +6 -6
- package/src/specs/agent-handoffs.test.ts +35 -35
- package/src/specs/thinking-handoff.test.ts +9 -9
- package/src/types/graph.ts +23 -7
|
@@ -82,13 +82,13 @@ async function testSequentialMultiAgent() {
|
|
|
82
82
|
{
|
|
83
83
|
from: 'agent_a',
|
|
84
84
|
to: 'agent_b',
|
|
85
|
-
edgeType: '
|
|
85
|
+
edgeType: 'sequence', // This creates direct edges without tools
|
|
86
86
|
description: 'Automatic transition from A to B',
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
from: 'agent_b',
|
|
90
90
|
to: 'agent_c',
|
|
91
|
-
edgeType: '
|
|
91
|
+
edgeType: 'sequence', // This creates direct edges without tools
|
|
92
92
|
description: 'Automatic transition from B to C',
|
|
93
93
|
},
|
|
94
94
|
];
|
|
@@ -228,31 +228,31 @@ async function testSupervisorMultiAgent() {
|
|
|
228
228
|
from: 'supervisor',
|
|
229
229
|
to: 'data_analyst',
|
|
230
230
|
description: 'Transfer to data analyst for statistical analysis and metrics',
|
|
231
|
-
edgeType: '
|
|
231
|
+
edgeType: 'transfer',
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
from: 'supervisor',
|
|
235
235
|
to: 'security_expert',
|
|
236
236
|
description: 'Transfer to security expert for cybersecurity assessment',
|
|
237
|
-
edgeType: '
|
|
237
|
+
edgeType: 'transfer',
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
from: 'supervisor',
|
|
241
241
|
to: 'product_designer',
|
|
242
242
|
description: 'Transfer to product designer for UX/UI design',
|
|
243
|
-
edgeType: '
|
|
243
|
+
edgeType: 'transfer',
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
from: 'supervisor',
|
|
247
247
|
to: 'devops_engineer',
|
|
248
248
|
description: 'Transfer to DevOps engineer for infrastructure and deployment',
|
|
249
|
-
edgeType: '
|
|
249
|
+
edgeType: 'transfer',
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
from: 'supervisor',
|
|
253
253
|
to: 'legal_advisor',
|
|
254
254
|
description: 'Transfer to legal advisor for compliance and licensing',
|
|
255
|
-
edgeType: '
|
|
255
|
+
edgeType: 'transfer',
|
|
256
256
|
},
|
|
257
257
|
];
|
|
258
258
|
return {
|
|
@@ -255,32 +255,32 @@ async function testSupervisorMultiAgent() {
|
|
|
255
255
|
to: 'data_analyst',
|
|
256
256
|
description:
|
|
257
257
|
'Transfer to data analyst for statistical analysis and metrics',
|
|
258
|
-
edgeType: '
|
|
258
|
+
edgeType: 'transfer',
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
from: 'supervisor',
|
|
262
262
|
to: 'security_expert',
|
|
263
263
|
description: 'Transfer to security expert for cybersecurity assessment',
|
|
264
|
-
edgeType: '
|
|
264
|
+
edgeType: 'transfer',
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
267
|
from: 'supervisor',
|
|
268
268
|
to: 'product_designer',
|
|
269
269
|
description: 'Transfer to product designer for UX/UI design',
|
|
270
|
-
edgeType: '
|
|
270
|
+
edgeType: 'transfer',
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
from: 'supervisor',
|
|
274
274
|
to: 'devops_engineer',
|
|
275
275
|
description:
|
|
276
276
|
'Transfer to DevOps engineer for infrastructure and deployment',
|
|
277
|
-
edgeType: '
|
|
277
|
+
edgeType: 'transfer',
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
from: 'supervisor',
|
|
281
281
|
to: 'legal_advisor',
|
|
282
282
|
description: 'Transfer to legal advisor for compliance and licensing',
|
|
283
|
-
edgeType: '
|
|
283
|
+
edgeType: 'transfer',
|
|
284
284
|
},
|
|
285
285
|
];
|
|
286
286
|
|
|
@@ -690,7 +690,7 @@ Start with "SUMMARY:" and end with "RECOMMENDATION:"`
|
|
|
690
690
|
{
|
|
691
691
|
from: 'researcher',
|
|
692
692
|
to: 'analyst',
|
|
693
|
-
edgeType: '
|
|
693
|
+
edgeType: 'sequence',
|
|
694
694
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
695
695
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
696
696
|
return `Here are the research findings. Analyze them and provide insights:\n\n${buffer}`;
|
|
@@ -700,7 +700,7 @@ Start with "SUMMARY:" and end with "RECOMMENDATION:"`
|
|
|
700
700
|
{
|
|
701
701
|
from: 'analyst',
|
|
702
702
|
to: 'summarizer',
|
|
703
|
-
edgeType: '
|
|
703
|
+
edgeType: 'sequence',
|
|
704
704
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
705
705
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
706
706
|
return `Here are the combined research and analysis. Synthesize into a final summary:\n\n${buffer}`;
|
|
@@ -813,7 +813,7 @@ Start with "REVIEW:" and keep it to 3-4 lines.`
|
|
|
813
813
|
{
|
|
814
814
|
from: 'data_collector',
|
|
815
815
|
to: 'translator',
|
|
816
|
-
edgeType: '
|
|
816
|
+
edgeType: 'sequence',
|
|
817
817
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
818
818
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
819
819
|
return `Here is the collected data. Translate the key findings to Spanish:\n\n${buffer}`;
|
|
@@ -823,7 +823,7 @@ Start with "REVIEW:" and keep it to 3-4 lines.`
|
|
|
823
823
|
{
|
|
824
824
|
from: 'translator',
|
|
825
825
|
to: 'reviewer',
|
|
826
|
-
edgeType: '
|
|
826
|
+
edgeType: 'sequence',
|
|
827
827
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
828
828
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
829
829
|
return `Here is the collected and translated data. Review it for quality:\n\n${buffer}`;
|
|
@@ -934,7 +934,7 @@ Format as a brief executive memo (4-5 sentences). Start with "EXECUTIVE SUMMARY:
|
|
|
934
934
|
{
|
|
935
935
|
from: 'intel_gatherer',
|
|
936
936
|
to: 'market_analyst',
|
|
937
|
-
edgeType: '
|
|
937
|
+
edgeType: 'sequence',
|
|
938
938
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
939
939
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
940
940
|
return `Here is the gathered intelligence. Analyze the market sentiment and cross-reference with our database:\n\n${buffer}`;
|
|
@@ -944,7 +944,7 @@ Format as a brief executive memo (4-5 sentences). Start with "EXECUTIVE SUMMARY:
|
|
|
944
944
|
{
|
|
945
945
|
from: 'market_analyst',
|
|
946
946
|
to: 'presenter',
|
|
947
|
-
edgeType: '
|
|
947
|
+
edgeType: 'sequence',
|
|
948
948
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
949
949
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
950
950
|
return `Here is the intelligence and market analysis. Create a polished executive summary:\n\n${buffer}`;
|
|
@@ -1070,7 +1070,7 @@ Start with "SENTIMENT ANALYSIS:"`,
|
|
|
1070
1070
|
{
|
|
1071
1071
|
from: 'planner',
|
|
1072
1072
|
to: 'researcher',
|
|
1073
|
-
edgeType: '
|
|
1073
|
+
edgeType: 'sequence',
|
|
1074
1074
|
prompt: (messages: BaseMessage[], startIndex: number) => {
|
|
1075
1075
|
const buffer = getBufferString(messages.slice(startIndex));
|
|
1076
1076
|
return `Here is the content plan. Gather the required data:\n\n${buffer}`;
|
|
@@ -37,7 +37,7 @@ async function testSequentialMetadata() {
|
|
|
37
37
|
];
|
|
38
38
|
// Sequential edge: A -> B (using edgeType not type)
|
|
39
39
|
const edges = [
|
|
40
|
-
{ from: 'agent_a', to: 'agent_b', edgeType: '
|
|
40
|
+
{ from: 'agent_a', to: 'agent_b', edgeType: 'sequence' },
|
|
41
41
|
];
|
|
42
42
|
const captureMetadata = (eventName, metadata) => {
|
|
43
43
|
if (metadata) {
|
|
@@ -49,7 +49,7 @@ async function testSequentialMetadata() {
|
|
|
49
49
|
|
|
50
50
|
// Sequential edge: A -> B (using edgeType not type)
|
|
51
51
|
const edges: t.GraphEdge[] = [
|
|
52
|
-
{ from: 'agent_a', to: 'agent_b', edgeType: '
|
|
52
|
+
{ from: 'agent_a', to: 'agent_b', edgeType: 'sequence' },
|
|
53
53
|
];
|
|
54
54
|
|
|
55
55
|
const captureMetadata = (
|
|
@@ -70,7 +70,7 @@ async function testCustomPromptKey() {
|
|
|
70
70
|
{
|
|
71
71
|
from: 'supervisor',
|
|
72
72
|
to: 'researcher',
|
|
73
|
-
edgeType: '
|
|
73
|
+
edgeType: 'transfer',
|
|
74
74
|
// Custom parameter name: "query"
|
|
75
75
|
prompt: 'The research question or topic to investigate',
|
|
76
76
|
promptKey: 'query',
|
|
@@ -78,7 +78,7 @@ async function testCustomPromptKey() {
|
|
|
78
78
|
{
|
|
79
79
|
from: 'supervisor',
|
|
80
80
|
to: 'designer',
|
|
81
|
-
edgeType: '
|
|
81
|
+
edgeType: 'transfer',
|
|
82
82
|
// Custom parameter name: "requirements"
|
|
83
83
|
prompt: 'The design requirements and constraints',
|
|
84
84
|
promptKey: 'requirements',
|
|
@@ -86,7 +86,7 @@ async function testCustomPromptKey() {
|
|
|
86
86
|
{
|
|
87
87
|
from: 'supervisor',
|
|
88
88
|
to: 'coder',
|
|
89
|
-
edgeType: '
|
|
89
|
+
edgeType: 'transfer',
|
|
90
90
|
// Custom parameter name: "specification"
|
|
91
91
|
prompt: 'The technical specification for the code to implement',
|
|
92
92
|
promptKey: 'specification',
|
|
@@ -75,7 +75,7 @@ async function testCustomPromptKey() {
|
|
|
75
75
|
{
|
|
76
76
|
from: 'supervisor',
|
|
77
77
|
to: 'researcher',
|
|
78
|
-
edgeType: '
|
|
78
|
+
edgeType: 'transfer',
|
|
79
79
|
// Custom parameter name: "query"
|
|
80
80
|
prompt: 'The research question or topic to investigate',
|
|
81
81
|
promptKey: 'query',
|
|
@@ -83,7 +83,7 @@ async function testCustomPromptKey() {
|
|
|
83
83
|
{
|
|
84
84
|
from: 'supervisor',
|
|
85
85
|
to: 'designer',
|
|
86
|
-
edgeType: '
|
|
86
|
+
edgeType: 'transfer',
|
|
87
87
|
// Custom parameter name: "requirements"
|
|
88
88
|
prompt: 'The design requirements and constraints',
|
|
89
89
|
promptKey: 'requirements',
|
|
@@ -91,7 +91,7 @@ async function testCustomPromptKey() {
|
|
|
91
91
|
{
|
|
92
92
|
from: 'supervisor',
|
|
93
93
|
to: 'coder',
|
|
94
|
-
edgeType: '
|
|
94
|
+
edgeType: 'transfer',
|
|
95
95
|
// Custom parameter name: "specification"
|
|
96
96
|
prompt: 'The technical specification for the code to implement',
|
|
97
97
|
promptKey: 'specification',
|
|
@@ -104,7 +104,7 @@ async function testHandoffInput() {
|
|
|
104
104
|
{
|
|
105
105
|
from: 'supervisor',
|
|
106
106
|
to: ['analyst', 'writer'],
|
|
107
|
-
edgeType: '
|
|
107
|
+
edgeType: 'transfer',
|
|
108
108
|
// This prompt field now serves as the description for the input parameter
|
|
109
109
|
prompt: 'Specific instructions for the specialist to follow. Be detailed about what analysis to perform, what data to focus on, or what content to create.',
|
|
110
110
|
},
|
|
@@ -123,7 +123,7 @@ async function testHandoffInput() {
|
|
|
123
123
|
{
|
|
124
124
|
from: 'supervisor',
|
|
125
125
|
to: ['analyst', 'writer'],
|
|
126
|
-
edgeType: '
|
|
126
|
+
edgeType: 'transfer',
|
|
127
127
|
// This prompt field now serves as the description for the input parameter
|
|
128
128
|
prompt:
|
|
129
129
|
'Specific instructions for the specialist to follow. Be detailed about what analysis to perform, what data to focus on, or what content to create.',
|
|
@@ -112,7 +112,7 @@ IMPORTANT: You are the specialist - provide a complete, helpful response to the
|
|
|
112
112
|
from: 'coordinator',
|
|
113
113
|
to: 'specialist',
|
|
114
114
|
description: 'Transfer to technical specialist for analysis',
|
|
115
|
-
edgeType: '
|
|
115
|
+
edgeType: 'transfer',
|
|
116
116
|
prompt: 'Specific instructions for the specialist about what to analyze',
|
|
117
117
|
promptKey: 'instructions',
|
|
118
118
|
},
|
|
@@ -136,7 +136,7 @@ IMPORTANT: You are the specialist - provide a complete, helpful response to the
|
|
|
136
136
|
from: 'coordinator',
|
|
137
137
|
to: 'specialist',
|
|
138
138
|
description: 'Transfer to technical specialist for analysis',
|
|
139
|
-
edgeType: '
|
|
139
|
+
edgeType: 'transfer',
|
|
140
140
|
prompt: 'Specific instructions for the specialist about what to analyze',
|
|
141
141
|
promptKey: 'instructions',
|
|
142
142
|
},
|
|
@@ -98,7 +98,7 @@ When you receive a task, execute it thoroughly. Always identify yourself as the
|
|
|
98
98
|
{
|
|
99
99
|
from: 'coordinator',
|
|
100
100
|
to: 'specialist',
|
|
101
|
-
edgeType: '
|
|
101
|
+
edgeType: 'transfer',
|
|
102
102
|
description: 'Transfer to specialist for detailed work',
|
|
103
103
|
prompt: 'Provide specific instructions for the specialist about what to analyze or create',
|
|
104
104
|
promptKey: 'instructions',
|
|
@@ -184,7 +184,7 @@ You must follow the exact format requested.`,
|
|
|
184
184
|
{
|
|
185
185
|
from: 'manager',
|
|
186
186
|
to: 'writer',
|
|
187
|
-
edgeType: '
|
|
187
|
+
edgeType: 'transfer',
|
|
188
188
|
description: 'Transfer to writer for report creation',
|
|
189
189
|
prompt: 'Provide specific formatting and content instructions for the writer',
|
|
190
190
|
promptKey: 'instructions',
|
|
@@ -264,7 +264,7 @@ If asked about non-Italian food, politely redirect to Italian alternatives.`,
|
|
|
264
264
|
{
|
|
265
265
|
from: 'router',
|
|
266
266
|
to: 'chef',
|
|
267
|
-
edgeType: '
|
|
267
|
+
edgeType: 'transfer',
|
|
268
268
|
description: 'Transfer to chef',
|
|
269
269
|
prompt: 'Instructions for the chef about how to respond',
|
|
270
270
|
promptKey: 'instructions',
|
|
@@ -121,7 +121,7 @@ When you receive a task, execute it thoroughly. Always identify yourself as the
|
|
|
121
121
|
{
|
|
122
122
|
from: 'coordinator',
|
|
123
123
|
to: 'specialist',
|
|
124
|
-
edgeType: '
|
|
124
|
+
edgeType: 'transfer',
|
|
125
125
|
description: 'Transfer to specialist for detailed work',
|
|
126
126
|
prompt:
|
|
127
127
|
'Provide specific instructions for the specialist about what to analyze or create',
|
|
@@ -226,7 +226,7 @@ You must follow the exact format requested.`,
|
|
|
226
226
|
{
|
|
227
227
|
from: 'manager',
|
|
228
228
|
to: 'writer',
|
|
229
|
-
edgeType: '
|
|
229
|
+
edgeType: 'transfer',
|
|
230
230
|
description: 'Transfer to writer for report creation',
|
|
231
231
|
prompt:
|
|
232
232
|
'Provide specific formatting and content instructions for the writer',
|
|
@@ -322,7 +322,7 @@ If asked about non-Italian food, politely redirect to Italian alternatives.`,
|
|
|
322
322
|
{
|
|
323
323
|
from: 'router',
|
|
324
324
|
to: 'chef',
|
|
325
|
-
edgeType: '
|
|
325
|
+
edgeType: 'transfer',
|
|
326
326
|
description: 'Transfer to chef',
|
|
327
327
|
prompt: 'Instructions for the chef about how to respond',
|
|
328
328
|
promptKey: 'instructions',
|
|
@@ -75,13 +75,13 @@ async function testParallelWithAgentLabeling() {
|
|
|
75
75
|
from: 'researcher',
|
|
76
76
|
to: ['analyst1', 'analyst2', 'analyst3'],
|
|
77
77
|
description: 'Distribute research to specialist analysts',
|
|
78
|
-
edgeType: '
|
|
78
|
+
edgeType: 'sequence',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
from: ['analyst1', 'analyst2', 'analyst3'],
|
|
82
82
|
to: 'summarizer',
|
|
83
83
|
description: 'Aggregate analysis results',
|
|
84
|
-
edgeType: '
|
|
84
|
+
edgeType: 'sequence',
|
|
85
85
|
prompt: 'Based on the analyses below, provide an integrated summary:\n\n{results}',
|
|
86
86
|
},
|
|
87
87
|
];
|
|
@@ -83,13 +83,13 @@ async function testParallelWithAgentLabeling() {
|
|
|
83
83
|
from: 'researcher',
|
|
84
84
|
to: ['analyst1', 'analyst2', 'analyst3'],
|
|
85
85
|
description: 'Distribute research to specialist analysts',
|
|
86
|
-
edgeType: '
|
|
86
|
+
edgeType: 'sequence',
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
from: ['analyst1', 'analyst2', 'analyst3'],
|
|
90
90
|
to: 'summarizer',
|
|
91
91
|
description: 'Aggregate analysis results',
|
|
92
|
-
edgeType: '
|
|
92
|
+
edgeType: 'sequence',
|
|
93
93
|
prompt:
|
|
94
94
|
'Based on the analyses below, provide an integrated summary:\n\n{results}',
|
|
95
95
|
},
|
|
@@ -73,14 +73,14 @@ When delegating, provide clear instructions to each agent about what they should
|
|
|
73
73
|
{
|
|
74
74
|
from: 'coordinator',
|
|
75
75
|
to: 'researcher',
|
|
76
|
-
edgeType: '
|
|
76
|
+
edgeType: 'transfer',
|
|
77
77
|
description: 'Transfer to researcher for research and fact-finding tasks',
|
|
78
78
|
prompt: 'Research task instructions',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
from: 'coordinator',
|
|
82
82
|
to: 'writer',
|
|
83
|
-
edgeType: '
|
|
83
|
+
edgeType: 'transfer',
|
|
84
84
|
description: 'Transfer to writer for content creation and writing tasks',
|
|
85
85
|
prompt: 'Writing task instructions',
|
|
86
86
|
},
|
|
@@ -82,14 +82,14 @@ When delegating, provide clear instructions to each agent about what they should
|
|
|
82
82
|
{
|
|
83
83
|
from: 'coordinator',
|
|
84
84
|
to: 'researcher',
|
|
85
|
-
edgeType: '
|
|
85
|
+
edgeType: 'transfer',
|
|
86
86
|
description: 'Transfer to researcher for research and fact-finding tasks',
|
|
87
87
|
prompt: 'Research task instructions',
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
from: 'coordinator',
|
|
91
91
|
to: 'writer',
|
|
92
|
-
edgeType: '
|
|
92
|
+
edgeType: 'transfer',
|
|
93
93
|
description: 'Transfer to writer for content creation and writing tasks',
|
|
94
94
|
prompt: 'Writing task instructions',
|
|
95
95
|
},
|
|
@@ -129,7 +129,7 @@ Do NOT write a long response. Just call the tool and hand off.`,
|
|
|
129
129
|
from: 'router',
|
|
130
130
|
to: 'data_analyst',
|
|
131
131
|
description: 'Transfer to data analyst after checking sessions',
|
|
132
|
-
edgeType: '
|
|
132
|
+
edgeType: 'transfer',
|
|
133
133
|
prompt: 'Provide specific instructions for the data analyst about what to analyze',
|
|
134
134
|
promptKey: 'instructions',
|
|
135
135
|
},
|
|
@@ -156,7 +156,7 @@ Do NOT write a long response. Just call the tool and hand off.`,
|
|
|
156
156
|
from: 'router',
|
|
157
157
|
to: 'data_analyst',
|
|
158
158
|
description: 'Transfer to data analyst after checking sessions',
|
|
159
|
-
edgeType: '
|
|
159
|
+
edgeType: 'transfer',
|
|
160
160
|
prompt:
|
|
161
161
|
'Provide specific instructions for the data analyst about what to analyze',
|
|
162
162
|
promptKey: 'instructions',
|
|
@@ -118,13 +118,13 @@ describeIf('Agent Handoff E2E with Bedrock', () => {
|
|
|
118
118
|
{
|
|
119
119
|
from: 'supervisor_abc123',
|
|
120
120
|
to: 'agent_W47hBnn2RoVZEOy5595GC',
|
|
121
|
-
edgeType: EdgeType.
|
|
121
|
+
edgeType: EdgeType.TRANSFER,
|
|
122
122
|
// No description - should auto-generate from agent name + description
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
from: 'supervisor_abc123',
|
|
126
126
|
to: 'agent_X92kLmn4TpQR8vw3221HD',
|
|
127
|
-
edgeType: EdgeType.
|
|
127
|
+
edgeType: EdgeType.TRANSFER,
|
|
128
128
|
// No description
|
|
129
129
|
},
|
|
130
130
|
];
|
|
@@ -203,8 +203,8 @@ describeIf('Agent Handoff E2E with Bedrock', () => {
|
|
|
203
203
|
];
|
|
204
204
|
|
|
205
205
|
const edges: t.GraphEdge[] = [
|
|
206
|
-
{ from: 'router', to: 'sales_agent', edgeType: EdgeType.
|
|
207
|
-
{ from: 'router', to: 'support_agent', edgeType: EdgeType.
|
|
206
|
+
{ from: 'router', to: 'sales_agent', edgeType: EdgeType.TRANSFER },
|
|
207
|
+
{ from: 'router', to: 'support_agent', edgeType: EdgeType.TRANSFER },
|
|
208
208
|
];
|
|
209
209
|
|
|
210
210
|
const { contentParts: _contentParts, aggregateContent } =
|
|
@@ -321,8 +321,8 @@ describeIf('Agent Handoff E2E with Bedrock', () => {
|
|
|
321
321
|
];
|
|
322
322
|
|
|
323
323
|
const edges: t.GraphEdge[] = [
|
|
324
|
-
{ from: 'router', to: 'sales_agent', edgeType: EdgeType.
|
|
325
|
-
{ from: 'router', to: 'support_agent', edgeType: EdgeType.
|
|
324
|
+
{ from: 'router', to: 'sales_agent', edgeType: EdgeType.TRANSFER },
|
|
325
|
+
{ from: 'router', to: 'support_agent', edgeType: EdgeType.TRANSFER },
|
|
326
326
|
];
|
|
327
327
|
|
|
328
328
|
const { contentParts: _contentParts, aggregateContent } =
|