AI Agents

Build an Intelligent Agent with Memory and Continuous Conversation

15 nodes 279 142 Automatic trigger
Download

Workflow Description

Automation that builds a smart agent capable of interacting with users through conversation, maintaining dialogue context in memory, and processing requests using multiple language models (OpenAI and Ollama) to generate contextual responses.

How it works

  1. 1.Capture user messages via the chat trigger channel
  2. 2.Process messages through the intelligent agent using LLM chains
  3. 3.Store conversation history in a sliding window memory buffer
  4. 4.Generate responses using OpenAI and Ollama models in parallel
  5. 5.Execute HTTP requests based on agent decisions
  6. 6.Return responses to the user

Use cases

  • Create a customer support chatbot that remembers conversation history
  • Build a virtual assistant combining multiple AI models for complex queries
  • Develop an internal help agent that learns from previous interactions

Requirements

  • OpenAI API key for model access
  • Local or cloud-hosted Ollama server running
  • Permissions to send HTTP requests to external services
  • Understanding of n8n memory buffer configuration

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Chat Trigger AI Agent OpenAI Memory LLM Chain Lm Chat Ollama

Details

Trigger Automatic trigger
Nodes 15
Apps 6
Views 279
Downloads 142

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (15)

/

When chat message received

Chat Trigger

#1

AI Agent

Agent

#2

DeepSeek

OpenAI

#3

Window Buffer Memory

Memory Buffer Window

#4

Basic LLM Chain2

LLM Chain

#5

Sticky Note

Sticky Note

#6

Sticky Note1

Sticky Note

#7

Ollama DeepSeek

Lm Chat Ollama

#8

Sticky Note2

Sticky Note

#9

Sticky Note3

Sticky Note

#10

DeepSeek JSON Body

HTTP Request

#11

DeepSeek Raw Body

HTTP Request

#12

Sticky Note4

Sticky Note

#13

Sticky Note5

Sticky Note

#14

Sticky Note6

Sticky Note

#15