Skip to content

hasnainXdev/ai_chatbot_base_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Customer Support Bot Base Code

Built because small businesses are drowning in the same 10 questions. Every. Single. Day.


😤 The Pain

A salon owner in Karachi gets 80 WhatsApp messages daily. A real estate agent in Lahore misses leads at 2am because he's asleep. A clinic receptionist spends 4 hours a day copy-pasting the same answers.

"What are your hours?" "How much does it cost?" "Do you have availability tomorrow?"

Same questions. Different customers. Every day. Forever.

They can't afford a full-time support agent. They don't have a tech team. They just need someone or something to answer.

That's why I built this.


🧠 What This Is

A reusable AI customer support agent base built for small to medium businesses in Pakistan (and anywhere else).

One codebase. Swap the business logic via config. Deploy per client.

Built with:

  • Python core language
  • FastAPI lightweight API layer
  • LangGraph agent state management
  • LangChain LLM orchestration
  • Gemini Flash fast, cheap, multilingual LLM
  • python-telegram-bot Telegram channel (WhatsApp Business API ready to plug in)

⚙️ Architecture

channels/          → Telegram, WhatsApp (swappable, plug in either)
agent/             → LangGraph agent logic (business-agnostic)
config/            → .env per client (name, hours, FAQs, booking link)
prompts/           → System prompt templates

Key design decision: Channel layer is completely separate from agent logic. Swap Telegram → WhatsApp without touching a single line of agent code.


🚀 How To Use This Base

  1. Clone the repo
  2. Duplicate for each client never touch base code
  3. Fill .env with client's business details
  4. Customize system prompt with their FAQs, pricing, hours
  5. Deploy on Render or Koyeb
  6. Done
git clone https://github.com/yourusername/ai-support-bot-base
cd ai-support-bot-base
cp .env.example .env
# Fill in your client's details
pip install -r requirements.txt
python main.py

🔧 .env Config

BUSINESS_NAME=Your Business Name
BUSINESS_HOURS=9am - 6pm PKT
BOOKING_LINK=https://yourbusiness.com/book
FAQ_1=What services do you offer?
FAQ_2=What are your prices?
GEMINI_API_KEY=your_key_here
TELEGRAM_BOT_TOKEN=your_token_here

🌍 Multilingual Support

Gemini Flash handles Arabic, Urdu, English out of the box. Set the language instruction in the system prompt bot auto-detects and responds accordingly.


📦 Why Not Just Use Dialogflow / Intercom / Tidio?

Because those tools cost $50-$200/month per business. A salon owner making PKR 80,000/month isn't paying that.

This costs them a one-time setup fee and a small monthly maintenance. They get 24/7 support. You get a client.


🛣️ Roadmap

  • Telegram channel
  • WhatsApp Business API integration
  • Conversation memory across sessions
  • Fallback escalation to human agent
  • Web widget channel
  • Admin dashboard per client

👤 Built By

Muhammad 16 year old full-stack AI developer from Karachi, Pakistan. Building real solutions for real businesses. One client at a time.


For developers: Fork it, use it, improve it. For businesses: DM me. I'll set it up for you.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages