Skip to content

GenieBot is an advanced AI-powered automation assistant that integrates GitHub, Google Workspace, email, SMS, and real-time data services to streamline productivity using LangChain, LangGraph, and Google Generative AI

Notifications You must be signed in to change notification settings

khanak0509/GenieBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GenieBot πŸ€–

Flutter Python FastAPI Firebase LangChain LangGraph

A powerful multifunctional AI assistant with cross-platform mobile app powered by LangGraph

Features β€’ Tech Stack β€’ Architecture β€’ Installation β€’ Usage β€’ API


πŸ“– Overview

GenieBot is a comprehensive AI-powered automation and productivity platform that combines a Flutter mobile application with a FastAPI backend orchestrated by LangGraph and powered by LangChain and Google Generative AI. It seamlessly integrates with various services including GitHub, Google Workspace, communication platforms, and information services to provide intelligent automation capabilities through advanced agentic workflows.

🌟 Key Features

1. GitHub Integration πŸ”§

  • Repository Management: Fetch issues, pull requests, and repository files
  • File Operations: Create, update, and delete files and branches
  • Advanced Search: Code and issue search capabilities
  • Automation: Automated review request creation

2. Google Workspace Integration πŸ“Š

  • Google Calendar: View upcoming events, create & manage events
  • Google Forms: AI-powered form generation from topics
  • Email Automation: Automated email distribution of forms
  • Data Analysis: Response analysis via Google Sheets integration

3. Communication Tools πŸ“¨

  • Email Integration: Send emails via Gmail SMTP with professional composition
  • SMS Capabilities: Message dispatch through Twilio
  • Automated Notifications: Multi-channel notification support

4. AI & Knowledge Tools πŸ€–

  • Resume Analysis: Parse PDF resumes and generate LinkedIn content
  • Information Retrieval: Wikipedia queries and YouTube search
  • Real-time Data: Weather updates via OpenWeatherMap API
  • Smart Search: Tavily-powered web search integration

5. Cross-Platform Mobile App πŸ“±

  • Flutter-Based: Native performance on iOS, Android, Windows, Linux, macOS, and Web
  • Firebase Authentication: Secure user authentication
  • Real-time Sync: Cloud Firestore for real-time data synchronization
  • Modern UI: Intuitive and responsive user interface

πŸ›  Tech Stack

Backend

Technology Purpose Version
Python Core Backend Language 3.8+
FastAPI Web Framework Latest
LangChain LLM Framework Latest
LangGraph Agent Orchestration Latest
Google Generative AI LLM Provider (Gemini 2.0) Latest
Firebase Admin SDK Backend Firebase Integration Latest
Uvicorn ASGI Server Latest

Frontend

Technology Purpose Version
Flutter Cross-Platform Framework 3.8.1
Dart Programming Language 3.8.1+
Firebase Auth Authentication 6.0.1
Cloud Firestore Database 6.0.0
Firebase Core Firebase SDK 4.0.0

AI & ML Libraries

  • LangChain Community: GitHub Toolkit, Wikipedia, YouTube Search
  • LangChain Google Community: Calendar Toolkit
  • LangGraph: Agent workflows and checkpointing
  • PyPDF: PDF document processing

External APIs & Services

  • GitHub API: Repository and code management
  • Google Workspace APIs: Calendar, Forms, Sheets
  • Twilio: SMS messaging
  • OpenWeatherMap: Weather data
  • Tavily API: Web search
  • Gmail SMTP: Email sending

Database & Storage

  • SQLite: Local checkpointing and conversation history
  • Cloud Firestore: User data and chat history

Development Tools

  • Pydantic: Data validation
  • python-dotenv: Environment variable management
  • HTTPX: Async HTTP client
  • CORS Middleware: Cross-origin resource sharing

πŸ— Architecture

GenieBot uses a modern agentic AI architecture powered by LangGraph, which orchestrates complex multi-step workflows through a ReAct (Reasoning + Acting) agent pattern.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Flutter Mobile App                      β”‚
β”‚  (iOS, Android, Web, Windows, Linux, macOS)                 β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚  Auth UI     β”‚  Chat UI     β”‚  Profile & Settings  β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚ HTTP/REST API
                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   FastAPI Backend Server                    β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚           LangGraph Agent Orchestrator              β”‚    β”‚
β”‚  β”‚  β€’ ReAct Agent Pattern (Reasoning + Acting)         β”‚    β”‚
β”‚  β”‚  β€’ State Management & Checkpointing                 β”‚    β”‚
β”‚  β”‚  β€’ Multi-step Workflow Execution                    β”‚    β”‚
β”‚  β”‚  β€’ Tool Calling & Response Handling                 β”‚    β”‚
β”‚  β”‚  β€’ Powered by Google Gemini 2.0 Flash               β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ GitHub Tools β”‚ Google Tools β”‚ Communication Tools  β”‚     β”‚
β”‚  β”‚  - Issues    β”‚  - Calendar  β”‚  - Email (SMTP)      β”‚     β”‚ 
β”‚  β”‚  - PRs       β”‚  - Forms     β”‚  - SMS (Twilio)      β”‚     β”‚
β”‚  β”‚  - Files     β”‚  - Sheets    β”‚                      β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚   AI Tools   β”‚ Search Tools β”‚  Utility Tools       β”‚     β”‚
β”‚  β”‚  - Resume    β”‚  - Wikipedia β”‚  - Weather           β”‚     β”‚
β”‚  β”‚  - LinkedIn  β”‚  - YouTube   β”‚  - Date/Time         β”‚     β”‚
β”‚  β”‚              β”‚  - Tavily    β”‚                      β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
└─────────────────────┬──────────────────────────────────────-
                      β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                        β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚    SQLite     β”‚        β”‚   Firebase   β”‚
  β”‚  (LangGraph   β”‚        β”‚  Firestore   β”‚
  β”‚  Checkpoint)  β”‚        β”‚ (User Data)  β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Architecture Features:

  • LangGraph Orchestration: All agent interactions are managed through LangGraph's stateful workflow system, enabling complex multi-turn conversations with persistent state
  • ReAct Pattern: The agent uses Reasoning and Acting cycles to break down complex tasks into manageable steps
  • Checkpointing: SQLite-based checkpointing ensures conversation history and state persistence across sessions
  • Tool Integration: Seamless integration of 30+ tools through LangChain's toolkit system
  • Async Processing: FastAPI's async capabilities combined with LangGraph's streaming support for real-time responses

πŸ›  Prerequisites

Before running GenieBot, ensure you have:

For Backend:

  • Python 3.8+ installed
  • Git for version control
  • Google Cloud Platform account with API access
  • GitHub account with necessary permissions
  • Twilio account (for SMS features)
  • OpenWeatherMap API key
  • Tavily API key
  • Firebase project with Admin SDK credentials

For Frontend:

  • Flutter SDK 3.8.1+ installed
  • Dart SDK 3.8.1+
  • Android Studio or Xcode (for mobile development)
  • Firebase project configured for your app

⚑ Installation

Backend Setup

  1. Clone the repository:

    git clone https://github.com/khanak0509/GenieBot.git
    cd GenieBot
  2. Set up a virtual environment:

    python -m venv venv
    source venv/bin/activate   # On Windows: venv\Scripts\activate
  3. Install Python dependencies:

    pip install -r requirements.txt
  4. Configure API Keys:

    Create a .env file in the project root:

    # Google AI
    GOOGLE_API_KEY=your_google_api_key
    
    # GitHub
    GITHUB_APP_ID=your_github_app_id
    GITHUB_APP_PRIVATE_KEY=your_github_private_key
    GITHUB_REPOSITORY=your_repository
    
    # Twilio
    TWILIO_ACCOUNT_SID=your_twilio_sid
    TWILIO_AUTH_TOKEN=your_twilio_token
    TWILIO_PHONE_NUMBER=your_twilio_number
    
    # Email
    SENDER_EMAIL=your_email@gmail.com
    SENDER_PASSWORD=your_app_password
    
    # Weather
    OPENWEATHER_API_KEY=your_weather_api_key
    
    # Search
    TAVILY_API_KEY=your_tavily_api_key
  5. Set up Firebase Admin credentials:

    • Download your Firebase Admin SDK JSON file from Firebase Console
    • Place it in the project root (e.g., firebase-adminsdk.json)
    • Update the credential path in the Firebase initialization section of main.py
  6. Set up Google Cloud credentials:

    • Download your Google Cloud credentials JSON file
    • Configure according to Google API requirements

Frontend Setup

  1. Navigate to the project directory:

    cd GenieBot
  2. Install Flutter dependencies:

    flutter pub get
  3. Configure Firebase for Flutter:

    flutterfire configure

    Follow the prompts to set up Firebase for your platforms.

  4. Run the app:

    # For mobile development
    flutter run
    
    # For web
    flutter run -d chrome
    
    # For desktop
    flutter run -d windows  # or macos, linux

πŸš€ Usage

Starting the Backend Server

python main.py

The FastAPI server will start on http://localhost:8000

API Endpoints

Chat Endpoint

POST /chat
Content-Type: application/json

{
  "user_id": "user123",
  "query": "What's the weather in New York?"
}

Using the Mobile App

  1. Launch the app on your device
  2. Sign up or log in with your credentials
  3. Start chatting with GenieBot
  4. Use natural language to:
    • Check weather
    • Search information
    • Manage GitHub repositories
    • Create Google Forms
    • Send emails and SMS
    • And much more!

Example Queries

"What's the weather in London?"
"Search for Python tutorials on YouTube"
"Create a new issue in my repository"
"Generate a customer feedback form"
"Send an email to john@example.com about the meeting"
"Parse my resume and create LinkedIn content"
"What are the open pull requests in my repo?"

πŸ“‚ Project Structure

GenieBot/
β”œβ”€β”€ main.py                          # FastAPI backend entry point
β”œβ”€β”€ pubspec.yaml                     # Flutter dependencies
β”œβ”€β”€ lib/                             # Flutter source code
β”‚   β”œβ”€β”€ main.dart                    # App entry point
β”‚   β”œβ”€β”€ auth.dart                    # Authentication logic
β”‚   β”œβ”€β”€ chatbot.dart                 # Chat interface
β”‚   β”œβ”€β”€ profile.dart                 # User profile
β”‚   └── ...                          # Other UI components
β”œβ”€β”€ android/                         # Android platform code
β”œβ”€β”€ ios/                             # iOS platform code
β”œβ”€β”€ web/                             # Web platform code
β”œβ”€β”€ windows/                         # Windows platform code
β”œβ”€β”€ linux/                           # Linux platform code
β”œβ”€β”€ macos/                           # macOS platform code
β”œβ”€β”€ .env                             # Environment variables (not in repo)
β”œβ”€β”€ chatbot.db                       # SQLite database
└── README.md                        # This file

πŸ“± API Documentation

Once the backend is running, visit:

πŸ§ͺ Testing

Backend Tests

pytest tests/

Flutter Tests

flutter test

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


About

GenieBot is an advanced AI-powered automation assistant that integrates GitHub, Google Workspace, email, SMS, and real-time data services to streamline productivity using LangChain, LangGraph, and Google Generative AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •