AI Agents

Build an intelligent agent for interactive query processing

5 nodes 313 118 Automatic trigger
Download

Workflow Description

Automation that constructs a smart agent to process user queries via a chat entry point, maintains context through memory, and invokes external search tools when needed via OpenAI to deliver accurate, contextual responses.

How it works

  1. 1.Receive user query through chat trigger endpoint
  2. 2.Load previous context from sliding window memory
  3. 3.Route query to OpenAI agent with available search tools
  4. 4.Execute search tool when necessary to fetch current information
  5. 5.Return intelligent response and persist context in memory

Use cases

  • Build customer service bot that answers questions while retaining conversation history
  • Create intelligent assistant that searches for current information and presents it contextually
  • Develop interactive agent for handling complex multi-step inquiries

Requirements

  • OpenAI API key to access the language model
  • Search service API key (SerpApi) for executing search tool
  • Channel or interface to receive user messages

Service Value

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

Apps Used

OpenAI Memory Tool Chat Trigger AI Agent

Details

Trigger Automatic trigger
Nodes 5
Apps 5
Views 313
Downloads 118

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 (5)

OpenAI Chat Model

OpenAI

#1

Window Buffer Memory

Memory Buffer Window

#2

SerpAPI

Tool Serp Api

#3

When chat message received

Chat Trigger

#4

AI Agent

Agent

#5