mirror of
https://github.com/vee1e/InstaFuel_Chatbot_public.git
synced 2026-09-01 18:57:24 +00:00
| config | ||
| data | ||
| docs | ||
| frontend | ||
| scripts | ||
| src | ||
| tests | ||
| .gitignore | ||
| api_usage.md | ||
| available_models.md | ||
| chat.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| prototype_flow.py | ||
| README.md | ||
| report.md | ||
| requirements.txt | ||
| run.sh | ||
| run_chat.py | ||
Fitness Supplement Multi-Agent Chatbot System
Overview
A comprehensive multi-agent chatbot system designed for an e-commerce fitness supplements brand, built with Google ADK (Agent Development Kit) and agentic workflows using Google Cloud AI Platform and Vertex AI. sc
Key Features
- Friendly & Motivational Tone: Like a fitness coach
- Real-time Order Tracking: E-commerce API integration
- Personalized Recommendations: Goal-based supplement stacks
- Comprehensive Knowledge Base: Products, FAQs, usage guides
- Performance Analytics: Conversion tracking and optimization
KPIs
- Conversion rates
- Customer satisfaction scores
- Support load reduction
- Response accuracy
Quick Start
Simple Chat Mode (Recommended for testing)
# Install dependencies
pip install -r requirements.txt
# The .env file is already configured with your API key
# Run the simple chat interface
python run_chat.py
Run automated checks
pytest
Full Agent System (Advanced)
# For the complete multi-agent system
uvicorn src.api.server:app --host 0.0.0.0 --port 8000 --reload
Manual Chat
# Direct chat with Google Gemini
python chat.py
Chat persistence with DuckDB
- Conversations and user context are persisted automatically in a DuckDB database. The store supports multiple deployment options:
- Local file:
data/chat_store.duckdb(default) - MotherDuck cloud: Set
CHAT_STORE_PATH=md:my_dbandMOTHERDUCK_TOKEN=<token> - S3: Set
CHAT_STORE_PATH=s3://bucket/path/chat.duckdb(requires AWS credentials) - EC2/NFS: Mount shared storage and set
CHAT_STORE_PATH=/mnt/shared-storage/chat.duckdb
- Local file:
- The CLI (
run_chat.py) now exposes a:context {"goal": "lean bulk"}command so you can insert structured context without sending a model prompt. Stored context is injected into every downstream QueryEngine call. - The FastAPI endpoint (
POST /chat) stores every turn along with anyuser_contextpayload sent in the request. Provide JSON to have fields tracked individually; repeated keys keep the value from the newest message timestamp. Auser_idis created the first time you hit the API, and every response now returns bothuser_idandconversation_id. Include both IDs on follow-up calls—if the pair doesn't match what's on disk the API returns403 Conversation ID does not belong to the provided user.
License
Proprietary - InstaFuel Brand