OpenClaw is the self-hosted, always-on AI agent runtime I’ve been running on my own machine — and this OpenClaw tutorial walks you through the complete setup from scratch, even if you’ve never touched a self-hosted agent before.
I run AI and SEO communities with 75,000+ members and test this stuff daily for my 394K+ YouTube audience. OpenClaw earned a permanent spot in my rig because it does something most cloud assistants can’t: it remembers who it is and keeps working when I close the laptop.
Last updated: July 2026.
Key takeaways
- OpenClaw is a self-hosted agent runtime — your agent gets its own persistent workspace, identity, and memory instead of resetting every chat.
- Setup is three moves: install the runtime, give the agent an identity, then point it at a model (I run Grok + MiniMax M3).
- The magic is the workspace files — IDENTITY, SOUL, and HEARTBEAT turn a plain model into an agent that persists and runs on its own.
What Is OpenClaw?
OpenClaw is an open, self-hosted runtime for building autonomous AI agents that live on your own hardware.
Instead of talking to a chatbot in a browser tab that forgets you the moment you close it, you give the agent a home directory on your machine — a persistent workspace it reads and writes to.
That workspace is the whole trick. It holds the agent’s identity, its memory, its tasks, and its connection to whatever AI models you plug in. Because it all lives on disk, the agent keeps its context between sessions and can run around the clock.
When I first set mine up, the moment it clicked was watching the agent fill in its own identity file and then pick up a task I’d left it — no re-briefing, no copy-pasting context. It just knew.
Why Bother With a Self-Hosted Agent?
Cloud AI assistants are brilliant, but they’re stateless by design. Every conversation starts from zero, and you’re renting compute you don’t control.
A self-hosted agent flips that. Here’s why it matters:
- Persistent memory — it remembers your projects, your preferences, and past work across sessions.
- Always-on — it can run overnight and handle tasks on a schedule, not just when you’re typing.
- Model freedom — you pick the models. I mix a fast frontier model with a cheap workhorse to keep costs down.
- Privacy & control — the workspace and its data live on your machine, not a vendor’s server.
If you’ve read my guide on the best free autonomous AI agents, OpenClaw sits right in that lane — but it leans harder into being yours.
Before You Start: What You’ll Need
OpenClaw setup is friendly, but line these up first so you don’t stall halfway:
- A computer that can stay on — Mac, Linux, or Windows. If you want 24/7 running, keep it awake or use a spare machine.
- A terminal — you’ll run a couple of commands. No deep coding required.
- At least one model API key — e.g. an xAI (Grok) key, or a MiniMax key. You can start with a single provider.
- 15 minutes — a first working agent genuinely takes about that long.
OpenClaw Setup: Step-by-Step
Here’s the exact flow I use. Follow it in order and you’ll have a live agent by the end.
Step 1 — Install the runtime
Install the OpenClaw CLI for your operating system following the official install instructions. On first run it creates a hidden home directory (on my Mac it lives at ~/.openclaw).
Inside that folder OpenClaw scaffolds everything it needs: an openclaw.json config, a workspace/ folder, and sub-folders for agents, devices, identity, logs, and tasks. You don’t create these by hand — the runtime lays them down for you.
Step 2 — Give your agent an identity
Open workspace/IDENTITY.md. This is where your agent becomes a someone rather than a generic model.
You fill in a name, a “creature” (is it an AI, a familiar, a ghost in the machine?), a vibe, and a signature emoji. It feels playful, but it’s load-bearing: this file is injected into the agent’s context so its personality stays consistent across every session.
Spend two minutes here. An agent with a clear identity behaves far more coherently than a blank one.
Step 3 — Connect your models
Open openclaw.json and add your provider(s) under the models section, then set a primary model. This is the config I actually run — a Grok model aliased for speed and a MiniMax M3 model as the cheap workhorse:
"agents": {
"defaults": {
"models": {
"xai/grok-4.3": { "alias": "Grok" },
"minimax/minimax-m3:cloud": { "alias": "MiniMax" }
},
"model": { "primary": "minimax/minimax-m3:cloud" }
}
}
Setting MiniMax as primary keeps my running costs down, and I switch to Grok when a task needs more horsepower. Start with whichever single provider you already have a key for — you can add the second later.
Step 4 — Start the agent and hand it a task
Start the OpenClaw gateway/runtime. Your agent boots, reads its identity and workspace, and comes online.
Give it a small first task — “summarise the files in this folder” or “draft a to-do list for my day.” Watching it work, log what it did, and remember it next time is the moment self-hosted clicks.
The 3 Files That Turn a Model Into an Agent
If you take one thing from this OpenClaw tutorial, make it this. Three workspace files do the heavy lifting:
- IDENTITY.md — who the agent is. Name, vibe, emoji. Keeps its personality stable.
- SOUL.md — its deeper character and values; the “why it acts the way it does” layer.
- HEARTBEAT.md — the always-on pulse. This is what lets the agent run on a rhythm instead of only when prompted.
A raw model answers questions. Wrap it in these three files plus a persistent workspace, and you’ve got an agent that has continuity, character, and the ability to act on its own. That’s the entire leap.
Running Multiple Models (Grok + MiniMax) for Pennies
One of my favourite things about OpenClaw is that you’re not married to a single model.
I route cheap, high-volume work to MiniMax M3 and save the pricier frontier model for the tasks that actually need it. Over a month of always-on running, that split makes a real difference to the bill.
The setup is just the two aliases you saw above. Add both providers, pick a sensible primary, and let the agent lean on the cheap one by default. It’s the frugal-builder’s dream: autonomous capability without a scary invoice.
Common OpenClaw Setup Mistakes (and Fixes)
A few things trip people up on their first run:
- Skipping the identity file — a blank IDENTITY.md gives you a wishy-washy agent. Fill it in.
- Wrong or missing API key — double-check the key matches the provider you referenced in
openclaw.json. - Machine goes to sleep — if you want true always-on behaviour, stop your computer from sleeping or run it on a dedicated box.
- Editing the wrong config copy — OpenClaw keeps backups (
.bakfiles); make sure you’re editing the liveopenclaw.json.
Where To Go From Here
Once your first agent is running, the fun part is giving it real jobs — research, drafting, monitoring, scheduled tasks. If you’re comparing options, my breakdown of the best free AI agents for 2026 and my guide to an Agentic OS for Hermes are the natural next reads.
If you want to go deeper with people who are building this stuff every day, that’s exactly what my communities are for.
Want help building your first autonomous agent?
I share my exact setups, prompts, and workflows inside my free AI community — over 1,000 members building agents together.
Ready to go further? Inside the AI Profit Boardroom I break down advanced agent stacks, or grab a free strategy session to map your build.
FAQ
What is OpenClaw?
OpenClaw is a self-hosted runtime for building autonomous AI agents on your own machine. Your agent gets a persistent workspace, its own identity, and can connect to the AI models you choose.
Is OpenClaw hard to set up for beginners?
No. If you can run a couple of terminal commands and edit a text file, you can set it up. A first working agent takes about 15 minutes.
Which AI models can OpenClaw use?
You pick them. I run xAI’s Grok alongside MiniMax M3, mixing a fast frontier model with a cheaper workhorse to control costs. You can start with a single provider.
Can OpenClaw run 24/7?
Yes — that’s the point. With the HEARTBEAT file and a machine that stays awake, the agent can run on a rhythm and handle tasks around the clock.
Do I need to be a programmer to use OpenClaw?
Not really. Basic comfort with a terminal helps, but the day-to-day is editing config and identity files and giving the agent tasks in plain language.
Is OpenClaw free?
The runtime is self-hosted, so the main cost is whatever model API usage you rack up. Running a cheap primary model like MiniMax keeps that low.
Also on my network: I cover autonomous agents across JulianGoldie.co.uk and GoldStarLinks too.
