Skip to main content

Prerequisites

Before installing:
  • Windows 10/11 (Pro or Enterprise)
  • Python 3.12 installed
  • Administrator access
  • Internet connectivity
Use Python 3.12, not 3.13+. There are compatibility issues with pywin32 on newer versions.

Installation Steps

1

Install Python 3.12

Download from python.orgImportant: Check “Add Python to PATH” during installation.
2

Download the Driver

Get the driver package from your Granite dashboard or:
git clone https://github.com/your-org/granite-driver.git
cd granite-driver/driver
3

Install Dependencies

pip install -r requirements.txt
This installs:
  • pyautogui (UI automation)
  • rpaframework (Robocorp RPA)
  • websockets (Backend connection)
  • mss (Screen capture)
  • aiortc (WebRTC streaming)
4

Configure the Driver

Create or edit the configuration file:
# config.py
BACKEND_URL = "wss://api.getgranite.ai/ws/driver"
MACHINE_ID = "unique-machine-id"  # Change this
5

Test the Installation

Run a quick test:
python -c "import pyautogui; print(pyautogui.position())"
Should print your mouse position.

Directory Structure

After installation:
granite-driver/
├── driver/
│   ├── src/
│   │   ├── config.py          # Configuration
│   │   ├── connection/        # WebSocket logic
│   │   ├── executor/          # Job execution
│   │   └── streaming/         # Video streaming
│   ├── requirements.txt       # Dependencies
│   └── main.py               # Entry point

Running the Driver

Manual Start

cd granite-driver/driver
python main.py
For production, run as a Windows service:
# Using NSSM (Non-Sucking Service Manager)
nssm install GraniteDriver "C:\Python312\python.exe" "C:\granite-driver\driver\main.py"
nssm start GraniteDriver

Verifying Installation

After starting the driver:
  1. Check the console for “Connected to backend”
  2. Go to Driver Management in the dashboard
  3. Your machine should appear as Online

Environment Variables

Optional configuration via environment:
VariableDescriptionDefault
GRANITE_BACKEND_URLWebSocket endpointProduction URL
GRANITE_MACHINE_IDUnique identifierHostname
GRANITE_LOG_LEVELLogging verbosityINFO

Next Steps