How to Set Up Your Own AI Agent with OpenClaw, Telegram & Cloud AI
A complete step-by-step guide to setting up an always-on AI agent on your MacBook using OpenClaw, Telegram, and cloud-based AI (MiniMax-M2.7). Perfect for developers and tech enthusiasts.

The Ultimate OpenClaw Setup Guide: Cloud AI & Telegram Integration
Have you ever wanted your own always-on AI agent that you can chat with from your phone, powered by a powerful cloud brain? This guide will walk you through setting up OpenClaw on your MacBook — creating a seamless bridge between a cloud-based AI and a Telegram bot interface.
By the end, you'll have your own personal AI agent running 24/7, ready to help with tasks, answer questions, and maybe even manage your digital life.
What is OpenClaw?
OpenClaw is a local gateway that connects powerful cloud AI models to messaging platforms like Telegram. Think of it as the nerve center that routes messages from your phone to a cloud brain and back — all running on your MacBook.
The best part? It uses MiniMax-M2.7 — a blazing fast cloud model that handles complex reasoning while staying incredibly responsive.
Prerequisites
Before we begin, gather these four essentials:
- Telegram Bot Token — Create one via @BotFather
- Telegram User ID — Get yours from @userinfobot
- Ollama Cloud API Key — Generate at cloud.ollama.com
- Target Model — We'll use
cloud/minimax-m2.7:cloud
Step 1: Install the Golden Build (v2026.3.24)
Stability is key. We specifically use version v2026.3.24 — a battle-tested release that plays nicely with cloud endpoints.
Open your Terminal and run:
npm install -g openclaw@2026.3.24
Verify the installation:
openclaw --version
You should see 2026.3.24 as the output.
Step 2: Create the Configuration File
OpenClaw needs a map. We'll create openclaw.json with all your credentials:
cat > ~/.openclaw/openclaw.json <<'EOF'
{
"plugins": {
"allow": ["ollama", "openclaw-web-search", "telegram"]
},
"meta": {
"lastTouchedVersion": "2026.3.24"
},
"gateway": {
"mode": "local",
"port": 18789,
"bind": "loopup",
"auth": {
"token": "your_secure_local_token"
}
},
"agents": {
"defaults": {
"model": "cloud/minimax-m2.7:cloud",
"workspace": "/Users/YOUR_USERNAME/workspace"
}
},
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_TELEGRAM_BOT_TOKEN",
"dmPolicy": "allowlist",
"allowFrom": ["YOUR_TELEGRAM_USER_ID"]
}
},
"models": {
"providers": {
"cloud": {
"api": "ollama",
"apiKey": "YOUR_OLLAMA_CLOUD_API_KEY",
"baseUrl": "https://api.ollama.com",
"models": [{
"id": "minimax-m2.7:cloud",
"name": "MiniMax Cloud"
}]
}
}
}
}
EOF
Important: Replace:
YOUR_TELEGRAM_BOT_TOKEN— from @BotFatherYOUR_TELEGRAM_USER_ID— numeric ID from @userinfobotYOUR_OLLAMA_CLOUD_API_KEY— from cloud.ollama.comYOUR_USERNAME— your Mac username
Step 3: Launch the Gateway
Time for liftoff! In your terminal:
openclaw gateway --allow-unconfigured
Watch for these success indicators:
[gateway] listening on ws://127.0.0.1:18789
[telegram] [default] starting provider (@your_bot_username)
Step 4: Test with /ping
Open Telegram, find your bot, and send:
/ping
You should get an instant:
PONG 🏓
Congratulations! Your AI agent is online!
Accessing the Dashboard
Monitor your agent's health at:
http://127.0.0.1:18789/channels
Troubleshooting Common Issues
Error: "No API provider registered for api: ollama"
This usually means a version regression (specifically in build 2026.3.28). Fix: Ensure you're running 2026.3.24, then perform a deep clean:
launchctl unload ~/Library/LaunchAgents/ai.openclaw.gateway.plist 2>/dev/null
openclaw gateway stop 2>/dev/null
killall openclaw 2>/dev/null
rm -rf ~/.openclaw/meta
rm -rf ~/.openclaw/agents/main
rm -f ~/.openclaw/plugins.json
Error: "Address already in use"
A ghost process is holding the port. Run the deep clean sequence above.
Bot Doesn't Reply (Webhook Conflict)
Telegram only allows one webhook per bot. Clear old webhooks:
https://api.telegram.org/botYOUR_TOKEN/deleteWebhook
Why Set Up an AI Agent?
Here are just a few things you can do once your agent is running:
- Automate repetitive tasks — draft emails, generate content
- Research assistant — web search, summarize articles
- Personal secretary — reminders, scheduling, note-taking
- Coding partner — debug code, explain concepts
- 24/7 availability — your agent never sleeps
Conclusion
You now have a fully functional AI agent powered by cloud AI, accessible from anywhere via Telegram. This setup gives you the power of sophisticated AI models with the convenience of a messaging app.
Ready to explore what your AI agent can do? Try asking it to help with a project, research a topic, or just have a conversation!
Setup inspired by the official OpenClaw documentation. For more advanced configurations and features, check out the OpenClaw Docs.
This guide was written with assistance from Hovah Agent ⚡ — an AI agent running on OpenClaw, helping manage Hovah Digital Solutions.