The problem: shops don't lose customers on price, they lose them in the inbox

Every shop, from a home bakery on Facebook to a busy store with thousands of followers, has the same leak. A customer sends a message: "How much is the chocolate cake? Do you deliver to Mirpur? Are you open on Friday?" Then they wait.

The owner is baking, packing, driving, or asleep. The same five questions arrive a hundred times a day on Telegram, Messenger and WhatsApp. By the time someone replies, the customer has already bought from the shop that answered first. They rarely come back.

Bigger shops have it worse, not better: more followers means more messages, and hiring people to sit in the inbox all day is expensive. Growth turns into lost customers. The shops with the most demand are the ones that can't keep up with it.

What ShopPilot does

1. An AI assistant that answers every customer in seconds, day and night

  • It replies on the shop's own Telegram bot and Facebook Page (Messenger).
  • It uses the shop's real data: products, prices, stock, delivery charges, payment options and opening hours. Change a price, and the next answer already uses it.
  • It answers in Bangla, English or Banglish, the way customers actually write.
  • It never invents a price or a promise. When it doesn't know, or when a customer wants to place an order, it hands the chat to the owner.

2. An inbox built around "who needs me right now"

  • Every connected app has its own tab.
  • Chats the AI handed over are pinned at the top under "Needs you", so the owner never has to search for them.
  • It follows Messenger's 24-hour reply window, so the owner never sends a message Facebook will reject.

3. A shop page customers can find

  • Every shop gets a public page with products, prices, a map with directions, and one button for each app the shop connected ("Ask or order on Telegram / Messenger").
  • It is built for Google and for link previews on Facebook and WhatsApp.

4. Customers who come back

  • Customers can follow a shop and get a feed of its posts, with push notifications.
  • AI social posts: the owner picks a product, and the AI writes a post from the product's real details. The owner checks it, then publishes it to the Facebook Page and to the shop's followers with one click.

5. Setup a shop owner can actually do

  • No tokens to copy and no developer settings: just "Connect with Facebook", pick the Page, and press Allow.
  • ShopPilot warns the owner before a Facebook connection expires.

How we built it

  • Backend: FastAPI (fully async), PostgreSQL with pgvector, Redis, and Celery workers for the AI replies, memory and push notifications.
  • The AI: an agent loop with tools. The agent searches the shop's knowledge with hybrid retrieval: vector search plus BM25 keyword search, re-ranked with FlashRank. Short-term and long-term conversation memory lets it remember each customer. A handoff_to_owner tool passes chats to the owner.
  • Multi-tenancy: a tenant guard scopes every query to one shop, so one shop's customers, chats and products can never leak to another.
  • Channels: Telegram Bot API and the Messenger Platform. Webhooks are signature-checked, and Facebook Login (OAuth) connects a Page.
  • Website: server-rendered Jinja pages that work without JavaScript, with Leaflet + OpenStreetMap maps.
  • Infrastructure: Docker Compose with two app replicas behind nginx (rate limiting, security headers, HTTPS with Let's Encrypt). It deploys to an Azure VM on every push with GitHub Actions.
  • Quality: 800+ automated tests run against a real PostgreSQL database. Every external service (Telegram, Meta, the LLM, push) is faked in tests, so no test ever messages a real customer.

Challenges we ran into

  • Making Facebook simple for non-technical owners. Page tokens, permissions, expiring access and webhook setup are hard even for developers. We hid all of it behind one "Connect with Facebook" button. ShopPilot checks the token itself, subscribes the Page's webhook automatically, and warns before access expires.
  • An AI that must not make things up. A wrong price costs a shop money and trust. The agent only answers from the shop's own data, and hands the chat to a human whenever it is unsure.
  • Keeping shops apart. With many shops in one database, a single missing filter could show one shop's customers to another. A tenant guard makes the database refuse unscoped queries.
  • Deploying for real. Moving from a laptop to a public HTTPS server meant solving file permissions, static files behind nginx, certificates and map tiles.

Accomplishments that we're proud of

  • A shop goes from sign-up to an AI answering its real customers in a few minutes.
  • The owner stays in control: the AI never publishes a post, and never closes a sale, without the owner.
  • It runs live on a real server, with automatic deploys and a large test suite behind it.

What we learned

  • Most of the work in an AI product is not the model call. It is everything around it: the right data, knowing when to stop and ask a human, and a setup a shop owner can finish without help.
  • Platform rules (Messenger's 24-hour window, permissions, token lifetimes) shape the product as much as the features do.

What's next for ShopPilot

  • WhatsApp and Instagram, the two other places customers message shops.
  • An owner assistant: the owner simply says "post about our Friday offer" or "which cakes are out of stock?", and it does the work.
  • Orders and payments (bKash and Nagad) inside the chat, and a daily summary of what customers asked.

Built With

Share this project:

Updates