AI Agents

How to Set Up Your Own AI Agent in 30 Minutes

A beginner-friendly guide to installing OpenClaw and running a personal AI agent on Mac, Windows, or Linux.
February 14, 2026 · 25 min read

The phrase "AI agent" sounds like something from a research lab. Something that requires a computer science degree, a server rack, and a weekend of debugging obscure Python libraries.

It does not. In 2026, setting up a personal AI agent is closer to installing a new app on your phone than it is to building software. The tools have caught up to the concept. What once required cobbling together APIs, prompt chains, and custom scripts now takes a single install command and a few minutes of configuration.

This guide walks through the entire process from zero to a working AI agent that responds to messages, remembers conversations, and runs on your own machine. No prior experience with AI tools is assumed. If you can open a terminal and paste a command, you can do this.

TL;DR:
  • OpenClaw turns Claude, ChatGPT, or other AI models into a persistent personal agent
  • It runs locally on Mac, Windows (via WSL2), or Linux
  • Setup involves one install command, an API key or subscription, and a messaging channel like Telegram
  • The entire process takes roughly 30 minutes, including the Telegram bot setup
  • Once running, the agent remembers conversations, accesses your files, and can run tasks on a schedule

What Is an AI Agent, and Why Would You Want One?

Most people interact with AI through a browser tab. Open ChatGPT or Claude, ask a question, get an answer, close the tab. The conversation disappears. The AI learns nothing about you between sessions. It cannot do anything on its own.

An AI agent is different. It is a persistent AI that lives on your machine, remembers past conversations, connects to your messaging apps, and can take actions without being prompted. Think of it as the difference between asking a stranger for directions and having a personal assistant who knows your schedule, your preferences, and your ongoing projects.

Chatbot

  • Lives in a browser tab
  • Forgets everything between sessions
  • Only responds when you open it
  • No access to your files or tools

AI Agent

  • Runs on your machine 24/7
  • Remembers all past conversations
  • Sends you messages proactively
  • Reads files, runs tasks, searches the web

With OpenClaw, that assistant lives on your computer. It sends you messages on Telegram. It can read and write files. It runs scheduled tasks while you sleep. And it gets more useful over time as it accumulates context about how you work.

The practical applications are wide open. Research, writing, daily briefings, task management, automation. More on those in the article on things you can actually do with your agent.

But first, the setup.

What You Need Before Starting

The requirements are minimal:

  • A computer that stays on. Mac, Linux, or Windows with WSL2 installed. A desktop or always-on laptop is ideal, though a VPS works too.
  • Node.js 22 or newer. Check with node --version in your terminal. If it is not installed, download it from nodejs.org.
  • Access to an AI model. Either a Claude or ChatGPT subscription you already pay for, or an API key from Anthropic, OpenAI, or OpenRouter.
  • A Telegram account (optional but recommended). Telegram is the fastest messaging channel to configure. OpenClaw also supports WhatsApp, Discord, Signal, Slack, and others.

That is it. No Docker, no Kubernetes, no cloud accounts. Everything runs locally.

0 Cloud accounts needed
1 Terminal command to install
30 min From zero to running agent

Step 1: Install OpenClaw

Open a terminal window and run a single command.

On macOS or Linux:

curl -fsSL https://openclaw.ai/install.sh | bash

On Windows (PowerShell with WSL2):

iwr -useb https://openclaw.ai/install.ps1 | iex

The installer downloads OpenClaw, sets up the binary, and prepares the workspace directory at ~/.openclaw/. It takes about a minute depending on your internet connection.

Once installation finishes, verify it worked:

openclaw --version

If a version number appears, the install succeeded.

Key Takeaway

If a version number appears after running openclaw --version, the install succeeded. If you see "command not found," close and reopen your terminal to reload your PATH.

Step 2: Run the Onboarding Wizard

OpenClaw includes an interactive setup wizard that walks through every configuration step. No need to edit config files manually.

openclaw onboard --install-daemon

The wizard asks a series of questions:

  1. Model provider. Choose between Anthropic (Claude), OpenAI (ChatGPT), or OpenRouter (access to many models through one key).
  2. Authentication. Paste your API key or, if you have a Claude Pro or Max subscription, use a setup-token so you pay nothing extra.
  3. Daemon installation. The --install-daemon flag sets up a background service so OpenClaw starts automatically when your machine boots.

Choosing Between a Subscription and an API Key

This is the question most beginners get stuck on. Here is the honest version:

The $20/month plans are not enough. Claude Pro ($20/month) and ChatGPT Plus ($20/month) will technically work to get OpenClaw running, but you will hit rate limits fast. An always-on agent that monitors messages, runs heartbeats, handles cron jobs, and responds to your requests burns through a $20 plan's quota in a day or two of real use. You will spend more time waiting for rate limits to reset than actually using the agent.

For a genuinely useful always-on agent, plan on Claude Max at $100/month. This gives you enough headroom to run an agent that responds reliably throughout the day without constant throttling. The $200/month tier is for power users running multiple sub-agents or heavy workloads. If you are just getting started, $100 is the realistic entry point for a good experience.

Claude Pro / ChatGPT Plus

  • $20/month
  • Rate limits hit within 1-2 days
  • Fine for occasional chatbot use
  • Not enough for an always-on agent

Claude Max (Recommended)

  • $100/month
  • Reliable all-day performance
  • Handles heartbeats, cron, and responses
  • Best starting point for a real agent

API Key (Pay-per-use)

  • $15-40/month typical
  • Cheaper if agent is mostly idle
  • Use OpenRouter for multi-model routing
  • Less predictable monthly billing

The API key route is another option. Anthropic and OpenAI both offer pay-per-use pricing. This can be cheaper if your agent is mostly idle, or more expensive if it is busy. For light personal use with occasional tasks, expect $15 to $40 per month on API costs. OpenRouter provides a single key with access to dozens of models, which lets you route cheaper tasks to cheaper models. The trade-off is less predictable billing.

Watch Out

The $20/month Claude Pro and ChatGPT Plus plans will hit rate limits fast with an always-on agent. For reliable operation, plan on Claude Max at $100/month or use API keys with budget alerts set.

A cost-conscious strategy: Start with the Claude Max $100 plan to get the agent running smoothly. Once you understand your usage patterns, you can experiment with API keys or model routing through OpenRouter to optimize costs.

The onboarding wizard handles whichever path you choose. Pick one and move forward. You can always switch later.

Step 3: Verify the Gateway Is Running

After onboarding completes, check that the gateway (the process that keeps your agent alive) is running:

openclaw gateway status

The output should confirm the gateway is active. If it is not running, start it manually:

openclaw gateway start

At this point, you already have a working AI agent. You can open the built-in dashboard with:

openclaw dashboard

This launches a browser-based chat interface at http://127.0.0.1:18789/. You can type a message and get a response. The agent is alive.

But chatting through a local browser tab is not the point. The real power comes from connecting the agent to a messaging app you already use. That way, it is always reachable from your phone, your tablet, or any device with Telegram installed.

Step 4: Connect Telegram

Telegram is the recommended starting channel because setup requires nothing more than a bot token. No phone number pairing, no QR code scanning, no OAuth flows.

1

Create a Bot with BotFather

Open Telegram and search for @BotFather (look for the blue verification checkmark). Send the command /newbot.

BotFather asks for a display name and a username. The username must end in "bot" (for example, "MyAssistantBot"). After confirming, BotFather provides a token that looks like 123456789:ABCdefGhIJKlmNOPqrstUVwxyz.

Copy this token. It is the key that connects your agent to Telegram.

2

Add the Token to OpenClaw

Run the channel configuration command:

openclaw configure --section channels

Select Telegram from the list and paste your bot token when prompted.

Alternatively, you can set it as an environment variable: TELEGRAM_BOT_TOKEN=your-token-here

3

Restart the Gateway

openclaw gateway restart

This picks up the new Telegram configuration.

4

Send Your First Message

Find your bot on Telegram and send it a message. Anything works. "Hello" is fine.

The first time, you will receive a pairing request. Approve it in your terminal:

openclaw pairing list telegram
openclaw pairing approve telegram YOUR_CODE

After approval, the bot responds. Your agent is now live on Telegram.

From this point forward, every message you send to your Telegram bot goes to your AI agent. Every response comes back as a Telegram message. It works from your phone, your desktop, or any device where Telegram is installed.

Pro tip: Treat your bot token like a password. Never share it publicly or commit it to a repository. If it is ever exposed, revoke it immediately by sending /revoke to @BotFather and generating a new one.

Step 5: Give Your Agent a Personality (SOUL.md)

Out of the box, the agent works but feels generic. Like talking to a polite stranger. The real value emerges when you tell it who it is, how to behave, and what matters to you.

OpenClaw stores agent configuration in simple Markdown files inside the workspace directory at ~/.openclaw/workspace/. You edit them with any text editor. No code required. The most important file is SOUL.md.

What Is SOUL.md?

This file defines your agent's identity. Its personality, communication style, tone, and purpose. Think of it as writing a job description for someone you are about to hire. The agent reads this file at the start of every conversation and follows the instructions.

Open it in your editor:

nano ~/.openclaw/workspace/SOUL.md

Or use VS Code, Sublime, or whatever text editor you prefer. It is just a Markdown file.

A Simple Starting Point

Here is a minimal SOUL.md that works well for a personal assistant:

# SOUL.md

## Who I Am
I am a personal assistant. I am helpful, direct, and proactive.
I communicate in a professional but friendly tone.
I remember previous conversations and build on them.

## How I Communicate
- I keep responses concise unless asked for detail
- I use bullet points for lists and structured information
- I never make up information. If I do not know something, I say so
- I avoid corporate jargon and filler phrases
- I match the tone of the person I am talking to

## What I Value
- Accuracy over speed
- Clear answers over long explanations
- Proactive suggestions when I notice something useful

A More Detailed Example

Most users expand their SOUL.md significantly over time. Here is an example for someone who wants an agent with more personality and specific expertise:

# SOUL.md

## Identity
I am Alex, a personal AI assistant specializing in business
and productivity. I have a dry sense of humor and I am not
afraid to push back on bad ideas (politely).

## Communication Style
- Direct and concise. No fluff, no filler
- I use plain language, not corporate speak
- When I disagree, I explain why with specifics
- I ask clarifying questions before diving into vague requests
- I celebrate wins genuinely but briefly
- If something is urgent, I lead with that

## What I Know About My User
- Works in digital marketing, runs a small agency
- Based in Southeast Asia (GMT+7 timezone)
- Prefers voice messages, so I keep text responses scannable
- Gets overwhelmed by long walls of text
- Cares about revenue and practical outcomes, not theory

## Rules I Follow
- Never share personal information about my user in public contexts
- Always verify facts before presenting them as certain
- When researching, cite sources so my user can check them
- If a task will take a while, I say so upfront rather than going silent

The more specific you are, the better the agent performs. Generic instructions produce generic behavior. Specific instructions produce an agent that feels like it genuinely knows you.

Key Takeaway

Think of SOUL.md as a job description for someone you are hiring. The more specific your instructions, the less time you spend correcting the agent later.

Tips for Writing a Good SOUL.md

Write it like you are talking to a new employee on their first day. What would you tell them about how you like to communicate? What annoys you? What do you appreciate?

Include negative instructions. "Do not" statements are surprisingly effective. "Do not use emojis" or "Do not start responses with 'Great question'" eliminates behaviors that feel robotic.

Pro Tip: Update SOUL.md every time your agent does something you do not like. Add a line about it. The file becomes a precise mirror of your preferences over weeks of use.

Update it over time. Every time the agent does something you do not like, add a line to SOUL.md about it. Every time it does something you love, reinforce that behavior. The file grows into a precise mirror of your preferences.

Keep it readable. Use headers, bullet points, and short paragraphs. The agent processes long files just fine, but you need to be able to scan and edit it easily.

Step 6: Define What Your Agent Does (AGENTS.md)

If SOUL.md is the personality, AGENTS.md is the playbook. This file tells the agent what to do, how to handle specific situations, and what its standard operating procedures are.

Open it:

nano ~/.openclaw/workspace/AGENTS.md

A Practical Starting Template

# AGENTS.md

## Morning Routine
When greeted in the morning:
- Provide a brief status of any pending tasks or reminders
- Flag anything time-sensitive
- Suggest one productive thing to focus on today
- Keep the whole update under 10 lines

## Research Tasks
When asked to research something:
- Start with a one-paragraph summary before going deep
- Structure findings with clear headers
- Always include sources and links
- If the topic is broad, ask what angle matters most before diving in

## Task Management
- When I say "remind me," create a scheduled reminder
- When I say "add to list," save it to a running task file
- Track what I have asked for and follow up if things go quiet

## Communication Preferences
- In messaging apps: short, punchy responses. No essays
- When writing documents or reports: be thorough and detailed
- Use formatting (bold, bullets, headers) to make things scannable

## Things That Need My Approval First
- Publishing anything publicly
- Sending messages to other people on my behalf
- Spending money or signing up for services
- Any action that cannot be easily undone

What Makes AGENTS.md Different from SOUL.md

The distinction is simple. SOUL.md describes who the agent is. AGENTS.md describes what the agent does. In practice:

SOUL.md (Identity)

  • Tone and personality
  • Communication style
  • Values and principles
  • Who the agent is

AGENTS.md (Playbook)

  • Workflows and procedures
  • Task-specific rules
  • Standard operating procedures
  • What the agent does

You could put everything in one file and the agent would still work. But separating them makes both easier to maintain as they grow.

Step 7: Other Workspace Files Worth Knowing

Two more files round out the basic configuration:

USER.md

This file tells the agent about you. Your name, timezone, job, interests, and anything else that provides useful context.

# USER.md

- Name: Sarah
- Timezone: America/New_York (EST)
- Job: Freelance copywriter
- Interests: AI tools, productivity systems, travel
- Preferred name: Sarah (not "user" or "you")
- Schedule: Usually available 9am-6pm weekdays

The agent references this file to personalize its responses. Instead of asking "What timezone are you in?" every time scheduling comes up, it already knows.

MEMORY.md

This file is the agent's long-term memory. It starts empty and grows as you work together. The agent writes important facts, decisions, and context here so it remembers them across conversations.

You do not need to create this file manually. The agent generates it automatically. But you can read it, edit it, and add things directly. If you want the agent to remember something specific, you can write it into MEMORY.md yourself, or simply tell the agent "Remember that I prefer morning meetings" and it will save it.

How the Workspace Fits Together

~/.openclaw/workspace/
  SOUL.md        → Agent's personality and identity
  AGENTS.md      → Workflows and standard procedures
  USER.md        → Information about you
  MEMORY.md      → Long-term memory (auto-generated)
  TOOLS.md       → Notes about local tools and setup
  HEARTBEAT.md   → Instructions for periodic check-ins

All of these files are plain Markdown. Edit them with any text editor. Changes take effect on the next conversation. No restart required.

Step 8: Lock It Down (Security Hardening)

Your agent is running and connected to Telegram. Before going further, take five minutes to make sure everything is secure. An AI agent has access to your files, your messages, and potentially your accounts. Treat security like locking the front door after moving into a new house.

Watch Out

Your agent can access files, run commands, and send messages. Without proper hardening, anyone on your network could potentially interact with it. Spend 5 minutes on security now to avoid problems later.

Run the Built-In Security Audit

OpenClaw includes a security check command that scans your setup for common issues:

openclaw doctor --non-interactive

This reviews your configuration and flags anything that needs attention. Fix any warnings it reports before continuing.

Essential Hardening Steps

1. Enable gateway authentication. This prevents anyone on your network from accessing the agent's API. In your config file (~/.openclaw/openclaw.json), make sure the gateway has auth enabled:

{
  "gateway": {
    "auth": {
      "mode": "token",
      "token": "a-long-random-string-here"
    },
    "bind": "loopback"
  }
}

Generate a strong token with: openssl rand -hex 32

The "bind": "loopback" setting ensures the gateway only listens on localhost (127.0.0.1), not on your network.

2. Restrict group access. If you connect Telegram groups, use an allowlist so the bot only responds in groups you control:

{
  "channels": {
    "telegram": {
      "groupPolicy": "allowlist",
      "groups": {
        "-YOUR_GROUP_ID": { "requireMention": false }
      }
    }
  }
}

Without this, anyone who adds your bot to a random group could interact with your agent.

3. Set DM pairing mode. This requires new users to be approved before they can chat with your bot in direct messages:

{
  "channels": {
    "telegram": {
      "dmPolicy": "pairing"
    }
  }
}

With pairing enabled, strangers who find your bot cannot start conversations. Only people you explicitly approve get access.

4. Protect your credential files. On macOS and Linux, lock down file permissions for any files containing API keys or tokens:

chmod 600 ~/.openclaw/openclaw.json
chmod 700 ~/.openclaw/

This ensures only your user account can read these files.

5. Turn on your system firewall. On macOS, go to System Settings, then Network, then Firewall, and turn it on. On Linux, enable ufw:

sudo ufw enable
sudo ufw default deny incoming

This prevents external connections to your machine. Since the gateway binds to loopback, it already rejects external requests, but a firewall adds defense in depth.

6. Keep OpenClaw updated. New versions include security patches. Check for updates periodically:

openclaw update
1

Enable Gateway Auth

Set a strong token with openssl rand -hex 32 and bind to loopback only.

2

Restrict Group Access

Use an allowlist so the bot only responds in groups you control.

3

Set DM Pairing

Require approval before strangers can chat with your bot.

4

Lock File Permissions

Run chmod 600 on config files and chmod 700 on the .openclaw directory.

5

Enable Firewall

Turn on your system firewall for defense in depth.

Quick Security Checklist

Run through this after setup to make sure nothing was missed:

  • [ ] Gateway auth token is set (not blank or default)
  • [ ] Gateway binds to loopback only
  • [ ] Telegram group policy is set to allowlist
  • [ ] DM policy is set to pairing
  • [ ] Config file permissions are 600
  • [ ] System firewall is enabled
  • [ ] Bot token is not committed to any public repository
  • [ ] FileVault (macOS) or disk encryption (Linux) is enabled

None of this takes more than a few minutes. And once it is done, you have an agent that is properly locked down. Security is not exciting, but it is the difference between a personal assistant and a liability.

Step 9: Test Drive Your Agent

With everything configured, it is time to put the agent through its paces. Here are a few things to try:

Ask it a question. Send a message on Telegram asking about any topic. The agent has access to web search and will find current information.

Give it a task. "Summarize the top 5 news stories about AI today." The agent searches the web, reads articles, and sends back a summary.

Test its memory. Tell the agent something about yourself. "I work in marketing and I am interested in AI tools for content creation." Then, in a later conversation, ask "What do I do for work?" It should remember.

Try file access. "Create a file called ideas.md in the workspace with three business ideas for 2026." The agent writes the file to your workspace directory.

Set a reminder style task. "Every morning at 9 AM, send me a brief summary of AI news." This uses the heartbeat and cron system to run tasks on a schedule.

If all of these work, your agent is fully operational. You now have a persistent AI assistant that lives on your machine and is reachable from anywhere through Telegram.

What Happens Next

A running agent is just the beginning. The value compounds over time as the agent learns your preferences, accumulates context in its memory files, and takes on more complex workflows.

Some natural next steps:

1

Add More Channels

OpenClaw supports WhatsApp, Discord, Signal, Slack, iMessage, and more. Adding a second channel takes minutes.

2

Connect External Tools

Pair with n8n for automated email digests, CRM updates, and data pipeline monitoring.

3

Build an Agent Team

Multiple specialized agents working together multiply the output. See the agent team guide.

4

Expand Workspace Files

The more context you give through SOUL.md, AGENTS.md, and other files, the more useful every conversation becomes.

Troubleshooting Common Issues

A few things that occasionally trip up beginners:

"Command not found" after install. Close and reopen your terminal, or run source ~/.bashrc (or ~/.zshrc on macOS). The installer adds OpenClaw to your PATH, but the current shell session may not have picked it up yet.

Gateway won't start. Check that Node.js 22 or newer is installed (node --version). Older versions cause compatibility issues. Also verify that port 18789 is not already in use by another application.

Telegram bot does not respond. Confirm the bot token is correct and that you restarted the gateway after adding it. Check the logs with openclaw logs --follow for error messages. The most common cause is a typo in the token.

Pairing code not appearing. Make sure dmPolicy is set to "pairing" in your Telegram channel config. Send a message to the bot and then run openclaw pairing list telegram to see pending requests.

High API costs. If using an API key, start with a more affordable model like Claude Sonnet rather than Opus. Set billing alerts on your provider dashboard. For predictable costs, the Claude Max $100/month plan gives reliable always-on performance. The $20 Pro plan will hit rate limits quickly with an active agent.

2 min Install OpenClaw
10 min Configure model and Telegram
15 min Write personality files and harden security

After Setup, It Stops Being Technical

This is the part that surprises most people. Everything above, the terminal commands, the config files, the YAML-adjacent JSON, that is the hardest it ever gets. Once your agent is running, the day-to-day interaction is just talking to it.

Want to audit your website for SEO issues? You do not need to learn an SEO tool. Ask your agent. It will run the audit, explain the findings, and suggest fixes.

Need to brainstorm revenue ideas for a side project? Ask your agent. It will research the market, analyze competitors, and come back with a prioritized list.

0 Tools you need to learn
1 Command: describe what you want
24/7 Available on your phone via Telegram

Curious whether your landing page copy converts well? Ask your agent to review it. It will identify weak spots and rewrite the sections that need work.

The pattern is always the same: describe what you want in plain language, and the agent figures out how to do it. If it needs a skill it does not have, it will tell you which one to install. If it needs access to a tool, it will walk you through connecting it. The agent becomes your technical translator, the layer between what you want to accomplish and the tools required to accomplish it.

Key Takeaway

A chatbot answers questions. An agent does work. The work it can do scales with the context you give it through your workspace files.

This is what makes a personal AI agent fundamentally different from a chatbot. A chatbot answers questions. An agent does work. And the work it can do scales with the context you give it through those workspace files. The more it knows about your projects, your preferences, and your goals, the more useful every conversation becomes.

You do not need to be technical to use an AI agent. You just need to be technical enough to set one up. And if you have made it this far in this guide, you already are.

The 30-Minute Promise

Here is the realistic timeline for someone following this guide:

Step Time
Install OpenClaw 2 minutes
Run onboarding wizard 5 minutes
Create Telegram bot and configure channel 5 minutes
Restart and verify 2 minutes
Write SOUL.md and AGENTS.md 10 minutes
Set up USER.md 2 minutes
Security hardening 5 minutes
Test and experiment 3 minutes
Total ~35 minutes

Some of that time is waiting for installations. Some is deciding how to word your agent's personality. The SOUL.md and AGENTS.md step is where most people spend extra time, and that is fine. Start simple and refine over days and weeks as you learn what works. None of this requires specialized knowledge.

The barrier to running a personal AI agent has dropped to near zero. The question is no longer "can I do this?" but "what will I use it for?" That second question is the interesting one, and the answer tends to evolve the longer the agent runs.

The setup is the easy part. What comes after is where things get exciting.

Advertisement

Share This Article

Share on X Share on Facebook Share on LinkedIn
Future Humanism editorial team

Future Humanism

Exploring where AI meets human potential. Daily insights on automation, side projects, and building things that matter.

Follow on X

Keep Reading

Vibe Coding Is a Lie (And Also the Future)
AI Tools

Vibe Coding Is a Lie (And Also the Future)

The truth about Lovable, Bolt, and Replit after building 12 projects with them....

The $700 Billion Bet: What Happens If AI Doesn't Pay Off?
Thought Leadership

The $700 Billion Bet: What Happens If AI Doesn't P...

Big Tech is spending more on AI infrastructure than the GDP of most countries. H...

TIBBIR Is the Only Agent Running on All Four Layers of the New AI Commerce Stack
Technology

TIBBIR Is the Only Agent Running on All Four Layer...

Four infrastructure launches in 14 days built the complete stack for autonomous...

Your AI Agent Forgets Everything. Here Is How to Fix It.
AI Agents

Your AI Agent Forgets Everything. Here Is How to F...

Every AI agent loses its memory when a session ends. Decisions, preferences, pro...

Share This Site
Copy Link Share on Facebook Share on X
Subscribe for Daily AI Tips