Llama 3.2、RAG、検索を使ってローカルAIアシスタント(OllamaとMCP)を構築
中級
これはSupport Chatbot, AI RAG分野の自動化ワークフローで、9個のノードを含みます。主にMcpClientTool, Agent, ChatTrigger, LmChatOllama, McpClientToolなどのノードを使用。 Llama 3.2、RAG、検索を使ってローカルAIアシスタント(Ollama、MCP)を構築
前提条件
- •特別な前提条件なし、インポートしてすぐに使用可能
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "cb29d79a-40dc-4077-8810-45c695229609",
"name": "チャットメッセージ受信時",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
0,
0
],
"webhookId": "349f7ccf-6700-42b1-8137-fdde62c4bdfa",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"name": "AIエージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
220,
0
],
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant. You have access to two MCP Servers. One which has access to a RAG Database, and one which has access to a tool to search google.\n\nWhen you get a question about current events, you use the search engine MCP Server to fetch information.\n\nWhen people ask more general questions, you use your RAG Database"
}
},
"typeVersion": 2
},
{
"id": "8688fdd5-7cb6-4d45-bda5-39c31f24ffcd",
"name": "Ollama チャットモデル",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
-120,
240
],
"parameters": {
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "xHuYe0MDGOs9IpBW",
"name": "Local Ollama service"
}
},
"typeVersion": 1
},
{
"id": "2db79ee1-07c3-49bc-863a-129066a4c758",
"name": "シンプルメモリ",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
60,
300
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "c82053cf-99f2-40cb-8c07-eac3f199f7b2",
"name": "MCPクライアント: RAG",
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"position": [
360,
300
],
"parameters": {
"sseEndpoint": "http://localhost:5678/mcp/8d7910ab-f0db-4042-9da9-f580647a8a8e"
},
"typeVersion": 1
},
{
"id": "020a7821-5c15-48cb-a5bd-1d3251130b80",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
220
],
"parameters": {
"color": 3,
"height": 240,
"content": "## MCP Client: RAG\n"
},
"typeVersion": 1
},
{
"id": "3d0b7c23-18f4-49ec-bb2a-4192959250e8",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
600,
220
],
"parameters": {
"color": 6,
"width": 400,
"height": 240,
"content": "## MCP Client: Bright Data\n"
},
"typeVersion": 1
},
{
"id": "c41ee2cf-73ef-4f38-bc0b-36ff5091d18c",
"name": "MCPクライアント:BD_Tools",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
680,
300
],
"parameters": {},
"credentials": {
"mcpClientApi": {
"id": "gtICJ1VBUVNpQahr",
"name": "MCP Client (STDIO) account"
}
},
"typeVersion": 1
},
{
"id": "85a32e4d-02c0-4811-a33d-3d77f4705f35",
"name": "MCPクライアント:BD_Execute",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
840,
300
],
"parameters": {
"toolName": "search_engine",
"operation": "executeTool",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
},
"credentials": {
"mcpClientApi": {
"id": "gtICJ1VBUVNpQahr",
"name": "MCP Client (STDIO) account"
}
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"2db79ee1-07c3-49bc-863a-129066a4c758": {
"ai_memory": [
[
{
"node": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"type": "ai_memory",
"index": 0
}
]
]
},
"c82053cf-99f2-40cb-8c07-eac3f199f7b2": {
"ai_tool": [
[
{
"node": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"type": "ai_tool",
"index": 0
}
]
]
},
"8688fdd5-7cb6-4d45-bda5-39c31f24ffcd": {
"ai_languageModel": [
[
{
"node": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"c41ee2cf-73ef-4f38-bc0b-36ff5091d18c": {
"ai_tool": [
[
{
"node": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"type": "ai_tool",
"index": 0
}
]
]
},
"85a32e4d-02c0-4811-a33d-3d77f4705f35": {
"ai_tool": [
[
{
"node": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"type": "ai_tool",
"index": 0
}
]
]
},
"cb29d79a-40dc-4077-8810-45c695229609": {
"main": [
[
{
"node": "c090dbad-f2dc-4db5-84c0-0f96ab5fb922",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - サポートチャットボット, AI RAG検索拡張
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
RAGパイプライン
検索拡張生成(RAG)ベースのローカルチャットボット
Form Trigger
Agent
Chat Trigger
+
Form Trigger
Agent
Chat Trigger
13 ノードThomas Janssen
エンジニアリング
AI サポート デスク用の Supabase および JIRA 統合
GPT、Supabaseベクター検索、JIRAチケットに基づくSlack ITデスクの自動化
If
Set
Slack
+
If
Set
Slack
25 ノードinderjeet Bhambra
サポートチャットボット
OpenAIとNotionを使用して、ウェブサイトに埋め込める知識ベースチャットボットを作成する
OpenAIとNotionを使ってウェブサイトに埋め込める知識ベースチャットボットを作成
Notion Tool
Agent
Chat Trigger
+
Notion Tool
Agent
Chat Trigger
9 ノードGegenfeld
サポートチャットボット
OpenAI GPT と Airtable 知識ベースを使用したインタラクティブなチャットボットの作成
OpenAI GPTとAirtableのKnowledge Baseを使用したスマートチャットボットを作成する
Airtable Tool
Agent
Chat Trigger
+
Airtable Tool
Agent
Chat Trigger
9 ノードGegenfeld
サポートチャットボット
PipedreamのMCPサーバ
GPT-4、Pipedreamを使ったCalendly・Gmail統合型スケーラブルAIチャットボットの構築
Agent
Chat Trigger
Lm Chat Open Ai
+
Agent
Chat Trigger
Lm Chat Open Ai
8 ノードDavide
サポートチャットボット
AI駆動型WhatsAppチャットボット
ドキュメント用のRAG駆動 WhatsApp チャットボットを構築:GPT-4o-mini と MongoDB を使用
Set
Code
Switch
+
Set
Code
Switch
35 ノードMuhammad Shahzaib Shahid
サポートチャットボット