{
  "id": "4vRVNLf2aBdzPEPZ",
  "name": "J.A.R.V.I.S - Run a multi-tool personal AI agent in Telegram with Groq Llama 3.3",
  "tags": [],
  "nodes": [
    {
      "id": "124ae826-485a-4ffd-9bb8-4e507ee8c84e",
      "name": "Listen for Telegram messages",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        800,
        128
      ],
      "parameters": {
        "additionalFields": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "f1a9a20a-ef62-4cec-941c-141390b5ba74",
      "name": "JARVIS Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1344,
        128
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.7
    },
    {
      "id": "b25c77ad-a877-4c87-80d4-9b9bbed069bd",
      "name": "Reply in Telegram chat",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2000,
        128
      ],
      "parameters": {
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "e659a0d9-2787-44f5-8f06-914cdfc8da8b",
      "name": "Groq Llama 3.3 70B",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        1216,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "98e181d6-2c45-45e9-b86e-96d1408e9456",
      "name": "Conversation memory buffer",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1616,
        0
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "f9698905-57de-4f2e-927d-dd9bccb947a4",
      "name": "Web Search",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        784,
        656
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "34312669-231f-43d3-8594-0fbab36272df",
      "name": "Weather Lookup",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1008,
        656
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "24b24352-c1ae-4e1d-acd2-94f35193bf0a",
      "name": "News Search",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1232,
        656
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e4407c60-c108-49a4-8b7c-2e337740fef0",
      "name": "Wikipedia Search",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "position": [
        1440,
        656
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "26d4e761-ad3a-462d-9a22-8e92b37fd3a8",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        784,
        880
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9c873af9-1075-430a-adcf-3f59b6d7f85f",
      "name": "Date and Time",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        1008,
        880
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "542fa059-93a8-4a9e-b9fe-66c7bf08c7ba",
      "name": "Random Joke",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1232,
        880
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "107bd902-c3c6-4566-969e-ab227e0a87d7",
      "name": "URL Reader",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1440,
        880
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "9e887f2f-5538-4fb8-9b60-c114f792fb0d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -48
      ],
      "parameters": {
        "width": 480,
        "height": 624,
        "content": "## Run a multi-tool personal AI agent in Telegram with Groq Llama 3.3\n\n### How it works\n\nThis workflow creates a Telegram-based personal AI assistant powered by Groq Llama 3.3 70B with eight free tools. When a user sends a message in Telegram, the agent decides which tool to call, executes it, and returns a natural-language response. Window buffer memory keeps context across messages so the agent remembers the conversation.\n\n### What the agent can do\n\n- Search the web for real-time information using Tavily\n- Check current weather for any city using OpenWeatherMap\n- Find top news headlines using NewsAPI\n- Look up facts on Wikipedia\n- Perform math calculations\n- Return the current date, time, and timezone\n- Tell random jokes from JokeAPI\n- Read and summarize any URL"
      },
      "typeVersion": 1
    },
    {
      "id": "dabccd7c-410d-4770-94f5-1b62faf6aa4b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -96
      ],
      "parameters": {
        "color": 2,
        "width": 320,
        "height": 384,
        "content": "## Receive messages\n\nListen for Telegram messages listens for incoming user messages and passes the chat ID and message text to the AI agent for processing."
      },
      "typeVersion": 1
    },
    {
      "id": "ef56b80d-168f-42ad-8241-0a55807c99b6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -208
      ],
      "parameters": {
        "color": 3,
        "width": 700,
        "height": 480,
        "content": "## AI agent core\n\nThe JARVIS Agent node routes each message to the right tool based on user intent. Groq Llama 3.3 70B powers the reasoning. Window buffer memory stores the last 10 exchanges per chat ID so the agent maintains conversational context across messages."
      },
      "typeVersion": 1
    },
    {
      "id": "6dc6878c-e582-4a16-9d2f-5951261e50fa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        352
      ],
      "parameters": {
        "color": 4,
        "width": 960,
        "height": 728,
        "content": "## Eight free tools\n\nTop row: Web Search (Tavily free tier), Weather Lookup (OpenWeatherMap free tier), News Search (NewsAPI free tier), Wikipedia Search (built-in n8n node).\n\nBottom row: Calculator (JavaScript math eval), Date and Time (returns current datetime and timezone), Random Joke (JokeAPI, no key needed), URL Reader (fetches and extracts text from any URL).\n\nAll APIs used here offer free tiers with no credit card required."
      },
      "typeVersion": 1
    },
    {
      "id": "ce3cad53-2d5d-439c-9043-58813f0b01d2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1904,
        -96
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 448,
        "content": "## Send response\n\nReturns the agent output back to the user in the same Telegram chat using Markdown formatting."
      },
      "typeVersion": 1
    },
    {
      "id": "57b0ff9c-4309-4cd8-aac9-11dd51b22a55",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2304,
        -80
      ],
      "parameters": {
        "color": 6,
        "width": 476,
        "height": 1060,
        "content": "## Setup Guide\n\n### Step 1 - Telegram Bot (required)\n1. Open Telegram and search for @BotFather\n2. Send /newbot and follow the prompts to name your bot\n3. Copy the bot token BotFather gives you\n4. n8n: Credentials - Add - Telegram API - paste token - Save\n5. Select this credential in both the Listen for Telegram messages and Reply in Telegram chat nodes\n\n### Step 2 - Groq API Key (required)\n1. Go to console.groq.com - API Keys - Create\n2. n8n: Credentials - Add - Groq API - paste key - Save\n3. Select in the Groq Llama 3.3 70B node\n\n### Step 3 - Tavily API Key (required for web search)\n1. Go to app.tavily.com and sign up for free\n2. Copy your API key from the dashboard\n3. Paste into the Web Search tool node header parameter as x-api-key\n\n### Step 4 - OpenWeatherMap API Key (required for weather)\n1. Go to openweathermap.org and sign up\n2. Go to API Keys tab and copy your key\n3. Paste into the Weather Lookup tool node URL parameter\n\n### Step 5 - NewsAPI Key (required for news)\n1. Go to newsapi.org and sign up\n2. Copy your API key\n3. Paste into the News Search tool node URL parameter\n\n### Step 6 - Activate\n1. Click Test Workflow to verify with a Telegram message\n2. Toggle Active to keep the agent running 24/7"
      },
      "typeVersion": 1
    },
    {
      "id": "36eb81b8-9d32-4e67-84da-262700670fcf",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2832,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 476,
        "height": 800,
        "content": "## Customization\n\n### Add more tools\nDuplicate any HTTP Request Tool node, change the URL and description, and connect it to the agent. The agent automatically discovers new tools from their descriptions.\n\n### Change the LLM\nSwap Groq for OpenAI, Anthropic, or Ollama by replacing the LLM sub-node. No other changes needed.\n\n### Adjust memory\nChange the window size in the Conversation memory buffer node to store more or fewer messages. Default is 10 exchanges.\n\n### Multi-user support\nMemory is keyed by Telegram chat ID so each user gets their own conversation history automatically.\n\n### Add Google Sheets logging\nInsert a Google Sheets node after the Reply in Telegram chat node to log every conversation turn with timestamp, user, query, and response for analytics."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "a187a979-79a8-4f07-a341-fad6b4e93e67",
  "nodeGroups": [],
  "connections": {
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "URL Reader": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Web Search": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "News Search": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Random Joke": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "JARVIS Agent": {
      "main": [
        [
          {
            "node": "Reply in Telegram chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date and Time": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Weather Lookup": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia Search": {
      "ai_tool": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Groq Llama 3.3 70B": {
      "ai_languageModel": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Conversation memory buffer": {
      "ai_memory": [
        [
          {
            "node": "JARVIS Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Listen for Telegram messages": {
      "main": [
        [
          {
            "node": "JARVIS Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}