OpenClaw Tutorial for Beginners: From Zero to Your First AI Agent in 30 Minutes
Most OpenClaw tutorials start with a wall of theory. This one starts with your terminal.
By the end of this guide β roughly 30 minutes from now β you'll have a working OpenClaw agent with its own personality, connected to Telegram, doing something actually useful: delivering a personalized daily news briefing every morning.
No prior OpenClaw experience needed. If you can SSH into a server and copy-paste commands, you're qualified.
What Is OpenClaw?
OpenClaw is an open-source AI agent platform that turns large language models (Claude, GPT, Gemini, etc.) into autonomous agents that live on your server. Unlike chatbots that forget everything between conversations, OpenClaw agents have persistent memory, can read and write files, execute shell commands, browse the web, and coordinate with other agents.
Think of it this way: ChatGPT is a conversation. OpenClaw is an employee. It has a workspace, remembers what happened yesterday, follows instructions you wrote in markdown files, and can use tools β from sending Telegram messages to deploying code. It runs 24/7 on your machine, and you own everything. No vendor lock-in, no data leaving your server unless you want it to.
The platform has 285,000+ GitHub stars and a growing ecosystem of skills (plugins) on ClawHub. People use it for everything from content automation to running entire businesses.
What You Need Before Starting
Before we dive in, make sure you have:
- A server β VPS (DigitalOcean, Hetzner, AWS), Raspberry Pi, or any Linux machine. Minimum 1GB RAM, 10GB disk. Ubuntu 22.04+ recommended.
- An API key β from Anthropic (Claude), OpenAI (GPT), or Google (Gemini). Anthropic's Claude is the most popular choice. Sign up at console.anthropic.com and add $10 credit.
- A Telegram account β for connecting your agent (we'll use Telegram in this tutorial, but WhatsApp, Discord, and Slack also work).
- 10β30 minutes β depending on your server speed.
Total cost to get started: about $5β$15 for the first month (API tokens + VPS if you don't already have one).
Step 1: Install OpenClaw
SSH into your server and run the one-liner installer:
curl -fsSL https://openclaw.ai/install.sh | bash
This script handles everything β it detects your Node.js version (installs Node 24 if needed), installs OpenClaw globally via npm, and launches the onboarding wizard.
If you prefer manual installation:
# Install Node.js 24 if you don't have it
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash -
sudo apt-get install -y nodejs
# Install OpenClaw globally
npm install -g openclaw@latest
# Run the onboarding wizard
openclaw onboard --install-daemon
The onboarding wizard will ask you a few questions:
- Your name β just your first name is fine
- API provider β select Anthropic (recommended), OpenAI, or Google
- API key β paste your key
- Default model β Claude Sonnet is a good balance of speed and quality for beginners
Once onboarding completes, OpenClaw creates your workspace at ~/.openclaw/workspace/ and starts the gateway daemon.
Verify everything is running:
openclaw gateway status
You should see something like:
Gateway is running (PID: 12345)
If it's not running, start it:
openclaw gateway start
Step 2: Configure Your Agent's Personality (SOUL.md)
This is where OpenClaw gets interesting. Your agent's behavior is defined by markdown files in its workspace. The most important one is SOUL.md β it defines who your agent is.
Open the file:
nano ~/.openclaw/workspace/SOUL.md
Replace the default content with something like this:
# Soul: Daily Briefing Agent
## Personality
You are a sharp, efficient personal assistant. You communicate clearly
and concisely. No fluff, no filler β just the information that matters.
## Values
- Accuracy over speed β never guess when you can verify
- Brevity β lead with the key point, then provide details if needed
- Proactive β if you notice something important, flag it
## Communication Style
- Use bullet points for lists
- Bold the most important takeaway in any summary
- Keep responses under 300 words unless asked for more detail
- Use plain language β no jargon unless the user uses it first
## What You Do
- Deliver daily news briefings on topics the user cares about
- Summarize articles and reports
- Track and alert on specific topics or keywords
- Answer questions with sourced information
Save and exit (Ctrl+X, then Y, then Enter in nano).
The beauty of SOUL.md is that it's just text. You can iterate on your agent's personality as much as you want β no code changes, no redeployment. Edit the file, and the agent picks up the changes in the next conversation.
Step 3: Connect to Telegram
Now let's give your agent a way to talk to you. Telegram is the easiest channel to set up.
Create a Telegram bot:
- Open Telegram and search for
@BotFather - Send
/newbot - Choose a name (e.g., "My OpenClaw Agent")
- Choose a username (e.g.,
my_openclaw_bot) - BotFather gives you a token β copy it
Connect the bot to OpenClaw:
openclaw channel add telegram
The wizard will ask for your bot token. Paste it in.
Then restart the gateway to pick up the new channel:
openclaw gateway restart
Now open Telegram, find your bot, and send it a message:
Hello! Who are you?
Your agent should respond based on the personality you defined in SOUL.md. If it does β congratulations, you have a working AI agent.
Step 4: Build Your First Useful Task β Daily News Briefing
A chatbot that responds to messages is nice, but let's make it do something useful without being asked.
We'll set up a daily news briefing that your agent delivers every morning at 8:00 AM.
Create a heartbeat configuration:
nano ~/.openclaw/workspace/HEARTBEAT.md
Add this content:
# Morning Briefing (8:00 AM)
If it's between 7:50 AM and 8:10 AM local time and you haven't
sent today's briefing yet:
1. Search the web for the latest news on these topics:
- AI and machine learning developments
- Open-source software news
- Tech industry business news
2. Pick the 5 most important stories from the last 24 hours
3. For each story, write:
- A one-line headline
- A 2-3 sentence summary
- Why it matters
4. Send the briefing to me on Telegram
5. After sending, note in memory/heartbeat-state.json that
today's briefing has been sent
If it's not briefing time, reply HEARTBEAT_OK.
Configure the heartbeat schedule:
The heartbeat is a periodic check-in where your agent reads HEARTBEAT.md and decides what to do. Set it to run every 30 minutes:
openclaw cron add --schedule "*/30 * * * *" --task "heartbeat"
Now your agent will check in every 30 minutes. When it hits the 8:00 AM window, it'll search for news, compile a briefing, and send it to your Telegram.
Customize your topics by editing the HEARTBEAT.md file. Replace the example topics with whatever you actually care about β crypto prices, your industry news, competitor updates, sports scores, whatever.
Step 5: Verify Everything Works
Let's make sure the full pipeline is working:
# Check gateway is running
openclaw gateway status
# Check your channels
openclaw channel list
# Check cron jobs
openclaw cron list
Send your agent a test message on Telegram:
Give me a quick news summary about AI developments today.
If it searches the web and returns a summary, your setup is complete. The daily briefing will start arriving tomorrow morning.
Quick Troubleshooting
Agent doesn't respond on Telegram:
- Check
openclaw gateway statusβ restart if needed - Verify your bot token with
openclaw channel list - Check logs:
openclaw gateway logs --tail 50
"API key invalid" errors:
- Re-run
openclaw onboardto update your API key - Make sure you have credit on your API account
Agent responds but seems generic:
- Make sure you saved SOUL.md correctly
- Check the file:
cat ~/.openclaw/workspace/SOUL.md - The agent reads SOUL.md at the start of each session
High API costs:
- Switch to a smaller model for routine tasks (Claude Haiku for daily briefings)
- Set token limits in your agent configuration
- Monitor usage:
openclaw status
What's Next?
You now have a working OpenClaw agent that lives on your server, has a defined personality, connects to Telegram, and delivers daily news briefings. That's the foundation β here's where to go from here:
- Install skills from ClawHub β browse clawhub.com for pre-built capabilities (SEO, writing, coding, data analysis)
- Build your own skills β read our skill creation guide to package your workflows
- Add more channels β connect WhatsApp, Discord, or Slack alongside Telegram
- Set up multi-agent teams β create specialized agents that coordinate on complex tasks
- Explore monetization β check our guide to making money with OpenClaw
The OpenClaw documentation at docs.openclaw.ai covers everything in depth. The Discord community is also incredibly active β if you get stuck, someone's probably solved your exact problem already.
Welcome to the OpenClaw ecosystem. Your agent is ready. Now put it to work.
Frequently Asked Questions
How much does OpenClaw cost to run?
OpenClaw itself is free and open-source. You pay for API tokens (the AI model) and hosting. A typical setup costs $20β$50/month β about $5β$15 for a basic VPS and $15β$35 for API tokens depending on how much you use the agent. Light usage (daily briefings + occasional questions) runs about $10β$15/month in API costs.
Which AI model should I use?
For beginners, Claude Sonnet (Anthropic) offers the best balance of quality, speed, and cost. Claude Haiku is cheaper for simple tasks. GPT-4o (OpenAI) is also solid. You can switch models anytime without reinstalling β just update your configuration.
Can I run OpenClaw on a Raspberry Pi?
Yes. A Raspberry Pi 4 or 5 with 4GB+ RAM runs OpenClaw fine. It's actually a popular setup for always-on personal agents. Performance is slightly slower than a VPS, but perfectly usable for most tasks.
Is my data private?
OpenClaw runs on your server. Your conversations, files, and memory stay on your machine. The only external communication is with your chosen AI provider (Anthropic, OpenAI, etc.) for model inference. No data is sent to OpenClaw's servers.
Can I use OpenClaw without a VPS?
Yes β you can run it on any computer that stays on. A Mac Mini, an old laptop, or a Raspberry Pi all work. The key requirement is that the machine needs to be running for the agent to be available. For 24/7 availability, a VPS or dedicated device is recommended.
What if I want to switch from Telegram to WhatsApp?
You can run multiple channels simultaneously. Add WhatsApp with openclaw channel add whatsapp and your agent will be available on both. Each channel connects to the same agent with the same personality and memory.