I have been setting up OpenClaw (an open-source framework for building AI agents that can use tools, browse the web, write code, and complete multi-step tasks) for teams for the past four months, and the question I get most often is some version of “how do I get from zero to a working agent in the shortest time possible.” This article is the answer. I am going to walk you through the exact 30-minute setup I run for new teams, the four example agents I use as starter templates, and the three mistakes that 80% of first-time OpenClaw users make.
You will need: a Linux or Mac machine, Python 3.11 or later, and an API key for some model provider. I am going to assume OpenAI for the examples, but Anthropic, Google, and self-hosted models all work with the same interface.
Install the runtime
OpenClaw is distributed as a Python package and a CLI (command-line interface) binary. The CLI is the easier of the two to install:
pip install openclaw
openclaw --version
That is the entire install. The CLI is roughly 40 MB on disk, and it includes the runtime, the agent scheduler, and the four example agents I am about to describe. If you would rather use the Python package directly, the same pip install gives you import openclaw and the full API.
If you are on a Mac with the Homebrew Python, the install is the same. If you are on Windows, the recommended path is WSL2 (Windows Subsystem for Linux, which lets you run a real Linux environment inside Windows). The native Windows install is not officially supported, and the few people I have seen try it have ended up switching to WSL2 within a week.
Configure your model provider
The model configuration lives in ~/.openclaw/config.yaml. The first time you run the CLI, it creates this file with placeholder values. Open it in your editor of choice and fill in the provider block:
providers:
openai:
api_key: ${OPENAI_API_KEY}
default_model: gpt-4o-mini
anthropic:
api_key: ${ANTHROPIC_API_KEY}
default_model: claude-3-5-sonnet-latest
The ${OPENAI_API_KEY} syntax means “read this from the environment variable of the same name.” I strongly recommend this over pasting the key into the file. The config file ends up in shell history, backup tarballs, and sometimes dotfiles repos, and you do not want the key in any of those places.
The default model is the one that gets used when an agent does not specify one. gpt-4o-mini is a good default for the first agent, because it is fast, cheap, and good enough for the standard “research a topic and write a summary” workload that most people start with.
Run your first agent
OpenClaw ships with four example agents in the examples/ directory. The simplest one is the “web researcher”:
openclaw run examples/web_researcher/agent.yaml \
--input "What are the three most popular open source LLM serving frameworks in 2026?"
That command does the following:
- Loads the agent configuration from
examples/web_researcher/agent.yaml. - Sets the user input as the agent’s task.
- Calls the model with the agent’s system prompt and the user’s task.
- The agent decides which tools to call (in this case, the web search tool and the URL fetching tool).
- The agent calls the tools, gets results, and decides if it needs more information.
- The agent returns a final answer.
The whole thing takes 20-40 seconds for a question like the one above. The output is a markdown-formatted summary with links to the sources the agent found. If the output looks reasonable, congratulations: you have a working OpenClaw deployment. Everything else is refinement.
The four example agents I actually use
I have been asked to give my honest opinion on which of the four example agents is most useful as a starting point. Here is the ranking, with notes:
- web_researcher. The best starter agent. It demonstrates the tool-calling pattern, it produces useful output, and the failure modes are easy to understand.
- code_reviewer. A pre-commit hook that reviews your staged changes and flags potential bugs. Useful enough that I run it on every commit to my own projects, even the toy ones.
- sql_analyst. A natural-language interface to a PostgreSQL database. Useful for ad-hoc data questions, but requires a database connection and a permissions story.
- email_triage. Reads an IMAP inbox, categorizes messages, and drafts replies. Powerful, but requires careful sandboxing before you let it touch a real inbox.
The code reviewer is the one I have found most teams adopt fastest. The email triage agent is the one I have found most teams underestimate the security implications of.
How to write your own agent
Once you have run the example agents, the next step is to copy one of the example directories and modify the configuration. An OpenClaw agent is a YAML file (a human-readable configuration format) that describes:
- The system prompt (what the agent is and how it should behave).
- The model to use (defaults to the config default if omitted).
- The tools the agent is allowed to call.
- The output format (markdown, JSON, plain text).
- Any rate limits or budget caps (recommended for all production agents).
Here is a minimal agent that summarizes the contents of a webpage:
name: page_summarizer
system_prompt: |
You are a research assistant. When given a URL, fetch the page and
produce a 200-word summary of the main points.
tools:
- web_fetch
output: markdown
budget:
max_api_calls: 5
max_cost_usd: 0.50
Save this to agents/page_summarizer.yaml and run it with openclaw run agents/page_summarizer.yaml --input "https://example.com/article". The agent fetches the page, summarizes it, and returns the summary. The budget cap means the agent cannot accidentally loop and drain your API credits.
The three mistakes first-time users make
I have seen these three mistakes dozens of times. They are not catastrophic, but they are annoying and easy to avoid.
- Running an agent with no budget cap. I have seen first-time users burn $300 in an afternoon because their agent got stuck in a retry loop. Always set a budget cap.
- Letting the agent read your email before you understand the security model. The OpenClaw quickstart guide makes it easy to connect to IMAP, and that is the wrong default for a first-time setup. Start with the web researcher. Graduate to email once you understand the sandboxing.
- Modifying the example agent’s system prompt before understanding what the original was doing. The example prompts have been tuned to produce reliable output. When you change them, you change the behavior. Make a copy first.
If you avoid those three, your first OpenClaw setup will be a good experience.
Trade-offs
OpenClaw is not the only agent framework. LangChain, AutoGen, CrewAI, and a dozen others all do similar things. The reason I recommend OpenClaw to new teams is that the documentation is honest about what works and what does not, the example agents are good starting points, and the runtime does not try to do everything.
If you are building a single-purpose agent that does one thing well, OpenClaw is a good choice. If you are building a complex multi-agent system with 20 specialized agents coordinating with each other, you will outgrow OpenClaw in 6 months and need to look at the heavier frameworks. For the 80% case of “I want a single agent that can use a few tools,” OpenClaw is the right size.
Start with the web researcher. Run it. Get a feel for what the tool calls look like. Modify a copy. Add a budget cap. You are now a 30-minute OpenClaw developer, and you have a clearer picture of what agent frameworks actually do in practice than 90% of the people who read the marketing pages.