Workflow Templates

Build an Interactive AI Agent with Chat Interface and Multiple Tools (n8n)

A tutorial-grade n8n template: in about 3 minutes, deploy an AI agent with a public chat page and six built-in tools — Wikipedia search, jokes, date math, password generation, loan calculations, and n8n blog fetching — with a switchable Gemini/OpenAI brain and conversation memory.

Visit site
Difficulty
Intermediate
Pricing
Free
Platform
n8n
Tools involved
n8n AI AgentGoogle GeminiOpenAIMemory Buffer

One of the most-viewed agent tutorials on n8n (5,000+ views), this template demonstrates the full “agent = LLM + tools + memory” equation. A Chat Trigger provides a fully styled, publicly accessible chat page; the AI Agent node acts as the brain, interpreting intent and autonomously deciding which of six bundled tools to call — Wikipedia summaries, random jokes, future-date calculation, secure password generation, monthly loan payment math, and fetching the latest n8n blog posts — while a Memory node keeps multi-turn context. Compared with the single-tool starter agent, it shows real multi-tool routing decisions, the best next step after getting a first agent running.

What it does

  • Public chat interface: the Chat Trigger generates a shareable chat page URL with no frontend work
  • Autonomous multi-tool routing: the agent picks the right tool among six based on your question
  • Switchable LLM brain: Google Gemini by default; disable it and enable the OpenAI node to swap
  • Conversation memory: a Memory Buffer Window keeps recent turns for contextual follow-ups
  • Customizable system prompt: the agent’s personality and rules live in one system prompt, ready to rewrite

Prerequisites

  • An n8n instance (cloud or self-hosted)
  • A Google AI (Gemini) or OpenAI API key (either one)

Setup

1. Import the template in n8n: https://n8n.io/workflows/5819
2. Configure credentials: Google AI (Gemini) or OpenAI
3. Pick the brain: Gemini node is active by default; to use OpenAI, disable Gemini,
   enable the OpenAI node, and make sure it connects to the Agent parent node
   (keep exactly one active LLM node)
4. Activate the workflow and copy the public URL from the Example Chat Window node

Official setup time: about 3 minutes.

Steps

  1. Open the chat page and try “Tell me a joke” or “What is n8n?”
  2. Trigger tools: “Generate a 16-character password”, “What’s the monthly payment for a $300,000 loan at 5% over 30 years?”
  3. Inspect each tool node, then add, remove, or modify tools to build your own agent

Use cases

  • Teaching agent fundamentals: watch an LLM choose between tools in real time — ideal for team training and demos
  • Custom assistant starting point: swap the toolset and system prompt into a support, lookup, or calculator bot
  • Tool-routing evaluation: test how phrasing affects the agent’s tool choices
  • n8n LangChain node primer: canonical wiring of Agent, Tool, and Memory nodes

Notes

  • Gemini and OpenAI are external APIs; your n8n instance’s network must reach whichever provider you choose
  • The chat page is a public URL — anyone with the link consumes your API quota, so add access control before real use
  • The six bundled tools are demonstrative; production use should replace them with business tools and tighten the system prompt
  • Pairs well with the starter agent template: run that first, then use this one to understand multi-tool routing

Last updated: July 13, 2026

Related solutions