AI-Powered Academic Operating System — Your intelligent study companion that integrates with Moodle, Notion, WakaTime, and more.
MoodleOS is an intelligent academic management system that helps students stay on top of their coursework, predict grade outcomes, and avoid burnout through AI-powered analysis.
Students struggle to manage multiple courses, track assignment deadlines, and maintain healthy study habits. Traditional LMS platforms (like Moodle) lack predictive capabilities and personalized insights.
MoodleOS creates a "Second Brain" for academic life by:
- 📊 Predicting final grades using Monte Carlo simulations
- 🧠 Detecting burnout risk through coding patterns (WakaTime integration)
- 🔍 Auto-discovering study resources for assignments (Tavily API)
- 📝 Syncing everything to Notion for beautiful visualization
- 🔔 Sending smart alerts via Telegram
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 👁 OBSERVER │────▶│ 🧠 STRATEGIST │────▶│ ⚡ EXECUTIVE │
│ Agent │ │ Agent │ │ Agent │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • Moodle Scrape │ │ • Monte Carlo │ │ • Notion Sync │
│ • WakaTime API │ │ • LLM Analysis │ │ • Telegram │
│ • Data Gather │ │ • Decisions │ │ • Actions │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Simulates 10,000 possible grade outcomes per course
- Provides 95% confidence intervals
- Calculates pass probability
- Risk level assessment (low/medium/high/critical)
- Uses GPT-4o for intelligent state determination
- Three states:
IN_FLOW,ON_TRACK,AT_RISK - Context-aware recommendations
- Burnout risk scoring
| Integration | Purpose |
|---|---|
| Moodle | Course data, assignments, grades |
| WakaTime | Coding time, focus metrics, burnout signals |
| OpenAI | LLM reasoning, natural language |
| Tavily | Academic resource discovery |
| Notion | Dashboard visualization |
| Telegram | Urgent alerts |
- Python 3.11+ — Modern async Python
- FastAPI — High-performance API framework
- LangGraph — Multi-agent orchestration
- LangChain — LLM integration
- Playwright — Browser automation (SSO scraping)
- APScheduler — Scheduled jobs
- NumPy — Monte Carlo simulations
- Pydantic — Data validation
- httpx — Async HTTP client
- OpenAI GPT-4o
- WakaTime API
- Tavily Search API
- Notion API
- Telegram Bot API
- Python 3.11 or higher
- Poetry or pip
- Playwright browsers
# Clone the repository
git clone https://github.com/yourusername/moodleos.git
cd moodleos
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install Playwright browsers
playwright install chromium
# Copy environment template
cp .env.example .env
# Edit .env with your API keys
nano .env
# Run the server
python main.py# Build image
docker build -t moodleos .
# Run container
docker run -p 8000:8000 --env-file .env moodleosCreate a .env file with the following variables:
# Required
OPENAI_API_KEY=sk-...
# Moodle SSO Credentials
MOODLE_BASE_URL=https://moodle.champlain.edu
MOODLE_USERNAME=your_username
MOODLE_PASSWORD=your_password
# Optional Integrations
WAKATIME_API_KEY=waka_...
TAVILY_API_KEY=tvly_...
NOTION_TOKEN=secret_...
NOTION_DATABASE_ID=...
# Telegram Alerts
TELEGRAM_BOT_TOKEN=...
TELEGRAM_CHAT_ID=...
# Scheduling
POLLING_INTERVAL_MINUTES=60
LOG_LEVEL=INFO- Go to OpenAI API Keys
- Create a new API key
- Add to
.envasOPENAI_API_KEY
- Go to WakaTime Settings
- Copy your API key
- Add to
.envasWAKATIME_API_KEY
- Sign up at Tavily
- Get your API key from the dashboard
- Add to
.envasTAVILY_API_KEY
- Create a Notion integration at Notion Developers
- Share your database with the integration
- Copy the integration token and database ID
- Create a bot via @BotFather
- Get your chat ID by messaging @userinfobot
- Add both to
.env
Once running, access the API at http://localhost:8000
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | API info |
/health |
GET | Health check |
/agent/run |
POST | Run full agent cycle |
/courses |
GET | List all courses |
/assignments |
GET | List assignments |
/predictions |
GET | Grade predictions |
/burnout |
GET | Burnout assessment |
/resources/search |
POST | Search study resources |
/notion/sync |
POST | Sync to Notion |
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
import httpx
async def run_moodleos():
async with httpx.AsyncClient() as client:
response = await client.post("http://localhost:8000/agent/run")
print(response.json())
# Output:
# {
# "success": true,
# "state": "on_track",
# "confidence": 0.75,
# "reasoning": "Good progress in most courses...",
# "urgent_actions": ["OVERDUE: Assignment 3 in CS270"],
# "recommendations": ["Monitor Calculus II - Current trend needs attention"],
# "burnout_score": 35.2,
# "alerts_count": 2
# }from grade_simulator import GradeSimulator
from models import Course, GradebookEntry
course = Course(
id="123",
name="Computer Science 101",
gradebook=[
GradebookEntry(item_name="Midterm", grade=85, max_grade=100, weight=25),
GradebookEntry(item_name="Final", grade=None, max_grade=100, weight=40),
]
)
simulator = GradeSimulator(iterations=10000)
prediction = simulator.simulate_final_grade(course)
print(f"Predicted: {prediction.predicted_mean:.1f}%")
print(f"95% CI: {prediction.confidence_interval_95}")
print(f"Pass Probability: {prediction.pass_probability * 100:.0f}%")moodleos/
├── main.py # FastAPI application & endpoints
├── agent_graph.py # LangGraph multi-agent system
├── moodle_connector.py # Playwright SSO scraper
├── wakatime_client.py # WakaTime API client
├── grade_simulator.py # Monte Carlo simulations
├── tavily_search.py # Academic resource search
├── notion_sync.py # Notion integration
├── models.py # Pydantic data models
├── config.py # Settings & configuration
├── requirements.txt # Python dependencies
├── .env.example # Environment template
└── README.md # This file
The grade simulator uses NumPy to run 10,000 simulations per course:
- Models uncertainty in future assignment grades
- Uses normal distribution based on current performance
- Provides statistical confidence intervals
workflow = StateGraph(AgentState)
workflow.add_node("observe", observer.observe)
workflow.add_node("analyze", strategist.analyze)
workflow.add_node("execute", executive.execute)
workflow.set_entry_point("observe")
workflow.add_edge("observe", "analyze")
workflow.add_edge("analyze", "execute")
workflow.add_edge("execute", END)Automatic handling of:
- SAML SSO authentication
- Multi-factor authentication prompts
- Session management
- Cookie persistence
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- LangChain/LangGraph for the multi-agent framework
- OpenAI for GPT-4o
- Champlain College for the hackathon opportunity
- All API providers for their generous free tiers
Created with 💜 for Champlain College Hackathon 2026
Team: [Your Team Name] Members: [Team Members]
Made with 🚀 by students, for students