The AI-powered study agent that actually gets the work done.
Quick Start β’ Features β’ Architecture β’ Configuration β’ Commands β’ Contributing
StudentSync is a messaging-first AI agent platform built for college students. Send a natural-language prompt, a PDF, a voice note, or a screenshot to your Telegram or WhatsApp chat β and StudentSync handles the rest: parsing, solving, code execution, LaTeX compilation, PDF generation, and even auto-submission to Google Classroom.
Under the hood, it's a modular TypeScript agent runtime with a plugin-based tool system. The LLM is the router β no keyword matching, no handler switches. Adding a new capability is literally a single file.
You: "Solve Q3 from this PDF and submit it to OS class"
StudentSync:
ββ π Parsed PDF β extracted Q3
ββ π§ Classified as "Coding + Theory" β built execution plan
ββ π» Executed Python solution in sandbox
ββ π Formatted answer with LaTeX
ββ π Rendered as professional PDF
ββ π Uploaded to Google Classroom β turned in β
curl -fsSL https://raw.githubusercontent.com/Ayush-Vish/studentsync/main/install.sh | bashThis installs studentsync globally via npm, sets up PM2, and starts the daemon. Then run the setup wizard:
studentsync onboard# 1. Clone
git clone https://github.com/Ayush-Vish/studentsync.git
cd studentsync
# 2. Install dependencies
npm install
# 3. Provision runtime toolchains (Python venv, Chrome, Tectonic)
npm run setup
# 4. Build
npm run build
# 5. Run interactive onboarding
npm start onboard
# 6. Launch
npm startPrerequisites: Node.js 20+, npm 9+. Optional:
ffmpeg(voice notes), Python 3.10+ (code sandbox).
| Platform | Integration | Auth |
|---|---|---|
| Telegram | Full-featured via Telegraf | Bot token from @BotFather |
| Multi-device via Baileys | QR scan in terminal | |
| Slack | Placeholder for future expansion | β |
Session persistence ensures automatic reconnection across restarts.
- Voice Notes β Send a voice message on Telegram/WhatsApp; transcribed locally with whisper.cpp (free, on-device, no API keys)
- PDF & Image Parsing β Extract assignment context from PDFs (
pdf-parse) and images (tesseract.jsOCR) - Adaptive Task Classification β Classifies tasks as Theory, MCQ, Coding, Research, or Mixed, then builds custom execution plans
- Agentic Problem Solving β Iterative agent loop with tool calls for complex multi-step assignments
- Follow-up Support β Full conversation history for revisions and clarifications
The core of StudentSync. Every capability is a self-describing ToolPlugin that the LLM can invoke dynamically:
| Category | Tools |
|---|---|
| Code Execution | Python, Node.js, Bash, C, C++, Java sandboxes |
| Document Rendering | PDF generation, LaTeX compilation (Tectonic), code screenshots |
| Web Research | Real-time web search via DuckDuckGo |
| File Operations | Full CRUD on the agent workspace |
| Shell Integration | Controlled shell command execution |
| Text Processing | Grep and sed for advanced search/replace |
| Resume Builder | LaTeX resume generation from Overleaf templates |
- Search courses and coursework directly from chat
- Upload generated artifacts to Google Drive
- Attach files and turn in assignments β all hands-free
- Natural language β "Remind me every day at 9am to study OS"
- Cron-backed β Persistent schedules via
node-cron - Messaging delivery β Reminders sent to your active chat channel
| Domain | Capabilities |
|---|---|
| Finance | Log expenses, set monthly budgets, spending summaries, bill splitting |
| Personal | Todo lists, habit tracking with streaks |
| Emotional | Mood logging, journaling, guided breathing & grounding exercises |
| Career | Job application tracking and status management |
π‘οΈ Safety: The emotional toolset includes crisis detection β if the user expresses distress, the agent immediately surfaces helpline numbers and crisis resources. Breathing/grounding exercises are deterministic (no LLM improvisation).
Extend StudentSync with external tools via MCP servers:
- Google MCP β Gmail, Calendar, Google Chat integration
- GitHub MCP β Issues, PRs, repository management
- Add custom MCP servers through the onboarding wizard
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MESSAGING LAYER β
β βββββββββββ βββββββββββββ βββββββββ β
β βTelegram β β WhatsApp β β Slack β β
β β(Telegraf)β β (Baileys) β β (WIP) β β
β ββββββ¬βββββ βββββββ¬ββββββ βββββ¬ββββ β
β βββββββββββββββββΌββββββββββββββ β
β βΌ β
β ββββββββββββββββββ β
β β Bot Router β β unified message handlerβ
β βββββββββ¬βββββββββ β
ββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ€
β βΌ AGENT CORE β
β βββββββββββββββββββββββ β
β β Orchestrator β β
β β ββββββββββββββββ β β
β β β Classifier β β Task type detection β
β β ββββββββ¬ββββββββ β β
β β ββββββββΌββββββββ β β
β β β Planner β β Dynamic execution plan β
β β ββββββββββββββββ β β
β βββββββββββ¬ββββββββββββ β
β βΌ β
β βββββββββββββββββββββββ β
β β Agent Loop β β LLM + tool dispatch β
β β (llm.ts) β β
β βββββββββββ¬ββββββββββββ β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββ β
β β Tool Plugin Registry β β
β β ββββββββββββ βββββββββββββββββββββ β β
β β β Builtin β β Domain Plugins β β β
β β β ββββββββ β β βββββββββββββββββ β β β
β β β β Code β β β β Finance β β β β
β β β β PDF β β β β Personal β β β β
β β β β LaTeXβ β β β Emotional β β β β
β β β β Shellβ β β β Career β β β β
β β β β Web β β β βββββββββββββββββ β β β
β β β β File β β βββββββββββββββββββββ β β
β β β ββββββββ β β β
β β ββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β INTEGRATIONS β
β ββββββββββββ ββββββββββββ ββββββββββββββ β
β β Google β β MCP β β Whisper β β
β βClassroom β β Servers β β (STT) β β
β β + Drive β β β β β β
β ββββββββββββ ββββββββββββ ββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
src/
βββ bot/ # Messaging adapters
β βββ TelegramBot.ts # Telegraf wrapper
β βββ WhatsAppBot.ts # Baileys multi-device
β βββ WhatsAppConnectionController # QR auth + reconnection
β βββ index.ts # Unified bot router
βββ cli/ # Setup wizard + CLI commands
βββ core/
β βββ llm.ts # Agent loop (Gemini / OpenAI)
β βββ plugins/ # Tool plugin system
β β βββ ToolRegistry.ts # Registry + dispatch
β β βββ builtin/ # Academic + workspace tools
β β βββ domains/ # Finance, personal, emotional, career
β βββ orchestrator/ # Task classifier + planner
β βββ mcp/ # MCP client manager + tool bridge
β βββ scheduler/ # Cron-backed reminders
β βββ classroom.ts # Google Classroom + Drive
β βββ formatter.ts # Output formatting engine
β βββ parser.ts # PDF parsing
β βββ store.ts # Local user/session persistence
β βββ schema.ts # Config schema + defaults
β βββ session-manager.ts # Multi-user session management
β βββ tools.ts # Artifact workspace + tool executor
β βββ transcriber.ts # whisper.cpp voice transcription
βββ api/ # (Future) REST API surface
βββ types/ # TypeScript type definitions
βββ templates/ # LaTeX templates
βββ resume-templates/ # Bundled resume templates
βββ skills/ # Document/artifact generation skills
βββ scripts/ # Runtime provisioning
StudentSync uses a JSON config at ~/.studentsync/config.json (created by the onboarding wizard). Environment variables always take priority over the config file.
| Variable | Required | Description |
|---|---|---|
LLM_PROVIDER |
β | gemini, openai, openrouter, or ollama |
LLM_API_KEY |
β * | API key for your chosen provider (*not needed for Ollama) |
LLM_MODEL |
β | Model override (default: gpt-4o for OpenAI, gemini-2.0-flash for Gemini) |
TELEGRAM_BOT_TOKEN |
β | Token from @BotFather |
WHATSAPP_ENABLED |
β | Set to true to enable WhatsApp |
WHATSAPP_AUTH_DIR |
β | Path to store WhatsApp auth session |
| Variable | Required | Description |
|---|---|---|
GOOGLE_CLIENT_ID |
β | OAuth 2.0 client ID |
GOOGLE_CLIENT_SECRET |
β | OAuth 2.0 client secret |
GOOGLE_REFRESH_TOKEN |
β | OAuth refresh token |
| Variable | Default | Description |
|---|---|---|
WHISPER_CPP_MODEL |
(required) | Path to ggml model, e.g. β¦/models/ggml-base.en.bin |
WHISPER_CPP_BIN |
whisper-cli |
Path to the whisper.cpp CLI binary |
FFMPEG_BIN |
ffmpeg |
Override if ffmpeg isn't on PATH |
WHISPER_CPP_LANG |
(auto) | Language hint (e.g. en). Omit to auto-detect |
WHISPER_CPP_THREADS |
(default) | Thread count for transcription |
| Variable | Default | Description |
|---|---|---|
STUDENTSYNC_HOME |
~/.studentsync |
Base directory for all runtime data |
STUDENTSYNC_PYTHON |
Auto-provisioned | Path to Python binary |
PUPPETEER_EXECUTABLE_PATH |
Auto-provisioned | Path to Chrome/Chromium |
TECTONIC_BIN |
Auto-provisioned | Path to Tectonic LaTeX engine |
If voice-note env vars aren't set, StudentSync simply replies with a friendly "voice notes aren't set up" message and continues working for text/PDF/image input.
The npm run setup command (also runs on postinstall) provisions into ~/.studentsync:
| Component | What it does | Override |
|---|---|---|
| Python venv | Creates venv/ with reportlab, fpdf2, matplotlib, numpy, pandas, sympy, etc. |
STUDENTSYNC_PYTHON |
| Chrome | puppeteer browsers install chrome for HTMLβPDF and screenshots |
PUPPETEER_EXECUTABLE_PATH |
| Tectonic | Downloads the Tectonic LaTeX engine into bin/ |
TECTONIC_BIN |
Every step is best-effort β if one toolchain can't be installed, the rest still proceed and the agent degrades gracefully.
| Command | Description |
|---|---|
npm run build |
Compile TypeScript β dist/ |
npm start |
Build + start messaging runtime |
npm start onboard |
Re-run the interactive setup wizard, then launch |
npm run setup |
Provision runtime toolchains (Python, Chrome, Tectonic) |
npm run start:daemon |
Start as a background service with PM2 |
npm run stop:daemon |
Stop and remove the PM2 daemon |
| Command | Description |
|---|---|
/start |
Initialize the bot conversation |
/new |
Start a fresh session |
/context |
Show current session info, workspace, and turn count |
/help |
List available commands |
/expense |
Log a new expense |
/todo |
Manage your todo list |
/mood |
Log how you're feeling |
/budget |
View budget summary |
/habits |
Track daily/weekly habits |
/apps |
View job application tracker |
Pro tip: You don't need slash commands. Just type naturally β "add milk to my todo", "I spent βΉ200 on lunch", "I'm feeling stressed". The agent understands.
Voice transcription runs fully local β no API keys, no cloud dependency.
# 1. Install ffmpeg
sudo apt install ffmpeg # Debian/Ubuntu
brew install ffmpeg # macOS
# 2. Build whisper.cpp
git clone https://github.com/ggerganov/whisper.cpp && cd whisper.cpp
cmake -B build && cmake --build build --config Release
sh ./models/download-ggml-model.sh base.enThen set the environment variables:
export WHISPER_CPP_MODEL="/path/to/whisper.cpp/models/ggml-base.en.bin"
export WHISPER_CPP_BIN="/path/to/whisper.cpp/build/bin/whisper-cli"Creating a new capability is a one-file change:
// src/core/plugins/builtin/myTool.ts
import type { ToolPlugin } from '../ToolRegistry.js';
export const myToolPlugin: ToolPlugin = {
name: 'my_tool',
description: 'Does something awesome',
parameters: {
input: { type: 'string', description: 'The input to process' }
},
required: ['input'],
async execute(args, context) {
// Your logic here
return { result: `Processed: ${args.input}` };
}
};Then export it from builtin/index.ts β done. The LLM can now call it. No prompt engineering, no router changes, no bot code modifications.
For persistent user data, extend StoredUserProfile in store.ts with a typed sub-store, initialize it in normalizeUserProfile(), and create domain plugins in src/core/plugins/domains/.
Add a preset to MCP_PRESETS in schema.ts, or configure custom servers through the onboarding wizard. The MCPClientManager handles lifecycle and the MCPToolBridge exposes external tools to the agent loop.
| Layer | Technology |
|---|---|
| Runtime | Node.js 20+ Β· TypeScript |
| AI/LLM | Google GenAI SDK Β· OpenAI-compatible APIs Β· Ollama |
| Messaging | Telegraf (Telegram) Β· Baileys (WhatsApp) |
| Automation | Puppeteer Β· Google APIs (Classroom + Drive) |
| Documents | pdf-parse Β· Tesseract.js Β· md2latex Β· Tectonic |
| Scheduling | node-cron |
| CLI | Commander Β· @clack/prompts Β· picocolors |
| Frontend | Next.js 16 Β· Tailwind CSS Β· Radix UI Β· Framer Motion |
| Voice | whisper.cpp Β· ffmpeg |
| Process Mgmt | PM2 |
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes and ensure the build passes:
npm run build - Commit with a descriptive message:
git commit -m "feat: add X capability" - Push to your fork:
git push origin feat/my-feature - Open a Pull Request
git clone https://github.com/Ayush-Vish/studentsync.git
cd studentsync
npm install
npm run setup # provision runtime toolchains
npm run build # compile TypeScript
npm start onboard # configure LLM + bot tokens| Directory | What lives there |
|---|---|
studentsync/ |
Core agent runtime (TypeScript) |
frontend/ |
Next.js marketing/docs site |
- LLM-as-Router β No hardcoded workflows. The LLM decides which tools to call based on the user's intent.
- Plugin-First β Every capability is a self-describing
ToolPlugin. Adding features = adding files. - Graceful Degradation β Missing toolchains? The agent adapts. No Chrome? Skip screenshots. No Tectonic? Fall back to HTML PDFs.
- Privacy-First Voice β Voice transcription runs entirely on-device with whisper.cpp. Zero cloud dependency.
- Safety by Design β Crisis detection in emotional tools, no medical/diagnostic language, deterministic grounding exercises.
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β and π§ by Ayush Vishwakarma
