Construisez votre premier agent IA – soutenu par Google Gemini et doté de la fonctionnalité de mémoire

Intermédiaire

Ceci est unEngineering, AIworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme Agent, ToolThink, ChatTrigger, ToolSerpApi, ToolCalculator, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. 🤖 Construire votre premier agent IA – soutenu par Google Gemini et doté de la mémoire

Prérequis
  • Clé API Google Gemini
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "uJ3EzQF3mDFAnkeb",
  "meta": {
    "instanceId": "d56113bd7fa650b2ac10ad7d1c3d6997aa49fa4dd1df2270cd1ac1e53b86f03a",
    "templateCredsSetupCompleted": true
  },
  "name": "Build Your First AI Agent – Powered by Google Gemini with Memory",
  "tags": [],
  "nodes": [
    {
      "id": "348eb0af-3b44-41f4-85be-05af1def4eb5",
      "name": "À la réception du message",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -180
      ],
      "webhookId": "f04048f5-3043-4250-ab36-aa282c819a69",
      "parameters": {
        "public": true,
        "options": {
          "loadPreviousSession": "memory"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "6c914256-d2b6-4156-99e3-d88f62bfca66",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        160,
        -180
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are my intelligent personal assistant. Your role is to help me think critically, access structured external knowledge, and solve complex numerical problems. You have access to the following tools:\n\n1. **Think** – Use this tool to reason step-by-step before giving a final answer.\n2. **SerpAPI** – Use this to access verified external knowledge, including encyclopedic or factual data.\n3. **Calculator** – Use this to perform accurate numerical or mathematical computations.\n\nYour goals:\n- Understand my task or question deeply before responding.\n- When unsure, think step-by-step using the `Think` tool.\n- For factual knowledge or concepts, use the `SerpAPI` tool.\n- For numerical tasks or financial calculations, use the `Calculator`.\n- Always explain your steps in a concise and professional way unless instructed otherwise.\n- Keep answers short and efficient unless asked for elaboration.\n\nAlways act as a helpful, private, and reliable personal assistant."
        }
      },
      "typeVersion": 2
    },
    {
      "id": "85b68f2c-e656-44f2-8e2a-27066c99a0c6",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        460,
        20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1c1c954c-ef1a-4114-9898-65bb4626fbb8",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        880,
        20
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "serpApi": {
          "id": "cSdemdubUv7MUHhQ",
          "name": "SerpAPI - DML"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8791e2c2-89f7-4e40-9520-8b8f35c0c6ba",
      "name": "Modèle de chat Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        40,
        20
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro-preview-06-05"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "O7KFdHkBYuFvFcAR",
          "name": "Google Gemini - DML"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9e4704ec-e498-4d0c-a3ea-ab08fa7bf7ac",
      "name": "Calculatrice",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        680,
        20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bcf984a7-774e-454f-a082-4fea25741e83",
      "name": "Simple Mémoire",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        260,
        20
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "e9f7eca2-5ad3-43e8-bde2-f8e7e75756f0",
      "name": "Note adhésive10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -180
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 580,
        "content": "## Author\n![Digimetalab](https://gravatar.com/avatar/8238cf8143845ac216cad8b70057892b?size=256?r=pg&d=retro&size=100)\n## Digimetalab\nAutomation consultant from Bali, with 3+ years helping Sales & Marketing streamline processes. We offer custom n8n solutions to boost efficiency. Book an initial consultation via our link for tailored automation.\n\nFor business inquiries, email we at digimetalab@gmail.com\nOr message me on [Telegram](https://t.me/digimetalab) for a faster response.\n\n### Check out my other templates\n### 👉 https://n8n.io/creators/digimetalab/\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d78f8043-0a68-454d-a7dd-aea9e4773432",
      "name": "Note adhésive17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 150,
        "height": 180,
        "content": "## 👆\nThis is a short term memory. It will remember the 5 previous interactions during the chat"
      },
      "typeVersion": 1
    },
    {
      "id": "59e98d56-42ea-4251-a287-82e8643f46aa",
      "name": "Note adhésive18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 170,
        "height": 180,
        "content": "## 👆\nYou can use  the free Google Gemini options."
      },
      "typeVersion": 1
    },
    {
      "id": "a2dd7685-4702-41af-8124-e4d307317d65",
      "name": "Note adhésive19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 150,
        "height": 180,
        "content": "## 👆\nThe Calculator is a tool that allows an agent to run mathematical calculations."
      },
      "typeVersion": 1
    },
    {
      "id": "8bad0027-784a-403d-b1db-149d68a6d022",
      "name": "Note adhésive20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 150,
        "height": 180,
        "content": "## 👆\nThe Think is a tool Enables step-by-step reasoning before answering."
      },
      "typeVersion": 1
    },
    {
      "id": "c98f150a-cfd4-4edb-8d6c-5f48178e08a8",
      "name": "Note adhésive21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 150,
        "height": 240,
        "content": "## 👆\nThe SerpAPI is a tool that allows Performs real-time Google Search using SerpAPI to retrieve factual, up-to-date information."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e2e9ac71-0450-40b8-818c-f7cc30bd4d3a",
  "connections": {
    "85b68f2c-e656-44f2-8e2a-27066c99a0c6": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "1c1c954c-ef1a-4114-9898-65bb4626fbb8": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          },
          {
            "node": "When chat message received",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Ingénierie, Intelligence Artificielle

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds13
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
DigiMetaLab

DigiMetaLab

@digimetalab

Digimetalab, Automation consultant with 3+ years helping Sales & Marketing streamline processes. We offer custom n8n solutions to boost efficiency. Book an initial consultation via our link for tailored automation.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34