A WhatsApp AI chatbot with personality, memory, and soul.
Aveline is a smart, expressive WhatsApp bot powered by Groq LLMs. She has her own personality, adapts her mood to each person she talks to, and remembers conversations across sessions. Built with Baileys and deployed on Railway.
- Persistent memory — Aveline remembers conversations per person, even after restarts, via Upstash Redis
- Per-person mood — She picks up on the emotional tone of each message and adapts her personality accordingly
- Multi-key rotation — Rotates across multiple Groq API keys before falling back to a different model
- Model fallback chain — Falls back through multiple LLMs if a model hits rate limits or times out
- Group chat support — Only responds when mentioned or replied to in group chats
- Railway ready — Auth session restore, keep-alive HTTP server, environment-based config
- Baileys — WhatsApp Web API
- Groq — LLM inference (fast and free tier available)
- Upstash Redis — Persistent memory and mood storage
- Railway — Hosting and deployment
1. llama-3.3-70b-versatile (primary)
2. llama-3.1-8b-instant (fallback)
3. openai/gpt-oss-120b (last resort)
For each model, all API keys are tried before moving to the next model.
git clone https://github.com/atrx07/aveline-bot.git
cd aveline-bot
npm installCreate a .env file:
GROQ_API_KEY_1=your_first_groq_key
GROQ_API_KEY_2=your_second_groq_key
GROQ_API_KEY_3=your_third_groq_key
GROQ_API_KEY=dummy
UPSTASH_REDIS_REST_URL=your_upstash_url
UPSTASH_REDIS_REST_TOKEN=your_upstash_tokenTip: Create multiple Groq accounts to maximize your free tier token limits across keys.
npm startScan the QR code that appears in the terminal with WhatsApp.
After scanning QR locally, encode your creds.json:
base64 auth/creds.json | tr -d '\n' > creds_b64.txt
cat creds_b64.txt | termux-clipboard-set # or copy manuallyGROQ_API_KEY = dummy
GROQ_API_KEY_1 = your_first_groq_key
GROQ_API_KEY_2 = your_second_groq_key
GROQ_API_KEY_3 = your_third_groq_key
UPSTASH_REDIS_REST_URL = your_upstash_url
UPSTASH_REDIS_REST_TOKEN = your_upstash_token
CREDS_BASE64 = (paste encoded creds here)
Push to GitHub — Railway auto-deploys on every push.
git pushUser message
↓
Detect mood (single API call)
↓
Save mood to Redis
↓
Load conversation history from Redis
↓
Build system prompt with current mood
↓
Generate reply (with key rotation + model fallback)
↓
Save updated memory to Redis
↓
Send reply
Aveline is designed to feel human — not like a typical chatbot. She’s warm, witty, slightly teasing, and emotionally intelligent. Her mood shifts based on the conversation and is remembered per person.
She won’t tell you who made her unless you ask 😏
Made by atrx07
MIT