{
  "name": "Rick Brain AI Polska",
  "nodes": [
    {
      "name": "Webhook Rick",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        200,
        300
      ],
      "parameters": {
        "path": "rick",
        "options": {}
      }
    },
    {
      "name": "Agent: Logika",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        100
      ],
      "parameters": {
        "functionCode": "return [{ json: { agent: 'logika', output: `Logika: ${$json.msg}` } }];"
      }
    },
    {
      "name": "Agent: Sarkazm",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        200
      ],
      "parameters": {
        "functionCode": "return [{ json: { agent: 'sarkazm', output: 'Sarkazm: No \u015bwietnie, mistrzu m\u00f3zgu...' } }];"
      }
    },
    {
      "name": "Agent: Humor",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        300
      ],
      "parameters": {
        "functionCode": "return [{ json: { agent: 'humor', output: 'Humor: Dlaczego kurczak przeszed\u0142 przez drog\u0119? Bo Rick mu kaza\u0142!' } }];"
      }
    },
    {
      "name": "Agent: Obliczenia",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        400
      ],
      "parameters": {
        "functionCode": "const sum = 2 + 2; return [{ json: { agent: 'obliczenia', output: `Obliczenia: 2 + 2 = ${sum}` } }];"
      }
    },
    {
      "name": "Agent: Web Search",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        500
      ],
      "parameters": {
        "functionCode": "return [{ json: { agent: 'web', output: 'Web: Nie mam internetu, wi\u0119c udaj\u0119 \u017ce znalaz\u0142em co\u015b wa\u017cnego.' } }];"
      }
    },
    {
      "name": "Merge All Agents",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 1,
      "position": [
        600,
        300
      ],
      "parameters": {
        "mode": "combine"
      }
    },
    {
      "name": "Rick Final Output",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        800,
        300
      ],
      "parameters": {
        "functionCode": "const response = items.map(i => i.json.output).join(' | '); return [{ json: { RickM\u00f3wi: response } }];"
      }
    },
    {
      "name": "Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1000,
        300
      ],
      "parameters": {
        "responseData": "={{ $json[\"RickM\u00f3wi\"] }}"
      }
    }
  ],
  "connections": {
    "Webhook Rick": {
      "main": [
        [
          {
            "node": "Agent: Logika",
            "type": "main",
            "index": 0
          },
          {
            "node": "Agent: Sarkazm",
            "type": "main",
            "index": 0
          },
          {
            "node": "Agent: Humor",
            "type": "main",
            "index": 0
          },
          {
            "node": "Agent: Obliczenia",
            "type": "main",
            "index": 0
          },
          {
            "node": "Agent: Web Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Logika": {
      "main": [
        [
          {
            "node": "Merge All Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Sarkazm": {
      "main": [
        [
          {
            "node": "Merge All Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Humor": {
      "main": [
        [
          {
            "node": "Merge All Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Obliczenia": {
      "main": [
        [
          {
            "node": "Merge All Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Web Search": {
      "main": [
        [
          {
            "node": "Merge All Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Agents": {
      "main": [
        [
          {
            "node": "Rick Final Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rick Final Output": {
      "main": [
        [
          {
            "node": "Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "tags": [
    "rick",
    "offline",
    "polski",
    "multiagent"
  ]
}