{ "name": "Main AI Agent Flow", "nodes": [ { "parameters": {}, "id": "chat-trigger", "name": "Chat Trigger", "type": "@n8n/n8n-nodes-langchain.chatTrigger", "typeVersion": 1, "position": [200, 240] }, { "parameters": { "promptType": "define", "text": "={{ $json.chatInput }}", "options": {} }, "id": "agent-node", "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 1, "position": [420, 240] }, { "parameters": { "model": "gpt-4o", "options": {} }, "id": "llm-node", "name": "OpenAI Model", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1, "position": [420, 460] }, { "parameters": {}, "id": "memory-node", "name": "Memory", "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", "typeVersion": 1, "position": [560, 460] }, { "parameters": { "name": "guarded_costly_tool", "description": "Call this tool to perform a costly data lookup. Requires a query string.", "workflowId": "REPLACE_WITH_WORKFLOW_1_ID", "requireApproval": true }, "id": "workflow-tool-node", "name": "Call n8n Workflow Tool", "type": "@n8n/n8n-nodes-langchain.toolWorkflow", "typeVersion": 1, "position": [720, 460] } ], "connections": { "Chat Trigger": { "main": [ [ { "node": "AI Agent", "type": "main", "index": 0 } ] ] }, "OpenAI Model": { "ai_languageModel": [ [ { "node": "AI Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "Memory": { "ai_memory": [ [ { "node": "AI Agent", "type": "ai_memory", "index": 0 } ] ] }, "Call n8n Workflow Tool": { "ai_tool": [ [ { "node": "AI Agent", "type": "ai_tool", "index": 0 } ] ] } } }