Build Custom AI Agent with LangChain & Gemini (Self-Hosted) — Workflow n8n
Aperçu
Overview
This workflow leverages the LangChain code node to implement a fully customizable conversational agent. Ideal for users who need granular control over their agent's prompts while reducing unnecessary token consumption from reserved tool-calling functionality (compared to n8n's built-in Conversation Agent).
Setup Instructions
Configure Gemini Credentials: Set up your Google Gemini API key (Get API key here if needed). Alternatively, you may use other AI provider nodes.
Interacti
Nœuds utilisés
Aperçu du workflow
Comment ça fonctionne
- 1
Déclencheur
Le workflow démarre avec un déclencheur déclencheur.
- 2
Traitement
Les données transitent par 4 nœuds, connecting chattrigger, code, lmchatgooglegemini.
- 3
Sortie
Le workflow termine son automatisation et livre le résultat à la destination configurée.
Détails des nœuds (4)
LangChain Code
n8n-nodes-langchain.code
Simple Memory
n8n-nodes-langchain.memoryBufferWindow
Google Gemini Chat Model
n8n-nodes-langchain.lmChatGoogleGemini
Comment importer ce workflow
- 1Cliquez sur le bouton Télécharger JSON à droite pour enregistrer le fichier du workflow.
- 2Ouvrez votre instance n8n. Accédez à Workflows → Nouveau → Importer depuis un fichier.
- 3Sélectionnez le fichier
build-custom-ai-agent-with-langchain-gemini-self-hostedtéléchargé et cliquez sur Importer. - 4Configurez les identifiants pour chaque nœud de service (clés API, OAuth, etc.).
- 5Cliquez sur Tester le workflow pour vérifier que tout fonctionne, puis activez-le.
Ou collez directement dans n8n → Importer depuis JSON :
Intégrations
Créé par
shepard
@shepard
Tags
Nouveau sur n8n ?
n8n est un outil d'automatisation de workflows gratuit et open-source. Hébergez-le vous-même ou utilisez la version cloud.
Obtenir n8n gratuitement →