← Blog
Guide

How to Use OpenClaw: Getting the Most From Your AI Agent

The practical guide to OpenClaw — first-time setup, connecting Telegram and Discord, installing skills, automations, sub-agents, and real daily use cases.

·8 min read

OpenClaw is installed. Now what?

A lot of people get the CLI running, see the agent respond to a test message, and then... aren't sure where to go next. The surface area is broad. This article covers the practical side: how to actually set OpenClaw up for daily use, what the main features do, and what people are doing with it in practice.

Understanding What OpenClaw Is

OpenClaw is an AI agent runtime. It's not a single chatbot — it's the infrastructure that runs an agent. The agent reads files, executes tasks, connects to external channels, remembers context, runs on a schedule, and spawns sub-agents for bigger tasks.

The OpenClaw runtime handles:

  • Process management (keeping the agent running)
  • Channel integrations (Telegram, Discord, Slack, etc.)
  • Gateway (the HTTP server that receives webhooks)
  • Skills (capabilities you install or build)
  • Memory (persistent context across sessions)
  • Scheduling (heartbeats and cron tasks)

The agent itself — the persona, the instructions, the behavior — is defined in files in your workspace. OpenClaw runs the agent; you define what it does.

For a broader overview, see What is OpenClaw.

First-Time Setup Walkthrough

Install and Initialize

# Install OpenClaw globally
npm install -g openclaw

# Run initial setup
openclaw init

The init command creates ~/.openclaw/ with this structure:

~/.openclaw/
├── config.json          # main config: gateway, channels, models
├── workspace/           # your agent's working directory
│   ├── AGENTS.md        # agent instructions (how it behaves)
│   ├── SOUL.md          # agent persona/identity
│   ├── USER.md          # context about you
│   └── memory/          # daily memory files
└── skills/              # installed skill packages

Configure Your LLM

Your agent needs access to an LLM. Edit ~/.openclaw/config.json:

{
  "llm": {
    "provider": "anthropic",
    "model": "claude-sonnet-4-6",
    "apiKey": "sk-ant-your-key-here"
  }
}

OpenClaw supports multiple providers. Common choices:

  • anthropic + claude-sonnet-4-6 — strong default
  • openai + gpt-4o — solid alternative
  • openai + gpt-4o-mini — cheaper for lower-stakes tasks

Start Your Agent

openclaw start

This starts the agent runtime and the gateway. You should see output confirming both are running.

Test it:

openclaw chat "Hello, what can you do?"

If the agent responds coherently, you're running.

Connecting Telegram

Telegram is the most common channel for OpenClaw. It gives you a mobile interface to your agent, available anywhere.

Create a Bot

  1. Open Telegram, search for @BotFather
  2. Send /newbot
  3. Follow the prompts — give it a name and username
  4. Copy the bot token (looks like 7429284729:AAF...)

Configure the Plugin

In ~/.openclaw/config.json:

{
  "plugins": {
    "telegram": {
      "enabled": true,
      "token": "7429284729:AAF...",
      "allowedUsers": [262207319]
    }
  }
}

allowedUsers is an array of Telegram user IDs. Get yours by messaging @userinfobot. Without this list, anyone who finds your bot can talk to your agent — you probably don't want that.

Set Up the Webhook

The gateway needs to be publicly accessible for Telegram to deliver messages. On a VPS:

openclaw gateway status
# Confirm publicUrl is set in config

Telegram will automatically register the webhook when OpenClaw starts, as long as publicUrl is set correctly. See the OpenClaw Gateway guide for full configuration options.

Restart OpenClaw after config changes:

openclaw restart

Send a message to your bot. It should respond within a few seconds.

Connecting Discord

Discord setup involves creating a bot application through the Discord developer portal.

Create a Discord Application

  1. Go to discord.com/developers/applications
  2. Click New Application, give it a name
  3. Go to Bot section → Reset Token → copy the token
  4. Enable Message Content Intent under Privileged Gateway Intents
  5. Go to OAuth2URL Generator → select bot scope + Send Messages, Read Message History permissions
  6. Use the generated URL to add the bot to your server

Configure the Plugin

{
  "plugins": {
    "discord": {
      "enabled": true,
      "token": "your-discord-bot-token",
      "guildId": "your-server-id"
    }
  }
}

Restart OpenClaw. The bot should appear online in your Discord server.

Defining Your Agent's Behavior

The most important files in your workspace:

SOUL.md

This is your agent's identity — who it is, what it does, its personality and operating principles. A minimal example:

# Agent Soul

## Identity
You are a personal assistant for [Name]. You handle tasks,
research, scheduling, and communications.

## Operating Principles
- Be direct and concise
- Take action when you have clear instructions
- Write important decisions to memory files
- Ask when genuinely uncertain

AGENTS.md

Technical instructions for the agent — tool usage rules, workspace conventions, what files exist and what they're for. This is where you put rules like "never send emails without confirmation" or "always commit code before reporting done."

USER.md

Context about you — timezone, name, preferences, project context. This helps the agent tailor responses and make sensible assumptions.

The agent reads these files at the start of each session. What you put in them directly shapes how it behaves.

Installing Skills

Skills are capability packages — pre-built tool sets that extend what your agent can do.

# Search available skills
openclaw skills search weather

# Install a skill
openclaw skills install weather

# List installed skills
openclaw skills list

After installing, the skill's tools are available to your agent. A weather skill adds the ability to check weather. A calendar skill adds calendar access. Skills have their own SKILL.md files that the agent reads to understand how to use them.

Some skills require configuration (API keys, etc.). Check the skill's documentation:

openclaw skills info weather

For skills covering specific domains, see the OpenClaw Skills guide.

Setting Up Heartbeats

A heartbeat is a periodic check-in — OpenClaw sends your agent a scheduled message and the agent acts on it. This is how you get proactive behavior: daily summaries, inbox checks, scheduled reports.

Configure Heartbeat Interval

In ~/.openclaw/config.json:

{
  "heartbeat": {
    "enabled": true,
    "intervalMinutes": 30,
    "prompt": "Check HEARTBEAT.md for tasks. If nothing needs attention, reply HEARTBEAT_OK."
  }
}

Create HEARTBEAT.md

In your workspace (~/.openclaw/workspace/HEARTBEAT.md):

# Heartbeat Tasks

## Every 30 Minutes
- Check for urgent emails
- Look for calendar events in the next 2 hours

## Once Daily (Morning)
- Send a summary of what's happening today
- Check if any cron jobs failed overnight

## Once Daily (Evening)  
- Write memory consolidation to today's log

The agent reads this file on every heartbeat and acts on what's relevant. This is how you get a morning brief, inbox monitoring, and scheduled automation without writing any code.

Spawning Sub-Agents

For bigger tasks — writing a batch of articles, doing a code review, researching a topic — you can have your agent spawn sub-agents that work in parallel.

Your agent can spawn sub-agents via the session tools available in its runtime. From a conversation:

"Research the top 10 competitors for [product] and write a comparison report."

If the agent is configured to delegate, it'll spawn a sub-agent for research and another for writing, coordinate the results, and deliver the finished report.

Sub-agents are independent sessions — they can read files, use tools, write output — and they report back to the parent agent when done.

This is one of OpenClaw's more powerful features: a single agent orchestrating a team of specialized workers to complete complex multi-step tasks.

Memory and Continuity

Your agent wakes up fresh with each session. Memory files are how it maintains continuity.

How It Works

The agent writes to memory/YYYY-MM-DD.md during sessions:

## [14:30 UTC] — Researched competitor pricing
- Checked 5 competitor sites
- Found average price point is $29/month
- Wrote findings to projects/competitor-analysis.md

At the start of each session, the agent reads today's and yesterday's memory files to pick up context. Long-term important facts go in MEMORY.md — a curated file the agent updates periodically.

Practical Impact

This is what separates an agent from a stateless chatbot. Your agent knows:

  • What you were working on yesterday
  • Decisions made last week
  • Context about ongoing projects
  • Your preferences and working style

The longer OpenClaw runs on a persistent server, the more context it accumulates and the more useful it becomes.

Real Daily Use Cases

What do people actually use OpenClaw for? Here's what works well:

Morning brief — Every morning, heartbeat triggers a summary: emails that came in overnight, calendar for the day, any tasks carried over from yesterday. Delivered to Telegram before you're out of bed.

Writing assistant — Article drafts, email responses, social media posts. The agent has context about your projects, tone, and audience. Much better than cold-prompting a chatbot.

Research tasks — "Find the 5 best VPS providers under $10/month and compare their specs." The agent searches, reads pages, synthesizes, delivers a clean summary.

Code reviews — Point a sub-agent at a PR or directory. It reads the diff, checks for issues, writes a review. Faster than doing it yourself for routine reviews.

Lead monitoring — Connect email or Slack. Agent monitors for messages matching certain criteria and either alerts you or takes action automatically.

Content pipeline — Brief → research → draft → review → publish. Each step delegated to a sub-agent, orchestrated by the main agent, with your review only required for the final output.

Scheduled reports — Weekly digest of what happened, what's pending, what needs attention. Generated automatically and sent to Telegram.

Getting More Out of OpenClaw Over Time

OpenClaw compounds. The first week, it's a capable assistant. After a month of running continuously on a server, with good memory files and refined instructions, it knows your projects, your patterns, and your preferences well enough to work independently on most tasks.

The investment that pays off most:

  1. Write detailed SOUL.md and AGENTS.md — The better the instructions, the better the behavior
  2. Run on a persistent server — Continuity of memory is the multiplier
  3. Use heartbeats — Proactive agents are 10x more useful than reactive ones
  4. Install relevant skills — Don't rebuild what already exists
  5. Review and refine — Read what the agent writes to memory. Correct misunderstandings early.

For deployment options, see OpenClaw Hosting — running on a laptop won't give you the persistence and availability that makes OpenClaw genuinely useful.


Ready to go from "installed" to "actually useful"? Pick one live workflow, connect one real channel, and make the first automation solve a real operational problem.