WorkBuddyAn LLM-based content moderator
Firefox extension to block webpages unrelated to work, based on page title and URL. Local LLMs with Ollama and Langchain to ensure your browsing history never leaves your device, for complete privacy. Google Gemini also supported.
WorkBuddy
pip install -r requirements.txt.env or as environment variable GEMINI_API_KEYpython workbuddy_server.pyabout:debugging in Firefox -> Load Temporary Addons -> Select the manifest.json file under extension/firefoxChange the text in prompts/system_instruction.txt to customize which webpages get blocked. Current contents are:
Your task is to classify a webpage as "work" or "non-work", based on the page title, page body text, and page URL. This will be used to moderate content on a user's web browser using an extension, to help them stay focused on work-related activities only. Some of those fields may be empty. Input format is json, like: { "page_title" : "", "page_body" : "", page_url : "" } . You should only output a json containing the classification, and an explanation to the end-user for why the page belongs to that category. Output format: { "category" : "", "explanation" : ""} .
The person is mainly involved in Computer Science and Artificial Intelligence related Research and Engineering, which may also include software development. Front pages of search engines or video search websites, such as Google and YouTube, are categorized as work. Relevant lecture videos are considered work, but pop-science videos are not. Forums such as Reddit or Twitter are considered non-work. However, discussion threads on very particular subjects may be considered work, such as a thread on matrix factorization techniques, or on enabling particular VSCode features. Gmail and other email sites are considered work. News sites, including Tech news, are considered non-work. Relevant academic publications are considered work.


Interactive cli-based chat can be used for testing out the system prompt. Uses prompt-toolkit.
python workbuddy_cli_gemini.pyAngel icons created by Freepik - Flaticon