A self-hosted personal AI executive assistant, second brain & communication hub inside WhatsApp.
Overview β’ Honest Risks β’ Architecture β’ Quickstart β’ Configuration β’ Command Cheatsheet β’ Troubleshooting
ARGUS is an executive personal AI assistant that lives inside your own WhatsApp account. Designed as a self-hosted "second brain" and digital Chief of Staff, ARGUS reads your incoming chats, prioritizes emails, manages reminders, schedules events, tracks shared expenses, and transcribes voice notes.
- β‘ System 1 Zero-Token Engine: Sub-5ms deterministic local execution for tasks, reminders, ledger records, status, and acknowledgments using 0 cloud tokens.
- π΄ Offline Mode Guard: Toggle full offline execution (
/offline) running purely on local SQLite storage with zero external cloud calls. - π Multi-Model AI Router: Dynamically routes between Groq (low-latency reasoning) and Google Gemini (deep code, long context, and analysis) with automatic intra-model and cross-provider failover.
- π§ Second Brain: Automatically stores, categorizes, and recalls personal notes, facts, and preferences.
- π‘οΈ Outbound Policy Engine & Autopilot (ADR 0003): 3-tiered autonomy (Draft Only, Supervised, Autonomous) restricted exclusively to 1-on-1 DMs with human approval queues and emergency bulk killswitches (
/autopilot off for all). - π¬ Group Catch-up: Generates structured 3-tier summaries (Key Points, Links, Action Items) for active chats.
- π¬ Email Triage (IMAP): Checks unread inbox messages and performs executive deep-dive breakdowns.
- π Calendar Scheduling: Generates 1-tap Google Calendar links from natural language or document dates.
- ποΈ Voice Note Transcription: Transcribes WhatsApp voice memos using Groq Whisper.
- πΈ Expense Ledger: Tracks shared expenses, debts, and balances via conversational commands.
- π€ Message Drafter: Drafts polished messages for contacts and routes them through approval workflows.
Before running ARGUS, understand the actual architecture and trade-offs:
- Unofficial WhatsApp Client: ARGUS uses
@whiskeysockets/baileys, an unofficial WhatsApp Web reverse-engineered client. Using unofficial clients carries a potential risk of account suspension or ban by WhatsApp. ARGUS incorporates human-like typing delays, but use is entirely at your own risk. - Cloud AI Inference: ARGUS is self-hosted, but it is not zero-cloud. Conversation snippets, email excerpts, and audio notes are sent over TLS to cloud inference APIs (Groq Cloud by default, or OpenAI/OpenRouter if configured).
- Prompt Injection Risk: When ARGUS processes messages from other contacts or group chats, external text reaches the model prompt. Never allow untrusted contacts to trigger sensitive tools without human oversight.
- Credential Security: Plaintext passwords, API keys, and sensitive financial secrets should never be saved in memory commands (
remember ...). Memory vaults are indexed and retrieved directly by the LLM. - Multi-Writer Concurrency: Both the Node.js bridge and Python brain interact with local SQLite databases. SQLite Write-Ahead Logging (WAL) is enabled to handle concurrent reads.
For the complete technical specification, data schemas, and design decisions, see docs/ARCHITECTURE.md.
βββββββββββββββββββββββββββββββββββββββββββ
β WhatsApp User Interface β
β (Self-Chat / Dedicated ARGUS Group) β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β Baileys (WebSockets)
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β ARGUS WhatsApp Bridge β
β (apps/bridge: Node.js 20+) β
β Single Sender Policy Choke Point β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β HTTP + HMAC Signed Body (ADR 0001)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ARGUS AI BRAIN (FastAPI) β
β β’ Central SQLite Writer (WAL) β’ ReAct Agent Tool Execution β
β β’ Outbound Policy Engine (ADR 0003) β’ Encrypted Fernet Vault (AES-128) β
β β’ Context Isolation Boundary β’ Native AG-UI Server-Sent Events Stream β
βββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββ
β Single-Writer SQLite β AG-UI SSE + REST (Key Auth)
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββ
β PERSISTENCE STORE β β ARGUS WEB CONTROL PLANE β
β β’ argus.db (Single DB Owner) β β (apps/web: Next.js 14+) β
β - outbound_audit_log (Append-Only) β β β’ Real-Time Chat (AG-UI SSE) β
β - pending_approvals (Human-in-Loop) β β β’ Approvals Inbox (Approve/Edit)β
β - message_log / chat_directory / expenses β β β’ Contacts & Autonomy (Tiers) β
β β’ argus_memory.db (Second Brain Facts) β β β’ Second Brain (Zero Credentialsβ
β β’ argus_vault.db (Encrypted Credentials) β β β’ Ledger & System Status β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββ¬ββββββββββββββββββ
β Host Loopback Only
βΌ
βββββββββββββββββββββββββββββββββββββ
β CADDY REVERSE PROXY (Localhost)β
β http://127.0.0.1:3000 β
β (Tailscale / VPN for Remote Access)β
βββββββββββββββββββββββββββββββββββββ
Starting in Phase 3, ARGUS features a modern, single-owner web application built with Next.js (App Router), TypeScript, and Tailwind CSS behind a local Caddy reverse proxy at http://127.0.0.1:3000.
- Chat (
/chat): Real-time agent conversations powered by native AG-UI Server-Sent Events (SSE), with dynamic tool invocation cards (list_contacts,web_search,record_expense) and generation stop/cancellation. - Approvals Inbox (
/approvals): Human-in-the-loop review queue for assistant-generated outbound drafts. Every draft can be Approved, Edited & Approved, or Declined, automatically writing to the tamper-proof SQLite audit trail. - Contacts & Autonomy (
/contacts): Granular per-contact autonomy tiers (Tier 0: Draft Only, Tier 1: Supervised 15-minute token, Tier 2: Autonomous with 8-second undo delay) and a prominent Global Emergency Kill Switch. - Second Brain Memory (
/memory): Personal knowledge base and fact repository with Guaranteed Zero-Credential Exposure (sensitive credentials and vault entries are fundamentally excluded from the UI). - Financial Ledger (
/ledger): Aggregated personal expenses, debt balances ("Who Owes Whom"), category breakdown, and recent transaction records. - Activity Log (
/activity): Real-time chronological audit trail of outbound policy engine decisions and WhatsApp message logs. - System Status (
/status): Live WhatsApp bridge link status, QR code display for initial device pairing, AI brain health, and database inventory metrics.
- Single-Owner Authentication: Every page and API route requires authentication with
ARGUS_WEB_ACCESS_KEY(orARGUS_SECRET), protected by constant-time comparison, anhttpOnlysecure session cookie, and IP rate limiting (max 5 failed attempts per 5 minutes). - Host Loopback by Default: Bound strictly to
127.0.0.1:3000. Never expose port 3000 or 8000 directly to the public internet. - Secure Remote Access: To access the ARGUS Web Control Plane remotely from a phone or laptop, connect via Tailscale (
tailscale serve/ MagicDNS) or an authenticated WireGuard/VPN tunnel.
Running with Docker is the recommended production deployment. Containers run unprivileged as non-root users with isolated network boundaries.
- Docker Engine 24+ and Docker Compose v2+
- A free Groq API Key (console.groq.com)
- (Optional) A Gmail App Password for email triage
git clone https://github.com/EchoOfCode/ARGUS.git
cd ARGUSGenerate a secure 32-byte shared secret:
# On Linux / macOS:
openssl rand -hex 32
# On Windows PowerShell:
python -c "import secrets; print(secrets.token_hex(32))"Initialize environment files:
cp apps/brain/.env.example apps/brain/.env
cp apps/bridge/.env.example apps/bridge/.envEdit both .env files:
- Set
ARGUS_SECRETto the generated 32-byte hexadecimal string in both.envfiles. - In
apps/brain/.env, add yourGROQ_API_KEY. - In
apps/bridge/.env, setMY_JIDto your WhatsApp phone number formatted as919876543210@s.whatsapp.net.
# Build and start background containers
docker compose up --build -dSecurity Note: In production, the brain container does not publish port
8000to the host network. All bridge-to-brain traffic occurs over the private internal Docker network.
Display the container logs to view the WhatsApp Web QR code:
docker compose logs -f argus-bridge- Open WhatsApp on your phone.
- Go to Settings β Linked Devices β Link a Device.
- Scan the terminal QR code.
- Create a WhatsApp group named
ARGUS(or text your own number in self-chat). - Send
helpto begin!
If you prefer running directly on your host machine:
make setup
# OR on Windows:
.\scripts\setup.batmake dev
# OR on Windows:
.\scripts\start.bat- Brain runs at
http://127.0.0.1:8000(Web Cockpit available at/dashboard). - Bridge logs into WhatsApp and displays the terminal QR code.
| Variable | Required | Default | Description |
|---|---|---|---|
ARGUS_SECRET |
Yes | β | HMAC shared secret (min 32 chars, cannot be placeholder). |
LLM_PROVIDER |
No | groq |
Inference backend: router (dynamic Groq/Gemini routing), groq, gemini, ollama, mock. |
GROQ_API_KEY |
Yes | β | API key from Groq Cloud Console. |
GROQ_MODEL |
No | llama-3.3-70b-versatile |
Primary reasoning model (qwen/qwen3.8-27b supported). |
GROQ_FALLBACK_MODEL |
No | openai/gpt-oss-20b |
Intra-provider fallback model when primary hits rate limits. |
GEMINI_API_KEY |
No | β | Google Gemini API key for coding, deep analysis, and failover. |
GEMINI_MODEL |
No | gemini-flash-lite-latest |
Model used for complex reasoning, code, and long queries. |
EMAIL_USER |
No | β | Gmail address for IMAP inbox triage. |
EMAIL_PASS |
No | β | Gmail 16-character App Password. |
HOST |
No | 127.0.0.1 |
Local bind address (bound to localhost for security). |
PORT |
No | 8000 |
Port for the FastAPI ASGI server. |
| Variable | Required | Default | Description |
|---|---|---|---|
MY_JID |
Yes | β | Owner WhatsApp JID (e.g. 919876543210@s.whatsapp.net). |
ARGUS_SECRET |
Yes | β | Must match ARGUS_SECRET in brain configuration. |
AI_BRAIN_URL |
No | http://127.0.0.1:8000 |
URL for brain service (http://argus-brain:8000 in Docker). |
LISTEN_MODE |
No | all |
all to ingest all chats, or allowlist for restricted chats. |
ALLOWED_JIDS |
No | β | Comma-separated list of allowed JIDs when in allowlist mode. |
SEND_DELAY_MS |
No | 1500 |
Natural typing delay between outgoing messages. |
DEDICATED_GROUP_NAME |
No | ARGUS |
WhatsApp group name for dedicated command channel. |
(All examples use synthetic demonstration data)
| Category | Example Command / Slash Command | What ARGUS Does | Token Cost |
|---|---|---|---|
| β‘ System 1 & Modes | /offline or offline mode |
Enables strict offline mode (runs 100% locally on PC; pauses cloud AI). | 0 tokens |
/online or online mode |
Re-enables Cloud AI reasoning alongside local fast-path. | 0 tokens | |
/mode |
Displays current active operating mode (Online vs Offline). | 0 tokens | |
/status or /s |
Instant telemetry: health, pending tasks/reminders, killswitch state. | 0 tokens | |
clean up / reset |
Wipes active conversational working buffer and refreshes state. | 0 tokens | |
| π Tasks & Todos | /todo or todos |
Lists pending tasks with IDs. | 0 tokens |
add buy milk or /todo add buy milk |
Creates a new task in SQLite. | 0 tokens | |
done #1 or complete buy milk |
Marks task #1 completed. | 0 tokens | |
delete #1 |
Deletes task #1. | 0 tokens | |
| β° Reminders | remind me in 45 minutes to submit report |
Schedules reminder using local NLP time parser. | 0 tokens |
remind me tomorrow morning to call doctor |
Schedules reminder for tomorrow morning (10:00 AM). | 0 tokens | |
/reminders |
Displays all upcoming scheduled reminders. | 0 tokens | |
cancel reminder #2 |
Cancels scheduled reminder #2. | 0 tokens | |
| πΈ Financial Ledger | spent 50 on coffee |
Logs expense of βΉ50 under "coffee" category. | 0 tokens |
paid 450 for lunch with Alex |
Logs shared expense with contact. | 0 tokens | |
/ledger or expenses / debts |
Aggregates monthly spend, all-time total, and unsettled debts. | 0 tokens | |
| π€ Autopilot & Outbound | /autopilot on Alex |
Enables auto-replies for contact in 1-on-1 DM (never in groups). | Cloud AI |
/autopilot off Alex |
Disables auto-replies for contact. | 0 tokens | |
/autopilot off for all |
Bulk Emergency Killswitch: Disables auto-reply for all contacts. | 0 tokens | |
/killswitch on / /killswitch off |
Global master silence switch (pauses all outgoing actions). | 0 tokens | |
/approve 4 / /reject 4 |
Approves or discards queued outbound draft #4. | 0 tokens | |
| π§ Second Brain | remember office parking spot is B-12 |
Categorizes and stores note into memory vault. | Cloud AI |
where is my parking spot? |
Synthesizes instant answer from memory vault. | Cloud AI | |
memories |
Displays categorized knowledge graph. | Cloud AI | |
forget parking |
Deletes outdated memory entries. | Cloud AI | |
| π¬ Chat Catch-up | catchup Project Alpha |
Generates 3-tier summary of recent group discussion. | Cloud AI |
summarize chat |
Summarizes most recent active conversation. | Cloud AI | |
| π¬ Email Reader | read my emails |
Fetches unread email headers and senders via IMAP. | Cloud AI |
summarize email #1 |
Deep executive breakdown of specific message. | Cloud AI | |
| π Calendar | schedule Project Sync tomorrow at 4pm |
Produces 1-tap Google Calendar event creation link. | Cloud AI |
events / calendar |
Shows upcoming schedule from local database. | 0 tokens | |
| π« Exemptions | exempt Family Group |
Stops message logging for spammy group chats. | 0 tokens |
- Cause: Startup validation detected an empty, default placeholder, or short secret.
- Fix: Generate a 32-byte secret (
openssl rand -hex 32) and paste the exact value into bothapps/brain/.envandapps/bridge/.env.
- Fix: Restart the bridge service or attach to the container:
docker compose restart argus-bridge docker compose logs -f argus-bridge
- To completely reset WhatsApp authentication credentials:
# Local: rm -rf apps/bridge/auth_info # Docker: docker volume rm argus_whatsapp_auth
Persistent data is isolated in Docker volumes:
argus_whatsapp_auth: WhatsApp Web encryption keys and pairing state.argus_brain_memory: Second Brain memory database (argus_memory.db).argus_bridge_data: Message log and contact cache (argus.db).
To back up databases:
docker run --rm -v argus_bridge_data:/data -v $(pwd):/backup alpine cp /data/argus.db /backup/
docker run --rm -v argus_brain_memory:/data -v $(pwd):/backup alpine cp /data/argus_memory.db /backup/- Security Vulnerabilities: Review our policy in
SECURITY.md. - Contributing: Guidelines, setup steps, and coding conventions are in
CONTRIBUTING.md. - Code of Conduct: Standards of engagement are in
CODE_OF_CONDUCT.md. - Changelog: Project evolution is tracked in
CHANGELOG.md.
Licensed under the MIT License. Copyright Β© 2026 Mohammed Yusuf Ahmed.