InstaFuel_Chatbot_public/README.md
2026-04-21 11:57:37 +05:30

2.4 KiB

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

# 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_db and MOTHERDUCK_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
  • 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 any user_context payload sent in the request. Provide JSON to have fields tracked individually; repeated keys keep the value from the newest message timestamp. A user_id is created the first time you hit the API, and every response now returns both user_id and conversation_id. Include both IDs on follow-up calls—if the pair doesn't match what's on disk the API returns 403 Conversation ID does not belong to the provided user.

License

Proprietary - InstaFuel Brand