-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMulti Agent Tool.json
More file actions
447 lines (447 loc) · 12.7 KB
/
Copy pathMulti Agent Tool.json
File metadata and controls
447 lines (447 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
{
"name": "Multi Agent Tool",
"nodes": [
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1-mini",
"mode": "list",
"cachedResultName": "gpt-4.1-mini"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
-48,
80
],
"id": "f5220c54-5034-4dbb-8725-5892bbdfa2e0",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "l6rO6JWGfbCiIEsm",
"name": "OpenAI account 3"
}
}
},
{
"parameters": {
"toolDescription": "Flights AI Agent that can call other tools",
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "You are a Flights Search Agent.\\n\\nInput: Origin, destination, dates, traveler count, flight preferences.\\n\\nUse the Flights tool once.\\n\\nGenerate 4–6 viable round-trip options.\\nInclude a mix of non-stop and 1-stop (if relevant).\\nInclude airline, departure/arrival times, duration, stops, and estimated total price.\\n\\nDo not explain reasoning.\""
}
},
"type": "@n8n/n8n-nodes-langchain.agentTool",
"typeVersion": 3,
"position": [
80,
176
],
"id": "7e93e28b-d306-4847-a6fa-6deb47af6789",
"name": "Flights Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1-mini",
"mode": "list",
"cachedResultName": "gpt-4.1-mini"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
-64,
448
],
"id": "54d88ab7-956d-40f7-b423-9b1b6ef26397",
"name": "OpenAI Chat Model1",
"credentials": {
"openAiApi": {
"id": "l6rO6JWGfbCiIEsm",
"name": "OpenAI account 3"
}
}
},
{
"parameters": {
"operation": "google_flights",
"departure_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Departure_airport_code___location_kgmid__departure_id_', ``, 'string') }}",
"arrival_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Arrival_airport_code___location_kgmid__arrival_id_', ``, 'string') }}",
"outbound_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Outbound_Date__outbound_date_', ``, 'string') }}",
"return_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_Date__return_date_', ``, 'string') }}",
"additionalFields": {},
"requestOptions": {}
},
"type": "n8n-nodes-serpapi.serpApiTool",
"typeVersion": 1,
"position": [
208,
416
],
"id": "271bcfa3-e144-43bb-8d75-2a4842bd17ab",
"name": "Google_flights search in SerpApi",
"credentials": {
"serpApi": {
"id": "FzI01LR7FspQOVMb",
"name": "SerpApi account"
}
}
},
{
"parameters": {
"options": {
"systemMessage": "You are the Trip Planning Orchestrator.\nInput: Structured trip request (origin, destination, dates, travelers, budget, preferences).\nYOUR JOB:\nCall Flights Agent, Hotels Agent, and Activities Agent once each.\nEnsure outputs align with travel dates.\nCombine results into a structured itinerary.\nPresent a clean final plan.\nDo not deeply re-optimize domain outputs.\nDo not generate options yourself.\nDo not call agents multiple times unless critical data is missing.\nDo not explain internal reasoning."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": [
96,
-128
],
"id": "28cef328-9a55-400f-a5cc-2b5c7ed3e826",
"name": "Travel Agent (Orchestrator)"
},
{
"parameters": {
"toolDescription": "Hotels AI Agent that can call other tools",
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "You are a Hotels Search Agent.\\n\\nInput: Destination, check-in/out dates, travelers, hotel preferences.\\n\\nUse the Hotels tool once.\\n\\nGenerate 5-7 hotel options aligned with travel_style and budget.\\nInclude rating, area, price per night, estimated total stay cost.\\n\\nAlign with travel_style and budget if provided.\\n\\nPrefer 4 star+ when budget allows.\\n\\nNo explanations.\n "
}
},
"type": "@n8n/n8n-nodes-langchain.agentTool",
"typeVersion": 3,
"position": [
416,
112
],
"id": "171dbfc9-46aa-4933-bc88-41a00fea5c4b",
"name": "Hotels Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1-mini",
"mode": "list",
"cachedResultName": "gpt-4.1-mini"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
432,
336
],
"id": "087dcad7-fc3c-41f2-a6a1-8c556bc7fc52",
"name": "OpenAI Chat Model2",
"credentials": {
"openAiApi": {
"id": "l6rO6JWGfbCiIEsm",
"name": "OpenAI account 3"
}
}
},
{
"parameters": {
"operation": "google_hotels",
"q": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Search_Query__q_', ``, 'string') }}",
"check_in_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Check-in_Date__check_in_date_', ``, 'string') }}",
"check_out_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Check-out_Date__check_out_date_', ``, 'string') }}",
"additionalFields": {},
"requestOptions": {}
},
"type": "n8n-nodes-serpapi.serpApiTool",
"typeVersion": 1,
"position": [
592,
352
],
"id": "ba7e4322-085e-45f0-a0a9-4d023bd2715c",
"name": "Google_hotels search in SerpApi",
"credentials": {
"serpApi": {
"id": "FzI01LR7FspQOVMb",
"name": "SerpApi account"
}
}
},
{
"parameters": {
"toolDescription": "Activities AI Agent that can call other tools",
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "You are an Activities Agent.\nInput: Destination, trip duration, user preferences.\nUse the Activities tool and the Tavily Search tool once and consolidate the results.\n\nYOUR JOB IS TO:\n\nGenerate 8–12 activity options.\n\nInclude a mix of top attractions and unique/local experiences.\n\nGroup loosely by day (no strict optimization yet).\n\nNo explanations."
}
},
"type": "@n8n/n8n-nodes-langchain.agentTool",
"typeVersion": 3,
"position": [
752,
112
],
"id": "c3d2b14a-3bfe-4c3a-8c32-0b72dec73beb",
"name": "Activities Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1-mini",
"mode": "list",
"cachedResultName": "gpt-4.1-mini"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
720,
304
],
"id": "9aac1087-9f54-4be7-8c15-06c579521669",
"name": "OpenAI Chat Model3",
"credentials": {
"openAiApi": {
"id": "l6rO6JWGfbCiIEsm",
"name": "OpenAI account 3"
}
}
},
{
"parameters": {
"operation": "google_local",
"q": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Search_Query__q_', ``, 'string') }}",
"location": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location__location_', ``, 'string') }}",
"additionalFields": {},
"requestOptions": {}
},
"type": "n8n-nodes-serpapi.serpApiTool",
"typeVersion": 1,
"position": [
1008,
416
],
"id": "713c7dc3-be0c-480e-b12b-012c7592bc4b",
"name": "Google_local search in SerpApi",
"credentials": {
"serpApi": {
"id": "FzI01LR7FspQOVMb",
"name": "SerpApi account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://api.tavily.com/search",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "tavilyApi",
"sendQuery": true,
"queryParameters": {
"parameters": [
{}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Name', ``, 'string') }}",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequestTool",
"typeVersion": 4.4,
"position": [
816,
384
],
"id": "fc019f32-ce03-4f6d-8e4b-8161e9aa79d8",
"name": "HTTP Request",
"credentials": {
"tavilyApi": {
"id": "79LY4leLMlcjSg2R",
"name": "Tavily account"
}
}
},
{
"parameters": {
"inputSource": "passthrough"
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.2,
"position": [
-144,
-112
],
"id": "ead4aa73-05d1-44ba-9a21-4deb79d050da",
"name": "When Executed by Another Workflow"
}
],
"pinData": {},
"connections": {
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Travel Agent (Orchestrator)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Flights Agent": {
"ai_tool": [
[
{
"node": "Travel Agent (Orchestrator)",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Flights Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google_flights search in SerpApi": {
"ai_tool": [
[
{
"node": "Flights Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Hotels Agent": {
"ai_tool": [
[
{
"node": "Travel Agent (Orchestrator)",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Hotels Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google_hotels search in SerpApi": {
"ai_tool": [
[
{
"node": "Hotels Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Activities Agent": {
"ai_tool": [
[
{
"node": "Travel Agent (Orchestrator)",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model3": {
"ai_languageModel": [
[
{
"node": "Activities Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google_local search in SerpApi": {
"ai_tool": [
[
{
"node": "Activities Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"HTTP Request": {
"ai_tool": [
[
{
"node": "Activities Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Travel Agent (Orchestrator)",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"availableInMCP": false
},
"versionId": "1bc0c21c-3413-4235-b6d8-de370474e534",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "8c8201cb0dc83b4713a4dd42454ec696b963b61f56691c5da1d3d62640d43aca"
},
"nodeGroups": [],
"id": "sPgDdrDCKEl4lai3",
"tags": []
}