Getting Started#2
OpenClaw Quick Start: From Installation to Your First Agent
Step-by-step tutorial including environment setup, dependency installation, and running your first agent.
8 min read•2026-02-03
installationNode.jsquick start
Prerequisites
Before installing OpenClaw, ensure you have the following:
- Node.js 18+: OpenClaw requires a modern Node.js runtime
- npm or pnpm: Package manager for dependencies
- Git: For cloning the repository
- API Key: Access to an LLM provider (OpenAI, Anthropic, etc.)
Installation Steps
Step 1: Clone the Repository
git clone https://github.com/openclaw/openclaw.git
cd openclaw
Step 2: Install Dependencies
npm install
# or
pnpm install
Step 3: Configure Environment
Create a .env file in the project root:
# LLM Configuration
OPENAI_API_KEY=sk-your-api-key-here
# or
ANTHROPIC_API_KEY=sk-ant-your-key-here
# Messaging Platform (choose one)
TELEGRAM_BOT_TOKEN=your-telegram-token
# DISCORD_TOKEN=your-discord-token
# SLACK_TOKEN=your-slack-token
# Optional: Memory persistence
MEMORY_STORAGE_PATH=./data/memory
Step 4: Initialize Bootstrap Files
Create the workspace directory and bootstrap files:
mkdir -p workspace
touch workspace/AGENTS.md
touch workspace/SOUL.md
touch workspace/IDENTITY.md
Step 5: Start the Agent
npm run start
# or for development
npm run dev
Your First Interaction
Once the agent is running, connect through your configured messaging platform and try these commands:
# Check agent status
You: "Are you online?"
# Simple file operation
You: "Create a file called hello.txt with the content 'Hello, World!'"
# System information
You: "What's the current time and date?"
# List directory
You: "Show me the files in the current directory"
Understanding the Output
OpenClaw provides detailed feedback for each action:
[Agent] Received command: Create a file...
[Tool] Executing: writeFile
[Tool] Path: ./hello.txt
[Tool] Content: Hello, World!
[Agent] ✅ File created successfully at ./hello.txt
Basic Configuration
Setting Your Agent's Persona
Edit workspace/SOUL.md to define your agent's personality:
# Agent Persona
You are a helpful AI assistant focused on productivity and automation.
## Communication Style
- Be concise and action-oriented
- Confirm before executing potentially destructive actions
- Provide clear status updates during long-running tasks
## Expertise Areas
- File management and organization
- Email and calendar automation
- Code assistance and review
Common First-Time Issues
Issue: API Key Not Found
Error: No API key configured
Solution: Ensure your .env file contains a valid API key
and the variable name matches your LLM provider.
Issue: Permission Denied
Error: EACCES permission denied
Solution: Check file permissions in your workspace directory.
Run: chmod -R 755 ./workspace
Next Steps
Now that you have OpenClaw running, explore:
- Bootstrap Files: Deep dive into AGENTS.md and SOUL.md configuration
- Messaging Integration: Connect to your preferred platform
- Custom Tools: Add new capabilities to your agent