{
  "name": "Example agent workflow",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        48,
        -16
      ],
      "id": "e8f63522-9daf-4b61-8692-8df64cf26632",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        336,
        -16
      ],
      "id": "61966f52-65a4-4f40-bebb-56fff958dc4b",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": "llama3.2:3b",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "typeVersion": 1,
      "position": [
        128,
        208
      ],
      "id": "aa08fa80-9f2d-4957-ac0f-5d85c9dc863c",
      "name": "Ollama Chat Model",
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Get my external IP",
        "url": "http://ifconfig.io",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        512,
        240
      ],
      "id": "24b786d1-95cd-4267-a8ec-9e1cb586a871",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "toolDescription": "ping command to see if the internet is up",
        "command": "ping -c 1 1.1.1.1"
      },
      "type": "n8n-nodes-base.executeCommandTool",
      "typeVersion": 1,
      "position": [
        672,
        176
      ],
      "id": "ad7ce0fe-5598-4187-9fee-eb2e5447ca83",
      "name": "Execute Command"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "typeVersion": 1.5,
      "position": [
        320,
        176
      ],
      "id": "5909dd71-b85c-4257-9d0b-b381ac3520e0",
      "name": "Redis Chat Memory",
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        []
      ]
    },
    "Execute Command": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Redis Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a1656738-7647-40a4-9e80-ff7641c2da74",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "Qhq7WRNFYsOmqnoQ",
  "tags": []
}