This workflow corresponds to n8n.io template #self-building-ai-agent — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Wikipedia-ollama",
"nodes": [
{
"parameters": {
"options": {}
},
"id": "b24b05a7-d802-4413-bfb1-23e1e76f6203",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
360,
-40
]
},
{
"parameters": {
"content": "## Start by saying 'hi'\n",
"height": 149,
"width": 150
},
"id": "5592c045-6718-4c4e-9961-ce67a251b6df",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
180,
-40
]
},
{
"parameters": {
"options": {
"systemMessage": "=Today is {{ $now }}. IF you do not have the updated answer, please use Wikipedia tool to help you get the updated information. \n\nYou are a helpful assistant"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
580,
-40
],
"id": "7db7aa31-4648-494d-b570-7b594f105c1c",
"name": "AI Agent",
"notesInFlow": true
},
{
"parameters": {
"model": "qwen3:0.6b",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
520,
180
],
"id": "71755563-9824-4258-8bfa-fa61d4b3f589",
"name": "Ollama Chat Model",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
"typeVersion": 1,
"position": [
660,
200
],
"id": "1891ff77-758a-40d3-a621-1e86d37ce503",
"name": "Wikipedia"
}
],
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Wikipedia": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"callerPolicy": "workflowsFromSameOwner"
},
"versionId": "cfccd670-00e7-4e9c-949f-af1cf74040ad",
"meta": {
"templateId": "self-building-ai-agent",
"templateCredsSetupCompleted": true
},
"id": "Qoa2YMQnacnpLVkt",
"tags": [
{
"name": "wikipedia",
"id": "RpwfCixrfwnskaES",
"createdAt": "2025-06-14T01:28:39.908Z",
"updatedAt": "2025-06-14T01:28:39.908Z"
},
{
"name": "ollama",
"id": "YzdarlvU2CULBOFw",
"createdAt": "2025-06-14T01:28:36.616Z",
"updatedAt": "2025-06-14T01:28:36.616Z"
}
]
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
ollamaApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Wikipedia-ollama. Uses chatTrigger, agent, lmChatOllama, toolWikipedia. Chat trigger; 5 nodes.
Source: https://github.com/maulikmadhavi/dev_llm_components/blob/94a04b46086795ca0caa3d01f788cce9b083be68/n8n/Wikipedia_ollama.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
NGSS Agent v2.2 github. Uses memoryBufferWindow, toolWorkflow, chatTrigger, agent. Chat trigger; 13 nodes.
Orquestador Normativa. Uses chatTrigger, textClassifier, lmChatOllama, agent. Chat trigger; 12 nodes.
This workflow provides a chat-based research assistant powered by Google Gemini that can look up facts on Wikipedia, do calculations, and remember context, while also tagging each user question and lo
Ai Agent With Ollama For Current Weather And Wiki. Uses stickyNote, manualChatTrigger, toolWikipedia, memoryBufferWindow. Chat trigger; 10 nodes.
This workflow template demonstrates how to create an AI-powered agent that provides users with current weather information and Wikipedia summaries. By integrating n8n with Ollama's local Large Languag