{
  "name": "Agent Query Workflow (Prototype)",
  "nodes": [
    {
      "parameters": {
        "path": "query",
        "httpMethod": "POST",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "WebhookTrigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        280
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:8000/query",
        "sendBody": true,
        "jsonParameters": true,
        "bodyParametersJson": "={\n  \"text\": $json.body?.text || $json.text || \"\",\n  \"top_k\": 4,\n  \"allow_generation\": false\n}",
        "options": {}
      },
      "id": "CallLocalAPI",
      "name": "Call Local API (/query)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        520,
        280
      ]
    },
    {
      "parameters": {
        "respondWith": "allIncomingItems",
        "responseBody": "={{$json}}",
        "options": {}
      },
      "id": "Respond",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        780,
        280
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Call Local API (/query)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Local API (/query)": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  }
}