Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 3.86 KB

File metadata and controls

102 lines (73 loc) · 3.86 KB

Replication and Setup Guide

This guide details how to clone and replicate the Assistant ecosystem (bots, state manager, and browser automation) on a new host machine.

Since local secrets, dependencies, configuration files, and browser sessions are git-ignored for safety, they must be reconstructed on the target machine.


🛠️ Step 1: Environment & Dependency Setup

1. Recreate Virtual Environments

Each bot has its own isolated Python environment. Create and populate them on the new host machine:

Bridge Bot (discord-bridge)

cd discord/discord-bridge
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt

OpenClaw Bot (discord-openclaw)

cd discord/discord-openclaw
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt

2. Install Playwright & Browser Binaries

Run the installer script in the context of the virtual environments to set up directories and download the browser:

cd discord/browser_automation
powershell.exe -ExecutionPolicy Bypass -File .\install.ps1

Current browser automation providers are gemini, deepseek, chatgpt, and claude. The provider registry lives in discord/browser_automation/browser_manager.py.


⚙️ Step 2: Local Configuration & Secrets (.env)

Secrets and environment-specific variables are git-ignored. You must copy the templates and populate them manually.

  1. Copy .env.example to .env in both bot directories:

    • discord/discord-bridge/.env
    • discord/discord-openclaw/.env
  2. Open the .env files and configure the values:

    • DISCORD_BOT_TOKEN: The token for your bot application.
    • CHANNEL_ID: The channel ID the bots should listen to.
    • HERMES_HOME: The absolute path pointing to your .hermes data directory (e.g. C:\Users\<user>\.hermes).
    • CEREBRAS_API_KEY (OpenClaw): Your Cerebras API credentials.

🧠 Step 3: Local agent Data (.hermes)

Your agent memory, system contexts, and custom scripts are stored in the HERMES_HOME directory (e.g. D:\LapSlop brotherhood\Programs\HermesAI\.hermes).

  1. Manually copy your .hermes/ folder from the source machine to the destination.
  2. Ensure the HERMES_HOME path inside your .env matches this location.
  3. Git-ignored database states (like state.db or kanban.db) will be recreated automatically on startup, but you should copy them if you want to preserve session logs and history.

🔑 Step 4: Re-Authenticate Browser Sessions

Saved browser cookies and tokens (sessions/*.json) are not committed to Git. To authenticate the new machine:

  1. Launch your bots on the new machine.
  2. In your Discord server, type:
    /web-llm-login provider: gemini
    
  3. A headful browser window will appear on the new machine's desktop.
  4. Log in manually to your account (Google, OpenAI, or Anthropic).
  5. Once inside the chat UI, the bot will detect the active input field, save the session state locally to discord/browser_automation/sessions/gemini.json, and close the window.
  6. Repeat this step for chatgpt, claude, and deepseek.

For DeepSeek, prefer the newer slash command:

/login provider: deepseek

You can also run the standalone login helper locally:

cd "D:\LapSlop brotherhood\Programs\Assistant\discord"
.\discord-openclaw\.venv\Scripts\python.exe .\browser_automation\run_login.py deepseek

🚀 Step 5: Startup Verification

Once everything is configured, run the startup script to check health:

cd discord/discord-bridge
.\start_all.ps1

In Discord, use /web-llm-status to verify that all automation providers are authenticated and ready.

Current start_all.ps1 starts Hermes Gateway, RoketPunchaBluu Bridge/OpenCode, OpenClaw, and discord/desktop_action_layer.py. Use /status-turn and /reset-turn if the shared turn state is stuck after restoring a machine.