@illuma-ai/agents 1.1.15 → 1.1.16

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 (64) hide show
  1. package/dist/cjs/common/enum.cjs +13 -13
  2. package/dist/cjs/common/enum.cjs.map +1 -1
  3. package/dist/cjs/graphs/MultiAgentGraph.cjs +146 -150
  4. package/dist/cjs/graphs/MultiAgentGraph.cjs.map +1 -1
  5. package/dist/cjs/main.cjs +2 -2
  6. package/dist/cjs/types/graph.cjs.map +1 -1
  7. package/dist/esm/common/enum.mjs +12 -12
  8. package/dist/esm/common/enum.mjs.map +1 -1
  9. package/dist/esm/graphs/MultiAgentGraph.mjs +147 -151
  10. package/dist/esm/graphs/MultiAgentGraph.mjs.map +1 -1
  11. package/dist/esm/main.mjs +1 -1
  12. package/dist/esm/types/graph.mjs.map +1 -1
  13. package/dist/types/common/enum.d.ts +11 -11
  14. package/dist/types/graphs/MultiAgentGraph.d.ts +38 -36
  15. package/dist/types/types/graph.d.ts +13 -7
  16. package/package.json +1 -1
  17. package/src/common/__tests__/enum.test.ts +14 -6
  18. package/src/common/enum.ts +11 -11
  19. package/src/graphs/MultiAgentGraph.ts +148 -152
  20. package/src/graphs/__tests__/multi-agent-delegate.test.ts +44 -44
  21. package/src/graphs/__tests__/multi-agent-edges.test.ts +83 -85
  22. package/src/scripts/multi-agent-chain.js +1 -1
  23. package/src/scripts/multi-agent-chain.ts +1 -1
  24. package/src/scripts/multi-agent-document-review-chain.js +1 -1
  25. package/src/scripts/multi-agent-document-review-chain.ts +1 -1
  26. package/src/scripts/multi-agent-hybrid-flow.js +3 -3
  27. package/src/scripts/multi-agent-hybrid-flow.ts +3 -3
  28. package/src/scripts/multi-agent-parallel.js +2 -2
  29. package/src/scripts/multi-agent-parallel.ts +2 -2
  30. package/src/scripts/multi-agent-sequence.js +2 -2
  31. package/src/scripts/multi-agent-sequence.ts +2 -2
  32. package/src/scripts/multi-agent-supervisor.js +5 -5
  33. package/src/scripts/multi-agent-supervisor.ts +5 -5
  34. package/src/scripts/poc-multi-agent-comprehensive.ts +7 -7
  35. package/src/scripts/sequential-full-metadata-test.js +1 -1
  36. package/src/scripts/sequential-full-metadata-test.ts +1 -1
  37. package/src/scripts/test-custom-prompt-key.js +3 -3
  38. package/src/scripts/test-custom-prompt-key.ts +3 -3
  39. package/src/scripts/test-handoff-input.js +1 -1
  40. package/src/scripts/test-handoff-input.ts +1 -1
  41. package/src/scripts/test-handoff-preamble.js +1 -1
  42. package/src/scripts/test-handoff-preamble.ts +1 -1
  43. package/src/scripts/test-handoff-steering.js +3 -3
  44. package/src/scripts/test-handoff-steering.ts +3 -3
  45. package/src/scripts/test-multi-agent-list-handoff.js +1 -1
  46. package/src/scripts/test-multi-agent-list-handoff.ts +1 -1
  47. package/src/scripts/test-parallel-agent-labeling.js +2 -2
  48. package/src/scripts/test-parallel-agent-labeling.ts +2 -2
  49. package/src/scripts/test-parallel-handoffs.js +2 -2
  50. package/src/scripts/test-parallel-handoffs.ts +2 -2
  51. package/src/scripts/test-thinking-handoff-bedrock.js +1 -1
  52. package/src/scripts/test-thinking-handoff-bedrock.ts +1 -1
  53. package/src/scripts/test-thinking-handoff.js +1 -1
  54. package/src/scripts/test-thinking-handoff.ts +1 -1
  55. package/src/scripts/test-thinking-to-thinking-handoff-bedrock.js +1 -1
  56. package/src/scripts/test-thinking-to-thinking-handoff-bedrock.ts +1 -1
  57. package/src/scripts/test-tool-before-handoff-role-order.js +1 -1
  58. package/src/scripts/test-tool-before-handoff-role-order.ts +1 -1
  59. package/src/scripts/test-tools-before-handoff.js +1 -1
  60. package/src/scripts/test-tools-before-handoff.ts +1 -1
  61. package/src/specs/agent-handoffs-bedrock.integration.test.ts +6 -6
  62. package/src/specs/agent-handoffs.test.ts +35 -35
  63. package/src/specs/thinking-handoff.test.ts +9 -9
  64. package/src/types/graph.ts +13 -7
@@ -82,13 +82,13 @@ async function testSequentialMultiAgent() {
82
82
  {
83
83
  from: 'agent_a',
84
84
  to: 'agent_b',
85
- edgeType: 'direct', // This creates direct edges without tools
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: 'direct', // This creates direct edges without tools
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'direct',
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: 'direct',
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: 'direct',
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: 'direct',
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: 'direct',
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: 'direct',
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: 'direct',
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: 'direct' },
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: 'direct' },
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
325
+ edgeType: 'transfer',
326
326
  description: 'Transfer to chef',
327
327
  prompt: 'Instructions for the chef about how to respond',
328
328
  promptKey: 'instructions',
@@ -139,7 +139,7 @@ async function testSupervisorListHandoff() {
139
139
  'legal_advisor',
140
140
  ],
141
141
  description: 'Transfer to appropriate specialist based on task requirements',
142
- edgeType: 'handoff',
142
+ edgeType: 'transfer',
143
143
  },
144
144
  ];
145
145
  return {
@@ -170,7 +170,7 @@ async function testSupervisorListHandoff() {
170
170
  ],
171
171
  description:
172
172
  'Transfer to appropriate specialist based on task requirements',
173
- edgeType: 'handoff',
173
+ edgeType: 'transfer',
174
174
  },
175
175
  ];
176
176
 
@@ -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: 'direct',
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: 'direct',
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: 'direct',
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: 'direct',
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: 'handoff',
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: 'handoff',
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: 'handoff',
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: 'handoff',
92
+ edgeType: 'transfer',
93
93
  description: 'Transfer to writer for content creation and writing tasks',
94
94
  prompt: 'Writing task instructions',
95
95
  },
@@ -67,7 +67,7 @@ async function testBedrockThinkingHandoff() {
67
67
  from: 'supervisor',
68
68
  to: ['code_reviewer'],
69
69
  description: 'Transfer to code review specialist',
70
- edgeType: 'handoff',
70
+ edgeType: 'transfer',
71
71
  },
72
72
  ];
73
73
  return {
@@ -78,7 +78,7 @@ async function testBedrockThinkingHandoff() {
78
78
  from: 'supervisor',
79
79
  to: ['code_reviewer'],
80
80
  description: 'Transfer to code review specialist',
81
- edgeType: 'handoff',
81
+ edgeType: 'transfer',
82
82
  },
83
83
  ];
84
84
 
@@ -67,7 +67,7 @@ async function testThinkingHandoff() {
67
67
  from: 'supervisor',
68
68
  to: ['code_reviewer'],
69
69
  description: 'Transfer to code review specialist',
70
- edgeType: 'handoff',
70
+ edgeType: 'transfer',
71
71
  },
72
72
  ];
73
73
  return {
@@ -80,7 +80,7 @@ async function testThinkingHandoff() {
80
80
  from: 'supervisor',
81
81
  to: ['code_reviewer'],
82
82
  description: 'Transfer to code review specialist',
83
- edgeType: 'handoff',
83
+ edgeType: 'transfer',
84
84
  },
85
85
  ];
86
86
 
@@ -82,7 +82,7 @@ async function testThinkingToThinkingHandoffBedrock() {
82
82
  from: 'supervisor',
83
83
  to: ['code_reviewer'],
84
84
  description: 'Transfer to code review specialist',
85
- edgeType: 'handoff',
85
+ edgeType: 'transfer',
86
86
  },
87
87
  ];
88
88
  return {
@@ -97,7 +97,7 @@ async function testThinkingToThinkingHandoffBedrock() {
97
97
  from: 'supervisor',
98
98
  to: ['code_reviewer'],
99
99
  description: 'Transfer to code review specialist',
100
- edgeType: 'handoff',
100
+ edgeType: 'transfer',
101
101
  },
102
102
  ];
103
103
 
@@ -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: 'handoff',
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: 'handoff',
159
+ edgeType: 'transfer',
160
160
  prompt:
161
161
  'Provide specific instructions for the data analyst about what to analyze',
162
162
  promptKey: 'instructions',
@@ -110,7 +110,7 @@ async function testToolsBeforeHandoff() {
110
110
  from: 'research_coordinator',
111
111
  to: 'report_writer',
112
112
  description: 'Transfer to report writer after completing research',
113
- edgeType: 'handoff',
113
+ edgeType: 'transfer',
114
114
  },
115
115
  ];
116
116
  return {
@@ -133,7 +133,7 @@ async function testToolsBeforeHandoff() {
133
133
  from: 'research_coordinator',
134
134
  to: 'report_writer',
135
135
  description: 'Transfer to report writer after completing research',
136
- edgeType: 'handoff',
136
+ edgeType: 'transfer',
137
137
  },
138
138
  ];
139
139
 
@@ -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.HANDOFF,
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.HANDOFF,
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.HANDOFF },
207
- { from: 'router', to: 'support_agent', edgeType: EdgeType.HANDOFF },
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.HANDOFF },
325
- { from: 'router', to: 'support_agent', edgeType: EdgeType.HANDOFF },
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 } =