The Ultimate Guide to Installing ClawdBot – Free & Ready in 5 Minutes!
Build your own AI-powered Feishu Assistant in just 5 minutes!
Clawdbot is an open-source, low-cost, and easy-to-deploy solution that brings AI directly into Feishu (Lark).
✨ What Can It Do?
✅ Chat with AI directly inside Feishu
✅ Supports multiple AI models: Zhipu AI (GLM), anthropic claude, OpenAI
✅ Extremely affordable (~$0.40/month for light personal use)
✅ Deployable in under 5 minutes
✅ 100% free and open-source
⚡ Quick Setup (5-Minute Walkthrough)
Step 1: Install the Base Environment
Open PowerShell (Windows) and run:
# Install ClawDBot globally npm install -g ClawdBot@latest # Start the gateway service clawdbot gateway --port 18789
✅ Expected output: Gateway running at http://127.0.0.1:18789
Step 2: Configure Your AI API Key
Choose your preferred AI provider and run the corresponding command.
(Example below uses Zhipu AI — replace your-api-key with your actual key)
# For Zhipu AI (zai) echo 'your-api-key' | clawdbot models auth paste-token --provider zai # For Anthropic (Claude) echo 'your-api-key' | clawdbot models auth paste-token --provider anthropic # For openai echo 'your-api-key' | clawdbot models auth paste-token --provider openai
⚠️ Critical Tips:
DO NOT manually create credential files.
Always use the
paste-tokencommand above.Get your API key from the official platform (e.g., Zhipu AI Console)
Once configured, your AI is ready to chat!
Step 3: Download the bridge program
Run in PowerShell:
cd D:\ Invoke-WebRequest -Uri https://GitHub.com/wy51ai/MoltbotCNAPP/releases/latest/download/clawdbot-bridge-windows-amd64.exe -OutFile clawdbot-bridge.exe
This downloads the Feishu bridge executable.
Step 4: Create a Feishu App
Go to Feishu Open Platform
Create a "Custom Enterprise App"
Note down your App ID and App Secret
Enable permission:
im:messageSubscribe to event:
im.message.receive_v1Publish the app internally to your organization
Step 5: Launch the Bridge
In PowerShell:
.\clawdbot-bridge.exe start fs_app_id=YOUR_APP_ID fs_app_secret=YOUR_APP_SECRET
Replace YOUR_APP_ID and YOUR_APP_SECRET with your actual credentials.
Step 6: Initialize Your AI assistant
Go to Feishu, find your newly created app, and send it a message.
The bot will reply with:
Agent: "Hey. I just came online. Who am I? Who are you?"
Now reply with answers like:
“Your name is Xiao Zhushou (Little Assistant).”
“I’m Xiaoming, based in China.”
Any personalized intro you prefer.
✅ Once you respond, initialization completes! You can now chat freely with AI in Feishu.
💰 Cost Breakdown (pay-as-you-go)
| Usage Level | Daily Messages | Monthly Cost | Annual Cost |
|---|---|---|---|
| Personal (Light) | ~20 | ~¥3 ($0.40) | ~¥36 ($5) |
| Work (Medium) | ~100 | ~¥30 ($4) | ~¥360 ($50) |
🔑 Key Notes:
No cost when idle – you only pay when messages are sent.
Fully usage-based pricing.
Stop anytime – no subscription lock-in.
❌ 3 Critical Mistakes to Avoid
❌ Mistake 1: Manually Creating API Key Files
Wrong:
echo '{"api_key":"xxx"}' > ~/.clawdbot/credentials/zai/default/api_key.json✅ Correct:
echo 'xxx' | clawdbot models auth paste-token --provider zai
❌ Mistake 2: Skipping agent initialization
Symptom: Bot doesn’t reply.
Cause: Initialization dialogue never completed.
Fix: Send a message to the Feishu app and answer its questions. The file BOOTSTRAP.md must be deleted automatically after success.
❌ Mistake 3: Not Restarting After Config Changes
Always restart both services after changes:
clawdbot gateway restart .\clawdbot-bridge.exe restart
🚀 Starting Services Daily
Method 1: Manual Start
clawdbot gateway start cd D:\ .\clawdbot-bridge.exe start
Method 2: Startup Script (StartBot.ps1)
Create a file named StartBot.ps1:
Write-Host "🚀 Starting ClawdBot..." -ForegroundColor Green clawdbot gateway start Start-Sleep -Seconds 3 cd D:\ .\clawdbot-bridge.exe start Start-Sleep -Seconds 2 .\clawdbot-bridge.exe status Write-Host "✅ Startup complete!" -ForegroundColor Green
Then run it in PowerShell.
Method 3: Auto-start on Boot
clawdbot onboard --install-daemon
This creates a Windows scheduled task that launches ClawdBot automatically at system startup.
🔍 Troubleshooting Common Issues
Issue 1: Bot Not Replying
Checklist:
# 1. Is bootstrap incomplete? ls C:\Users\Administrator\clawd\BOOTSTRAP.md # If exists → complete init in Feishu # 2. Are API keys valid? clawdbot models status # 3. Test AI directly clawdbot agent --message "Hello"
Issue 2: Port Already in Use (Error: EADDRINUSE)
# Find process using port 18789 netstat -ano | findstr ":18789" # Kill it (replace <PID> with actual process ID) taskkill /PID <PID> /F # Restart gateway clawdbot gateway start
Issue 3: API 401 Authorization Error
Cause: Invalid or missing API key.
Fix:
echo 'correct-api-key' | clawdbot models auth paste-token --provider zai clawdbot gateway restart .\clawdbot-bridge.exe restart
📊 System Architecture
┌─────────┐ ┌──────────┐ ┌─────────┐ ┌─────────┐ │ Feishu │ ───> │ Bridge │ ───> │ Gateway │ ───> │ AI Model│ └─────────┘ └──────────┘ └─────────┘ └─────────┘ ↑ ↓ └────── Feishu WebSocket Events ────┘
Key Configuration Paths:
~/.clawdbot/clawdbot.json→ Main config~/.clawdbot/bridge.json→ Feishu app credentials~/.clawdbot/credentials/→ API keys~/clawd/→ Agent working directory (containsBOOTSTRAP.mdduring init)
🛠️ Quick Command Reference
Service Management
clawdbot gateway start # Start gateway clawdbot gateway stop # Stop gateway clawdbot gateway restart # Restart gateway .\clawdbot-bridge.exe start # Start bridge .\clawdbot-bridge.exe stop # Stop bridge .\clawdbot-bridge.exe restart # Restart bridge
Diagnostics
clawdbot doctor # Full system check clawdbot health # Quick health check clawdbot models status # View model/API status clawdbot agent --message "test" # Direct AI test
Log Inspection
# Last 20 log lines Get-Content ~/.clawdbot/bridge.log -Tail 20 # Real-time log tailing Get-Content ~/.clawdbot/bridge.log -Wait
🎓 Advanced Usage
Control Runtime Schedule
On-demand: Start/stop manually during work hours
Scheduled: Use Windows Task Scheduler (e.g., auto-start at 9 AM, stop at 6 PM on weekdays)
24/7: Deploy on a cheap cloud server (~$4–7/month), enable auto-start
Reduce Costs Further
Use cheaper models:
clawdbot models set zai/glm-4-flash
Shorten context:
Edit~/.clawdbot/clawdbot.json→ add:"compaction": { "mode": "aggressive" }Disable advanced features (e.g., tool calling, Web Search) in config
📝 Maintenance Recommendations
Weekly
clawdbot doctor # Health check ls ~/.clawdbot/*.log # Monitor log size
Monthly
# Update ClawdBot
npm update -g clawdbot
# Clean logs older than 30 days
Get-ChildItem ~/.clawdbot/*.log |
Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-30) } |
Remove-Item🎯 Summary
With ClawdBot, you get:
✅ A fully functional AI assistant in Feishu in 5 minutes
✅ Support for Zhipu, Claude, and OpenAI
✅ Ultra-low cost (~$0.40/month for personal use)
✅ Flexible scheduling (on-demand, scheduled, or 24/7)
✅ 100% free and open-source
Core Best Practices:
🔑 Always use
paste-token— never edit credential files manually🤖 Complete the Feishu initialization dialogue
🔄 Restart services after any config change
📝 Check logs first when troubleshooting
💰 You only pay when the bot sends messages
📚 Resources & Support
Official Links
ClawdBot Docs: docs.clawd.bot
ClawdBot GitHub: github.com/clawdbot/clawdbot
Bridge Project: github.com/wy51ai/moltbotCNAPP
Feishu Open Platform: open.feishu.cn
AI Providers
Zhipu AI: open.bigmodel.cn
Anthropic (Claude): console.anthropic.com
OpenAI: platform.openai.com
Community
GitHub Issues: Report bugs or request features
Now go build your smart Feishu workspace! 🚀
Comments & Questions (0)
No comments yet
Be the first to comment!