by ilanbenb
A WhatsApp bot that can participate in group conversations, powered by AI. The bot monitors group messages and responds when mentioned.
# Add to your Claude Code skills
git clone https://github.com/ilanbenb/wa_llm
AI-powered WhatsApp bot that joins any group, tracks conversations, and generates intelligent summaries.
pgvectorlocalhost:8000/docs)This project includes multiple Docker Compose files for different environments:
| File | Purpose | Usage |
| ------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------ |
| docker-compose.yml | Default/Development. Builds the application from source code. | docker compose up -d |
| docker-compose.prod.yml | Production. Uses pre-built images from GHCR. Recommended for deployment. | |
| | . For running the app on host while services run in Docker. | |
| | . Contains shared service definitions. | โ |
No comments yet. Be the first to share your thoughts!
docker compose -f docker-compose.prod.yml up -ddocker-compose.local-run.ymldocker compose -f docker-compose.local-run.yml up -ddocker-compose.base.ymlpgvector extensiongit clone https://github.com/YOUR_USER/wa_llm.git cd wa_llm
.env.example to .env and fill in required values.cp .env.example .env
| Variable | Description | Default |
| ------------------------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| WHATSAPP_HOST | WhatsApp Web API URL | http://localhost:3000 |
| WHATSAPP_BASIC_AUTH_USER | WhatsApp API user | admin |
| WHATSAPP_BASIC_AUTH_PASSWORD | WhatsApp API password | admin |
| VOYAGE_API_KEY | Voyage AI key | โ |
| DB_URI | PostgreSQL URI | postgresql+asyncpg://user:password@localhost:5432/postgres |
| LOG_LEVEL | Log level (DEBUG, INFO, ERROR) | INFO |
| ANTHROPIC_API_KEY | Anthropic API key. You need to have a real anthropic key here, starts with sk-.... | โ |
| LOGFIRE_TOKEN | Logfire monitoring key, You need to have a real logfire key here | โ |
| DM_AUTOREPLY_ENABLED | Enable auto-reply for direct messages | False |
| DM_AUTOREPLY_MESSAGE | Message to send as auto-reply | Hello, I am not designed to answer to personal messages. |
Option A: Development (Build from source)
docker compose up -d
Option B: Production (Use pre-built images)
docker compose -f docker-compose.prod.yml up -d
docker compose restart wa_llm-web-serveropen pgAdmin or any other posgreSQL admin tool
connect using | Parameter | Value | | --------- | --------- | | Host | localhost | | Port | 5432 | | Database | postgres | | Username | user | | Password | password |
run the following update statement:
UPDATE public."group"
SET managed = true
WHERE group_name = 'Your Group Name';
Restart the service: docker compose restart wa_llm-web-server
Swagger docs available at: http://localhost:8000/docs
Users can control whether they are tagged in bot-generated messages (summaries, answers) by sending Direct Messages (DMs) to the bot:
| Command | Description |
| :-------- | :--------------------------------------------------------------------------------- |
| opt-out | Opt-out of being tagged. Your name will be displayed as text instead of a mention. |
| opt-in | Opt-in to being tagged (default). |
| status | Check your current opt-out status. |
Note: This only affects messages generated by the bot. It does not prevent other users from tagging you manually.
To deploy in a production environment using the optimized configuration:
Create Production Environment File:
Copy .env.example to .env.prod and configure your production secrets.
cp .env.example .env.prod
Start Services:
docker compose -f docker-compose.prod.yml up -d
This configuration includes:
restart: always)Install dependencies using uv:
uv sync --all-extras --dev
The project uses Poe the Poet for task automation with parallel execution:
# Run all checks (format, then parallel lint/typecheck/test)
uv run poe check
# Individual tasks
uv run poe format # Format code with ruff
uv run poe lint # Lint code with ruff
uv run poe typecheck # Type check with pyright
uv run poe test # Run tests with pytest
# List all available tasks
uv run poe
The check command runs formatting first, then executes linting, type checking, and testing in parallel for faster execution.
app/main.pysrc/whatsapp/client.pysrc/handler/__init__.pysrc/models/The project consists of several key components: