Skip to content

Commit f58d3da

Browse files
committed
feat: update N8N agent pipelines with new tool integrations and improved session handling
1 parent 5450cde commit f58d3da

File tree

3 files changed

+107
-25
lines changed

3 files changed

+107
-25
lines changed

docs/n8n-tool-usage-display.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ Shows tool names with short result previews:
4747

4848
```txt
4949
🛠️ Tool Calls (4 steps) ▶
50-
Step 1: Date_Time → [{"currentDate":"2025-10-10T11:22:38.697+01:00"}]
51-
Step 2: Crypto → [{"Property_Name":"uuid4","uuid4":"c28495ca-1eb8-419f-8941-7a38c753e809"}]
52-
Step 3: Wikipedia → Page: List of tz database time zones...
53-
Step 4: Calculator → 128675.5415958103
50+
1. Date_Time → [{"currentDate":"2025-10-10T11:22:38.697+01:00"}]
51+
2. Crypto → [{"Property_Name":"uuid4","uuid4":"c28495ca-1eb8-419f-8941-7a38c753e809"}]
52+
3. Wikipedia → Page: List of tz database time zones...
53+
4. Calculator → 128675.5415958103
5454
```
5555

5656
**Best for**: Balance between overview and detail

pipelines/n8n/Open_WebUI_Test_Agent.json

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"name": "OpenAI Chat Model",
1313
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
1414
"position": [
15-
2288,
16-
1248
15+
2240,
16+
1424
1717
],
1818
"typeVersion": 1
1919
},
@@ -54,28 +54,28 @@
5454
},
5555
{
5656
"parameters": {
57-
"respondWith": "text",
58-
"responseBody": "={{ $json.output }}",
57+
"respondWith": "json",
58+
"responseBody": "={{ $json }}",
5959
"options": {}
6060
},
6161
"type": "n8n-nodes-base.respondToWebhook",
6262
"typeVersion": 1.1,
6363
"position": [
64-
3008,
64+
3136,
6565
848
6666
],
6767
"id": "325974b4-e249-4eb3-81dc-26b392f0894e",
6868
"name": "Respond to Webhook"
6969
},
7070
{
7171
"parameters": {
72-
"model": "gpt-4o-mini",
72+
"model": "gpt-5-mini",
7373
"options": {}
7474
},
7575
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
7676
"typeVersion": 1,
7777
"position": [
78-
2288,
78+
2240,
7979
1072
8080
],
8181
"id": "f2e088e0-aa71-4b42-8eaa-e0197150b9ca",
@@ -103,6 +103,7 @@
103103
"text": "={{ $json.body.chatInput }}",
104104
"options": {
105105
"systemMessage": "={{ $json.body.systemPrompt }}",
106+
"returnIntermediateSteps": true,
106107
"enableStreaming": false
107108
}
108109
},
@@ -125,7 +126,7 @@
125126
"type": "n8n-nodes-base.respondToWebhook",
126127
"typeVersion": 1.4,
127128
"position": [
128-
3008,
129+
3136,
129130
1008
130131
],
131132
"id": "114d81bd-4573-43b4-bbfe-80b784cd467e",
@@ -148,6 +149,31 @@
148149
"id": "b5e9d507-92e1-45aa-8f48-3629f802bafc",
149150
"name": "Webhook",
150151
"webhookId": "d3b1cfa8-8f3c-48ca-b1c8-87c40e3dcf76"
152+
},
153+
{
154+
"parameters": {},
155+
"type": "@n8n/n8n-nodes-langchain.toolThink",
156+
"typeVersion": 1.1,
157+
"position": [
158+
2928,
159+
1072
160+
],
161+
"id": "233faaf2-dc51-4dbd-9305-20e67a6ae589",
162+
"name": "Think"
163+
},
164+
{
165+
"parameters": {
166+
"modelName": "models/gemini-2.5-pro",
167+
"options": {}
168+
},
169+
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
170+
"typeVersion": 1,
171+
"position": [
172+
2240,
173+
1248
174+
],
175+
"id": "2e0360ac-d1db-45a4-91a5-f9e4a49e9d97",
176+
"name": "Google Gemini Chat Model"
151177
}
152178
],
153179
"pinData": {},
@@ -240,13 +266,24 @@
240266
}
241267
]
242268
]
269+
},
270+
"Think": {
271+
"ai_tool": [
272+
[
273+
{
274+
"node": "AI Agent",
275+
"type": "ai_tool",
276+
"index": 0
277+
}
278+
]
279+
]
243280
}
244281
},
245282
"active": true,
246283
"settings": {
247284
"executionOrder": "v1"
248285
},
249-
"versionId": "72ba3fa2-7d33-475f-bf0d-9dcdc5a44bb7",
286+
"versionId": "cf6cc59d-2f72-4cb3-91a9-aca8affa9094",
250287
"meta": {
251288
"templateCredsSetupCompleted": true,
252289
"instanceId": "6350a4271a2777a60d73e3a3c6a9549015b6bfe8b8f285cb566cd69ef87215da"

pipelines/n8n/Open_WebUI_Test_Agent_Streaming.json

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@
1212
"name": "OpenAI Chat Model",
1313
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
1414
"position": [
15-
32,
16-
416
15+
-16,
16+
624
1717
],
1818
"typeVersion": 1
1919
},
2020
{
2121
"parameters": {
22-
"sessionKey": "={{ $('Webhook').item.json.body.user_id }}_{{ $('Webhook').item.json.body.chat_id }}"
22+
"sessionKey": "={{ $('Webhook').item.json.body.user_id }}_{{ $('Webhook').item.json.body.chat_id }}",
23+
"contextWindowLength": 2
2324
},
2425
"id": "5c11a401-5dbb-4edd-bd1e-7df6d0844083",
2526
"name": "Window Buffer Memory",
2627
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
2728
"position": [
2829
160,
29-
240
30+
272
3031
],
3132
"typeVersion": 1
3233
},
@@ -36,7 +37,7 @@
3637
"typeVersion": 1,
3738
"position": [
3839
288,
39-
240
40+
272
4041
],
4142
"id": "01a2e9b2-0e01-48eb-91ac-628432c5d1a8",
4243
"name": "Wikipedia"
@@ -47,7 +48,7 @@
4748
"typeVersion": 1,
4849
"position": [
4950
416,
50-
240
51+
272
5152
],
5253
"id": "6ec76a25-8339-4c61-88b1-aab1a861c9e3",
5354
"name": "Calculator"
@@ -60,8 +61,8 @@
6061
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
6162
"typeVersion": 1,
6263
"position": [
63-
32,
64-
240
64+
-16,
65+
272
6566
],
6667
"id": "18b4d85b-a797-40d2-b3e3-22fe8985a872",
6768
"name": "Azure OpenAI Chat Model"
@@ -77,7 +78,7 @@
7778
"typeVersion": 2,
7879
"position": [
7980
544,
80-
240
81+
272
8182
],
8283
"id": "5968806c-44bb-42bc-a2d5-f9532954e2e5",
8384
"name": "Date & Time"
@@ -88,6 +89,9 @@
8889
"text": "={{ $json.body.chatInput }}",
8990
"options": {
9091
"systemMessage": "={{ $json.body.systemPrompt }}",
92+
"maxIterations": 10,
93+
"returnIntermediateSteps": true,
94+
"passthroughBinaryImages": true,
9195
"enableStreaming": true
9296
}
9397
},
@@ -113,8 +117,8 @@
113117
"type": "n8n-nodes-base.respondToWebhook",
114118
"typeVersion": 1.1,
115119
"position": [
116-
688,
117-
32
120+
656,
121+
16
118122
],
119123
"id": "184ac106-3444-43e7-a312-c359d6db33a0",
120124
"name": "Respond error to Webhook"
@@ -136,6 +140,31 @@
136140
"id": "e680d51f-ffb3-459b-b765-0d86881bcc80",
137141
"name": "Webhook",
138142
"webhookId": "852c394d-2b99-4688-9045-87aafbd721d1"
143+
},
144+
{
145+
"parameters": {},
146+
"type": "@n8n/n8n-nodes-langchain.toolThink",
147+
"typeVersion": 1.1,
148+
"position": [
149+
672,
150+
272
151+
],
152+
"id": "d4956b3f-e35f-4752-9b96-e015a261136c",
153+
"name": "Think"
154+
},
155+
{
156+
"parameters": {
157+
"modelName": "models/gemini-2.5-pro",
158+
"options": {}
159+
},
160+
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
161+
"typeVersion": 1,
162+
"position": [
163+
-16,
164+
448
165+
],
166+
"id": "745a19b5-a2ff-4472-a60d-3917e1d08cb6",
167+
"name": "Google Gemini Chat Model"
139168
}
140169
],
141170
"pinData": {},
@@ -222,13 +251,29 @@
222251
"main": [
223252
[]
224253
]
254+
},
255+
"Think": {
256+
"ai_tool": [
257+
[
258+
{
259+
"node": "AI Agent",
260+
"type": "ai_tool",
261+
"index": 0
262+
}
263+
]
264+
]
265+
},
266+
"Google Gemini Chat Model": {
267+
"ai_languageModel": [
268+
[]
269+
]
225270
}
226271
},
227272
"active": true,
228273
"settings": {
229274
"executionOrder": "v1"
230275
},
231-
"versionId": "753266e4-fd13-4b7c-be46-30bf91bd4517",
276+
"versionId": "58d9fa88-0a07-4311-959a-e1d1eb5d4c37",
232277
"meta": {
233278
"templateCredsSetupCompleted": true,
234279
"instanceId": "6350a4271a2777a60d73e3a3c6a9549015b6bfe8b8f285cb566cd69ef87215da"

0 commit comments

Comments
 (0)