Build Your First OpenClaw AI Agent

July 04, 2026
Build Your First OpenClaw AI Agent

OpenClaw Setup Guide: Build Your First OpenClaw AI Agent in 2026

OpenClaw went from zero to 247,000 GitHub stars in roughly 60 days — the fastest growth of any open-source project in history, beating React's 10-year record. Jensen Huang, Nvidia's CEO, called it 'probably the single most important release of software, probably ever.' That kind of attention is either hype or a signal.

After working through the setup process and the official documentation, the honest verdict is that it's a signal. OpenClaw is genuinely different from every AI tool you've used before. Not because it's smarter — it's not; the intelligence comes from whichever AI model you connect to it — but because it's always on, it runs in the background, it lives on your phone via WhatsApp or Telegram, and it can do things rather than just say things.

This guide walks you through setting up OpenClaw from scratch. By the end, you'll have a working personal AI agent that runs 24/7, connects to your phone, and can browse the web, manage your calendar, and automate workflows you choose.

Before you begin: OpenClaw is designed for technically comfortable users — you'll need to open a terminal and run commands. If you're not comfortable with that, the Personal AI Agents 101 guide covers ChatGPT Agent and Gemini Spark as zero-setup alternatives.

What OpenClaw Actually Is

OpenClaw is an open-source personal AI agent framework created by Peter Steinberger (founder of PSPDFKit) and released in early 2026. It's an MIT-licensed gateway that runs on your machine — Mac, Linux, or Windows via WSL2 — and connects AI models to the messaging apps you already use.

The core idea: your AI agent lives in your messaging app. You send it via WhatsApp, Telegram, or Slack message. It reads the message, reasons about what you want, uses its tools to make it happen, and replies. No browser tab to open. No new interface to learn. Your agent meets you where you are.

What Makes OpenClaw Different From ChatGPT or Gemini

Dimension ChatGPT / Gemini OpenClaw
Where it runs Company cloud servers Your computer or VPS
Always-on No — session-based Yes — 24/7 heartbeat
Your data Sent to OpenAI / Google Stays on your machine
Interface Their website or app Your WhatsApp, Telegram, Slack, and more
Monthly cost $20–$100/month subscription Free + API costs (~$5–50/month)
Customization Very limited Complete — build your own skills and workflows
Model choice Their models only 75+ AI models via OpenRouter
Open source No Yes (MIT License)

Before You Install: Three Important Safety Rules

 Rule 1: Do NOT install OpenClaw on your primary work computer. Use a dedicated machine, a second Mac, or a cloud VPS. OpenClaw can access files on the machine it runs on. A misconfigured skill or prompt injection attack is rare but possible.

 Rule 2: Always enable sandbox mode in your config (tools.fs.workspaceOnly: true). This restricts the agent to only accessing files in its designated workspace folder — not your entire file system.

 Rule 3: Use a dedicated API key for OpenClaw. Set a hard daily spending limit of $5 to $10 on that key. This caps the blast radius if something goes wrong.

With those rules in place, OpenClaw is safe and powerful. Thousands of developers have been running it daily for months. The risk is real but manageable with basic precautions.

System Requirements

  • Operating System: macOS (recommended), Linux, or Windows 10/11 via WSL2
  • Node.js: Version 22 or higher (older versions fail silently — check this first)
  • RAM: 4GB minimum, 8GB recommended
  • Storage: ~500MB for the gateway and workspace files
  • API key: One from OpenRouter (covers 75+ models), Anthropic, OpenAI, or another supported provider
  • Optional — Telegram account: Strongly recommended as your messaging interface. Simpler than WhatsApp for first-time setup.

Step 1: Check Your Node.js Version

This is the step most people skip and then spend an hour debugging. Check it first.

node --version

If the output shows v22.x.x or higher, you're good. If it shows anything lower — including v20 — update before continuing.

 Use nvm (Node Version Manager) to manage Node versions without affecting your system: nvm install 22 && nvm use 22

Step 2: Install OpenClaw

npm install -g openclaw

Verify the install was successful:

openclaw --version

You should see the current version number (2026.x.x). If you see a 'command not found' error, your npm global bin directory may not be in your PATH. Run npm bin -g to find the directory and add it to your ~/.bashrc or ~/.zshrc.

Step 3: Run the Setup Wizard

openclaw onboard

The wizard will ask you to configure:

•       Your primary AI model and API key — choose your preferred provider (see model recommendations below)

•       Your workspace directory — where your agent's files and memory will live (default: ~/.openclaw/workspace)

•       Your messaging channel — Telegram, WhatsApp, Slack, Discord, and 15+ others are supported

•       Basic security settings — sandbox mode, approval requirements for consequential actions

Choosing Your AI Model

Model Provider Estimated Cost/Month Best For
Qwen 3.5 Plus OpenRouter $3–8/month Best cost-to-performance ratio — recommended for beginners
Claude Sonnet 4.6 Anthropic $15–30/month Highest-quality reasoning and complex coding tasks
GPT-4o mini OpenAI $5–12/month Good balance of speed, quality, and familiarity for ChatGPT users
Llama 3.3 70B Ollama (Local) $0 (Runs on your machine) Complete privacy with no API costs; requires a capable GPU
DeepSeek V3 OpenRouter $2–6/month Excellent for writing, automation, and low-cost AI workflows

Start with Qwen 3.5 Plus to learn the tool without burning API credits. Once you understand your usage patterns, you can switch to Claude for higher-quality responses on demanding tasks.

Step 4: Connect Telegram

1.     Open Telegram and search for @BotFather

2.     Send /newbot and follow the prompts to create a new bot

3.     BotFather will give you an API token — copy it

4.     In your openclaw.json config file, add the Telegram token under the channels section

5.     Run openclaw restart

6.     Find your new bot on Telegram and send /start

What time is it? / What's my calendar looking like today?

 Once Telegram is working, consider connecting WhatsApp for mobile access — your agent can be reached from whichever app you have open. But start with Telegram first, as it's simpler to configure.

Step 5: Install Your First Skills

openclaw skills install web-search

openclaw skills install calendar-reader

openclaw skills install email-reader

openclaw skills install weather

openclaw skills install file-manager

 Always check the permissions object in a skill's metadata before installing. A skill that requests shell. execute or fs.read_root permissions is a red flag unless you understand exactly why it needs them.

Step 6: Customize Your Agent's Identity (SOUL.md)

Open the SOUL.md file in your workspace and personalize it. Example:

# My Agent - SOUL.md  ## Identity You are my personal assistant. Your name is Aria.  ## Communication style Be concise. I prefer bullet points over paragraphs. Never say 'Certainly!' or 'Of course!' — just do the task.  ## Defaults - Always ask for confirmation before sending emails externally - Always ask for confirmation before deleting any file - For research tasks, cite your sources - My timezone is US/Eastern (UTC-5)

  Treat SOUL.md like a job description for a new employee. The more specific you are about your preferences, communication style, and what the agent should and shouldn't do, the better it performs.

Step 7: Set Up Your First Automated Task (HEARTBEAT.md)

# HEARTBEAT.md - Standing instructions  ## Every morning (check if time is 8:00-8:30 AM) Send me a Telegram message with: 1. Today's calendar events 2. Any unread emails from the last 12 hours 3. Top 3 things I should focus on today

After saving, run openclaw restart. Your agent will now send you a morning briefing every day without being asked.

💡  Start with one automated task. Add more gradually as you build trust in how the agent behaves.

Running OpenClaw 24/7 on a VPS

1.     Rent a 2GB RAM VPS running Ubuntu 24.04 LTS (~$5/mo on Hetzner or DigitalOcean)

2.     SSH into the server and install Node.js 22

3.     Install OpenClaw: npm install -g openclaw

4.  Transfer your workspace files or run openclaw onboard fresh on the server

5.  Run as a background service: pm2 start openclaw -- serve && pm2 save

6.  Your agent now runs 24/7, reachable via Telegram from your phone

Monthly budget estimate:  VPS: $5–10. API costs: $5–50 depending on usage. Total: $10–60/month versus Gemini Spark at $100/month — with the trade-off being 20 minutes of setup time.

What Real OpenClaw Users Are Building

•       Automated PR triage: agent monitors GitHub issues, spawns coding sub-agents to implement fixes, opens PRs

•       Daily briefings: every morning at 8 AM, a Telegram message with a calendar, an email summary, and priority tasks

•       Blog research assistant: agent researches trending topics, drafts outlines in Notion, notifies when ready

•       Deployment watchdog: monitors CI/CD pipelines, alerts on failures, can roll back deployments automatically

•       Competitive intelligence: monitors competitor websites, sends a weekly digest with changes and new announcements

Troubleshooting Common Problems

Agent is not responding to messages

Run openclaw status --all to see the health of all components. If the gateway is running but the channel is not responding, the most common cause is an expired or invalid messaging token. Run the OpenClaw channels test to check channel connectivity.

API costs are higher than expected

Run openclaw usage --last-7-days to see a breakdown of API calls. The heartbeat system is often the culprit — if HEARTBEAT.md has complex instructions, every 30-minute ping runs a significant query. Simplify the heartbeat instructions or increase the interval to 60 or 120 minutes.

Agent modified or deleted files unexpectedly

Immediately run openclaw pause to halt all activity. Review session logs at ~/.openclaw/agents/<agentId>/sessions/. Add explicit rules like 'never delete files without confirmation' to SOUL.md before resuming.

Also published on this site — related reading:

•       AI Coding Agents Explained: CLI vs IDE, and Which One to Use in 2026 — foundational guide to agentic coding tools

•       Claude Code vs Cursor vs OpenCode: Which AI Coding Agent Should You Use? — full developer-tool comparison

•       5 Things Claude Code Can Do That ChatGPT Can't (Yet) — concrete feature breakdown

Author Image

Hardeep Singh

Hardeep Singh is a tech and money-blogging enthusiast, sharing guides on earning apps, affiliate programs, online business tips, AI tools, SEO, and blogging tutorials. About Author.