Smart Task Manager is a full-stack observability and process-management suite for Windows and Linux. It combines live telemetry, fine-grained process controls, AI-assisted recommendations, and educational scheduler simulations inside a unified dark-theme experience.
- Real-time CPU, memory, disk, and thread metrics with adaptive thresholds
- Historical mini-charts and health scoring across subsystems
- Behavioral Anomaly Alerts with security scoring, cryptominer detection, and quick actions
- Complete process tree with ownership, permission status, and thread insights
- One-click permission checks (
/process/{pid}/can-modify) and detailed remediation steps - Smart Process Recommendations (resource hogs, future issue prediction, confidence scoring)
- User-owned filter to isolate modifiable processes
- Incremental anomaly detector with sliding-window history, persistence, and behavioral baselines
- Incremental model updates (Welford statistics, Isolation Forest persistence)
- Pattern learning via action recording (
/record-user-action) feeding the HealthOptimizer
- FCFS, Round Robin, Priority, and SJF simulations with interactive Gantt charts
- Pre-built scenarios for classroom demos and comparative analysis
- Dark-mode-only UI with consistent theming, toast cooldowns, Clear All control, and friendly error states
- Thread Information and Permission Notice panels styled for accessibility and parity with the global theme
| Layer | Tech | Highlights |
|---|---|---|
| Backend | FastAPI, psutil, Pydantic, Uvicorn | Process control actions, anomaly detection, smart recommendations, scheduler API |
| ML/AI | Incremental Isolation Forest, rule-based HealthOptimizer, dynamic thresholds | Behavioral baselines, security scoring, resource forecasts |
| Frontend | React 18 + Vite, Axios, custom hooks, Context API | Process tree, anomaly console, smart recommendations, scheduler simulator |
| Persistence | Joblib, JSON configs | Model snapshots, anomaly history, learned user patterns |
Documentation resources:
PROJECT_OVERVIEW.md– end-to-end feature summaryPROJECT_ABSTRACT.md– executive abstractML_MODELS_ANALYSIS.md/ML_DATA_SOURCES.md– model behavior and data lineageINCREMENTAL_ML_IMPLEMENTATION.md– incremental pipeline designBEHAVIORAL_ANOMALY_FEATURES.md,SMART_RECOMMENDATIONS_FEATURE.md– feature deep dives
Documentation files live at the repository root (grouped as docs/ below for clarity).
smart_task_manager(OS)/
├─ backend/
│ ├─ main.py
│ ├─ health_optimizer.py
│ ├─ dynamic_threshold_model.py
│ ├─ config_store.py
│ ├─ config.json
│ ├─ ml/
│ │ ├─ anomaly_detector.py
│ │ └─ incremental_anomaly_detector.py
│ └─ requirements.txt
├─ frontend/
│ ├─ src/
│ │ ├─ api.js
│ │ ├─ App.jsx
│ │ ├─ styles.css
│ │ ├─ contexts/AppContext.jsx
│ │ └─ components/
│ │ ├─ ProcessTree.jsx
│ │ ├─ Processes.jsx
│ │ ├─ AnomalyDetector.jsx
│ │ ├─ HealthOptimizer.jsx
│ │ ├─ HealthDashboard.jsx
│ │ └─ Simulator.jsx
│ ├─ package.json
│ └─ vite.config.js
├─ docs/
│ ├─ PROJECT_OVERVIEW.md
│ ├─ PROJECT_ABSTRACT.md
│ ├─ ML_MODELS_ANALYSIS.md
│ ├─ ML_DATA_SOURCES.md
│ ├─ INCREMENTAL_ML_IMPLEMENTATION.md
│ ├─ BEHAVIORAL_ANOMALY_FEATURES.md
│ └─ SMART_RECOMMENDATIONS_FEATURE.md
└─ README.md
- Python 3.8+
- Node.js 16+
- Administrator/sudo privileges for controlling non-user processes
cd backend
python -m venv .venv
.\.venv\Scripts\activate # Windows
source .venv/bin/activate # Linux/macOS
pip install -r requirements.txt
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run dev- App UI: http://localhost:5173
- API root: http://localhost:8000
- Docs: http://localhost:8000/docs
- Observe system vitals, update thresholds, and watch anomaly alerts in real time
- Select any process to review threads, permissions, recommendations, and actions
- Thread drawer surfaces thread IDs, CPU time, and start timestamps
- Toggle “Teach Me” to capture your actions for personalized suggestions
- Apply recommendations (e.g., kill, suspend, adjust priority) directly inside the widget
- Displays anomaly reason (resource spikes, new process, sustained CPU), security score, and quick action shortcuts
- Configure job sets, run algorithms, and compare execution timelines via interactive Gantt charts
| Endpoint | Purpose |
|---|---|
GET /stats |
Aggregate system metrics and health status |
GET /processes?limit=N |
Paginated process list |
GET /process-tree |
Recursive tree including ownership, modifiability, thread counts |
GET /process/{pid}/can-modify |
Permission check with reason and remediation guidance |
GET /process/{pid}/threads |
Detailed thread metadata |
POST /process/{pid}/action |
Kill, suspend, resume, or force terminate |
POST /process/{pid}/nice |
Adjust scheduling priority with platform-aware errors |
GET /anomalies |
Behavioral + ML anomaly feed |
GET /smart-recommendations |
AI-driven remediation and optimization suggestions |
POST /record-user-action |
Persist user choices for pattern learning |
POST /simulate |
Run scheduling scenarios |
- All models rely solely on real-time psutil data and internally collected history; no synthetic or external datasets are used.
- Incremental models store history (
anomaly_history.pkl) and persist Isolation Forest weights (anomaly_model.pkl) for fast cold starts. - Health scores are formula-based (CPU/RAM/disk weighting) to avoid circular training dependencies.
- Respect system integrity: elevated privileges are required for non-user processes.
- Permission Notice component explains how to restart the backend as Administrator and why certain actions are blocked.
- The backend never performs privileged escalation; it mirrors the rights of the hosting user.
- Backend unavailable: verify Python version, dependency installs, and port 8000 availability.
- Frontend timeouts: ensure the backend is reachable; Axios timeout defaults to 30s with friendly error messaging.
- Access denied: run backend with elevated permissions or restrict actions to user-owned processes.
- Notification spam: toast cooldowns and max-toast enforcement are built in; use the Clear All button if needed.
Contributions are welcome. Suggested areas:
- Extend anomaly heuristics or introduce supervised models
- Add more scheduling algorithms or visualization modes
- Integrate cross-platform service monitoring
- Expand accessibility and keyboard navigation
Educational use only. Confirm compliance with local organizational or institutional policies before deploying in production environments.