Tutorial

How to Set Up OpenClaw on Windows

A complete step-by-step guide to installing OpenClaw, connecting Telegram, and running your personal AI agent on Windows.

πŸ“… Updated: January 2024 ⏱️ 25 min read πŸ‘€ By BowTiedAgent

Table of Contents

OpenClaw is a powerful open-source AI agent framework that lets you run your own personal AI assistant on your Windows machine. Whether you want to automate emails, research topics, or simply have a smart assistant available 24/7, OpenClaw makes it possibleβ€”all without monthly subscriptions.

In this guide, I'll walk you through the complete installation process, from prerequisites to your first conversation with your new AI agent. Let's dive in.

What is OpenClaw?

OpenClaw is an open-source AI agent platform built on top of large language models. Think of it as having your own personal AI assistant that runs locally on your computer. Unlike ChatGPT or Claude, your data stays on your machine, and you have full control over what your agent can do.

OpenClaw can:

πŸ’‘ Pro Tip The Professional edition of BowTiedAgent includes pre-configured skills and setup support. If you'd prefer us to handle the technical details, check out the Professional Edition.

Prerequisites

Before we begin, let's make sure your Windows machine is ready. You'll need the following:

1. System Requirements

2. Required Software

πŸ“‹ Software Checklist Before proceeding, verify each item is installed. We'll cover how to get your API keys in the next sections.

Installation

Let's get OpenClaw installed on your Windows machine. Follow these steps carefully.

1

Install Git (if not already installed)

Download and install Git from git-scm.com. Use default options during installation.

2

Install Python

Download Python 3.11+ from python.org. Important: Check "Add Python to PATH" during installation.

3

Clone the OpenClaw Repository

Open PowerShell and run the following command:

PowerShell # Navigate to your desired directory cd C:\Users\YourUsername\Projects # Clone the OpenClaw repository git clone https://github.com/openclawai/openclaw.git # Enter the project directory cd openclaw
4

Create a Virtual Environment

It's best practice to create a virtual environment to isolate dependencies:

PowerShell # Create a virtual environment python -m venv venv # Activate the virtual environment .\venv\Scripts\Activate # Upgrade pip python -m pip install --upgrade pip
5

Install Dependencies

Install the required Python packages:

PowerShell # Install OpenClaw and all dependencies pip install -r requirements.txt
⚠️ Important If you encounter permission errors, run PowerShell as Administrator and try again.

Initial Setup

Now that OpenClaw is installed, let's configure it. You'll need to set up your API keys and basic configuration.

1. Get Your OpenAI API Key

  1. Go to platform.openai.com
  2. Sign up or log in to your account
  3. Navigate to API Keys section
  4. Create a new secret key
  5. Copy and save it somewhere secure β€” You won't be able to see it again!

2. Configure Environment Variables

OpenClaw uses environment variables for configuration. Create a .env file in the project root:

.env # OpenAI Configuration OPENAI_API_KEY=sk-your-api-key-here OPENAI_MODEL=gpt-4 # Optional: Anthropic Claude (if using instead) ANTHROPIC_API_KEY=sk-ant-your-key-here # Telegram Configuration TELEGRAM_BOT_TOKEN=your-telegram-bot-token TELEGRAM_ADMIN_ID=your-telegram-user-id # Application Settings LOG_LEVEL=INFO

3. Verify Installation

Let's make sure everything is working:

PowerShell # Make sure venv is activated .\venv\Scripts\Activate # Run the health check python -m openclaw health

You should see output indicating that all services are operational. If you see errors, check the troubleshooting section below.

Telegram Connection

Telegram provides the easiest way to interact with your OpenClaw agent. Here's how to set it up:

1. Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot to create a new bot
  3. Follow the prompts to name your bot
  4. Copy the bot token β€” You'll need this for configuration

2. Get Your Telegram User ID

  1. Search for @userinfobot on Telegram
  2. Start a conversation with it
  3. It will display your User ID β€” copy this

3. Update Your Configuration

Add the Telegram credentials to your .env file:

.env # Add these lines to your .env file TELEGRAM_BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrsTUVwxyz123456789 TELEGRAM_ADMIN_ID=123456789

4. Start the Bot

PowerShell # Start the OpenClaw Telegram bot python -m openclaw telegram
πŸŽ‰ Success! Your bot should now be running. Open Telegram and search for your bot name to start chatting!

First Conversation

Now comes the fun part β€” talking to your AI agent! Let's verify everything is working with a simple conversation.

1. Start the Chat

  1. Open Telegram and find your bot
  2. Click "Start" or send a message
  3. Wait a moment for the agent to initialize

2. Test with Simple Commands

Try these starter commands:

Telegram hello β†’ Hello! I'm your OpenClaw assistant. How can I help you today? what can you do? β†’ I can help you with a variety of tasks including: β€’ Reading and writing emails β€’ Researching topics online β€’ Summarizing documents β€’ Managing your calendar β€’ And much more depending on my configured skills help me write an email β†’ I'd be happy to help you write an email! Please tell me: 1. Who is the recipient? 2. What's the purpose of the email? 3. Any specific points you want to include?

3. Configure Your First Skill

OpenClaw's power comes from skills. Let's enable a basic skill:

PowerShell # List available skills python -m openclaw skills list # Install a skill (e.g., web search) python -m openclaw skills install web-search # Enable the skill python -m openclaw skills enable web-search
πŸ’‘ Next Steps Now that you have OpenClaw running, explore additional skills in the official documentation. The Professional edition comes with 30+ pre-configured skills for marketing, research, and business automation.

Troubleshooting

Here are solutions to common issues you might encounter:

"Python is not recognized"

Make sure Python is in your PATH. Reinstall Python and check "Add to PATH" or manually add the Python directory to your system PATH.

"Module not found" errors

Activate your virtual environment first: .\venv\Scripts\Activate

Telegram bot won't start

Verify your bot token is correct. Check for extra spaces or quotes in your .env file.

API key errors

Ensure your OpenAI account has credits available. Check the API key is copied correctly without extra characters.

Slow responses

This is usually due to API rate limits or network issues. Check your internet connection and verify you're not hitting rate limits on your OpenAI account.

πŸ†˜ Need More Help? Check the official OpenClaw documentation or reach out to the community on GitHub.

Conclusion

Congratulations! You've successfully set up OpenClaw on Windows. Your personal AI agent is now running and ready to help with your workflow.

From here, you can:

OpenClaw is incredibly powerful, but getting everything perfectly configured can take time. If you'd prefer a hands-off approach with pre-configured skills, 24/7 support, and a complete business automation system, consider the Professional Edition.

Want Us to Do This for You?

Save hours of setup time. Get the Professional Edition with 30+ pre-configured skills, complete setup, and priority support.

Get the Professional Edition β†’