{
  "name": "Research Assistant",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        -208,
        -32
      ],
      "id": "9a528d0f-499b-41ad-8c46-06ace3283d34",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=You are a helpful research assistant. Whenever a user asks a query or gives inputs to you, your main task is to web search for that topic, search and read the best quality, trusted official results, summarize the findings, and answer return back to user. \n\nUser Input Query: {{ $json.chatInput }}\n\nOutput is text via chat. Keep the output result short, concise, and straightforward to the user's query. Include an emoji for the answer for an engaging read experience for the user. If possible, you can also include citations or official links and references from where you gather the data at the end of the response.  \n\nYou have to search the web using connected tool called \"Navily\" through API. You have access to LLM, memory, and all tools connected. "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        0,
        -32
      ],
      "id": "b0ae9060-bfd8-42ed-82e5-fad2f043dd90",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1.1,
      "position": [
        -128,
        176
      ],
      "id": "df2a9ede-6f12-4eae-b9d1-98e0ae18594b",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.4,
      "position": [
        48,
        176
      ],
      "id": "8908beff-5bde-4068-a1a2-0bb18b480c86",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "options": {}
      },
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "typeVersion": 1,
      "position": [
        240,
        176
      ],
      "id": "3ace47bb-41d8-43c0-82ce-b97bb5940305",
      "name": "Search in Tavily",
      "credentials": {
        "tavilyApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "Tavily API Key:\n\nYOUR_TAVILY_API_KEY\n\nWebsite: https://app.tavily.com/home",
        "height": 192,
        "width": 320,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -48
      ],
      "typeVersion": 1,
      "id": "9064fe30-d3c6-439d-8337-efdb3d96de05",
      "name": "Sticky Note"
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Search in Tavily": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "staticData": null,
  "triggerCount": 0,
  "meta": {
    "templateCredsSetupCompleted": true
  }
}