← All tutorials
beginnerGetting Started15 min

Set up your first OpenClaw agent

Go from zero to a working agent that can read your files and respond in your chat channel.

Prerequisites

  • Node.js 20+ installed
  • A terminal you're comfortable with

This walkthrough gets a basic agent running and connected to a chat channel.

Install the CLI

Install the OpenClaw CLI globally so the openclaw command is available:

npm install -g openclaw

Create a workspace

Pick a directory to be your agent's home. This is where its memory and identity files live.

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

Start the gateway

The gateway is the long-running process that hosts your agent.

openclaw gateway start

Tip

Use openclaw gateway status any time to confirm it's healthy before debugging anything else.

Say hello

Send a message from your connected channel. If the agent replies, you're live.

Note

If nothing happens, check that your channel credentials are set in the environment and re-run the status command above.

Next steps

  • Read: Keep memory files small and scoped
  • Try the Automating workflows tutorial