Build Custom AI Agent with LangChain & Gemini (Self-Hosted) — n8n ワークフロー
概要
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
使用ノード
ワークフロープレビュー
仕組み
- 1
トリガー
このワークフローは トリガー トリガーで開始します。
- 2
処理
データは 4 個のノードを流れます, connecting chattrigger, code, lmchatgooglegemini。
- 3
出力
ワークフローは自動化を完了し、設定された宛先に結果を配信します。
ノード詳細 (4)
LangChain Code
n8n-nodes-langchain.code
Simple Memory
n8n-nodes-langchain.memoryBufferWindow
Google Gemini Chat Model
n8n-nodes-langchain.lmChatGoogleGemini
このワークフローのインポート方法
- 1右側の JSONをダウンロード ボタンをクリックしてワークフローファイルを保存します。
- 2n8nインスタンスを開き、ワークフロー → 新規 → ファイルからインポート に進みます。
- 3ダウンロードした
build-custom-ai-agent-with-langchain-gemini-self-hostedファイルを選択し、インポートをクリックします。 - 4各サービスノードの 認証情報(APIキー、OAuthなど)を設定します。
- 5ワークフローをテスト をクリックして動作確認し、有効化します。
またはn8nの JSONからインポート に直接貼り付け:
インテグレーション
作成者
shepard
@shepard