Skip to content
Subscribe

Build Your First OpenClaw Agent in 30 Minutes

By the end of this tutorial, you’ll have a working AI agent that can read files, search the web, remember context across sessions, and run on a schedule. Total time: ~30 minutes.

A personal research agent that:

  • Monitors RSS feeds for AI news every morning
  • Summarizes the top 5 stories
  • Sends you a digest via your preferred channel (Telegram, Slack, or email)
  • Remembers what it already sent so it doesn’t repeat
  1. Install OpenClaw globally:

    Terminal window
    npm install -g openclaw
  2. Initialize a new agent workspace:

    Terminal window
    mkdir my-agent && cd my-agent
    openclaw init

    This creates the base structure:

    my-agent/
    ├── SOUL.md # Your agent's personality and instructions
    ├── AGENTS.md # Workspace rules and conventions
    ├── USER.md # Info about you (the human)
    ├── TOOLS.md # Tool configuration notes
    └── memory/ # Agent memory storage
    └── .gitkeep
  3. Set your API key:

    Terminal window
    export ANTHROPIC_API_KEY="sk-ant-..."

The SOUL.md file is where you define who your agent is. This isn’t just flavor text — it directly shapes how the agent behaves.

SOUL.md
# Research Agent
You are a focused research assistant specializing in AI news.
## Behavior
- Every morning, check the configured RSS feeds
- Summarize the top 5 most important stories
- Be concise: 2-3 sentences per story
- Include the source URL for each story
- Skip stories you've already reported (check memory)
## Tone
- Professional but not boring
- Highlight why each story matters, not just what happened
- If nothing noteworthy happened, say so (don't pad)

Skills are reusable capabilities your agent can use. Let’s add web fetching and RSS parsing:

Terminal window
openclaw skill add web-fetch
openclaw skill add rss-reader

Skills install to the skills/ directory with their own SKILL.md that teaches your agent how to use them.

Create a simple memory file so your agent can track what it’s already sent:

memory/sent-stories.json
{
"lastCheck": null,
"sentUrls": []
}

Your agent will read this file before each run and update it after sending a digest. No database needed — just files.

Tell OpenClaw to run your agent on a schedule:

Terminal window
openclaw cron add "0 7 * * *" --label "morning-digest"

This runs your agent every day at 7:00 AM. OpenClaw handles the scheduling — your agent’s SOUL.md tells it what to do when it wakes up.

Run your agent manually to verify everything works:

Terminal window
openclaw run

You should see your agent:

  1. Read the RSS feeds
  2. Filter for new stories
  3. Generate summaries
  4. Output a formatted digest
Terminal window
openclaw channel add telegram --token "YOUR_BOT_TOKEN"

Now your morning digest will be delivered automatically to your preferred platform.

You’ve built a working agent in 30 minutes. Here’s where to go from here:


About the author: JD Davenport builds AI agent systems at OpenClaw. Follow on LinkedIn for updates on building AI agents for business.