AI · Automation
AzirbotAI sales agent for Instagram, Facebook and WhatsApp
My role
Web & applications developer at Azirgo SAS. I worked on the platform's backend, its AI and semantic-search integration, and the admin dashboard.
The problem
An unanswered comment is a sale going cold. People ask for the price in public on Instagram and Facebook, and by the time somebody replies the interest has passed. Answering each comment by hand, opening the DM and moving the conversation to WhatsApp does not scale: the business loses sales after hours and repeats the same answers all day long.
What I built
- Comment detection on Instagram and Facebook by keyword or pattern, with a public reply and an automatic DM within seconds.
- Unified inbox: Instagram DMs, Messenger and WhatsApp chats in one place.
- Buttons that open WhatsApp with the message pre-written, so the follower is not lost in the channel switch.
- Lead capture with a 0-100 % interest score computed by the AI (cold, warm, hot or very hot), keeping the source post and the full history.
- Automatic extraction of name, phone, email and interest from the conversation itself, with no forms.
- Visual flow builder: triggers on comment, DM or lead; conditions by keyword, channel or schedule; actions that reply, tag and route.
- Catalogue with semantic search: it understands “something blue for summer” and recommends the real product with its price.
- Real-time funnel metrics and which post brings in the most leads.
- Multi-tenant platform on a NestJS REST API, with Prisma and PostgreSQL.
The dashboard
The admin panel is a Next.js app that talks to the NestJS API over REST at /api/v1 through a single fetch client, with TanStack Query caching and refreshing every view. The bot's script does not live in the panel's code: workflows are drawn on a React Flow canvas and saved as-is, as the graph JSON the API's engine runs.
- Every request carries the JWT as a Bearer token plus an x-workspace-id header, so the API keeps each business's data apart; sessions last 14 days, renew when the panel opens and a 401 sends the user back to login.
- The inbox merges Instagram, Messenger and WhatsApp, refreshes the list every 15 s and the open thread every 8 s, labels who replied (chatbot or a person) and lets the team pause the bot per conversation with automatic reactivation.
- The editor is built on @xyflow/react: several triggers per flow, conditions and actions, and Claude or ChatGPT nodes that query catalogues, read images and transcribe voice notes.
- Before a flow goes live it can be run in a simulator that only records what it would do, and every real run lands in a step-by-step history with the model and tokens used.
- The statistics (KPIs, 14-day activity, comment-to-lead funnel and the AI interest thermometer) are drawn with Recharts.
- Catalogues are indexed in Qdrant with text-embedding-3-small embeddings, and the panel includes a box to test the meaning-based search.
Inside the site

Dashboard overview: KPIs, 14-day activity and the comment-to-lead funnel (sample data). 
Unified inbox with a WhatsApp conversation handled by the chatbot and a sales rep (sample data). 
Visual workflow editor: triggers, conditions and AI nodes (sample data). 
Claude node settings: the agent's instructions and the catalogues it searches (sample data). 
Leads with channel, status and the interest score computed by the AI (sample data). 
Product catalogue with the semantic-search test (sample data). 
Site: practical guides organised by sales bottleneck. 
Site: industry landing, AI agent for clinics and practices.
The admin panel
Each module covers one part of the day-to-day operation, without leaving the panel.
Overview
KPIs for automations, comments, reply rate, leads and unanswered conversations, with 14-day activity, the comment-to-lead funnel and the AI lead thermometer.
Unified inbox
Instagram DMs, Messenger and WhatsApp in one list. Every reply shows whether the chatbot or which team member wrote it, and the bot can be paused per conversation to hand over to a person.
Visual workflow editor
A canvas with triggers on comment, DM or new lead, conditions (keyword, business hours, weekday, channel, regex) and actions that reply, tag, add notes or pause the bot. Several triggers per flow.
AI nodes
Replies with Claude or ChatGPT using custom instructions, model, temperature and product catalogues; they read images, transcribe voice notes and can split a reply into several messages.
Simulator, run history and AI usage
Test a flow with sample messages without sending anything, inspect each run step by step and see tokens and estimated cost per model over 7, 14 or 30 days.
Catalogues with semantic search
Products with price, category and attributes indexed in Qdrant with OpenAI embeddings, with reindexing and a box to test what the AI would find.
AI-scored leads
One record per contact with channel, status (new, contacted, customer, discarded), a 0-100 % interest score computed by the AI and the data the AI captured from the conversation.
Comment automations
A keyword in an Instagram or Facebook comment triggers a public reply, a DM and a card with link buttons, per post and without repeating to the same user within a window.
Workspaces and permissions
Each business in its own workspace, with owner, admin and member roles and permissions per section and per action (send from the inbox, edit or simulate workflows, publish).
Connections and credentials
Meta apps and Instagram, Facebook and WhatsApp accounts (official API or WAHA via QR), AI keys encrypted on the server and an API other systems use to send WhatsApp messages.
Technical decisions
- Semantic search with Qdrant and OpenAI embeddings over the catalogue, so the agent answers with products that actually exist, priced, instead of improvising them.
- Meta's official API with encrypted tokens as the main path, rather than unofficial automation that breaks or gets the account banned. WAHA stays as an optional self-hosted WhatsApp transport, paired by QR code and with anti-ban limits: it never starts a conversation, respects the reply window and caps messages per contact.
- The flow is configured on a visual canvas, not in code: whoever knows the business can change the script without waiting for a deploy.
- Multi-tenant by design, so each business keeps its own catalogue, tone and context without separate instances.
- Traceability and logs for every action, because an agent acting on its own across social accounts has to be auditable.
Challenges
- Keeping the model inside the catalogue and the business rules so it never invents products or conditions.
- Holding the thread of a conversation that starts as a public comment, continues in a DM and ends on WhatsApp.
- Working within Meta's API limits and permissions without degrading response time.
- Separating context cleanly between businesses on a shared platform.
Result
Azirbot is in production as its own product at azirbot.ai, with agents tailored per industry (e-commerce, clinics, real estate, beauty), handling comments and conversations without a human touching every message.
