This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.
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 Chat with Streaming",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "ai-agent-chat",
"responseMode": "responseNode",
"options": {
"responseHeaders": {
"entries": [
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
]
}
}
},
"id": "webhook-trigger",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"options": {
"systemMessage": "You are a helpful AI assistant. Be concise, accurate, and helpful in your responses. If you don't know something, say so honestly."
}
},
"id": "ai-agent",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
480,
300
]
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"id": "openai-model",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
480,
500
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $json.sessionId || 'default' }}"
},
"id": "memory",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.2,
"position": [
680,
500
]
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{ $json.output }}"
},
"id": "respond",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
720,
300
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Respond to Webhook",
"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
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 0
}
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
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AI Agent Chat with Streaming. Uses agent, lmChatOpenAi, memoryBufferWindow. Webhook trigger; 5 nodes.
Source: https://github.com/NarsistPanda/Claude1-n8n-avatar/blob/232d49109540ee19b25950df82fafc5f2a646f63/n8n-workflows/ai-agent-chat.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
AI chatbot for appointment scheduling. Uses memoryBufferWindow, lmChatOpenAi, toolWorkflow, chatTrigger. Webhook trigger; 12 nodes.
InstaTest. Uses memoryBufferWindow, lmChatOpenAi, respondToWebhook, stickyNote. Webhook trigger; 11 nodes.
Once connected, GPT will automatically initiate conversations with messages from new recipients in Intagram.
consulta-cnpj. Uses agent, lmChatOpenAi, memoryBufferWindow, httpRequestTool. Webhook trigger; 11 nodes.
A natural conversational AI chatbot that collects lead information (Name, Phone, Email, Message) one question at a time without feeling like a form. Uses session-based memory to track conversations, i