{
  "name": "Guide1 AFTER - AI Agent 3.1 (Tools Agent)",
  "nodes": [
    {
      "parameters": {},
      "id": "t1",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "chatInput",
              "value": "How many PKR is 19 USD at 280 PKR per USD? Use the calculator.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "s1",
      "name": "Question",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [220, 0]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.chatInput }}",
        "options": {
          "systemMessage": "You are a helpful assistant. Use the Calculator tool for any arithmetic."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "id": "ag1",
      "name": "AI Agent",
      "position": [460, 0]
    },
    {
      "parameters": {
        "model": { "__rl": true, "value": "mock-gpt", "mode": "id" },
        "options": {}
      },
      "id": "m1",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [460, 220]
    },
    {
      "parameters": {},
      "id": "c1",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "typeVersion": 1,
      "position": [620, 220]
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": { "main": [[{ "node": "Question", "type": "main", "index": 0 }]] },
    "Question": { "main": [[{ "node": "AI Agent", "type": "main", "index": 0 }]] },
    "OpenAI Chat Model": { "ai_languageModel": [[{ "node": "AI Agent", "type": "ai_languageModel", "index": 0 }]] },
    "Calculator": { "ai_tool": [[{ "node": "AI Agent", "type": "ai_tool", "index": 0 }]] }
  },
  "settings": { "executionOrder": "v1" }
}
