MAX_WEBSITES: Maximum number of websites an admin can add to the knowledge base.
DB_USER, DB_HOST, DB_NAME, DB_PASSWORD, DB_PORT: PostgreSQL credentials. Make sure a PostgreSQL instance is running with these parameters.
Running the Bot
Install Dependencies
Start the Bot
or
The bot will begin polling for updates on Telegram. You can then interact with it in your chosen Telegram client.
Usage & Workflow
/start
Triggers the initial intro (resetAgent). If no project is set up, it guides you through creating a new project.
Admin Mode
Tap “For Admin” to verify your password and access admin features (adding websites, removing websites, changing password, deleting agent, etc.).
User Mode
Regular users ask questions about the project’s knowledge base. The bot crawls relevant websites (via crawler.js) and fuses that data with LLM-based context.
Deployment
Stable production deployment:
Use webhooks instead of polling for improved efficiency and reliability. (codes are in webhooks)
Use a hosting provider like Render, Railway, or AWS with HTTPS support.
Use a process manager (e.g., PM2) to keep the bot running and automatically restart on crashes.
Future Enhancements
Advanced Logging
Add structured logging (e.g., Winston) to track admin/user actions more comprehensively.
File Upload Support
Integrate advanced features for reading PDFs, CSVs, or doc files.
Robust Security
Harden admin password policies and add role-based access if needed.
Webhook Migration
Switch from polling to webhooks for lower latency and resource usage.
Contributing
We welcome pull requests, feature suggestions, and bug reports. Feel free to fork the repository, create feature branches, and submit PRs.
License
MIT License
Acknowledgements
Volaris Games for pioneering the idea of LinkolnOS.
OpenAI for powering the LLM-based responses.
Cheerio & Axios for streamlined web crawling.
PostgreSQL for robust database management.
Closing Notes
This README is intended as a living document. You’re encouraged to add new sections or update existing ones as LinkolnOS evolves—whether you integrate new features, refine your PostgreSQL setup, or overhaul the admin flow.