MentorAgents is an AI-powered platform where users interact with agents modeled after legendary real-world expertsβlike Naval Ravikant and Warren Buffett.
Ask questions, get tailored guidance, and learn from the best minds β anytime, anywhere.
- β¨ Key Features
- π Tech Stack
- π Getting Started
- π€ Mentor Profiles
- π¬ How It Works
- π§ Memory System
- π§ Configuration
- π€ Contributing
- π License
- π§ Contact & Support
- π― Legendary Mentor AI Agents: Chat with AI versions of famous investors and thought leaders
- π§ Intelligent Memory System: Both short-term and long-term memory capabilities using MongoDB
- π RAG-Powered Knowledge: Vector database containing comprehensive mentor profiles and wisdom
- β‘ Real-time Conversations: Fast and responsive chat interface powered by FastAPI
- π¨ Personalized Insights: Get tailored advice based on your specific questions and context
- π Evaluation & Monitoring: Built-in evaluation system with LLMOps observability
| Technology | Purpose |
|---|---|
| FastAPI | High-performance Python web framework |
| LangGraph | Advanced AI agent orchestration with memory management |
| LangChain | LLM integration and RAG implementation |
| MongoDB | Persistent storage for memory and state management |
| Vector Database | Semantic search for mentor knowledge retrieval |
| Groq | Fast LLM inference |
| Sentence Transformers | Text embeddings for RAG |
| OPIK | LLM Ops and evaluation |
| Knowledge base | Wikipedia, PDF, Youtube, Twitter |
- React - Modern frontend framework
- Interactive UI - Gamified chat experience
- π€ AI Agent Layer: LangGraph manages intelligent conversations with mentor personalities
- π§ Memory Management:
- Short-term memory for conversation context
- Long-term memory for user preferences and history
- π Knowledge Retrieval: RAG system pulls relevant mentor insights from vector database
- π API Layer: FastAPI provides high-performance backend services
- πΎ Data Persistence: MongoDB stores conversation history and agent states
Before you begin, ensure you have the following installed:
- π Python 3.11+
- π¦ Node.js 16+ (for future frontend)
- π MongoDB instance
- π Groq API key
-
π₯ Clone the repository
git clone https://github.com/shubhamprajapati7748/mentoragents.git cd mentoragents/backend -
π¦ Install dependencies
# Using uv (recommended) uv install # Or using pip pip install -e .
-
βοΈ Environment Configuration
cp .env.example .env # Edit .env with your API keys and configuration -
π§ Initialize Long-term Memory
# Save mentors to MongoDB python src/mentoragents/tools/save_mentors_into_mongodb.py # Create long-term memory python src/mentoragents/tools/create_long_term_memory.py
-
π Run the backend
uvicorn mentoragents.main:app --reload --host 127.0.0.1 --port 8080
- π API:
http://127.0.0.1:8080 - π API Docs:
http://127.0.0.1:8080/docs
- π API:
# Generate evaluation dataset
python src/mentoragents/tools/generate_evaluation_data.py
# Evaluate agent performance
python src/mentoragents/tools/evaluate_langraph_agent.py
# Clean up (if needed)
python src/mentoragents/tools/delete_long_term_memory.pyOur growing library of legendary mentors includes:
| Mentor | Expertise | Specialization |
|---|---|---|
| Naval Ravikant | Entrepreneurship | Philosophy, Angel Investing |
| Warren Buffett | Investing | Value Investing, Business Analysis |
| Ray Dalio | Finance | Macro Investing, Economic Cycles |
| Charlie Munger | Investing | Mental Models, Rational Thinking |
| Benjamin Graham | Finance | Value Investing, Financial Analysis |
| And many more... | Various | Expanding mentor library |
graph TD
A[User Question] --> B[Choose Mentor]
B --> C[AI Agent Processing]
C --> D[Memory Retrieval]
D --> E[RAG Knowledge Search]
E --> F[Generate Response]
F --> G[Update Memory]
G --> H[Personalized Advice]
- π― Choose Your Mentor: Select from available mentor personalities
- β Ask Your Question: Type your question or describe your challenge
- π€ Get Personalized Advice: The AI agent retrieves relevant knowledge and provides mentor-style guidance
- π¬ Continue the Conversation: Build on previous discussions with persistent memory
- π Short-term Memory: Maintains conversation context within sessions
- πΎ Long-term Memory: Remembers user preferences, past topics, and learning progress
- π Knowledge Base: Continuously updated mentor profiles and experiences
Key configuration options in backend/src/mentoragents/core/config.py:
# RAG Settings
EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
CHUNK_SIZE = 1000
RETRIEVAL_LIMIT = 5
# Database Settings
MONGODB_COLLECTION = "mentors"We welcome contributions! Please see our Contributing Guidelines for details.
- π΄ Fork the repository
- πΏ Create a feature branch (
git checkout -b feature/amazing-feature) - πΎ Commit your changes (
git commit -m 'Add amazing feature') - π Push to the branch (
git push origin feature/amazing-feature) - π Open a Pull Request
- π€ New mentor personalities
- π Knowledge base expansion
- π¨ Frontend development
- π§ͺ Testing and evaluation
- π Documentation improvements
This project is licensed under the MIT License - see the LICENSE file for details.
- π¦ LangChain and LangGraph communities for AI agent frameworks
- π§ The mentors whose wisdom inspired this project
- π» Open source contributors making AI accessible
- π The amazing Python and AI/ML community
Questions? Ideas? Let's connect!
π§ Email: shubhamprajapati7748@gmail.com
π GitHub: shubhamprajapati7748
Ready to learn from the best? Start your mentorship journey today! π

