Multi-channel AI Gateway β Connect your AI Agent to 27+ messaging platforms through a unified gateway.
PyClaw is a Python rewrite of openclaw/openclaw, featuring MCP tool integration, 20+ built-in tools, cross-platform UI (Web/Desktop/Mobile), and an OpenAI-compatible HTTP API.
17+ pages: Chat, Agents, Channels, Sessions, Usage, Cron, Plans, Skills, Nodes, Voice, Logs, Debug, Config, System, Settings, and more
π‘οΈ Security
Command exec approval rules
Workspace sandbox boundary
SSRF prevention
Plaintext secret scanning
Configuration security audit
Quick Start
Requirements
Python >= 3.10
An LLM API key (OpenAI, Anthropic, Google Gemini, Ollama, or any OpenAI-compatible provider)
Install
# One-line install (macOS / Linux)
curl -fsSL https://raw.githubusercontent.com/chensaics/openclaw-py/master/scripts/install.sh | bash
# One-line install with local model support
curl -fsSL https://raw.githubusercontent.com/chensaics/openclaw-py/master/scripts/install.sh | bash -s -- --extras llamacpp
curl -fsSL https://raw.githubusercontent.com/chensaics/openclaw-py/master/scripts/install.sh | bash -s -- --extras mlx # Apple Silicon only# Windows (PowerShell)
irm https://raw.githubusercontent.com/chensaics/openclaw-py/master/scripts/install.ps1 | iex
# From PyPI (recommended)
pip install openclaw-py
# Or via pipx (isolated environment)
pipx install openclaw-py
# macOS via Homebrew
brew install chensaics/tap/pyclaw
# From source (development)
pip install -e ".[dev,ui]"# Docker
docker run -it --rm -e OPENAI_API_KEY="sk-..." ghcr.io/chensaics/openclaw-py:latest pyclaw agent "Hello"
Optional Extras
Extra
What it adds
ui
TypeScript client (Web/Desktop/Mobile)
matrix
Matrix channel (matrix-nio)
whatsapp
WhatsApp channel (neonize)
voice
Voice TTS (edge-tts)
dev
Testing + linting (pytest, ruff, mypy)
all
ui + matrix + voice + more
First Run
# 1. Interactive setup
pyclaw setup --wizard
# 2. Chat with the agent
pyclaw agent "What is the weather in Tokyo?"# 3. Start the gateway
pyclaw gateway
# 4. Launch the desktop UI
pyclaw ui
# 5. Or launch as a web app
pyclaw ui --web --port 18776
CLI Reference
Core Commands
Command
Description
pyclaw setup --wizard
Interactive setup wizard
pyclaw setup --non-interactive
Headless setup (env vars)
pyclaw agent <message>
Run a single agent turn
pyclaw gateway
Start the gateway server
pyclaw ui
Launch desktop UI
pyclaw ui --web
Launch web UI
pyclaw status [--deep]
Show status / probe health
pyclaw doctor
Run diagnostics
Configuration
Command
Description
pyclaw config list
Show all config
pyclaw config get <key>
Get a config value
pyclaw config set <key> <value>
Set a config value
Agents & Channels
Command
Description
pyclaw agents list
List agents
pyclaw agents add <name> --model <model>
Add an agent
pyclaw channels list
List channels
pyclaw channels status
Connection status
Auth & MCP
Command
Description
pyclaw auth login --provider <name>
Add API key profile
pyclaw auth status
Show auth profiles
pyclaw mcp status
Show MCP servers and tools
pyclaw mcp list-tools
List available MCP tools
Operations
Command
Description
pyclaw service install
Install as system service
pyclaw secrets audit
Scan for plaintext secrets
pyclaw security audit
Security audit
pyclaw logs [--follow]
Tail runtime logs
pyclaw backup export
Export config and sessions
Supported Channels
Channel
Library
Type
Telegram
aiogram
Core
Discord
discord.py
Core
Slack
slack-bolt (Socket Mode)
Core
WhatsApp
neonize (Baileys)
Core
Signal
signal-cli JSON-RPC
Core
iMessage
imsg JSON-RPC
Core
Web
Built-in
Core
Feishu / Lark
Open Platform API
Extension
DingTalk
Stream Mode
Extension
QQ
QQ Bot
Extension
MS Teams
Bot Framework
Extension
Matrix
matrix-nio
Extension
IRC
Native TCP/TLS
Extension
LINE
Messaging API
Extension
Twitch
IRC/TLS
Extension
Nostr
NIP-04 relay
Extension
BlueBubbles
REST webhook
Extension
Google Chat
OAuth webhook
Extension
Mattermost
REST + WebSocket
Extension
Nextcloud Talk
REST webhook
Extension
Synology Chat
Incoming webhook
Extension
Tlon / Urbit
HTTP API
Extension
Zalo
Official API
Extension
Voice Call
Twilio
Extension
Supported LLM Providers
Core Providers
Provider
Models
OpenAI
GPT-4o, GPT-4o-mini, o1, o3-mini
Anthropic
Claude Opus, Claude Sonnet, Claude Haiku
Google Gemini
Gemini 2.0 Flash, Gemini Pro
Ollama
Any locally hosted model
OpenAI-Compatible Providers
Provider
Notes
OpenRouter
Access to all models
Together AI
Open-source models
Groq
Fast inference
Fireworks AI
Fast inference
Perplexity
Search-augmented
Chinese Providers
Provider
Notes
DeepSeek
DeepSeek-V2 / DeepSeek-Coder
Moonshot / Kimi
128k context
Zhipu / GLM
GLM-4 series
Qwen / DashScope
Qwen series
Volcengine
Doubao models
MiniMax
MiniMax models
Qianfan / ηΎεΊ¦
ERNIE series
MCP (Model Context Protocol)
Connect external tool servers via MCP. Config format is compatible with Claude Desktop and Cursor.
# Install with dev dependencies
pip install -e ".[dev,ui]"# Run tests
pytest
# Run tests with coverage
pytest --cov=pyclaw --cov-report=term-missing
# Lint
ruff check src/ tests/
# Format
ruff format src/ tests/
# Type check
mypy src/pyclaw/
Contributing
Pull requests welcome. The project follows standard Python conventions:
Code style enforced by ruff
Type annotations enforced by mypy
All new features should include tests
Async-first architecture throughout
Acknowledgements
This project is inspired by OpenClaw (originally built with TypeScript). PyClaw is a ground-up rewrite using Python + TypeScript, with additional features.