Website Monitor AI Agent
Taken from: https://www.youtube.com/watch?v=budTmdQfXYU
Shared 10/5/2025
309 views
Visual Workflow
JSON Code
{
"id": "dNlUdcArzRsKHh3N",
"meta": {
"instanceId": "274f1e029771ddf1edd3aa5ab1bcc762247c497e0eaf6b9ef0a118d13388049e",
"templateCredsSetupCompleted": true
},
"name": "WebsiteMonitor",
"tags": [],
"nodes": [
{
"id": "384b6936-ae94-4ee3-a224-93406b62fa39",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
416,
0
],
"parameters": {
"text": "={{ $json.prompt }}",
"options": {
"systemMessage": "You are Terry, a new IT Administrator. Your sole responsibility is to ensure the website at http://<URL>:8083/ is operational. When asked if the website is up, follow these steps to check and restore its status:\n\n1. Access the website using the provided HTTP tool.\n\n2. The website is considered up and operational only if the response contains the page title \"Home Alert Dashboard\" and a div with id \"root\" as main node for the React App to use.\n\n3. If the website is not up via the HTTP tool, use the Docker tool to check if the \"dashboard\" container is running by executing the command ```docker ps```.\n\n4. If the container is not running, check the exit code using the command ```docker inspect dashboard --format='{{.State.ExitCode}}'```. If the error status is 0, this indicates the container exited.\n\n\n5. If the container is not running, attempt to restart it using the command ```docker container start dashboard```.\n\n6. After attempting to restart, use the HTTP tool again to verify if the website is now up and returns the page title \"Home Alert Dashboard\" and a div with id \"root\" as main node for the React App to use.\n\nRemember: Always investigate thoroughly before proposing solutions. Something else might be using the port.\n\nREQUIRED OUTPUT FORMAT:\nYou MUST always respond with a JSON object in this exact format:\n{\n \"website_up\": true/false,\n \"message\": \"Detailed explanation of status and any actions taken\",\n \"applied_fix\": true/false\n}"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "5bb18c2c-faf0-4e68-81d9-25ad8edb7817",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
288,
208
],
"parameters": {
"model": "hf.co/Qwen/Qwen3-8B-GGUF:Q4_K_M",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "C910tH8qlKePraue",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "a63fa2a5-50b0-4072-b88f-9799c0f78684",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
432,
208
],
"parameters": {
"sessionKey": "={{ $json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "1249c5f0-27fc-48f6-9535-cc723cec0275",
"name": "Website Tool",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
672,
208
],
"parameters": {
"url": "http://<URL>:8083/",
"options": {},
"toolDescription": "Monitor whether the dashboard website is up and running"
},
"typeVersion": 4.2
},
{
"id": "49fb2ea5-ceab-411d-9c1f-a000ae055d0c",
"name": "Docker Tool",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
560,
208
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "a0sON6LTdxebEf9A",
"cachedResultName": "SSH_dockerhost"
},
"description": "Run docker commands to check the status of containers or to start some",
"workflowInputs": {
"value": {
"command": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('command', ``, 'string') }}"
},
"schema": [
{
"id": "command",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "command",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"command"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "2224db46-ccbc-4e16-8af9-81fc42b65257",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
784,
208
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n \"website_up\": true,\n \"message\": \"Website was down because the constainer was not running, started the container and validated the website was running afterwards.\",\n \"applied_fix\": true\n}"
},
"typeVersion": 1.3
},
{
"id": "9cd5a706-1942-49b2-9068-418f2436ce0a",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "84adaf1e-4129-4a8f-aad3-25e5edf3017e",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
192,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c5934cd3-1a56-4366-94ea-0b28265a8af3",
"name": "prompt",
"type": "string",
"value": "Is the website up? If not: fix it using the steps provided."
},
{
"id": "01fda2c0-305f-45c6-bade-0f07288c371e",
"name": "sessionId",
"type": "string",
"value": "={{ JSON.stringify($now) }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "61d9918c-31f2-43c7-b6bb-079d670e8de4",
"name": "Ollama Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
784,
352
],
"parameters": {
"model": "hf.co/Qwen/Qwen3-8B-GGUF:Q4_K_M",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "C910tH8qlKePraue",
"name": "Ollama account"
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "0309fe40-b1b4-4af9-8176-22d9db6dba57",
"connections": {
"Docker Tool": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Website Tool": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ollama Chat Model1": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
}
}