This project is a complete AI-powered Employee Onboarding Agent using LangGraph, FastAPI, React, Telegram, MongoDB, and Supabase (pgvector).
- Telegram Bot: New employees interact with an AI bot to ask questions and track their onboarding progress.
- HR Dashboard: HR can view all employees, monitor chats, see task progress, and upload documents (PDFs) to the Vector Knowledge Base.
- AI Router: LangGraph routes the user's intent to
Q&A(RAG),Progress Tracker, orSmalltalk.
- Backend: FastAPI, LangChain, LangGraph
- LLM: Google Vertex AI (Gemini 3.1 Pro)
- Vector DB: Supabase + pgvector
- Database: MongoDB (Users, Chats)
- Frontend: React, Vite, Tailwind CSS
- cd
backend - Create virtual environment:
python3 -m venv venv - Activate it:
source venv/bin/activate - Install dependencies:
pip install -r requirements.txt - Configure
.env:PORT=8000 TELEGRAM_BOT_TOKEN=your_bot_token MONGO_URI=mongodb://localhost:27017 MONGO_DB_NAME=onboarding_db SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_key SUPABASE_DB_URL=postgresql://postgres:password@db.supabase.co:5432/postgres VERTEX_PROJECT_ID=your_gcp_project_id VERTEX_LOCATION=us-central1
- Run Backend:
uvicorn app.main:app --reload - Set Telegram Webhook to your Ngrok/Server URL:
curl -X POST https://api.telegram.org/bot<TOKEN>/setWebhook -d "url=https://<NGROK_URL>/telegram/webhook"
- cd
frontend - Install dependencies:
npm install - Run Development Server:
npm run dev
Open http://localhost:5173 to view the HR Dashboard.
- HR can now generate a unique invite link from the dashboard
- Click the
+button in the "New Hires" sidebar - Enter the new hire's name and click "Generate Invite Link"
- Share the generated
t.me/DayOne11bot?start=XXXXlink with the employee - When they click the link and start the bot, they get a personalized DayOne welcome message
- All uploaded PDFs are now consolidated into
backend/knowledge_base_merged.txt - This file serves as a master reference for the search tool
- The agent now has access to a tool that can search the merged knowledge base
- Returns complete paragraphs (up to 20 results) containing the keyword
- Automatically triggered by the LLM when vector search is insufficient
- The bot now consistently identifies as "DayOne"
- All prompts updated to reflect the onboarding assistant persona