π€ AI Sales Agent with Lead Generation
A conversational AI sales agent capable of interacting with users,
filtering products from Excel/PDF/TXT, capturing leads, and sending
real-time notifications using ntfy.sh.
Powered by OpenAI, Gradio, and a fully modular architecture.
β οΈ Note: This project is built for development and testing.
For production, ensure secure API keys, HTTPS, and proper rate
limiting.
π Features
- π¬ Natural AI chat using OpenAI function-calling\
- π Product filtering by name, min/max price\
- π₯ Lead capturing (email & phone)\
- π¨ Instant notifications via ntfy.sh\
- π Knowledge Base from Excel, PDF, and TXT\
- π¨ Beautiful Gradio UI with custom themes\
- π Centralized logging (file + console)\
- π§ͺ Full test coverage with pytest
π§ Tech Stack
Technology Version Description
Python 3.9+ Core language
OpenAI API Latest LLM & tool calling
Gradio 4.0+ Interactive UI
ntfy.sh API Real-time alerts
Pandas 2.0+ Excel loader
PyPDF Latest PDF parser
PyYAML Latest Config management
python-dotenv Latest Environment variables
βοΈ Prerequisites
Before running the project, ensure you have:
- π Python 3.9+\
- π¦ pip\
- π Git\
- π ntfy.sh topic (free)\
- π AI API key like OpenAI
π οΈ Installation
git clone https://github.com/yourusername/SalesFlow-AI.git
cd SalesFlow-AI
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtποΈ Edit .env file
- Rename
.env.samplefile to.env - Put your environment variables to it(like AI_API_KEY)
π Run Tests
python -m pytestβΆοΈ Run the Project
python -m appand then go to http://localhost:8000/
π‘ How It Works
- User starts the chat β Agent greets as AidenAI\
- Smart questions detect customer needs\
- Product filtering using
filter_productstool\ - Results explained naturally\
- Lead capture (email/phone)\
- Realβtime ntfy.sh alert\
- Logging saved in
logs/*.log
π§© Project Structure
files/
βββ info.pdf
βββ products.xlsx
βββ summary.txt
logs/
βββ *.log
src/
βββ agent.py
βββ tools.py
βββ data.py
βββ config.py
βββ logger.py
βββ ui.py
app.py
config.yaml
π Security Notes
- Keep API keys inside
.env\ - Change values in config.yaml
π‘ Future Improvements
- Vector search with ChromaDB\
- Database chat history\
- Lead analytics dashboard
π§βπ» Author
Developed by: ReZaiden
πΌ GitHub: @ReZaiden
π§ Contact: rezaidensalmani@gmail.com