AI Agents

Build an intelligent agent with memory and vector search

14 nodes 304 161 Automatic trigger
Download

Workflow Description

An automation template that creates a conversational AI agent receiving questions through a chat interface, processes them using Gemini and OpenAI models, maintains conversation context in MongoDB, and stores document data as vectors for semantic search capabilities.

How it works

  1. 1.Receive user messages through the enabled chat channel
  2. 2.Split documents and convert them into searchable vectors
  3. 3.Process queries through an intelligent agent that selects the appropriate model
  4. 4.Store conversation context, questions, and answers in MongoDB
  5. 5.Return responses to users while maintaining conversation history

Use cases

  • Build a smart assistant that answers customer questions based on internal documentation
  • Create an automated customer support system that learns from previous interactions

Requirements

  • API keys for Gemini and OpenAI
  • MongoDB Atlas account for storing conversations and vector data
  • n8n platform with webhook execution permissions

Service Value

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

Apps Used

Chat Trigger MongoDB Gemini OpenAI AI Agent Document Default Data Loader Text Splitter

Details

Trigger Automatic trigger
Nodes 14
Apps 7
Views 304
Downloads 161

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

/

When chat message received

Chat Trigger

#1

MongoDB Chat Memory

Memory Mongo Db Chat

#2

Google Gemini Chat Model

Gemini Model

#3

MongoDB Atlas Vector Store

Vector Store Mongo D B Atlas

#4

Embeddings OpenAI

OpenAI

#5

Sticky Note

Sticky Note

#6

AI Traveling Planner Agent

Agent

#7

Webhook

Webhook

#8

Default Data Loader

Document Default Data Loader

#9

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#10

MongoDB Atlas Vector Store1

Vector Store Mongo D B Atlas

#11

Embeddings OpenAI1

OpenAI

#12

Sticky Note1

Sticky Note

#13

Sticky Note2

Sticky Note

#14