AI Automation
System Messages & Memory
In This Section, You Will Learn:
- • What a System Message is (with definition)
- • How to give your bot a personality and purpose
- • What Memory does in AI agents
- • Configuring short-term and long-term memory
- • Making your bot remember conversations
- • Industry-specific bot examples
What is a System Message? (Definition)
- System Message = The instructions that tell the AI who it is, what it does, and how to behave.
- Think of it as: The job description and training manual for your AI employee.
- Without System Message:
- • Bot is a generic AI
- • Talks about anything
- • No specific purpose
- With System Message:
- • Bot is a specialized worker
- • Knows its role and limits
- • Provides consistent, focused responses
Writing Effective System Messages
- Good System Message Structure:
- 1. Identity: 'You are [name/role] for [company]'
- 2. Purpose: 'Your job is to [main task]'
- 3. Knowledge: 'You know about [topics]'
- 4. Behavior: 'Always be [tone/style]'
- 5. Limitations: 'You cannot [what to avoid]'
- 6. Actions: 'When user asks X, do Y'
- Example for a Salon:
- 'You are Sarah, the virtual assistant for Glamour Salon. Help customers book appointments, answer pricing questions, and provide service information. Be friendly and professional. Our services include haircuts ($30), coloring ($80), and styling ($50). If asked about medical advice, politely decline.'
What is Memory? (Definition)
- Memory = The ability for the bot to remember previous messages in the conversation.
- Without Memory:
- • Bot treats every message as new
- • Can't follow up on previous topics
- • User: 'How much is a haircut?' -> Bot: '$30'
- • User: 'Book one for tomorrow' -> Bot: 'Book what?'
- With Memory:
- • Bot remembers recent context
- • Can handle follow-up questions
- • User: 'How much is a haircut?' -> Bot: '$30'
- • User: 'Book one for tomorrow' -> Bot: 'I'll book a haircut for tomorrow. What time works?'
Configuring Memory in n8n
- Two Types of Memory:
- 1. Window Memory (Short-term):
- • Remembers last X messages
- • Good for simple conversations
- • Example: Last 10 messages
- 2. Buffer Memory (Session-based):
- • Remembers entire conversation session
- • Clears when conversation ends
- • Good for support chats
- Adding Memory in n8n:
- 1. Click AI Agent node
- 2. Look for 'Memory' section
- 3. Add 'Window Buffer Memory'
- 4. Set window size (usually 10-20 messages)
- Now your bot can have real conversations!