Chatbot experiments
A WhatsApp bot answered by Claude
Summary
The tests I ran before the production Telegram bot: a backend that receives WhatsApp messages through Meta's webhook, keeps each conversation's recent history and answers with Claude.
Python, FastAPI and the Anthropic SDK.
What it is
A small FastAPI backend for WhatsApp. One endpoint answers Meta's webhook verification; the other receives incoming messages, parses Meta's payload, keeps the last 20 messages of each conversation in memory and replies with Claude. It can be tested without Meta credentials by simulating the webhook with curl, and exposed through ngrok when it's time to connect the real number.
Why it exists
These were the tests I ran before building the Telegram bot that is now in production. For now Claude's reply shows up in the server log; sending replies back through Meta is left for when the real credentials are in place.