Blink AI is a powerful, autonomous AI agent designed to assist with a wide range of tasks, from coding to general problem-solving. It features a modern desktop-like interface and supports multiple Large Language Model (LLM) providers, allowing you to choose the best model for your needs.
- Multi-Provider Support: Seamlessly switch between OpenAI, Anthropic, Groq, and OpenRouter.
- Autonomous Agent: Capable of executing terminal commands, file operations, and more to actively solve problems.
- Persistent Memory: Maintains conversation context to provide coherent and improved responses.
- Customizable: extensive configuration options including system prompts, model parameters, and more.
- Modern UI: A sleek, dark-themed user interface built with HTML/CSS and powered by
pywebview.
- Python 3.8 or higher.
pippackage manager.
-
Clone the repository:
git clone https://github.com/SaaranshDx/blink.git cd blink -
Install dependencies:
pip install -r requirements.txt
Blink AI operates on a client-server architecture:
- Backend (
server/main.py): Handles the core AI logic, conversation memory, and communicates with LLM providers. It runs onhttp://127.0.0.1:5000. - Client (
main.py): The user interface wrapper that communicates with the backend and handles local system operations (like terminal commands). It runs an internal server onhttp://127.0.0.1:6767.
To use Blink AI, you need to run both the backend server and the client application.
Open a terminal window and run the backend server:
python server/main.pyThis will start the Flask server on port 5000. You needs to keep this window open.
Open a second terminal window (or a new tab) and launch the client:
python main.pyThis will open the Blink AI application window.
- Click the Settings gear icon in the top right corner (or use
Ctrl+,). - Select your preferred Provider (OpenAI, Anthropic, Groq, OpenRouter).
- Enter your API Key.
- Specify the Model name (e.g.,
gpt-4,claude-3-opus-20240229,llama3-70b-8192). - Adjust Temperature and Max Tokens if desired.
- Click Save.
The "personality" and rules of the agent are defined in the System Prompt. To modify it:
- Open
server/main.pyin your text editor. - Locate the variable
SYSTEM_PROMPT(usually near the top of the file). - Edit the text within the triple quotes
"""to change how the agent behaves, its rules, or its capabilities.
# server/main.py
SYSTEM_PROMPT = """
You are "blink", an AI assistant developed by Blink AI.
...
"""- Restart the backend server (
server/main.py) for the changes to take effect.
Your settings (API keys, current model, etc.) are saved locally in config.json. You can edit this file directly if you prefer, but using the in-app Settings menu is recommended to ensure proper formatting.
F5: Clear Chat History (UI only)Ctrl + E: Clear Session (Clears UI and Backend Memory)Ctrl + ,: Open SettingsCtrl + L: Focus Input Field
- "Connection Error": Ensure that
server/main.pyis running and accessible atlocalhost:5000. - Rate Limits: If you receive rate limit errors, try switching providers or increasing the wait time between requests.
- Dependencies: If you encounter
ModuleNotFoundError, make sure you have installed all requirements:pip install -r requirements.txt.