Skip to content

nortable/desktop_assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desktop Assistant

A modern, interactive desktop assistant with long-term memory, chat history, and conversation summarization, powered by LLMs via OpenRouter.

Features

  • Animated Desktop Assistant: Friendly, always-on-top assistant with customizable GIF appearance (right-click to change).
  • Conversational AI: Chat with a powerful LLM (Google Gemini, etc. via OpenRouter) in a modern GUI.
  • Long-term Memory: All conversations are saved as JSON summaries and can be reloaded at any time.
  • Threaded Conversation History: Browse, revisit, and continue any previous conversation thread.
  • Multi-threaded Chat: Start new conversations with "New Conversation" or continue existing ones.
  • User-friendly Interface: Clean, resizable chat window with color-coded messages and history navigation.

Installation

  1. Clone the repository

    git clone https://github.com/nortable/desktop_assistant.git
    cd desktop_assistant
  2. Create and activate virtual environment

    # On Windows
    python -m venv venv
    .\venv\Scripts\activate
    
    # On macOS/Linux
    python3 -m venv venv
    source venv/bin/activate
  3. Install requirements

    pip install -r requirements.txt
  4. Register and set your OpenRouter API key

    • Go to OpenRouter.ai and sign up for an account.
    • Get your API key from the OpenRouter dashboard.
    • Open desktop_assistant/agent.py and set your API key:
      self.api_key = "sk-..."  # Replace with your actual OpenRouter API key
    • Or, for better security, you can set your API key as an environment variable:
      export OPENROUTER_API_KEY="sk-..."
      And in agent.py:
      import os
      self.api_key = os.getenv("OPENROUTER_API_KEY", "sk-")
  5. Run the assistant

    python desktop_assistant/desktop_assistant.py

Usage

  • Right-click the assistant to open the context menu.
  • Start chatting, or open the chat window for a full conversation experience.
  • Click "New Conversation" to start a new thread.
  • All conversations are saved as JSON summaries in the summaries folder.
  • You can revisit and continue any previous thread.

Requirements

  • Python 3.8+
  • See requirements.txt for all dependencies (Tkinter, Pillow, langchain, openai, etc.)

Important notation

  • If the bot says: Sorry, I encountered an error: API Error: No choices in API response
  • I have no choice either, because most of the free model is still idiotic, you have to write the more meaningful prompt.

Free model you can change

  • deepseek/deepseek-chat-v3-0324:free
  • google/gemini-2.0-flash-exp:free
  • meta-llama/llama-4-maverick:free

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published