{
  "name": "ollama works copy",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "77e9b827-6815-4200-921a-4baeda087db3",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "3fd9a7fa-a7d1-4eb0-a4ef-46cc032a0018",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.message }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        220,
        0
      ],
      "id": "8cac66c9-d479-4774-8c5b-2036bbb593bc",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": "phi3:latest",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "typeVersion": 1,
      "position": [
        260,
        220
      ],
      "id": "9492999e-138e-4ee1-9d97-c09b7e2c9135",
      "name": "Ollama Chat Model",
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.body.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        420,
        220
      ],
      "id": "523d7ee8-1c1e-45c6-a11d-0524117784ab",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        580,
        0
      ],
      "id": "488090d8-e7e4-43d9-bdc9-029cb98ec69a",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "411e1f5c-d9eb-4759-bfa0-8b1cd305ae77",
  "id": "NPwo5Nez14PJolZr",
  "tags": []
}