Appearance
🦅 OpenClaw Gateway
OpenClaw is a self-hosted, open-source personal assistant gateway developed by Peter Steinberger. It connects messaging networks (such as Telegram, Slack, and Discord) to Large Language Models (like Google Gemini) and exposes local operating system capabilities through custom Python executables called Skills.
For the corresponding hands-on module, see openclaw-gateway.md.
📊 Tool Datasheet
| Metric | Details |
|---|---|
| Tool Name | OpenClaw Gateway |
| Category | Messaging & Local Assistant Gateway |
| Purpose | To connect messaging APIs to LLMs, exposing local OS processes through Python-decorated tool functions. |
| Developer | Peter Steinberger |
| License | MIT License |
| Port Mapping | Default: 9000 |
🛠️ Capabilities
- Multi-Channel Bridges: Connects directly to Telegram Bots (via long polling or webhooks) and broadcasts alerts to Discord and Slack webhooks.
- Dynamic Skill Loading: Automatically parses docstrings of Python functions decorated with
@skillto dynamically define LLM tool-calling capabilities. - Strict Security Whitelisting: Safeguards local system execution by rejecting commands from non-whitelisted user identifiers.
- Local Subprocess Execution: Spawns isolated shell tasks on the host machine to execute Python commands and return logs.
🧭 Step-by-Step Tutorial & Setup
This tutorial guides you through installing OpenClaw, configuring your Telegram token, and running a custom Python skill.
1. Installation
Clone the repository and install Node.js dependencies:
bash
cd ~/AI_BOOTCAMP/labs
git clone https://github.com/petersteinberger/openclaw.git
cd openclaw
nvm use default
npm install2. Configure Environment Variables
Create a .env file at the root of the openclaw directory: Path: ~/AI_BOOTCAMP/labs/openclaw/.env
text
OPENAI_API_KEY=your_openai_api_key_here
TELEGRAM_BOT_TOKEN=123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ
TELEGRAM_ALLOWED_USER_IDS=555123456
PORT=9000
DATA_DIR=~/AI_BOOTCAMP/labs/openclaw/data3. Write a Custom Python Skill
Create system_skills.py inside the skills directory: Path: ~/AI_BOOTCAMP/labs/openclaw/skills/system_skills.py
python
import os
from openclaw.skills import skill
@skill(description="Lists files in the active training workspace to inspect progress.")
def check_workspace_files() -> str:
path = os.path.expanduser("~/AI_BOOTCAMP")
if not os.path.exists(path):
return f"Workspace path '{path}' does not exist!"
files = os.listdir(path)
return "Files found:\n" + "\n".join([f"- {f}" for f in files])4. Start the Gateway
Launch the server daemon in your terminal:
bash
npm run startMessage your Telegram bot: OpenClaw, what files do we have in our training workspace? The bot will execute the Python subprocess natively on Linux and reply with your directory structure.
💡 Sample Ideation to Test
Try these ideas to expand your OpenClaw Gateway integration:
- System Performance Auditing: Write a custom skill that parses output from
psutiland sends a warning to your bot if RAM usage exceeds 90%. - Outbound Webhook Dispatcher: Integrate
alert_dispatcher.pyto trigger immediate Slack or Discord channel notifications when local builds or database tests fail.