A modern, full-stack chat application with AI integration, real-time communication, and persistent memory using Clerk, LiveKit, Groq, and Mem0.
- Google OAuth Integration: Seamless sign-in with Google accounts
- Email/Password Authentication: Traditional credential-based login
- Clerk: Latest authentication framework with session management
- LiveKit Integration: Real-time messaging with WebRTC
- AI-Powered Responses: Intelligent responses using Groq's LLM
- Persistent Memory: Context-aware conversations with Mem0
- Modern UI: Beautiful, responsive chat interface with message differentiation
- Create/Join Rooms: Dynamic room creation and management
- Participant Management: Add/remove participants from rooms
- Room Listing: Browse all active chat rooms
- Real-time Updates: Live participant and room status updates
- Contextual Conversations: AI remembers previous interactions
- User-specific Memory: Personalized responses based on chat history
- Memory Retrieval: Smart context injection for relevant responses
- Room-Specific Context: The specific room holds the context of the user. Even if you leave and join again, it holds the context and all the memories. New chat interactions are saved back into the memory store for continuous improvement.
- Next.js 14: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- Clerk: Authentication
- LiveKit React: Real-time communication components
- Lucide React: Modern icon library
- Python Flask: Lightweight web framework
- Groq: Fast LLM inference
- Mem0: Memory and context management
- LiveKit Server SDK: Real-time communication backend
- Node.js 18+ and npm/pnpm
- Python 3.8+
- Clerk account
- LiveKit Cloud account or self-hosted LiveKit server
- Groq API key
- Mem0 API key
git clone <repository-url>
cd FluentAicd client
npm install
# or
pnpm installCopy the environment template and configure:
cp .env.example .env.localEdit .env.local with your configuration:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_API_BASE_URL=https://fluentai-h2hq.onrender.com
NEXT_PUBLIC_LIVEKIT_URL=wss://your-livekit-server-urlcd server
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtCopy the environment template and configure:
cp .env.example .envEdit .env with your configuration:
GROQ_API_KEY=your-groq-api-key
MEM0_API_KEY=your-mem0-api-key
MEMO_ORG_ID=your-mem0-org-id
MEMO_PROJECT_ID=your-mem0-project-id
LIVEKIT_API_KEY=your-livekit-api-key
LIVEKIT_API_SECRET=your-livekit-api-secret
LIVEKIT_URL=wss://your-livekit-server-urlStart the backend server:
cd server
venv\Scripts\activate
python app/main.pyStart the frontend development server:
cd client
npm run dev
# or
pnpm devVisit http://localhost:3000 to access the application.
- Visit the application and click "Continue with Google" or use email/password
- Complete the authentication flow
- Navigate to "Rooms" to see active rooms
- Click "Create New Room" to start a new conversation
- Join existing rooms by clicking "Join Room"
- Send messages in any room
- AI will respond with contextual, memory-aware replies
- Previous conversations are remembered for personalized responses
- Click the users icon next to any room to manage participants
- Remove participants or view room activity
The application uses Mem0 for persistent memory:
- User Context: Each user has their own memory space
- Conversation History: Previous interactions are stored and retrieved
- Smart Retrieval: Relevant context is injected into AI responses
- Personalization: Responses become more personalized over time
β Frontend:
β Backend:
cd client
vercel --prodcd server
vercel --prod- Upcoming Participant Management: The room will remember the individual context of two separate users, allowing multiple people to chat in the room at the same time.
- Speech-to-Text/Text-to-Speech: The system will be extended with speech-to-text or text-to-speech services.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the setup instructions
Built with β€οΈ using Next.js, Flask, and modern AI technologies. A real-time, memory-enhanced AI chat agent. Using LiveKit for seamless chat and a RAG system like mem0 to provide contextual, personalized conversations that remember past interactions.