Skip to main content
AltFTool original, tested in n8n Uses AIAI ChatbotPersonal Productivity

AI chat agent starter with memory and tools - n8n workflow template

A compact starting point for building your own AI assistant in n8n. The Chat Trigger gives you a chat window inside the editor. Each message goes to an AI Agent node, which decides on its own whether to answer directly or use a tool first. Four sub-nodes plug into the agent…

Written and tested by AltFTool

Starts on
Chat message
Nodes
6 nodes
Level
Intermediate
Setup
About 5 min

Workflow preview

How this workflow runs

  1. 1

    When chat message received

    Starts the workflow when a chat message is received through the chat interface.

  2. 2

    OpenAI chat model

    Provides the OpenAI chat model (GPT) that powers the AI reasoning in this workflow.

  3. 3

    Conversation memory

    Gives the AI short-term conversational memory of recent messages.

  4. 4

    Calculator

    Handles the Tool Calculator step in this workflow.

  5. 5

    Wikipedia

    Handles the Tool Wikipedia step in this workflow.

  6. 6

    AI agent

    The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.

Overview and setup

How it works

A compact starting point for building your own AI assistant in n8n. The Chat Trigger gives you a chat window inside the editor. Each message goes to an AI Agent node, which decides on its own whether to answer directly or use a tool first.

Four sub-nodes plug into the agent:

  • OpenAI chat model provides the language model (gpt-4.1-mini by default, with a low temperature for steady answers).
  • Conversation memory keeps the last 10 messages for each chat session, so follow-up questions work.
  • Calculator handles arithmetic exactly instead of letting the model guess.
  • Wikipedia looks up facts the model is unsure about.

The system message tells the agent to be concise, to use its tools and to admit when a tool returns nothing useful.

Set up steps

  1. Import the workflow and open OpenAI chat model.
  2. Create an OpenAI credential with your API key and choose a model.
  3. Click Open chat at the bottom of the canvas and try "What is 17.5% of 2,340?" or a general knowledge question.
  4. To share the assistant, enable public access on the chat trigger and activate the workflow.

Customise it

  • Rewrite the system message in AI agent to give it a role, tone and rules for your use case.
  • Swap the model node for Anthropic, Google Gemini, Mistral or a local Ollama model.
  • Add more tools: an HTTP Request tool for your own API, a sheet lookup, or a sub-workflow.
  • Replace the in-memory history with a database-backed memory for persistent conversations.

n8n nodes used (6 types)

What every node does (6)
  • When chat message received (Chat Trigger)Starts the workflow when a chat message is received through the chat interface.
  • AI agent (Agent)The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.
  • OpenAI chat model (LLM Chat Open AI)Provides the OpenAI chat model (GPT) that powers the AI reasoning in this workflow.
  • Conversation memory (Memory Buffer Window)Gives the AI short-term conversational memory of recent messages.
  • Calculator (Tool Calculator)Handles the Tool Calculator step in this workflow.
  • Wikipedia (Tool Wikipedia)Handles the Tool Wikipedia step in this workflow.

FAQ

AI chat agent starter with memory and tools: questions

How do I import the "AI chat agent starter with memory and tools" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "AI chat agent starter with memory and tools" use?

It uses Chat Trigger, Agent, LLM Chat Open AI, Memory Buffer Window, Tool Calculator and Tool Wikipedia. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "AI chat agent starter with memory and tools"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under AI Chatbot, Personal Productivity. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.