Configuring OpenClaw for First Use

Clawpedia · For Humans

Essential configuration steps to get your OpenClaw agent running after installation, including API keys and preferences.

Configuring OpenClaw for First Use

After installing OpenClaw, the next step is configuration. This guide walks you through the initial setup process — from choosing an AI provider to configuring memory, setting up your first chat platform, and customizing behavior.

---

The Configuration File

Location and Format

OpenClaw stores its configuration at ~/.openclaw/config.yaml:


# ~/.openclaw/config.yaml — Main configuration file
agent:
  name: "My Agent"
  language: "en"
  tone: "professional"

provider:
  name: "openai"
  model: "gpt-4"
  api_key: "sk-..."
  temperature: 0.7
  max_tokens: 4096

memory:
  enabled: true
  backend: "local"     # local, redis, or postgres
  encryption: true
  max_entries: 10000

platforms:
  terminal:
    enabled: true
  telegram:
    enabled: false
    token: ""

skills:
  auto_load: true
  directory: "~/.openclaw/skills"

logging:
  level: "info"         # debug, info, warn, error
  file: "~/.openclaw/logs/agent.log"
  max_size: "10MB"
  max_files: 5

---

Interactive Setup

Using the Init Wizard


openclaw init

The wizard guides you through each configuration step:


🦞 Welcome to OpenClaw Setup!

━━━ AI Provider ━━━
? Select your AI provider:
  ❯ OpenAI
    Anthropic
    Google (Gemini)
    Ollama (Local)
    Custom Endpoint

? Enter your API key: sk-●●●●●●●●●●●●
? Select model: gpt-4

━━━ Personality ━━━
? Agent name: Jarvis
? Default language: English
? Communication tone: Professional

━━━ Memory ━━━
? Enable persistent memory? Yes
? Encrypt stored memories? Yes

━━━ Platform ━━━
? Select chat platform:
  ❯ Terminal only (for now)
    Telegram
    Slack
    Discord

✅ Configuration saved!
🚀 Run 'openclaw start' to begin chatting.

---

AI Provider Configuration

Supported Providers

ProviderModelsAPI Key Required
OpenAIGPT-4, GPT-4o, GPT-3.5Yes
AnthropicClaude 3.5, Claude 3Yes
GoogleGemini Pro, Gemini FlashYes
OllamaLlama 3, Mistral, Phi-3No (local)

Configuring via CLI


# Set provider
openclaw config set provider.name openai
openclaw config set provider.model gpt-4
openclaw config set provider.api_key sk-your-key-here

# Set temperature (creativity)
openclaw config set provider.temperature 0.7

# For Ollama (local)
openclaw config set provider.name ollama
openclaw config set provider.model llama3
openclaw config set provider.endpoint http://localhost:11434

Testing Your Provider


# Quick test
openclaw test-provider

# Expected output:
# 🔗 Connecting to OpenAI...
# ✅ Authentication successful
# ✅ Model gpt-4 available
# ✅ Test prompt completed (1.2s, 45 tokens)
# 💰 Estimated cost: $0.003
CustomAny OpenAI-compatible APIVaries

---

Memory Configuration

Memory Backends

BackendPersistenceSpeedUse Case
Local (SQLite)✅FastSingle user, development
Redis✅FastestProduction, multi-instance
PostgreSQL✅FastEnterprise, complex queries

# Local backend (default)
memory:
  backend: "local"
  path: "~/.openclaw/memory.db"
  encryption: true

# Redis backend
memory:
  backend: "redis"
  url: "redis://localhost:6379/0"
  encryption: true

# PostgreSQL backend
memory:
  backend: "postgres"
  url: "postgresql://user:pass@localhost:5432/openclaw"
  encryption: true
In-Memory❌FastestTesting, stateless agents

---

Platform Setup

Terminal Mode (Default)

No additional configuration needed:


openclaw start
# or
openclaw chat

Quick Platform Setup


# Telegram
openclaw platform add telegram --token "YOUR_BOT_TOKEN"

# Slack
openclaw platform add slack --token "xoxb-YOUR-TOKEN"

# Discord
openclaw platform add discord --token "YOUR_BOT_TOKEN"

See dedicated platform guides for detailed setup instructions.

---

System Prompt Configuration

Customizing Agent Behavior


# ~/.openclaw/config.yaml
agent:
  system_prompt: |
    You are a helpful AI assistant named Jarvis.
    You specialize in software development and DevOps.
    Always provide code examples when possible.
    Be concise but thorough.
    If you are unsure, say so honestly.
  
  rules:
    - Never share API keys or secrets
    - Always confirm before destructive actions
    - Prefer open-source solutions when possible

---

Verifying Your Setup

Comprehensive Health Check


openclaw doctor

# Output:
# ━━━ System ━━━
# ✅ Node.js v20.11.0
# ✅ npm v10.2.4
# ✅ OpenClaw v1.5.2
#
# ━━━ Configuration ━━━
# ✅ Config file: ~/.openclaw/config.yaml
# ✅ Provider: OpenAI (gpt-4)
# ✅ API key: configured
# ✅ Memory: local (encrypted)
#
# ━━━ Connectivity ━━━
# ✅ OpenAI API: reachable (230ms)
# ✅ Internet: connected
#
# ━━━ Skills ━━━
# ✅ Built-in skills: 12 loaded
# ⚠️ Custom skills: none found
#
# ━━━ Platforms ━━━
# ✅ Terminal: active
# ⚠️ No external platforms configured

---

Common Configuration Patterns

Developer Setup


agent:
  name: "DevBot"
  tone: "technical"
  system_prompt: "You are a senior developer assistant."
provider:
  model: "gpt-4"
  temperature: 0.3  # Lower = more precise

Personal Assistant Setup


agent:
  name: "Friday"
  tone: "casual"
  system_prompt: "You are a friendly personal assistant."
provider:
  model: "gpt-4o"  # Faster for daily tasks
  temperature: 0.7

---

Your First Steps After Installation

You have installed OpenClaw — now what? This guide takes you from your first command to a fully configured personal AI assistant in under 15 minutes. By the end, you will have a working agent that responds to your questions, remembers context, and is ready for automation.

---

Step 1: Run the Setup Wizard

If you have not already run the initialization wizard during installation, start it now:


openclaw init

The wizard walks you through four decisions:

StepWhat It DoesExample
ProviderSelects which AI service powers your agentOpenAI, Anthropic, Ollama
API KeyAuthenticates with your chosen providersk-abc123...
ModelSets the default language modelgpt-4o, claude-sonnet-4
MemoryEnables persistent context across sessionsYes / No

Tip: If you are unsure which model to pick, start with gpt-4o-mini — it is fast, affordable, and great for learning.

---

Step 2: Your First Conversation

Send a message to your agent:


openclaw chat "Hello! What can you help me with?"

OpenClaw responds with a summary of its capabilities based on your configuration.

Interactive Chat Mode

For a back-and-forth conversation (like a terminal chatbot):


openclaw chat

This opens an interactive session:


┌─ OpenClaw Chat ─────────────────────┐
│ Type your message, or /help for     │
│ commands. Press Ctrl+C to exit.     │
└─────────────────────────────────────┘

You: What is the capital of France?
OpenClaw: The capital of France is Paris.

You: Tell me three interesting facts about it.
OpenClaw: Here are three interesting facts about Paris:
1. The Eiffel Tower was originally meant to be temporary...

Useful in-chat commands:

CommandEffect
/helpShow all available commands
/clearClear conversation context
/model gpt-4oSwitch model mid-conversation
/exportSave the conversation to a file
/quitExit the chat

---

Step 3: Explore Core Features

One-Shot Commands

Ask single questions without entering chat mode:


openclaw chat "Summarize this file" < report.txt
openclaw chat "Convert 50 USD to EUR"
openclaw chat "Write a haiku about coding"

Pipe Input

OpenClaw can process piped input:


cat error.log | openclaw chat "What went wrong?"
git diff | openclaw chat "Summarize these changes"
curl -s https://api.example.com/data | openclaw chat "Analyze this JSON"

File Context

Attach files for richer context:


openclaw chat "Review this code" --file src/app.ts
openclaw chat "Explain this diagram" --file architecture.png

---

Step 4: Teach Your Agent About You

Personalization makes OpenClaw more useful over time. Teach it your preferences:


openclaw teach "I am a frontend developer using React and TypeScript"
openclaw teach "I prefer concise answers with code examples"
openclaw teach "My timezone is Europe/Berlin"

Verify what OpenClaw knows:


openclaw memory list

---

Step 5: Install Your First Skill

Skills extend OpenClaw's capabilities. Browse and install from ClawHub:


# Search for skills
openclaw skill search weather

# Install a skill
openclaw skill install weather-forecast

# Use it
openclaw chat "What's the weather in Berlin tomorrow?"

Popular starter skills:

SkillWhat It Does
weather-forecastWeather queries for any location
web-searchSearch the web and summarize results
calculatorComplex math and unit conversions
reminderSet timed reminders
file-managerRead, write, and organize files

---

Step 6: Connect a Messaging Platform (Optional)

Use OpenClaw from your favorite chat app:


# Start the messaging gateway
openclaw gateway start

# Connect Telegram
openclaw connect telegram --token YOUR_BOT_TOKEN

# Connect Discord
openclaw connect discord --token YOUR_BOT_TOKEN

Once connected, message your agent directly from Telegram, Discord, Slack, or WhatsApp.

---

Step 7: Review Your Configuration

Check your current setup anytime:


openclaw config list

Output:


provider: openai
model: gpt-4o
memory:
  enabled: true
  max_entries: 1000
gateway:
  port: 3777
  auto_start: false
skills:
  installed:
    - weather-forecast
    - web-search

Change any setting:


openclaw config set model gpt-4o-mini
openclaw config set memory.max_entries 2000

---

Quick Reference Card

TaskCommand
Chat (one-shot)openclaw chat "your question"
Chat (interactive)openclaw chat
Teach a factopenclaw teach "fact"
Install a skillopenclaw skill install name
Start gatewayopenclaw gateway start
Check configopenclaw config list
View logsopenclaw logs
Updateopenclaw self-update

---

What to Try Next

---

Troubleshooting First Steps

"No provider configured"

Run openclaw init again or set manually:


openclaw config set provider openai
openclaw config set provider.api_key sk-your-key

Slow Responses

"Memory is disabled"


openclaw config set memory.enabled true
openclaw gateway restart

---

Summary

Getting started with OpenClaw takes just a few minutes: run openclaw init, start chatting, teach it about yourself, and install a few skills. From there, you can connect messaging platforms, automate workflows, and build a truly personal AI assistant.

---

Troubleshooting

ProblemSolution
Config file not foundRun openclaw init to create it
API key invalidVerify at provider's dashboard
Memory errorsCheck disk space, try openclaw memory repair
Slow responsesSwitch to faster model or lower max_tokens
Config changes not appliedRestart: openclaw restart

Related Articles