Select Your Operating System
Commands and service definitions update dynamically for your workstation shell.
Set Up Virtual Environment & Dependencies
Create an isolated Python 3.10+ virtual environment and install core bot runtime libraries.
Create Virtualenv & Install Dependencies
Create your environment and install pyodbc, playwright, requests, and pydantic:
Paste the terminal output confirming successful package installation:
Configure Database Connectivity & ODBC Drivers
Verify that Microsoft ODBC Driver 18 for SQL Server is registered and set connection credentials.
Check Installed ODBC Drivers
Query registered drivers using Python pyodbc:
msodbcsql18).
Paste the output of pyodbc.drivers() showing SQL Server driver registration:
Install Playwright Headless Browser Engine
Install dedicated headless Chromium binaries for automated web interaction and data extraction.
Install Chromium Binary & Verify Execution
Fetch browser binaries and run a headless launch smoke test:
Paste the Chromium version output from the smoke test command:
Execute Single-Cycle Bot Runner Test
Run a single task-dispatch cycle to verify database communication and task processing.
Create Bot Runner & Health Check Scripts
Save the operational worker script runner.py in your project directory:
Also create health_check.py to monitor log vitality:
Execute Single Diagnostic Cycle
Run the diagnostic cycle and health check on your operating system:
Paste the completion banner from your single-cycle test run:
Verify Mandatory Persistent Logging & Health
Verify that all bot actions, heartbeats, and subprocess runs write to logs/grok_bot.log.
Inspect Log File Output
Check the latest log entries in the project log file:
Paste lines from logs/grok_bot.log to confirm persistent record creation:
Configure Background Daemon & Run It Later Card
Set up a persistent background schedule and save the operations reference card.
Register Background Service
Configure automated execution on your operating system:
Paste the confirmation output from your service registration command:
⚡ Run It Later — Operations Reference
py -3.12 runner.py --bot grok_bot --once
Executes one task cycle and terminates cleanly
py -3.12 runner.py --bot grok_bot
Runs continuous loop with backoff and heartbeat logging
Get-Content logs/grok_bot.log -Wait
Streams live persistent execution logs to terminal
python health_check.py
Verifies DB connectivity, ODBC drivers, and browser state
Build Bot Better & Wipe Resistance
Apply profile and workspace protections so an agent cannot casually wipe your home folder or project data. Fleet rule: Hub conversation #31.
An autonomous agent running without boundary constraints executed a recursive delete targeting the user profile. Prompt rules and command-text deny lists (like rm or Remove-Item) fail when paths are passed inside variables or child scripts. BuildBotsBetter requires the complete defense trio: PreToolUse path inspection, off-volume backups, and a practised restore.
1. Per-Agent Onboarding Checklist (Run Once Per Agent)
Onboarding does not end when software installs. Generate and maintain a six-line checklist file for each agent operating on your system:
2. Variable-Limit Delete Guard Demo
Demonstrate why command-text pattern matching misses variable-derived deletions, while true path resolution catches and refuses them:
3. Off-Volume Profile & Data Backup
Back up Grok Bot profiles (.grokbot, .grok, AppData\Roaming\Grok Bot) off the OS volume:
4. Practised Restore Drill
Never trust an unverified backup. Run this safe, self-contained restore drill inside your temp folder:
5. Fail-Closed Workspace Policy
Grok Bot runners must be configured with explicit working directories and safety hooks. BuildBotsBetter enforces the PreToolUse hook (protect_user_folders.py) to block recursive profile wipes. Fail-closed working directories and off-volume profile backups ensure complete resilience. Never run runner.py with a home-root cwd.
Paste terminal output from the restore drill or variable demo confirming protection: