BridgeAI is a hybrid AI assistant that delivers high-quality, cloud-powered inference when internet connectivity is available while providing instant, offline answers through a lightweight local model when connectivity is limited. It ensures knowledge accessibility even in low-connectivity environments. Brief project Video Link - https://youtu.be/O5ar4QmJpBM
- Problem Statement
- Solution Overview
- System Architecture
- Workflow & User Scenario
- Handling Internet Outages
- Unique Features
- Suggested Use Cases
- Quick Start / Installation
- BridgeAI & Hosting
- License & Acknowledgments
- Communities such as students, researchers, NGOs, and local governments often face slow or unreliable internet connectivity.
- Current AI assistants are either:
- Fully cloud-based → require fast, reliable internet.
- Fully local → limited intelligence and cannot handle large datasets.
- Gap: There is no hybrid assistant that prioritizes advanced online reasoning but can fall back to offline mode when necessary.
BridgeAI bridges this gap using three integrated layers:
-
Online Layer (LLaMA 3 via Cerebras API)
- Handles complex queries, long-context reasoning, and advanced computation.
- Lightning-fast inference powered by Cerebras Cloud.
- Provides enhanced answers with structured guidance, references, and deep reasoning.
-
Offline Layer (LLaMA 2, Chat-Optimized Quantized Model)
- Lightweight, quantized version optimized for chat.
- Handles FAQs, factual questions, and lightweight queries when connectivity is unavailable.
- Runs locally in a Docker container with instant inference.
-
Docker MCP Gateway
- Orchestrates queries between online and offline layers.
- Detects network availability and switches automatically to offline fallback.
- Logs queries, caches responses, and ensures seamless hybrid operation.
BridgeAI consists of three main layers:
- Frontend Layer: React-based UI for query input and response display.
- Backend Layer: FastAPI service receives requests and forwards them to MCP Gateway.
- MCP Gateway Layer:
- Decision engine for online/offline routing
- Query logging and caching
- Metadata management
and using the AI Models:
- Online: LLaMA-3.3-70b via Cerebras API
- Offline: LLaMA-2 Chat-Optimized Quantized model
- Submitted via frontend (React UI).
- FastAPI receives the query and forwards it to the MCP Gateway.
- Internet available: LLaMA 3 online handles the query.
- Internet unavailable: LLaMA 2 offline handles the query.
- MCP Gateway sends the response back to the frontend.
- Offline responses are cached locally.
- Cached responses can be optionally enriched by LLaMA 3 once internet connectivity is restored.
Example Query:
"The number of World Cups won by Argentina."
Steps:
- User submits the query via the React frontend.
- Backend (FastAPI) sends the query to MCP Gateway.
- MCP Gateway checks connectivity → online first, offline fallback.
- Response is returned to frontend.
- Offline responses are logged for optional later enhancement.
- Offline Mode: LLaMA 2 chat-optimized model provides instant local answers.
- Caching: Queries are stored locally for enrichment once connectivity is restored.
- Online Enhancement: Cached offline responses can be enriched by LLaMA 3 for detailed reasoning when internet is available.
- Online-first, offline-fallback: Ensures optimal performance in any connectivity scenario.
- LLaMA 2: Offline survival brain, chat-optimized, quantized, instant inference.
- LLaMA 3: Online superbrain via Cerebras API, lightning-fast reasoning.
- Docker MCP Gateway: Orchestrator, query logger, and metadata manager.
- Fully hybrid workflow: Resilient, smart, portable.
- Tracks queries, caches responses, and enhances answers intelligently.
Helps students and NGOs quickly gather information, summaries, and insights for research projects and reports.
Supports teachers and students by providing interactive learning content, explanations, and study guidance.
Provides citizens with easy access to information, forms, guidelines, and government resources.
Airplane mode? Still functional!
Never shows "No internet connection" error
- Docker Desktop: https://www.docker.com/products/docker-desktop
- Python 3.11+ (if running locally)
- Visual Studio Community 2022 with C++ Desktop Development workload (for compiling dependencies as llama.cpp framework is used for offline model)
- Cerebras API Key: https://cloud.cerebras.ai/
This method uses the provided batch scripts for automated setup.
# Run initial setup
setup.bat
# Downloads LLaMA 2 model (~4GB) and configures environment
# Start the app
start.bat
# Builds Docker images (~5-10 min) and opens browser automatically
# Don't forget to shut down all containers and images after use
stop.batFor users who want to manually setup Docker containers and run BridgeAI.
# Build all images for frontend, backend, and MCP Gateway
docker-compose build- Start Services
# Start all containers in foreground
docker-compose up
# Start all containers in background (detached)
docker-compose up -d- Stop Services
# Stop all running containers
docker-compose down- Cancel or Restart
# Rebuild containers after changes
docker-compose up --build
# View live logs for debugging
docker-compose logs -fWe haven't hosted BridgeAI online, and we have a Reason for that. Unlike other kinds of AI applications, what makes our BridgeAI unique is its Hybrid-Performance. The offline quantized LlaMa model which acts as a fallback when our online system fails, is an integral part of our setup. Right now we have included the model as a Volume Mount, rather than mounting it directly. we have decided to do so to keep the docker images lighter and for ease of use in the hackathon point-of-view. As such, hosting can't be done in this configuration.
We plan on continuing our work on BridgeAI, even after the end of the hackathon. We are planning to implement Doc Uploads, Chat History, and more to this platform. Our Ultimate goal is to host BridgeAI as an app.
This project is licensed under the MIT License. See the LICENSE file for details.
- Developed by: Team Cyber_Samurais for WeMakeDevs FutureStack GenAI Hackathon 2025
- AI Models & Tools:
- Meta (LLaMA)
- Cerebras (cloud API)
- Frameworks & Libraries:
- Docker
- FastAPI
- React
- Community & Contributors: Thank you to all open-source communities and contributors whose tools and libraries made this project possible.