> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Windows Setup for PraisonAI Claw

> Windows setup guide for the PraisonAI Claw dashboard with venv pattern

PraisonAI Claw (`praisonai claw`) is the PraisonAI Dashboard; this guide covers venv isolation and PowerShell setup on Windows. For the separate OpenClaw project, see [Works with OpenClaw](https://praison.ai/docs/integrations/openclaw.md).

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="assistant",
    instructions="You are a helpful assistant with OpenClaw tools.",
    llm="gpt-4o-mini",
)
agent.start("List available OpenClaw tools")
```

The user runs PraisonAI Claw on Windows; the agent calls MCP tools exposed by the local daemon.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Windows PraisonAI Claw Architecture"
        A[🖥️ Windows Host] --> B[🐍 Python venv]
        B --> C[🦞 PraisonAI Claw Daemon]
        C --> D[🤖 PraisonAI Agent]
        D --> E[🔌 MCP Tools]
    end
    
    classDef host fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef venv fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef daemon fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tools fill:#10B981,stroke:#7C90A0,color:#fff
    
    class A host
    class B venv
    class C daemon
    class D agent
    class E tools
```

## How It Works

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant Agent
    participant Feature as Windows Claw Setup

    User->>Agent: Request
    Agent->>Feature: Process request
    Feature-->>Agent: Result    Agent-->>User: Response
```

## Quick Start

**1. Create Virtual Environment**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Create project directory and venv
mkdir praisonai-claw
cd praisonai-claw
python -m venv .venv
.venv\Scripts\Activate.ps1
```

**2. Install PraisonAI with Claw**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Install with agents and tools extras
pip install "praisonai[agents,tools,claw]"

# Verify installation
praisonai --version
Get-Command praisonai | Format-List *
```

**3. Configure Environment**

Claw onboarding expects search tools to be available. Set `TAVILY_API_KEY` (recommended) or rely on the free DuckDuckGo fallback — without Tavily, web search quality is lower.

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Create .env file
@'
# Set keys from your provider dashboards
OPENAI_API_KEY=
TAVILY_API_KEY=
PYTHONPATH=.
'@ | Out-File -FilePath .env -Encoding utf8
```

**4. Launch PraisonAI Claw Dashboard**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai claw
# Dashboard opens at http://localhost:8082
```

***

## PowerShell Setup Script

Create a standardized setup script for repeatable deployments:

**Invoke-PraisonClaw\.ps1**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
<#
.SYNOPSIS
    Setup and run PraisonAI Claw on Windows
.DESCRIPTION
    Creates venv, installs dependencies, and launches the Claw daemon
.PARAMETER ProjectPath
    Directory to create/use for the project (default: current directory)
.PARAMETER VenvPath
    Virtual environment path (default: .venv)
.PARAMETER LaunchDashboard
    Whether to launch the dashboard after setup
#>
param(
    [string]$ProjectPath = ".",
    [string]$VenvPath = ".venv", 
    [switch]$LaunchDashboard = $true
)

$ErrorActionPreference = "Stop"

# Resolve absolute paths
$ProjectDir = Resolve-Path $ProjectPath
$VenvDir = Join-Path $ProjectDir $VenvPath

Write-Host "🦞 PraisonAI Claw Windows Setup" -ForegroundColor Cyan
Write-Host "Project: $ProjectDir" -ForegroundColor Green

# Check Python availability
try {
    $PythonCmd = Get-Command python -ErrorAction Stop
    Write-Host "Python found: $($PythonCmd.Source)" -ForegroundColor Green
} catch {
    Write-Error "Python not found. Install Python 3.8+ and add to PATH"
}

# Create venv if it doesn't exist
if (!(Test-Path $VenvDir)) {
    Write-Host "Creating virtual environment..." -ForegroundColor Yellow
    python -m venv $VenvDir
}

# Activate venv
$ActivateScript = Join-Path $VenvDir "Scripts\Activate.ps1"
if (Test-Path $ActivateScript) {
    Write-Host "Activating virtual environment..." -ForegroundColor Yellow
    & $ActivateScript
} else {
    Write-Error "Virtual environment activation script not found: $ActivateScript"
}

# Verify we're in venv
$VenvPython = Join-Path $VenvDir "Scripts\python.exe"
if (Test-Path $VenvPython) {
    Write-Host "Using venv Python: $VenvPython" -ForegroundColor Green
} else {
    Write-Error "Virtual environment Python not found"
}

# Install PraisonAI with extras
Write-Host "Installing PraisonAI with OpenClaw..." -ForegroundColor Yellow
& $VenvPython -m pip install --upgrade pip
& $VenvPython -m pip install "praisonai[agents,tools,claw]"

# Verify installation
Write-Host "Verifying installation..." -ForegroundColor Yellow
$PraisonCmd = Join-Path $VenvDir "Scripts\praisonai.exe"
if (Test-Path $PraisonCmd) {
    & $PraisonCmd --version
    Write-Host "Installation verified: $PraisonCmd" -ForegroundColor Green
} else {
    Write-Error "PraisonAI command not found in venv"
}

# Create .env if it doesn't exist
$EnvFile = Join-Path $ProjectDir ".env"
if (!(Test-Path $EnvFile)) {
    Write-Host "Creating .env template..." -ForegroundColor Yellow
    @'
# OpenAI API Key (required) — paste your key after the equals sign
OPENAI_API_KEY=

# Optional: Other LLM providers
# ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# GOOGLE_API_KEY=${GOOGLE_API_KEY}

# Python path
PYTHONPATH=.
'@ | Out-File -FilePath $EnvFile -Encoding utf8
    Write-Host "Created $EnvFile - Please add your API keys" -ForegroundColor Yellow
}

# Print diagnostics
Write-Host "`n📊 Environment Diagnostics:" -ForegroundColor Cyan
Write-Host "Working Directory: $(Get-Location)"
Write-Host "Python Path: $VenvPython"
Write-Host "PraisonAI Path: $PraisonCmd"
Write-Host "Environment File: $EnvFile"

# Launch dashboard if requested
if ($LaunchDashboard -and (Test-Path $EnvFile)) {
    Write-Host "`n🚀 Launching OpenClaw Dashboard..." -ForegroundColor Cyan
    Write-Host "Dashboard will open at http://localhost:8082" -ForegroundColor Green
    & $PraisonCmd claw
}
```

**Quick Setup**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# One-liner setup and launch
irm https://raw.githubusercontent.com/MervinPraison/PraisonAIDocs/main/scripts/windows/Setup-PraisonClaw.ps1 | iex
```

**Manual Commands**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Manual step-by-step setup
mkdir praisonai-openclaw
cd praisonai-openclaw

# Create and activate venv
python -m venv .venv
.\.venv\Scripts\Activate.ps1

# Install with all extras
pip install "praisonai[agents,tools,claw]"

# Create environment
echo "OPENAI_API_KEY=sk-..." > .env

# Verify and launch
praisonai --version
praisonai claw
```

***

## OpenClaw Configuration

Configure OpenClaw with absolute Windows paths and proper subprocess handling:

**claw-config.yaml**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# OpenClaw Configuration for Windows
name: "PraisonAI Claw"
description: "Windows MCP bridge for PraisonAI agents"

# Python executable path (use absolute path)
python_executable: "C:\\path\\to\\your\\project\\.venv\\Scripts\\python.exe"

# Working directory (use absolute path)
working_directory: "C:\\path\\to\\your\\project"

# Environment variables
environment:
  PYTHONPATH: "."
  OPENAI_API_KEY: "${OPENAI_API_KEY}"
  
# Subprocess configuration
subprocess:
  # Use forward slashes or escaped backslashes
  executable: ".venv/Scripts/praisonai.exe"
  args: ["claw", "--port", "8082"]
  
  # Windows-specific options
  shell: false
  capture_output: true
  timeout: 60
  
# MCP server configuration  
mcp:
  servers:
    filesystem:
      command: "python"
      args: ["-m", "mcp_server_filesystem", "C:\\path\\to\\project"]
    
    praisonai_tools:
      command: ".venv/Scripts/python.exe"
      args: ["-m", "praisonai.mcp.server"]
      
# Health check configuration
health:
  endpoint: "http://localhost:8082/health"
  interval: 30
  timeout: 5
```

**launch.ps1**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Windows launcher script for OpenClaw
param(
    [string]$ConfigPath = "claw-config.yaml",
    [int]$Port = 8082,
    [switch]$Debug = $false
)

$ErrorActionPreference = "Stop"

# Resolve paths
$ProjectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$VenvPython = Join-Path $ProjectRoot ".venv\Scripts\python.exe"
$ConfigFile = Join-Path $ProjectRoot $ConfigPath

# Validate environment
if (!(Test-Path $VenvPython)) {
    Write-Error "Virtual environment not found. Run setup script first."
}

if (!(Test-Path $ConfigFile)) {
    Write-Warning "Config file not found: $ConfigFile"
}

# Set environment
$env:PYTHONPATH = $ProjectRoot
Push-Location $ProjectRoot

try {
    # Launch OpenClaw
    Write-Host "🦞 Starting OpenClaw..." -ForegroundColor Cyan
    Write-Host "Python: $VenvPython" -ForegroundColor Green
    Write-Host "Config: $ConfigFile" -ForegroundColor Green
    Write-Host "Port: $Port" -ForegroundColor Green
    
    if ($Debug) {
        & $VenvPython -c "
import sys
print(f'Python: {sys.executable}')
print(f'Working dir: {sys.path[0]}')
"
    }
    
    # Start the daemon
    & $VenvPython -m praisonai claw --port $Port
    
} finally {
    Pop-Location
}
```

***

## Verification Checklist

> **Environment Setup**
>
> * [ ] Python 3.8+ installed and in PATH
> * [ ] Virtual environment created and activated
> * [ ] PraisonAI installed with `[agents,tools,claw]` extras
> * [ ] `.env` file created with API keys
> * [ ] Paths use absolute Windows format

> **OpenClaw Health Check**
>
> ```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> # Verify PraisonAI installation
> praisonai --version
>
> # Test OpenClaw launch
> praisonai claw --help
>
> # Check available tools
> praisonai tools list
>
> # Verify MCP connectivity
> Invoke-RestMethod -Uri "http://localhost:8082/health" -Method Get
> ```

> **MCP Tool Validation**
>
> ```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> # List available MCP servers
> praisonai mcp list
>
> # Test tool functionality
> praisonai test-agent "List files in current directory"
>
> # Verify subprocess paths
> Get-Process | Where-Object {$_.ProcessName -like "*python*"}
> ```

> **Security Validation**
>
> * [ ] `.env` file not committed to version control
> * [ ] API keys stored securely (Windows Credential Manager for production)
> * [ ] Virtual environment isolated from global Python
> * [ ] PowerShell execution policy allows script execution
> * [ ] Firewall allows localhost:8082 (if needed)

***

## Common Windows Issues

**PowerShell Execution Policy**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Check current policy
Get-ExecutionPolicy

# Allow script execution (if needed)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# Or run with bypass (temporary)
PowerShell -ExecutionPolicy Bypass -File .\Setup-PraisonClaw.ps1
```

**Path Resolution**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Use absolute paths to avoid working directory issues
$ProjectRoot = (Get-Location).Path
$VenvPath = Join-Path $ProjectRoot ".venv"
$PythonExe = Join-Path $VenvPath "Scripts\python.exe"

# Verify paths exist
Test-Path $PythonExe
```

**Module Import Errors**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Ensure venv is activated
.\.venv\Scripts\Activate.ps1

# Verify installation
python -c "import praisonai; print(praisonai.__version__)"

# Check PYTHONPATH
$env:PYTHONPATH = "."
python -c "import sys; print('\n'.join(sys.path))"
```

**Subprocess Issues**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Use console script instead of python -m
praisonai claw  # Not: python -m praisonai claw

# Check if command exists
Get-Command praisonai

# Use full path if needed
& ".\.venv\Scripts\praisonai.exe" claw
```

***

## Production Deployment

**1. Service Installation**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Install as Windows Service (requires admin)
# Create service wrapper script
$ServiceScript = @'
& "C:\path\to\project\.venv\Scripts\praisonai.exe" claw --port 8082
'@

# Register service (using NSSM or sc.exe)
nssm install PraisonAIClaw PowerShell -ExecutionPolicy Bypass -File service.ps1
nssm set PraisonAIClaw Start SERVICE_AUTO_START
```

**2. Security Configuration**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Use Windows Credential Manager for API keys
cmdkey /generic:praisonai_openai /user:api /pass:your-actual-key

# Update .env to read from credential store
# OPENAI_API_KEY will be read from secure storage
```

**3. Monitoring Setup**

```powershell theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Health check script
$HealthCheck = @'
$Response = Invoke-RestMethod -Uri "http://localhost:8082/health" -TimeoutSec 5
if ($Response.status -ne "ok") {
    Restart-Service PraisonAIClaw
}
'@

# Schedule health checks
Register-ScheduledTask -TaskName "PraisonClawHealth" -Trigger (New-ScheduledTaskTrigger -RepetitionInterval (New-TimeSpan -Minutes 5) -Once -At (Get-Date))
```

***

## Best Practices

> **Isolate PraisonAI in a dedicated venv**
>
> OpenClaw's Windows pattern relies on a per-project virtual environment. Create and activate a venv before installing so system Python stays clean and tool versions are reproducible across machines and CI.

> **Point OpenClaw at the local daemon, not the internet**
>
> The agent reaches MCP tools through the local OpenClaw daemon (e.g. `http://localhost:8082`). Bind the daemon to localhost so the tool surface isn't exposed on the network, and let Windows handle host-level access control.

> **Health-check and auto-restart the service**
>
> Long-running Windows deployments should watch the daemon's `/health` endpoint and restart the service on failure. A scheduled health check (as shown above) keeps tools available without manual intervention after a crash or reboot.

> **Keep credentials out of PowerShell scripts**
>
> Store API keys as Windows environment variables or a secrets store, not inline in `.ps1` files. Scripts committed to a repo or shared with a team should reference the environment so keys never leak.

***

## Related

> **[Onboard CLI](https://praison.ai/docs/features/onboard.md)**
>
> Interactive setup wizard including OpenClaw

> **[MCP Lifecycle](https://praison.ai/docs/features/mcp-lifecycle.md)**
>
> Model Context Protocol setup on Windows


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.