Dynamic AI Companion: Personalized & Empathetic Chatbot with Memory
detail.loadingPreview
This n8n workflow powers an intelligent AI chatbot that understands user intent, remembers past conversations, and responds with dynamic, mood-aware personas. Built on Google Gemini, it offers a truly personalized and empathetic conversational experience.
About This Workflow
Unleash the power of highly personalized AI conversations with this sophisticated n8n workflow. Designed to act as an empathetic and intelligent companion, it intelligently analyzes user intent for tasks like image generation, memory retention, or setting reminders. Crucially, it adapts its conversational persona and tone dynamically based on the user's emotional state, ranging from deeply supportive for sadness to playful for happiness, even including a "girlfriend mode." The workflow also incorporates a robust memory system, fetching past interactions and extracting new, vital information to build a rich, continuous understanding of the user. Powered by the advanced Google Gemini LLM, this solution transforms static chatbots into engaging, emotionally intelligent AI companions.
Key Features
- Intelligent Intent Detection: Automatically analyzes user messages to identify primary intentions, including generating images, setting reminders, remembering information, or engaging in general chat.
- Dynamic Persona & Mood Adaptation: Adjusts the AI's tone and conversational style based on the user's detected mood (e.g., sad, happy, neutral) and specialized modes like an "AI Girlfriend" persona.
- Conversational Memory Management: Fetches historical conversation summaries from MongoDB and intelligently extracts new, important information from ongoing dialogue to build a persistent user memory.
- Robust LLM Integration: Leverages the powerful Google Gemini-2.0-flash model for advanced natural language understanding and generation, ensuring high-quality, relevant responses.
- Error-Resilient Intent Parsing: Includes custom code to safely parse LLM outputs, defaulting to a general chat intent if parsing errors occur, ensuring uninterrupted conversation flow.
How To Use
- Configure MongoDB (Fetch User Memory2): Set up your MongoDB credentials and ensure the
conversation_summariescollection is accessible to store and retrieve user memory. - Define LLM Credentials (Google Gemini Chat Model7): Provide your API key for the Google Gemini (models/gemini-2.0-flash) service to enable the AI's advanced language capabilities.
- Customize Intent Analysis (Intent Analysis2): Modify the prompt to fine-tune intent detection, adding or adjusting intents and their corresponding JSON output structures as needed for your specific application.
- Tailor Dynamic Personas (Chat Agent2): Adjust the conditional prompts within
Chat Agent2to create new moods or specialized personas, defining how your AI assistant should respond under different emotional states or operational modes. - Integrate Memory Storage: While not fully shown, ensure you connect the "Check If Worth Remembering1" node's output to a subsequent node (e.g., another MongoDB node or a database) to actually store the extracted memory summaries.
- Connect Routing (Route Intent2): Extend the branches from
Route Intent2to implement specific actions for each detected intent (e.g., call an image generation API for "generate_image", store a reminder in a calendar for "reminder").
Apps Used
Workflow JSON
{
"id": "25147a0b-d87d-44af-a078-77975186f1f3",
"name": "Dynamic AI Companion: Personalized & Empathetic Chatbot with Memory",
"nodes": 20,
"category": "Personal",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 25147a0b-d87d...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Smart Expense Tracking with Telegram & AI
Automate your personal finance management by turning your Telegram chat into an intelligent expense tracker. Simply send a photo of a receipt or a text message, and this workflow uses AI to categorize your spending, extract crucial details, and provide instant summaries.
Daily AI-Powered Morning Briefing
Start your day with clarity and focus using this n8n workflow. It automatically fetches your tasks from Todoist and events from Google Calendar, then leverages AI to create a concise, personalized daily briefing delivered directly to your inbox every morning. This ensures you always know your top priorities and upcoming schedule at a glance.
Automate Your Daily Briefing: News, Emails, and Tasks
Streamline your day by automatically fetching the latest news from Times of India, important emails from your Gmail, and your upcoming Todoist tasks. Get a consolidated, beautifully formatted daily digest delivered straight to your inbox.