{
  "name": "n8n-agent-demo",
  "nodes": [
    {
      "parameters": {
        "agent": "conversationalAgent",
        "promptType": "define",
        "text": "={{ $json.body.chatInput }}",
        "options": {
          "returnIntermediateSteps": true
        }
      },
      "id": "29963449-1dc1-487d-96f2-7ff0a5c3cd97",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        560,
        -20
      ]
    },
    {
      "parameters": {
        "model": "deepseek-ai/DeepSeek-V3-0324",
        "options": {
          "baseURL": "https://llm.chutes.ai/v1"
        }
      },
      "id": "cbaedf86-9153-4778-b893-a7e50d3e04ba",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        520,
        220
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.body.sessionId }}"
      },
      "id": "75481370-bade-4d90-a878-3a3b0201edcc",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        680,
        220
      ]
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "typeVersion": 1,
      "position": [
        800,
        220
      ],
      "id": "fdd836cf-04ce-44cd-9e09-9e7c31dccd48",
      "name": "Wikipedia"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "wiki-pipe",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        260,
        -20
      ],
      "id": "6d85f646-21ad-4ac6-8730-258d5b6e0b01",
      "name": "Webhook"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        280,
        320
      ],
      "id": "0e5e1e73-c58c-4df7-84bc-e1f04f9dc13c",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8beb56f7-a34b-4294-8d84-5c257b164814",
  "meta": {
    "templateId": "PT1i+zU92Ii5O2XCObkhfHJR5h9rNJTpiCIkYJk9jHU=",
    "templateCredsSetupCompleted": true
  },
  "id": "YwFziucTPSc0EAy7",
  "tags": []
}