Build an intelligent agent with memory and vector search
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.Receive user messages through the enabled chat channel
- 2.Split documents and convert them into searchable vectors
- 3.Process queries through an intelligent agent that selects the appropriate model
- 4.Store conversation context, questions, and answers in MongoDB
- 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
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (14)
When chat message received
Chat Trigger
MongoDB Chat Memory
Memory Mongo Db Chat
Google Gemini Chat Model
Gemini Model
MongoDB Atlas Vector Store
Vector Store Mongo D B Atlas
Embeddings OpenAI
OpenAI
Sticky Note
Sticky Note
AI Traveling Planner Agent
Agent
Webhook
Webhook
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
MongoDB Atlas Vector Store1
Vector Store Mongo D B Atlas
Embeddings OpenAI1
OpenAI
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note