{
  "name": "Thunder Planning Agent (Basic)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "planning-agent",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": "gpt-4o",
        "prompt": "={{ $json.body.prompt }}",
        "options": {
          "systemMessage": "Sen Thunder ERP'nin \u00fcretim planlama agent'\u0131s\u0131n.\n\nG\u00f6revlerin:\n1. Sipari\u015f bilgilerini analiz et\n2. BOM (Bill of Materials) kontrol et\n3. Stok durumunu de\u011ferlendir\n4. \u00dcretim s\u00fcrelerini hesapla\n5. Optimum \u00fcretim plan\u0131 olu\u015ftur\n\nYan\u0131t format\u0131 JSON:\n{\n  \"decision\": \"approved\" | \"rejected\" | \"needs_review\",\n  \"reasoning\": \"Karar gerek\u00e7esi\",\n  \"production_plan\": {\n    \"start_date\": \"2025-12-20\",\n    \"end_date\": \"2025-12-27\",\n    \"estimated_duration_hours\": 168,\n    \"required_materials\": [],\n    \"warnings\": []\n  },\n  \"confidence\": 0.95\n}",
          "temperature": 0.7,
          "maxTokens": 2048
        }
      },
      "id": "openai-agent",
      "name": "Planning Agent (GPT-4o)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ {\n  \"success\": true,\n  \"agent\": \"planning\",\n  \"response\": $json.message.content,\n  \"tokens\": $json.usage.total_tokens,\n  \"cost\": ($json.usage.prompt_tokens * 0.005 / 1000) + ($json.usage.completion_tokens * 0.015 / 1000)\n} }}"
      },
      "id": "response",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Planning Agent (GPT-4o)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Planning Agent (GPT-4o)": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2025-01-27T00:00:00.000Z",
  "versionId": "1"
}