The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "AI Agent 1",
"nodes": [
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "c5111dc7-d066-4d7e-a4f4-51d53611654e",
"name": "When chat message received"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
220,
0
],
"id": "1dc0e0ab-3266-4a88-8af6-d91d02280e47",
"name": "AI Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
40,
220
],
"id": "15231a3a-9d17-4c5d-99cc-f74ba0503044",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
160,
220
],
"id": "dab6428a-4694-42b9-a8ab-f9b20bc16052",
"name": "Window Buffer Memory"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"typeVersion": 1,
"position": [
280,
220
],
"id": "f8e505a4-9cb1-4a8f-b1ba-24ce65f4588b",
"name": "Calculator"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
"typeVersion": 1,
"position": [
400,
220
],
"id": "c919cfe7-99d3-4ac5-83ea-41d1ae1355bb",
"name": "Wikipedia"
}
],
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Calculator": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Wikipedia": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "da161b41-7117-4933-8087-5c9778bf13de",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "UPZFOl0STgV8nHNF",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApi
About this workflow
AI Agent 1. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 6 nodes.
Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →