chatbot-with-vector-store-memory-mcp-tools-and-voice-mode
This project features an AI chatbot that serves as a sophisticated study companion, utilizing vector store memory and MCP tools. It allows for interactive conversations in both text and voice formats, providing a personalized learning experience. The system includes long-term memory capabilities and efficient similarity search for context retrieval.
GitHub Stars
1
User Rating
Not Rated
Favorites
0
Views
24
Forks
0
Issues
0
AI Chatbot with Vector Store, Memory and MCP tools
A sophisticated AI-powered study companion chatbot that leverages advanced AI capabilities with vector store memory retention and Model Context Protocol (MCP) integration. This project combines modern technologies for both backend and frontend to deliver a seamless learning experience with both text and voice chat capabilities.
Text Chat
https://github.com/user-attachments/assets/647acc87-2a20-4245-8959-ef824399eede
Tavily MCP
https://github.com/user-attachments/assets/16d6501f-eca0-44b2-ab77-d87791a9651b
Firecrawl MCP
https://github.com/user-attachments/assets/aa3be5c2-c964-414c-aff0-5e1b75a7d232
Voice Mode
https://github.com/user-attachments/assets/8c47e61d-8eee-48d5-afe0-2fe3cb03f169
π Features
- Chat Interface: Interactive text-based conversation with AI study assistant
- Voice Chat Support: Real-time voice communication using LiveKit
- Memory Retention: Long-term memory system for personalized learning interactions
- Vector Store Integration: Efficient similarity search and context retrieval
- MCP Integration: Model Context Protocol for enhanced AI capabilities
- Flutter Web Support: Web browser support
- User Authentication: Secure login and session management
- Web Search Integration: Real-time web search capabilities via Tavily
- Document Processing: File handling and document analysis
- LLM model: cas/llama-3.2-1b-instruct:latest
- Embedding model: nomic-embed-text:latest
π Technology Stack
Backend
- Node.js: Runtime environment
- TypeScript: Primary programming language
- LangGraph: AI conversation flow orchestration
- LangChain: AI framework for language models
- OpenAI: Large language model integration
- LiveKit: Real-time voice/video communication
- Mem0: Advanced memory system for conversation context
- SQLite: Database with Sequelize ORM
- Tavily: Web search and research capabilities
- MCP (Model Context Protocol): Enhanced AI agent capabilities
- Firecrawl: Web scraping and content extraction
- JWT: Authentication and authorization
Frontend
- Flutter: Cross-platform UI framework
- Dart: Programming language for Flutter
- BLoC Pattern: State management architecture
- LiveKit Client: Real-time communication client
- WebRTC: Voice and video communication
- HTTP: API communication
- Go Router: Navigation management
π Prerequisites
- Node.js (v18 or higher)
- Flutter SDK (latest stable version)
- Git
π§ Installation
Backend Setup
Navigate to the backend directory:
cd backendInstall dependencies:
npm installSet up environment variables:
cp .env.example .env # Edit .env with your configuration including: # - OpenAI API key # - LiveKit credentials # - Tavily API key # - JWT secretBuild the project:
npm run buildStart the development server:
npm run dev
Frontend Setup
Navigate to the frontend directory:
cd frontendGet Flutter dependencies:
flutter pub getRun the application:
flutter run
π Project Structure
.
βββ backend/
β βββ src/
β β βββ app.ts # Express application setup
β β βββ chat_agent.ts # AI chat agent implementation
β β βββ clients/ # MCP clients (Firecrawl, Tavily)
β β βββ config/ # Configuration files
β β βββ controllers/ # Route controllers
β β βββ middleware/ # Authentication middleware
β β βββ models/ # Data models
β β βββ routes/ # API routes
β β βββ services/ # Business logic services
β β βββ tools/ # AI tools and utilities
β βββ package.json # Node.js dependencies
β βββ database.sqlite # SQLite database
βββ frontend/
β βββ lib/
β βββ features/ # Feature-based architecture
β β βββ auth/ # Authentication feature
β β βββ chat/ # Text chat feature
β β βββ livekit/ # Voice chat feature
β βββ common/ # Shared utilities and widgets
β βββ core/ # Core configurations
β βββ layout/ # App layout components
β βββ main.dart # Application entry point
π± Features Overview
Authentication System
- Secure user registration and login
- JWT-based session management
- Protected routes and middleware
Chat System
- Real-time text messaging
- AI-powered responses with context awareness
- Message history and persistence
- Custom chat UI with Material Design
Voice Chat
- Real-time voice communication
- LiveKit integration for high-quality audio
- Voice-to-text and text-to-voice capabilities
- Cross-platform voice support
Memory & Context
- Vector store for efficient information retrieval
- Long-term conversation memory
- Personalized learning experiences
- Context-aware responses
AI Capabilities
- OpenAI integration for advanced language processing
- Web search integration via Tavily
- Document processing and analysis
- MCP protocol for enhanced AI features
π API Endpoints
Authentication
POST /api/auth/login- User loginPOST /api/auth/register- User registration
Chat
POST /api/chat/message- Send chat messageGET /api/chat/history- Get chat history
LiveKit
POST /api/livekit/token- Generate LiveKit access tokenPOST /api/livekit/start- Start LiveKit sessionPOST /api/livekit/stop- Stop LiveKit sessionPOST /api/livekit//record_message- Record transcript message
π License
This project is licensed under the BSD-3-Clause license License - see the LICENSE file for details.
π₯ Authors
Created by Oleksandr Samoilenko
Extrawest.com, 2025
Framework for building and managing multi-agent systems with Model Context Protocol (MCP) and LangGraph support. Features a modern React UI, JWT-secured agent communication, and dynamic LLM provider integration (OpenAI, Azure, Google). Easily create, configure, and monitor agents that connect to external toolsβall from a single interface.