OpenClaw Tutorial for Beginners
From Zero to Running Agent
Complete hands-on tutorial to build your first OpenClaw AI agent. Follow step-by-step exercises with practical examples and real code.
Hands-On Tutorial Steps
Follow these step-by-step exercises to build your first OpenClaw agent
Environment Setup & Installation
15 minutesGoal: Get OpenClaw installed and running on your system
Exercises:
Exercise 1: Install OpenClaw
npm install -g openclaw openclaw --version
✓ Expected Result: OpenClaw version number displays
Exercise 2: Initialize workspace
mkdir openclaw-tutorial cd openclaw-tutorial openclaw init
✓ Expected Result: Workspace initialized with config files
Checkpoints:
- ✓OpenClaw CLI responds to commands
- ✓Workspace directory created
- ✓Config file exists
Start Gateway & Basic Configuration
10 minutesGoal: Launch OpenClaw gateway and verify it's working
Exercises:
Exercise 1: Start the gateway
openclaw gateway start openclaw gateway status
✓ Expected Result: Gateway running on localhost:3000
Exercise 2: Test gateway connection
curl http://localhost:3000/health openclaw gateway logs --tail 5
✓ Expected Result: Health check returns OK status
Checkpoints:
- ✓Gateway process running
- ✓Port 3000 accessible
- ✓No error messages in logs
Troubleshooting Tips:
- • Port 3000 in use? Try: openclaw gateway start --port 3001
- • Permission errors? Run as administrator/sudo
- • Firewall blocking? Check firewall settings
Create Your First Agent
20 minutesGoal: Build a simple AI agent that can respond to basic queries
Exercises:
Exercise 1: Create agent configuration
openclaw agent create --name hello-agent openclaw agent list
✓ Expected Result: hello-agent appears in agent list
Exercise 2: Test agent interaction
openclaw agent chat hello-agent "Hello, what's your name?" openclaw agent chat hello-agent "What can you help me with?"
✓ Expected Result: Agent responds with helpful messages
Agent Configuration (agents/hello-agent.json):
{
"name": "hello-agent",
"description": "A friendly AI assistant for beginners",
"personality": "Helpful, patient, and encouraging",
"capabilities": ["conversation", "general-assistance"],
"skills": [],
"model": "claude-3-haiku",
"maxTokens": 500
}Checkpoints:
- ✓Agent created successfully
- ✓Agent responds to chat messages
- ✓Responses are coherent and helpful
Add Skills to Your Agent
25 minutesGoal: Enhance agent capabilities with pre-built skills
Exercises:
Exercise 1: Browse available skills
openclaw skills browse openclaw skills search weather
✓ Expected Result: List of available skills displays
Exercise 2: Install weather skill
openclaw skills install weather-basic openclaw skills list
✓ Expected Result: weather-basic skill installed
Exercise 3: Configure agent with weather skill
openclaw agent config hello-agent --add-skill weather-basic openclaw agent restart hello-agent
✓ Expected Result: Agent restarted with new skill
Exercise 4: Test weather functionality
openclaw agent chat hello-agent "What's the weather like in London?" openclaw agent chat hello-agent "Tell me about the weather in New York"
✓ Expected Result: Agent provides weather information
Checkpoints:
- ✓Skills marketplace accessible
- ✓Weather skill installed successfully
- ✓Agent can provide weather updates
- ✓Weather responses include real data
Build a Custom Automation Workflow
30 minutesGoal: Create an automated task that runs without direct interaction
Exercises:
Exercise 1: Create a scheduled task
openclaw workflow create daily-summary openclaw workflow config daily-summary --schedule "0 9 * * *"
✓ Expected Result: Workflow created with daily schedule
Exercise 2: Define workflow actions
✓ Expected Result:
Exercise 3: Test workflow manually
openclaw workflow run daily-summary openclaw workflow status daily-summary
✓ Expected Result: Workflow executes and completes
Checkpoints:
- ✓Workflow created and configured
- ✓Manual execution works
- ✓Output logged correctly
- ✓Schedule configured properly
Monitor and Debug Your Setup
15 minutesGoal: Learn monitoring tools and troubleshooting basics
Exercises:
Exercise 1: Check system status
openclaw status openclaw agents status openclaw gateway metrics
✓ Expected Result: All systems showing healthy status
Exercise 2: Review logs and activity
openclaw logs agent hello-agent --tail 10 openclaw logs gateway --tail 5 openclaw activity recent
✓ Expected Result: Recent activity and logs displayed
Exercise 3: Performance monitoring
openclaw metrics summary openclaw resources usage
✓ Expected Result: Resource usage and performance metrics
Checkpoints:
- ✓All components showing healthy
- ✓Logs accessible and informative
- ✓Performance metrics available
- ✓No critical errors present
Practical Exercises & Projects
Build real-world applications with these hands-on projects
Personal Assistant Bot
Build an AI assistant that helps with daily tasks
Features:
- ✓Answers questions about time/date
- ✓Provides weather updates
- ✓Sets reminders
- ✓Gives motivational quotes
Steps:
- 1.Create 'personal-assistant' agent
- 2.Install time, weather, and quotes skills
- 3.Configure personality to be friendly and helpful
- 4.Test various query types
- 5.Set up daily motivation workflow
Code Examples:
agent Config:
{
"name": "personal-assistant",
"personality": "Friendly, helpful personal assistant",
"skills": ["time-utils", "weather-basic", "quotes", "reminders"],
"responseStyle": "conversational",
"capabilities": ["scheduling", "information", "motivation"]
}test Queries:
What time is it? How's the weather today? Give me a motivational quote Remind me to call mom at 3pm
Content Creator Helper
Agent that helps with content creation and social media
Features:
- ✓Generates blog post ideas
- ✓Creates social media posts
- ✓Suggests hashtags
- ✓Schedules content
Steps:
- 1.Create 'content-helper' agent
- 2.Install writing and social media skills
- 3.Configure for creative writing style
- 4.Set up content scheduling workflow
- 5.Test content generation
Code Examples:
agent Config:
{
"name": "content-helper",
"personality": "Creative, inspiring content strategist",
"skills": ["writing-assistant", "social-media", "hashtag-generator"],
"responseStyle": "creative",
"capabilities": ["content-generation", "scheduling", "social-media"]
}workflow:
{
"name": "daily-content",
"schedule": "0 8 * * 1-5",
"actions": [
{"type": "generate-content", "topic": "daily-tip"},
{"type": "post-social", "platforms": ["twitter", "linkedin"]}
]
}Business Task Automator
Automated business workflow processor
Features:
- ✓Processes incoming emails
- ✓Updates spreadsheets
- ✓Sends status reports
- ✓Manages customer inquiries
Steps:
- 1.Create 'business-automator' agent
- 2.Install email, spreadsheet, and CRM skills
- 3.Configure business-focused personality
- 4.Set up email processing workflow
- 5.Create reporting automation
Code Examples:
agent Config:
{
"name": "business-automator",
"personality": "Professional, efficient business assistant",
"skills": ["email-processor", "spreadsheet-manager", "crm-integration"],
"responseStyle": "professional",
"capabilities": ["email-automation", "data-processing", "reporting"]
}email Workflow:
{
"name": "email-processor",
"trigger": "email-received",
"conditions": [{"subject": "contains", "value": "inquiry"}],
"actions": [
{"type": "classify-email"},
{"type": "update-crm"},
{"type": "send-auto-response"}
]
}Common Challenges & Solutions
Agent Not Responding
Symptoms:
- •No response to chat messages
- •Agent appears offline
- •Timeout errors
Solutions:
- ✓Check gateway is running: openclaw gateway status
- ✓Verify agent exists: openclaw agent list
- ✓Restart agent: openclaw agent restart [name]
- ✓Check API keys are configured correctly
Skills Installation Failed
Symptoms:
- •Skill download errors
- •Permission denied messages
- •Skill not appearing in list
Solutions:
- ✓Check internet connection
- ✓Run with admin privileges if needed
- ✓Clear skill cache: openclaw skills cache clear
- ✓Try installing from different source
Workflow Not Triggering
Symptoms:
- •Scheduled workflows not running
- •Manual triggers not working
- •No log entries for workflow
Solutions:
- ✓Verify cron schedule format
- ✓Check workflow status: openclaw workflow status [name]
- ✓Review workflow logs for errors
- ✓Ensure all referenced agents/skills exist
Performance Issues
Symptoms:
- •Slow agent responses
- •High CPU/memory usage
- •Gateway becoming unresponsive
Solutions:
- ✓Monitor resource usage: openclaw metrics
- ✓Reduce concurrent agents if needed
- ✓Optimize agent configurations
- ✓Consider upgrading system resources
Next Steps & Advanced Learning
Continue your OpenClaw journey with these advanced topics
Advanced Agent Development
Build more sophisticated agents with complex logic
Topics to Explore:
- ▸Custom skill development
- ▸Multi-agent orchestration
- ▸Advanced memory management
- ▸Integration with external APIs
Learning Resources:
- 📖OpenClaw Skills Development Guide
- 📖Agent Architecture Patterns
- 📖API Integration Tutorials
- 📖Community skill examples
Production Deployment
Deploy OpenClaw for real-world use
Topics to Explore:
- ▸Server hosting and scaling
- ▸Security configuration
- ▸Backup and recovery
- ▸Monitoring and alerting
Learning Resources:
- 📖Production Deployment Guide
- 📖Security Best Practices
- 📖Monitoring Setup Tutorial
- 📖Backup Configuration Guide
Business Integration
Integrate OpenClaw with business systems
Topics to Explore:
- ▸CRM and database integration
- ▸Workflow automation
- ▸Customer service bots
- ▸Reporting and analytics
Learning Resources:
- 📖Business Integration Examples
- 📖CRM Connection Guides
- 📖Customer Service Automation
- 📖Analytics Dashboard Setup
Need Help with
Your First OpenClaw Project?
Get personalized guidance through your first OpenClaw implementation. From basic setup to advanced automation workflows.
- ✓One-on-one tutorial sessions
- ✓Custom project development
- ✓Troubleshooting support
Beginner Support
Get hands-on help with your OpenClaw learning