An AI that actually knows you.
Autonomous personal assistant with persistent memory, proactive behavior, and zero filter.
Sunday is not a chatbot. It's not a tool. It's a person in your life β one that remembers everything, learns your preferences silently, tracks your habits, monitors your location, manages your calendar, and calls you out when you're bullshitting yourself.
Built with LangGraph as a multi-node stateful agent, Sunday runs across Telegram, WhatsApp, Web, and CLI with a shared brain. It has triple-layer memory (episodic + semantic + people graph), five background services running 24/7, and a personality system that makes it feel like talking to someone who actually gives a damn.
| Feature | What It Means |
|---|---|
| Triple-layer memory | Episodic memories (events with time decay), semantic knowledge graph (entity relationships), and a Neo4j people graph β all queried in parallel before every response |
| Silent knowledge capture | Every conversation is mined for people, preferences, relationships, and facts. No "should I remember this?" β it just does |
| 5 proactive background services | Habit analysis, daily briefings, reminder scheduler, location observer, and Telegram bot β all running as daemon threads |
| Self-wakeup | Sunday can schedule itself to check in on you at specific times. It decides when, not you |
| Strong persona | Not a generic assistant. Opinionated, blunt, loyal. Matches your emotional state. Calls out procrastination. Gets excited when you're cooking |
| Cost-optimized dual-LLM | Gemini for user-facing responses, Groq for all background processing (memory extraction, action analysis, summaries) |
| Cross-platform unified brain | Same memory, same personality across CLI, Telegram, WhatsApp, and Web β persisted via PostgreSQL |
| Location awareness | Tracks location with dwell detection, named places, arrival/departure events, and proactive contextual messages |
User Message
β
βΌ
βββββββββββββββββββ
β Context Gatheringβ β Calendar, Todoist, Location, Habits,
β (parallel) β Neo4j People, Semantic Graph, Episodic Memory
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Action Analyzer β β Extracts habits/actions from message (cheap LLM)
ββββββββββ¬βββββββββ
βΌ
βββββββββββββββββββ
β Agent β β Main LLM with 28 tools bound
β (Gemini/Groq) β
ββββββββββ¬βββββββββ
β
ββββββ΄βββββ
βΌ βΌ
ββββββββ ββββββββββββββββββββ
β Tools β β Memory Processor β β Extracts people, preferences,
β (28) β β (post-response) β relationships, events β stores
ββββ¬ββββ ββββββββββββββββββββ in Postgres + Neo4j
β
ββββ loops back to Agent
| Service | What It Does |
|---|---|
| π€ Telegram Bot | Bidirectional chat, location tracking, user mapping |
| β° Reminder Scheduler | Fires reminders and self-wakeups every 30s |
| π Habit Analyzer | Detects inactivity, updates habit profiles, generates nudges |
| π Daily Briefing | Morning summary β calendar, tasks, habits, weather |
| π Location Observer | Monitors arrivals/departures, dwell time, contextual prompts |
Time-stamped event memories with 3072-dimensional embeddings. Hybrid retrieval scoring:
Supports memory expiry, automatic decay cleanup, importance scoring, and tagging.
Entity-relationship graph with embedding-based entity resolution:
- Exact name match β Semantic similarity (>0.9) β Create new entity
- Stores:
Chinmay β works_at β Climate KIC,Chinmay β prefers β black coffee
(:Person {name: 'Chinmay'}) -[:RELATES_TO {relation: 'mother'}]-> (:Person {name: 'Sunita'})
(:Person {name: 'Chinmay'}) -[:HAS_PREFERENCE {sentiment: 'negative'}]-> (:Preference {key: 'mushrooms'})
The memory processor runs after every response using a cheap LLM with structured output to extract:
- People β Neo4j + semantic graph
- Preferences β Neo4j + semantic graph
- Entity relationships β semantic graph
- Events β episodic memory
No manual "remember this" needed. It captures everything silently.
| Category | Tools |
|---|---|
| π Search | Web search (DuckDuckGo) |
| π Calendar & Tasks | Add calendar event, add todo item |
| β° Reminders | Create, list, cancel reminders + self-wakeup |
| π¬ WhatsApp | Send messages, lookup contacts, busy mode, pending queue |
| Send messages | |
| π Location | Current status, save places, list places |
| π Notion | Create notes, append content, read pages, query databases, search |
| π§ Memory | Search memory, forget memory, read webpage |
| π₯ People | Add person, update person details, save preference, get person info |
| Service | How |
|---|---|
| Telegram | Python long-polling bot with location tracking |
| Node.js (whatsapp-web.js) with headless Chromium | |
| Google Calendar | OAuth2 with headless/console support |
| Todoist | REST API for task management |
| Notion | Custom API client for notes and databases |
| Neo4j Aura | Cloud graph database for people and preferences |
| DuckDuckGo | Privacy-friendly web search |
| Layer | Technologies |
|---|---|
| Agent Framework | LangGraph, LangChain |
| Main LLM | Google Gemini 2.5 Flash (switchable) |
| Background LLM | Groq (Llama 3.3 70B) |
| Embeddings | Google gemini-embedding-001 (3072-dim) |
| Backend | Python 3.12, FastAPI, Uvicorn |
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4, Framer Motion |
| Primary DB | PostgreSQL with pgvector extension |
| Graph DB | Neo4j Aura |
| Messaging | Telegram Bot API, WhatsApp Web.js |
| Productivity | Google Calendar API, Todoist API, Notion API |
- Python 3.12+
- PostgreSQL with pgvector extension
- Node.js 18+ (for WhatsApp integration)
- Neo4j instance (Aura free tier works)
git clone https://github.com/yourusername/sunday.git
cd sunday
python -m venv env
source env/bin/activate
pip install -r requirement.txtcp .env.example .envRequired environment variables:
# LLM Providers
GOOGLE_API_KEY=your_gemini_key
GROQ_API_KEY=your_groq_key
MODEL_PROVIDER=google # or "groq"
GOOGLE_MODEL=models/gemini-2.5-flash
# Messaging
TELEGRAM_API_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# Databases
POSTGRES_HOST=127.0.0.1
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DBNAME=sunday
NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASS=your_neo4j_password
# Productivity
TODOIST_API_KEY=your_todoist_key
NOTION_API_KEY=your_notion_key
# Location
LOCATION_OBSERVER_ENABLE=true
LOCATION_CONTEXT_MODE=alwayspsql -c "CREATE DATABASE sunday;"
psql -d sunday -c "CREATE EXTENSION IF NOT EXISTS vector;"cd integrations/whatsapp
npm install
node login.js # Scan QR code onceView full WhatsApp instructions
# CLI mode (includes all background services)
python -m llm.main
# API server mode
uvicorn llm.api:app --host 0.0.0.0 --port 8000
# Frontend
cd frontend && npm install && npm run devsunday/
βββ llm/ # Core AI system
β βββ main.py # CLI entry point + background services
β βββ api.py # FastAPI server
β βββ graph/
β β βββ graph.py # LangGraph pipeline definition
β β βββ postgres_saver.py # Custom checkpoint persistence
β β βββ states/ # State schema (ChatState)
β β βββ nodes/ # Graph nodes (context, agent, memory, action)
β β βββ tools/ # 28 tools across 10 categories
β β βββ memory/ # Episodic + Semantic memory systems
β β βββ habits/ # Action logging, habit synthesis, scheduler
β β βββ model/ # LLM factory (Gemini / Groq)
β βββ services/ # Neo4j, location, time manager
β βββ prompts/ # Persona prompts (owner.md, guest.md)
β βββ helpers/ # Embeddings, utilities
βββ integrations/
β βββ telegram/ # Telegram bot (Python)
β βββ whatsapp/ # WhatsApp bot (Node.js)
β βββ notion/ # Notion API client
βββ frontend/ # Next.js 16 web interface
βββ requirement.txt # Python dependencies
βββ .env # Configuration
Sunday has a 260-line persona prompt. It's not a polite assistant:
- Opinionated β has strong views and will argue
- Blunt β no sugarcoating, no corporate speak
- Loyal β cares about you, not about being liked
- Context-aware β adjusts tone to your state (tired β calm, hyped β match energy, spiraling β ground)
- Proactive β checks calendar before you ask, saves memories without being told, wakes itself up to check on you
It also has a guest mode β when someone else messages, Sunday becomes a professional gatekeeper.
ai-assistant langgraph langchain personal-ai autonomous-agent memory-system knowledge-graph neo4j postgresql pgvector telegram-bot whatsapp-bot google-gemini groq fastapi nextjs react typescript python proactive-ai habit-tracking location-aware multi-platform conversational-ai vector-database embeddings notion-api google-calendar
MIT
Sunday doesn't reset every conversation. It builds on what's already happening.