Skip to content

abhipsa14/AgenticAI_wemakedevs

Repository files navigation

Study Assistant - Multi-Agent System

A multi-agent AI system that helps students with:

  • πŸ“… Study Planning - Generate personalized day-wise schedules
  • ❓ Doubt Resolution - Get answers from your own uploaded notes (RAG)
  • πŸ“‹ Schedule Management - Track progress and reschedule missed sessions

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Web Interface                        β”‚
β”‚  (Dashboard | Create Plan | Today's Tasks | Ask Doubt) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  Coordinator Agent    β”‚
              β”‚  (Intent Detection &  β”‚
              β”‚   Request Routing)    β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                 β–Ό                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Planner Agent β”‚ β”‚Knowledge Agentβ”‚ β”‚Scheduler Agentβ”‚
β”‚               β”‚ β”‚               β”‚ β”‚               β”‚
β”‚ Creates study β”‚ β”‚ RAG-based Q&A β”‚ β”‚ Tracks & re-  β”‚
β”‚ schedules     β”‚ β”‚ over notes    β”‚ β”‚ schedules     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                 β”‚                 β”‚
        β–Ό                 β–Ό                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   SQLite DB   β”‚ β”‚   ChromaDB    β”‚ β”‚   SQLite DB   β”‚
β”‚   (Plans &    β”‚ β”‚  (Embeddings) β”‚ β”‚  (Sessions)   β”‚
β”‚   Sessions)   β”‚ β”‚               β”‚ β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How to start with the Project?

1. Clone and Setup

cd AgenticAI_wemakedevs

# Create virtual environment
python -m venv venv

# Activate (Windows)
.\venv\Scripts\activate

# Activate (Mac/Linux)
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

2. Configure Environment

# Copy example env file
copy .env

# Edit .env and add your Groq API key
# GROQ API KEY = your_api_key

3. Run the Application

# Start the server
uvicorn app.main:app --reload

# Or run directly
python -m app.main

4. Open in Browser

Navigate to: http://localhost:8000

πŸ“ Project Structure

AgenticAI_wemakedevs/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ config.py           # Configuration settings
β”‚   β”œβ”€β”€ main.py             # FastAPI application entry
β”‚   β”‚
β”‚   β”œβ”€β”€ agents/             # AI Agents
β”‚   β”‚   β”œβ”€β”€ coordinator.py  # Main orchestrator
β”‚   β”‚   β”œβ”€β”€ planner.py      # Study plan generation
β”‚   β”‚   β”œβ”€β”€ knowledge.py    # RAG-based Q&A
β”‚   β”‚   β”œβ”€β”€ scheduler.py    # Schedule management
β”‚   β”‚   └── config/
β”‚   β”‚       └── agents.yaml # Agent configurations
β”‚   β”‚
β”‚   β”œβ”€β”€ models/             # Database models
β”‚   β”‚   β”œβ”€β”€ database.py     # SQLModel tables
β”‚   β”‚   └── session.py      # DB session management
β”‚   β”‚
β”‚   β”œβ”€β”€ routers/            # API endpoints
β”‚   β”‚   β”œβ”€β”€ plans.py        # Study plan APIs
β”‚   β”‚   β”œβ”€β”€ schedule.py     # Schedule APIs
β”‚   β”‚   β”œβ”€β”€ knowledge.py    # Document/Q&A APIs
β”‚   β”‚   └── chat.py         # Chat interface APIs
β”‚   β”‚
β”‚   └── services/           # Business logic
β”‚       β”œβ”€β”€ pdf_processor.py    # PDF text extraction
β”‚       β”œβ”€β”€ vector_store.py     # ChromaDB operations
β”‚       └── llm_service.py      # LLM API wrapper
β”‚
β”œβ”€β”€ frontend/
β”‚   └── templates/          # Jinja2 HTML templates
β”‚       β”œβ”€β”€ base.html       # Base layout
β”‚       β”œβ”€β”€ index.html      # Dashboard
β”‚       β”œβ”€β”€ plan.html       # Create plan page
β”‚       β”œβ”€β”€ schedule.html   # Today's tasks
β”‚       └── knowledge.html  # Notes management
β”‚
β”œβ”€β”€ uploads/                # Uploaded PDFs (auto-created)
β”œβ”€β”€ chroma_db/              # Vector store (auto-created)
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .env.example
└── README.md

πŸ€– Agents used in Study Assistant - Multi-Agent System

1. Coordinator Agent

  • Detects user intent from messages
  • Routes requests to appropriate specialist agents
  • Synthesizes responses for the frontend

2. Planner Agent

  • Input: Subjects, topics, dates, hours/day
  • Output: Day-wise study schedule with time blocks
  • Uses LLM to generate intelligent, balanced schedules

3. Knowledge Agent (RAG)

  • Input: User question + uploaded PDF notes
  • Process: Retrieves relevant chunks from ChromaDB
  • Output: Answer with source citations

4. Scheduler Agent

  • Tracks session completion status
  • Reschedules missed sessions intelligently
  • Provides progress summaries and tips

API Endpoints

Study Plans

  • POST /api/plans/create - Create new study plan
  • GET /api/plans/{plan_id} - Get plan details
  • GET /api/plans/user/{user_id} - Get user's plans

Schedule

  • GET /api/schedule/today/{plan_id} - Today's sessions
  • PUT /api/schedule/session/{id} - Update session status
  • POST /api/schedule/reschedule/{plan_id} - Reschedule missed

Knowledge

  • POST /api/knowledge/upload - Upload PDF
  • POST /api/knowledge/ask - Ask question
  • POST /api/knowledge/quiz - Generate quiz

Chat

  • POST /api/chat/send - Send message to assistant
  • GET /api/chat/history/{user_id} - Get chat history

πŸ› οΈ Technologies

  • Backend: FastAPI, Python 3.10+
  • Database: SQLite + SQLModel
  • Vector Store: ChromaDB
  • LLM: Groq or llama-3.3-70b(Configurable)
  • PDF Processing: PyMuPDF
  • Frontend: HTML, Tailwind CSS, Vanilla JS

πŸ“ Usage Example

Creating a Study Plan

  1. Go to "Create Plan" page
  2. Enter plan title and dates
  3. Add subjects and topics with difficulty levels
  4. Click "Generate Plan" - AI creates your schedule

Asking Doubts

  1. Upload your study notes (PDFs)
  2. Click the chat button or go to "My Notes"
  3. Type your question
  4. Get answers with source citations

Managing Schedule

  1. View today's tasks on dashboard or schedule page
  2. Check off completed sessions
  3. Skip sessions you couldn't do
  4. Use "Reschedule" to automatically adjust plan

βš™οΈ Configuration

Edit .env file:

GROQ_API_KEY=gsk_...

# Database (SQLite by default)
DATABASE_URL=sqlite:///./study_assistant.db

# Debug mode
DEBUG=true

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing)
  5. Open a Pull Request

Built with ❀️ for students who want to study smarter, not harder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published