/configs

Configuration examples and templates for OpenClaw.

config.yaml — Basic Gateway

Basic OpenClaw gateway configuration with Claude Sonnet and Discord integration.

#basic#discord#claude
›
config.yaml
# OpenClaw Basic Configuration

gateway:
  name: "my-claw"
  model:
    provider: anthropic
    model: claude-sonnet-4-5
    temperature: 0.7
    max_tokens: 4096

channels:
  - type: discord
    token: ${DISCORD_BOT_TOKEN}
    command_prefix: "!"
    allowed_channels:
      - "ai-assistant"
      - "general"

memory:
  type: local
  path: ./data/memory
  max_messages: 100

plugins:
  - name: web_search
    enabled: true
  - name: code_execution
    enabled: false

logging:
  level: info
  file: ./logs/openclaw.log

config.yaml — Multi-Channel Setup

OpenClaw configuration with Discord, Telegram, and Slack integrations running simultaneously.

#multi-channel#discord#telegram#slack
›
config.yaml
# OpenClaw Multi-Channel Configuration

gateway:
  name: "omni-claw"
  model:
    provider: anthropic
    model: claude-sonnet-4-5
    temperature: 0.7

channels:
  # Discord
  - type: discord
    token: ${DISCORD_BOT_TOKEN}
    command_prefix: "!"
    status_message: "AI Assistant Online"
    allowed_roles:
      - "moderator"
      - "member"
  
  # Telegram
  - type: telegram
    token: ${TELEGRAM_BOT_TOKEN}
    allowed_users:
      - "@admin_user"
      - "@team_lead"
  
  # Slack
  - type: slack
    token: ${SLACK_BOT_TOKEN}
    app_token: ${SLACK_APP_TOKEN}
    socket_mode: true
    allowed_channels:
      - "#engineering"
      - "#ai-help"

memory:
  type: redis
  url: ${REDIS_URL}
  ttl: 86400  # 24 hours
  max_messages_per_user: 50

rate_limiting:
  enabled: true
  max_requests_per_minute: 10
  max_requests_per_hour: 100

agents.yaml — Agent Army

Multiple specialized agents with different roles, models, and skills for team collaboration.

#agents#multi-agent#advanced
›
agents.yaml
# OpenClaw Agent Army Configuration

agents:
  # Code Expert
  - name: "code-expert"
    model:
      provider: anthropic
      model: claude-sonnet-4-5
      temperature: 0.3
    system_prompt: |
      You are an expert software engineer specializing in code review,
      refactoring, and architecture. You write clean, maintainable code
      and follow best practices.
    skills:
      - code_execution
      - file_operations
      - git_operations
    tools:
      - python
      - nodejs
      - bash
  
  # Data Analyst
  - name: "data-analyst"
    model:
      provider: anthropic
      model: claude-opus-4
      temperature: 0.2
    system_prompt: |
      You are a data analyst expert. You analyze datasets, create
      visualizations, and provide insights from data.
    skills:
      - data_analysis
      - visualization
      - sql_queries
    tools:
      - python
      - pandas
      - matplotlib
  
  # Creative Writer
  - name: "writer"
    model:
      provider: anthropic
      model: claude-sonnet-4
      temperature: 0.9
    system_prompt: |
      You are a creative writer and content strategist. You craft
      compelling narratives, documentation, and marketing copy.
    skills:
      - content_creation
      - markdown_formatting
      - seo_optimization
  
  # DevOps Engineer
  - name: "devops"
    model:
      provider: anthropic
      model: claude-sonnet-4-5
      temperature: 0.3
    system_prompt: |
      You are a DevOps engineer. You manage infrastructure, CI/CD,
      monitoring, and deployment workflows.
    skills:
      - docker_management
      - kubernetes_operations
      - ci_cd_pipelines
    tools:
      - docker
      - kubectl
      - terraform

routing:
  # Route messages to appropriate agents based on keywords
  rules:
    - keywords: ["code", "bug", "refactor", "function"]
      agent: "code-expert"
    - keywords: ["data", "analyze", "chart", "sql"]
      agent: "data-analyst"
    - keywords: ["write", "blog", "content", "documentation"]
      agent: "writer"
    - keywords: ["deploy", "docker", "kubernetes", "pipeline"]
      agent: "devops"
  
  default_agent: "code-expert"

cron.yaml — Scheduled Jobs

Cron job configuration for monitoring, backups, and automated maintenance tasks.

#cron#automation#monitoring
›
cron.yaml
# OpenClaw Cron Jobs Configuration

jobs:
  # Daily Backup
  - name: "daily-backup"
    schedule: "0 2 * * *"  # 2 AM daily
    agent: "devops"
    task: |
      Backup the following:
      1. Memory database to S3
      2. Configuration files
      3. Agent logs from past 7 days
      Upload to: s3://openclaw-backups/{{date}}/
    channels:
      - type: slack
        channel: "#ops-alerts"
        on_completion: true
  
  # Weekly Security Scan
  - name: "security-scan"
    schedule: "0 3 * * 1"  # 3 AM Monday
    agent: "code-expert"
    task: |
      Run security audit:
      1. npm audit on all Node.js projects
      2. Check for outdated dependencies
      3. Scan for exposed secrets in code
      Report findings to #security channel
    channels:
      - type: slack
        channel: "#security"
  
  # Hourly Health Check
  - name: "health-check"
    schedule: "0 * * * *"  # Every hour
    agent: "devops"
    task: |
      Check system health:
      1. API response times
      2. Database connection
      3. Redis cache status
      4. Disk usage
      Alert if any threshold exceeded
    alerts:
      - condition: "response_time > 2000"
        channel: "#ops-alerts"
        severity: warning
      - condition: "disk_usage > 90"
        channel: "#ops-alerts"
        severity: critical
  
  # Daily Standup Summary
  - name: "standup-summary"
    schedule: "0 9 * * 1-5"  # 9 AM weekdays
    agent: "writer"
    task: |
      Generate daily standup summary:
      1. Review yesterday's commits
      2. Check open PRs and issues
      3. Summarize team activity
      Post formatted summary to #standup
    channels:
      - type: slack
        channel: "#standup"
  
  # Monthly Report
  - name: "monthly-report"
    schedule: "0 10 1 * *"  # 10 AM on 1st of month
    agent: "data-analyst"
    task: |
      Generate monthly metrics report:
      1. Agent usage statistics
      2. Most common queries
      3. User engagement metrics
      4. Cost analysis
      Create visualizations and post to #metrics
    channels:
      - type: slack
        channel: "#metrics"

notifications:
  on_failure:
    - type: slack
      channel: "#ops-alerts"
    - type: email
      to: "[email protected]"

skills.yaml — Custom Skills

Custom skill definitions for code execution, database queries, and API integrations.

#skills#custom#integrations
›
skills.yaml
# OpenClaw Custom Skills Configuration

skills:
  # Code Execution Skill
  - name: code_execution
    description: "Execute code in sandboxed environment"
    enabled: true
    config:
      languages:
        - python
        - javascript
        - bash
      timeout: 30
      memory_limit: "512MB"
      network_access: false
      allowed_modules:
        python:
          - numpy
          - pandas
          - requests
        javascript:
          - lodash
          - axios
  
  # Database Query Skill
  - name: sql_queries
    description: "Execute read-only SQL queries"
    enabled: true
    config:
      connection:
        type: postgresql
        url: ${DATABASE_URL}
        pool_size: 5
      permissions:
        - SELECT
      rate_limit:
        max_queries_per_minute: 10
      query_timeout: 30
  
  # GitHub Integration
  - name: git_operations
    description: "Interact with GitHub repositories"
    enabled: true
    config:
      token: ${GITHUB_TOKEN}
      allowed_operations:
        - read_repo
        - create_issue
        - comment_pr
        - read_commits
      rate_limit:
        max_operations_per_hour: 100
  
  # Web Search Skill
  - name: web_search
    description: "Search the web for information"
    enabled: true
    config:
      provider: brave
      api_key: ${BRAVE_API_KEY}
      max_results: 5
      safe_search: true
  
  # File Operations
  - name: file_operations
    description: "Read and write files in workspace"
    enabled: true
    config:
      workspace_path: ./workspace
      max_file_size: "10MB"
      allowed_extensions:
        - .txt
        - .md
        - .json
        - .yaml
        - .py
        - .js
        - .ts
      forbidden_paths:
        - /etc
        - /root
        - ~/.ssh
  
  # Docker Management
  - name: docker_management
    description: "Manage Docker containers"
    enabled: true
    config:
      socket: /var/run/docker.sock
      allowed_operations:
        - list_containers
        - inspect_container
        - read_logs
      forbidden_operations:
        - remove_container
        - stop_container
  
  # API Integration
  - name: http_requests
    description: "Make HTTP requests to external APIs"
    enabled: true
    config:
      timeout: 30
      max_redirects: 5
      allowed_domains:
        - api.github.com
        - api.openai.com
        - api.anthropic.com
      rate_limit:
        max_requests_per_minute: 20

# Skill chains (compose multiple skills)
chains:
  - name: "code-review-chain"
    description: "Automated code review workflow"
    steps:
      - skill: git_operations
        action: fetch_pr_diff
      - skill: code_execution
        action: run_linter
      - skill: git_operations
        action: post_review_comment

memory.yaml — Advanced Memory System

Advanced memory configuration with vector search, conversation history, and knowledge graphs.

#memory#vectors#knowledge-graph
›
memory.yaml
# OpenClaw Advanced Memory Configuration

memory:
  # Short-term conversation memory
  conversation:
    type: redis
    url: ${REDIS_URL}
    ttl: 86400  # 24 hours
    max_messages: 100
    compression: true
  
  # Long-term vector memory
  vectors:
    provider: pinecone
    api_key: ${PINECONE_API_KEY}
    index_name: "openclaw-memory"
    dimension: 1536
    metric: cosine
    embedding_model:
      provider: openai
      model: text-embedding-3-small
    
    # Auto-store important information
    auto_indexing:
      enabled: true
      importance_threshold: 0.7
      categories:
        - user_preferences
        - project_context
        - code_snippets
        - decisions
    
    # Retrieval settings
    retrieval:
      top_k: 5
      similarity_threshold: 0.75
      rerank: true
  
  # Knowledge graph
  knowledge_graph:
    enabled: true
    database: neo4j
    url: ${NEO4J_URL}
    user: ${NEO4J_USER}
    password: ${NEO4J_PASSWORD}
    
    # Entity extraction
    entities:
      - type: person
        extract: true
      - type: project
        extract: true
      - type: technology
        extract: true
      - type: concept
        extract: true
    
    # Relationship types
    relationships:
      - WORKED_ON
      - USES
      - RELATED_TO
      - DEPENDS_ON
  
  # Conversation summaries
  summaries:
    enabled: true
    trigger:
      message_count: 50
      time_elapsed: 3600  # 1 hour
    model:
      provider: anthropic
      model: claude-haiku-3-5
    storage:
      type: s3
      bucket: openclaw-summaries
      prefix: "summaries/"

# Privacy settings
privacy:
  # PII detection and redaction
  pii_detection:
    enabled: true
    entities:
      - email
      - phone
      - ssn
      - credit_card
    action: redact
  
  # Data retention
  retention:
    conversation_logs: 30  # days
    vector_embeddings: 365  # days
    knowledge_graph: -1  # forever
  
  # GDPR compliance
  gdpr:
    enabled: true
    data_export: true
    right_to_be_forgotten: true

docker-compose.yaml — Full Stack Deployment

Complete Docker Compose setup for OpenClaw with Redis, PostgreSQL, and monitoring.

#docker#deployment#production
›
docker-compose.yaml
# OpenClaw Docker Compose — Production Stack

version: '3.8'

services:
  # OpenClaw Gateway
  openclaw:
    image: openclaw/openclaw:latest
    container_name: openclaw
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      - REDIS_URL=redis://redis:6379
      - DATABASE_URL=postgresql://openclaw:password@postgres:5432/openclaw
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
      - DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
    volumes:
      - ./config.yaml:/app/config.yaml
      - ./agents.yaml:/app/agents.yaml
      - ./data:/app/data
      - ./logs:/app/logs
    depends_on:
      - redis
      - postgres
    networks:
      - openclaw-network
  
  # Redis for caching and message queue
  redis:
    image: redis:7-alpine
    container_name: openclaw-redis
    restart: unless-stopped
    ports:
      - "6379:6379"
    volumes:
      - redis-data:/data
    command: redis-server --appendonly yes
    networks:
      - openclaw-network
  
  # PostgreSQL for persistent storage
  postgres:
    image: postgres:16-alpine
    container_name: openclaw-postgres
    restart: unless-stopped
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_DB=openclaw
      - POSTGRES_USER=openclaw
      - POSTGRES_PASSWORD=password
    volumes:
      - postgres-data:/var/lib/postgresql/data
    networks:
      - openclaw-network
  
  # Prometheus for metrics
  prometheus:
    image: prom/prometheus:latest
    container_name: openclaw-prometheus
    restart: unless-stopped
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - prometheus-data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
    networks:
      - openclaw-network
  
  # Grafana for visualization
  grafana:
    image: grafana/grafana:latest
    container_name: openclaw-grafana
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=admin
    volumes:
      - grafana-data:/var/lib/grafana
    networks:
      - openclaw-network

volumes:
  redis-data:
  postgres-data:
  prometheus-data:
  grafana-data:

networks:
  openclaw-network:
    driver: bridge