AI Study Buddy is a local, sequential, multi-agent learning companion. It helps you study any custom topic by generating educational material, creating practice quizzes, and providing interactive tutoring feedback.
The system runs entirely locally on your machine using Ollama, Mistral, and CrewAI.
The system utilizes exactly 3 specialized agents executing in a strict sequential chain:
[ User Topic Input ]
│
▼
┌───────────────┐
│ Topic Agent │ ──► Generates clear explanation
└───────────────┘
│
▼
┌───────────────┐
│ Quiz Agent │ ──► Analyzes explanation & creates practice questions
└───────────────┘
│
▼
[ User Answers Input ]
│
▼
┌───────────────┐
│Feedback Agent │ ──► Grades answers & provides tutoring feedback
└───────────────┘
│
▼
[ Tutor Evaluation & Score ]
- Topic Agent: Simulates an expert teacher, generating clean and structured explanations of complex concepts for beginners.
- Quiz Agent: Receives the Topic Agent's explanation and constructs 3 multiple-choice questions (MCQs) with options, keeping correct answers hidden.
- Feedback Agent: Receives the original material, the questions, and the user's input answers. It grades the answers, provides explanations for each correct/incorrect option, and calculates a final score (e.g.,
2/3).
demo.multi.agent.1.mp4
- Language: Python 3.12+
- Orchestration: CrewAI
- Local LLM: Ollama (Mistral model)
- UI Framework: Streamlit
- Download and install Ollama.
- Pull the Mistral model in your terminal:
ollama pull mistral
-
Clone the repository:
git clone https://github.com/tisha-varma/AI-study-Buddy.git cd AI-study-Buddy -
Create a virtual environment and activate it:
python -m venv .venv # Windows: .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate
-
Install the dependencies:
pip install crewai python-dotenv streamlit
-
Create a
.envfile in the root directory:OPENAI_API_BASE=http://localhost:11434/v1 OPENAI_MODEL_NAME=ollama/mistral OPENAI_API_KEY=local
Launch the beautiful Streamlit dark-mode interface:
streamlit run app.pyOpen http://localhost:8501 in your browser.
Alternatively, run the system directly in your terminal:
python main.py