GuideOpenClawGitHubMarch 21, 2026·14 min read

OpenClaw AI Agent GitHub: The Complete Guide to the 250K-Star Repository

OpenClaw is the most starred AI agent project on GitHub. This guide covers everything: repository structure, key configuration files, the 13K-skill ecosystem on ClawHub, 162 agent templates, contributing workflows, security practices, and CI/CD pipelines. Whether you want to build your first agent or contribute to the project, start here.

OpenClaw GitHub Repository Overview

The OpenClaw AI agent GitHub repository sits at github.com/openclaw/openclaw and has crossed 250,000 stars, making it the most starred AI agent project in GitHub history. The repository receives hundreds of commits weekly from both the core team and the open-source community. It powers everything from single-agent setups on a Raspberry Pi to multi-agent production systems running across cloud infrastructure.

What sets the OpenClaw repository apart from other AI agent frameworks on GitHub is its architecture philosophy. Instead of requiring Python scripts or complex configuration objects, OpenClaw agents are defined in plain markdown files. A single file called SOUL.md contains an agent's entire identity, personality, rules, and skill set. This makes the repository approachable for people who have never written code, while the underlying Node.js engine provides the performance and extensibility developers expect.

The repository is not just source code. It includes 162 agent templates across 24 categories, comprehensive documentation, a skills marketplace integration, CI/CD workflow templates, and an active community through GitHub Discussions and Discord. It is a complete ecosystem packaged as a single repo.

250K+

GitHub Stars

162

Agent Templates

13K+

Skills on ClawHub

24

Categories

Repository Structure Explained

The OpenClaw repository follows a monorepo structure. Every component of the framework lives in a single repository, organized into clearly separated directories. Understanding this structure is the first step to working with the codebase, whether you are building agents or contributing code.

OpenClaw repository structure
openclaw/
├── agents/              # 162 ready-to-use agent templates
│   ├── researcher/      # Research and analysis agent
│   ├── writer/          # Content creation agent
│   ├── seo-specialist/  # SEO optimization agent
│   ├── devops-engineer/ # Infrastructure automation agent
│   └── ... (24 categories, 162 total)
├── gateway/             # Runtime engine (HTTP + WebSocket)
│   ├── server.js        # Main entry point
│   ├── routes/          # API route handlers
│   ├── channels/        # Telegram, Slack, Discord, WhatsApp, Email
│   ├── sessions/        # Session management and persistence
│   └── middleware/      # Auth, rate limiting, logging
├── skills/              # Built-in skill implementations
│   ├── browser/         # Web browsing and scraping
│   ├── file/            # File system operations
│   ├── database/        # Database queries and management
│   ├── api/             # External API integrations
│   └── ... (40+ built-in skills)
├── cli/                 # Command-line interface
│   ├── commands/        # agent, agents, gateway, skills, config
│   └── utils/           # Helpers, formatters, validators
├── core/                # Core framework logic
│   ├── llm/             # LLM provider adapters (Anthropic, OpenAI, Ollama)
│   ├── memory/          # Agent memory and context management
│   ├── orchestrator/    # Multi-agent routing and handoffs
│   └── parser/          # SOUL.md and AGENTS.md parsers
├── docs/                # Documentation and guides
├── .github/             # CI/CD workflows and issue templates
│   ├── workflows/       # GitHub Actions for testing and releases
│   └── ISSUE_TEMPLATE/  # Bug reports and feature requests
├── tests/               # Test suite
├── package.json         # Dependencies and npm scripts
├── CHANGELOG.md         # Version history
└── README.md            # Project overview and quickstart

agents/ -- The Template Library

This directory contains 162 pre-built agent templates organized into 24 categories including SEO, content creation, customer support, DevOps, data analysis, sales, security, and more. Each template is a complete agent workspace with a SOUL.md file, an optional AGENTS.md for team configurations, and sample skill references. You can use any template as-is or fork it as a starting point for your own agent.

core/ -- The Brain

The core directory is where the framework logic lives. The LLM adapters handle communication with different AI providers. The memory module manages conversation history and context windows. The orchestrator handles multi-agent routing, deciding which agent should handle a given message based on AGENTS.md rules. The parser reads your markdown configuration files and converts them into runtime objects the gateway can execute.

gateway/ -- The Runtime Engine

The gateway is the server that runs your agents. It accepts incoming messages from channels (Telegram, Slack, Discord, WhatsApp, Email) or the CLI, routes them through the orchestrator, executes skill calls, manages sessions, and returns responses. The channels subdirectory has one integration file per platform. Adding a new channel is as simple as implementing the channel interface and registering it.

.github/ -- CI/CD and Community

The .github directory contains GitHub Actions workflows for automated testing, linting, and release publishing. It also includes issue templates that guide bug reporters and feature requesters to provide the right information. The community health files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md) establish the rules for open-source participation.

How to Clone and Set Up from GitHub

There are three paths to getting OpenClaw on your machine, depending on your goals. Each path takes under 5 minutes.

Path 1: npm Install (Build Agents)

If your goal is to build and run agents, the npm install is the fastest path. You do not need to clone the repository.

Quick install via npm
# Install OpenClaw globally
npm install -g openclaw

# Verify the installation
openclaw --version
# Output: openclaw v3.2.1

# Initialize a new agent workspace
mkdir my-ai-agent && cd my-ai-agent
openclaw init

# This creates:
# my-ai-agent/
# ├── SOUL.md          # Your agent's identity
# ├── AGENTS.md        # Multi-agent config (optional)
# ├── HEARTBEAT.md     # Scheduled tasks (optional)
# └── WORKING.md       # Runtime state (auto-generated)

Path 2: Clone the Repository (Contribute or Customize)

Clone the full repository if you want to read the source code, contribute features or fixes, or run the development version with unreleased changes.

Clone and set up the full repository
# Clone the repository
git clone https://github.com/openclaw/openclaw.git
cd openclaw

# Install all dependencies
npm install

# Link CLI for local development
npm link

# Verify your local build
openclaw --version

# Run the test suite to confirm everything works
npm test

# Start the gateway in development mode
npm run dev

Path 3: Fork First (Long-term Contribution)

If you plan to contribute regularly, fork the repository to your GitHub account first. This gives you a personal copy where you can push branches and open pull requests against the main repo.

Fork, clone, and set up upstream tracking
# 1. Fork on GitHub (click the Fork button on the repo page)

# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/openclaw.git
cd openclaw

# 3. Add the original repo as upstream
git remote add upstream https://github.com/openclaw/openclaw.git

# 4. Install dependencies
npm install && npm link

# 5. Stay in sync with upstream
git fetch upstream
git merge upstream/main

# 6. Create a feature branch for your work
git checkout -b feature/my-improvement

Key Files: SOUL.md, AGENTS.md, HEARTBEAT.md, WORKING.md

The OpenClaw AI agent framework on GitHub uses four core markdown files to define and operate agents. These files are the backbone of every agent workspace. Understanding each one is essential for building effective agents from the GitHub source.

SOUL.md -- The Agent's Identity

Every OpenClaw agent starts with a SOUL.md file. It defines who the agent is, what it does, what rules it follows, and what skills it has access to. Think of it as the agent's DNA. The format is plain markdown with specific sections: Identity (name, role, personality), Rules (behavioral constraints), Skills (capabilities like browsing, file access, API calls), and Style (communication preferences). One SOUL.md equals one fully functional agent.

AGENTS.md -- The Team Roster

When you run multiple agents together, AGENTS.md defines the team. It lists every agent by name and role, specifies handoff rules (when Agent A should pass work to Agent B), and defines the orchestration logic. The @mention system allows agents to reference each other. The gateway reads this file to route messages between agents automatically based on the rules you define.

HEARTBEAT.md -- Scheduled Tasks

HEARTBEAT.md turns your agents into autonomous workers by defining cron-like scheduled tasks. Each entry specifies a schedule (every morning at 9 AM, every Monday, every 6 hours), a target agent, and a message to send. The gateway's heartbeat daemon reads this file and triggers tasks on schedule. Use it for daily reports, periodic monitoring, content publishing schedules, and any recurring workflow.

WORKING.md -- Runtime State

WORKING.md is the agent's scratchpad. It is auto-generated and updated by the agent during operation. It stores current task context, intermediate results, notes, and anything the agent needs to remember across interactions. You do not edit this file manually. It provides continuity between sessions so agents can pick up where they left off after restarts or long pauses.

Example SOUL.md for an SEO agent
# SOUL.md

## Identity
- Name: Radar
- Role: SEO Specialist
- Personality: Analytical, data-driven, concise

## Rules
- Always cite data sources when making recommendations
- Prioritize actionable insights over general advice
- Never fabricate metrics or rankings
- Report findings in structured format with headers

## Skills
- browser: Search Google and analyze SERPs
- scraper: Extract content from competitor pages
- file: Read and write analysis reports
- api: Query Google Search Console and Analytics

## Style
- Use bullet points for recommendations
- Include priority levels (high/medium/low)
- Start reports with a summary section
Example AGENTS.md for a content team
# AGENTS.md

## Team: Content Production

### @radar (SEO Specialist)
- Handles: keyword research, SERP analysis, content briefs
- Hands off to: @echo when brief is ready

### @echo (Content Writer)
- Handles: writing blog posts, landing pages, social copy
- Receives briefs from: @radar
- Hands off to: @orion when draft is complete

### @orion (Project Manager)
- Handles: task coordination, quality review, publishing
- Oversees: @radar, @echo
- Final approval before publishing

The Skills Ecosystem: 13K+ Skills on ClawHub

Skills are the capabilities you give your agents. The OpenClaw GitHub repository ships with 40+ built-in skills, but the real power is ClawHub, the community skill marketplace with over 13,000 published skills. Any skill on ClawHub can be installed with a single command and referenced in your SOUL.md.

Built-in Skills (in the GitHub repo)

The skills directory in the repository contains every built-in skill. These are maintained by the core team and tested with every release.

Built-in skills overview
# Core skills included in the repository
browser       # Web browsing, search, page interaction
scraper       # Content extraction and parsing
file          # File read/write/manage operations
api           # HTTP requests to external APIs
database      # SQL and NoSQL database operations
email         # Send and receive emails
calendar      # Google Calendar integration
git           # Git operations (commit, push, PR)
docker        # Container management
ssh           # Remote server access
pdf           # PDF generation and parsing
image         # Image processing and analysis
code          # Code execution in sandboxed environments
notify        # Push notifications (Telegram, Slack, ntfy)

# Install a ClawHub skill
openclaw skills install [SKILL_NAME]

# List all installed skills
openclaw skills list

# Search ClawHub for skills
openclaw skills search "google sheets"

ClawHub: The Skill Marketplace

ClawHub is to OpenClaw what npm is to Node.js. Community members publish skills that extend agent capabilities. Popular categories include CRM integrations (Salesforce, HubSpot), analytics tools (Google Analytics, Mixpanel), payment processors (Stripe, PayPal), social media management, and cloud provider APIs. Each skill follows a standard interface, so adding one to your agent is a one-line change in SOUL.md.

Using ClawHub skills in your agent
# Install a skill from ClawHub
openclaw skills install clawhub/google-sheets
openclaw skills install clawhub/stripe-billing
openclaw skills install clawhub/slack-advanced

# Reference in your SOUL.md
## Skills
- browser: Search the web
- google-sheets: Read and write spreadsheets
- stripe-billing: Manage subscriptions and invoices
- slack-advanced: Send messages, create channels, manage threads

162 Agent Templates Across 24 Categories

The OpenClaw GitHub repository includes 162 production-ready agent templates. Each template is a complete agent workspace that you can copy and use immediately, or customize for your specific needs. Templates are organized into 24 categories covering virtually every business function.

SEO & Marketing

Content Creation

Customer Support

Sales & CRM

DevOps & Infra

Data Analysis

Security & Compliance

Project Management

Finance & Accounting

HR & Recruiting

Legal & Contracts

Research & Analysis

Use a template from the repository
# List all available templates
openclaw agents list --templates

# Copy a template to start building
cp -r agents/seo-specialist my-seo-agent
cd my-seo-agent

# Customize the SOUL.md
nano SOUL.md

# Register and start your agent
openclaw agents add my-seo-agent .
openclaw agent --agent my-seo-agent --message "Analyze the top 10 results for 'ai agent framework'"

# Or use the template shortcut
openclaw init --template seo-specialist
# Creates a new workspace pre-configured with the template

Templates are not just SOUL.md files. The more complete templates include AGENTS.md for team configurations, HEARTBEAT.md for scheduled tasks, sample skill configurations, and README files explaining the agent's capabilities and use cases. The community regularly submits new templates through the contribution workflow.

Contributing to OpenClaw on GitHub

OpenClaw welcomes contributions from the community. The repository has clear guidelines, well-maintained issue labels, and responsive maintainers. Here are the main ways to contribute.

Bug Reports and Feature Requests

The Issues tab has templates for bug reports and feature requests. For bugs, include your OpenClaw version, operating system, reproduction steps, and error messages. For features, describe the use case, proposed solution, and any alternatives you considered. Well-written issues get addressed faster.

Pull Requests: Code and Documentation

Code contributions follow a standard fork-branch-PR workflow. The repository uses automated checks: linting (ESLint), type checking (TypeScript), and a test suite that must pass before merge. Documentation PRs are equally valued. Every improvement to the docs helps thousands of users.

Contribution workflow
# 1. Fork and clone (see setup section above)

# 2. Create a feature branch
git checkout -b fix/gateway-session-cleanup

# 3. Make your changes and run checks
npm run lint        # ESLint
npm run typecheck   # TypeScript compiler
npm test            # Full test suite

# 4. Commit with a descriptive message
git add .
git commit -m "fix: clean up stale sessions on gateway restart

Sessions older than 24 hours were persisting across gateway
restarts, causing memory leaks in long-running deployments.
This fix adds a cleanup step to the gateway boot sequence."

# 5. Push and open a PR
git push origin fix/gateway-session-cleanup
# Then open a PR on GitHub with:
# - Clear title describing the change
# - Description of what and why
# - Steps to test the change

Submitting Agent Templates

The community template submission process has three tiers. Basic submissions include a SOUL.md and README. Standard submissions add an AGENTS.md for team configurations. Full Agent OS submissions include all four files: SOUL.md, AGENTS.md, HEARTBEAT.md, and WORKING.md. Use the agent submission issue template on GitHub to propose a new template. Popular submissions get featured in the template gallery.

Publishing Skills to ClawHub

If you build a custom skill, you can publish it to ClawHub for the community to use. Skills follow a standard interface defined in the docs. Once published, any OpenClaw user can install your skill with a single command. Popular skills get featured on the ClawHub homepage and can generate significant adoption.

Security Considerations and Best Practices

Running AI agents from open-source code requires security awareness. The OpenClaw team maintains a proactive security program, but you should follow best practices when deploying agents from the GitHub source.

API Key Management

Never commit API keys to your repository. Use environment variables or a .env file (added to .gitignore) to store LLM provider keys, channel tokens, and database credentials. The OpenClaw CLI reads keys from environment variables by default.

Skill Permissions

Review the permissions each skill requires before enabling it. The browser skill needs network access. The file skill needs filesystem access. The ssh skill needs remote server credentials. Only enable skills your agent actually needs. The principle of least privilege applies to AI agents too.

Gateway Exposure

The gateway server should not be exposed to the public internet without authentication. Use a reverse proxy (nginx, Caddy) with TLS termination. Enable the built-in rate limiting middleware. For production deployments, run the gateway behind a firewall and only expose the specific channel endpoints you use.

Dependency Auditing

Run npm audit regularly after cloning or updating the repository. The OpenClaw team monitors for vulnerable dependencies, but third-party ClawHub skills may have their own dependency trees. Review skills from unknown publishers before installing them in production environments.

Security Advisories

Watch the Security tab on the GitHub repository for published advisories. The team uses responsible disclosure and publishes CVE identifiers for confirmed vulnerabilities. Subscribe to release notifications to get patched versions as soon as they are available.

Build Your Own Agent from GitHub Source

Building a custom agent from the OpenClaw GitHub source gives you maximum control. Here is the step-by-step process from clone to running agent.

Build a custom agent from scratch
# Step 1: Create your agent workspace
mkdir my-custom-agent && cd my-custom-agent
openclaw init

# Step 2: Define your agent's identity in SOUL.md
cat > SOUL.md << 'SOUL'
# SOUL.md

## Identity
- Name: Scout
- Role: Competitive Intelligence Analyst
- Personality: Thorough, strategic, data-oriented

## Rules
- Always verify claims with at least 2 sources
- Present findings in structured tables when possible
- Flag assumptions clearly
- Include confidence levels for each finding

## Skills
- browser: Research competitors and market trends
- scraper: Extract pricing, features, and positioning data
- file: Save reports and track changes over time
- api: Query industry databases and analytics platforms

## Style
- Executive summary first, details below
- Use comparison tables for competitor analysis
- Include timestamps on all data points
SOUL

# Step 3: Register the agent
openclaw agents add scout .

# Step 4: Set your LLM provider
export ANTHROPIC_API_KEY="your-key-here"

# Step 5: Test your agent
openclaw agent --agent scout --message "Compare the top 5 project management tools by pricing and features"

# Step 6: Add scheduled tasks (optional)
cat > HEARTBEAT.md << 'HEARTBEAT'
# Scheduled Tasks

## Weekly Competitor Report
- Schedule: Every Monday at 8:00 AM
- Agent: @scout
- Message: Run the weekly competitor pricing and feature comparison
HEARTBEAT

# Step 7: Start the gateway for persistent operation
openclaw gateway start

Deploying Agents from GitHub Templates

The fastest way to go from zero to a running agent is to deploy directly from one of the 162 templates in the repository. Here is how to pick a template, customize it, and deploy to your preferred channel.

Deploy a template agent to Telegram
# Browse templates by category
openclaw agents list --templates --category "customer-support"

# Initialize from a template
openclaw init --template customer-support

# Configure your Telegram channel
openclaw config set telegram.token "YOUR_BOT_TOKEN"
openclaw config set telegram.chat_id "YOUR_CHAT_ID"

# Register and start
openclaw agents add support-bot .
openclaw gateway start --daemon

# Your agent is now live on Telegram 24/7
# Test it by sending a message to your bot

Deployment targets include Telegram, Slack, Discord, WhatsApp, Email, and direct HTTP API. For production deployments, run the gateway as a daemon process with --daemon or use a process manager like PM2. For cloud deployments, the repository includes Docker configurations and deployment guides for AWS, GCP, and self-hosted VPS providers.

GitHub Actions and CI/CD for Agents

The OpenClaw repository includes GitHub Actions workflow templates that you can adapt for your own agent projects. These workflows automate testing, deployment, and monitoring of your agents.

GitHub Actions workflow for agent deployment
# .github/workflows/deploy-agent.yml
name: Deploy Agent

on:
  push:
    branches: [main]
    paths:
      - 'agents/**'
      - 'SOUL.md'
      - 'AGENTS.md'

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm install -g openclaw
      - run: openclaw validate SOUL.md
      - run: openclaw validate AGENTS.md

  deploy:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm install -g openclaw
      - name: Deploy to production server
        env:
          DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
          DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
        run: |
          openclaw deploy --host $DEPLOY_HOST --key $DEPLOY_KEY

This workflow validates your agent configuration files on every push, then deploys to your production server if validation passes. The openclaw validate command checks your SOUL.md and AGENTS.md for syntax errors, missing required fields, and invalid skill references before deployment. You can extend this with custom test steps that send test messages to your agent and verify the responses.

Agent Health Monitoring

Use a scheduled GitHub Actions workflow to monitor your deployed agents. Send a test message, check the response, and alert if the agent is unresponsive.

Health check workflow (runs every 30 minutes)
# .github/workflows/agent-health.yml
name: Agent Health Check

on:
  schedule:
    - cron: '*/30 * * * *'

jobs:
  health-check:
    runs-on: ubuntu-latest
    steps:
      - name: Ping agent gateway
        run: |
          RESPONSE=$(curl -s -o /dev/null -w "%[HTTP_CODE]" \
            https://your-server.com/api/health)
          if [ "$RESPONSE" != "200" ]; then
            curl -X POST "https://api.telegram.org/bot[TOKEN]/sendMessage" \
              -d "chat_id=[CHAT_ID]&text=Agent gateway is down! HTTP $RESPONSE"
            exit 1
          fi

Community: Discussions, Discord, and Skill Marketplace

The OpenClaw AI agent GitHub repository is more than code. It is the center of a growing community of agent builders, contributors, and enthusiasts.

GitHub Discussions

The Discussions tab on the repository is the primary community forum. Key threads include "Share Your Agent" where builders showcase their creations, "Request Templates" where users suggest new agent types, and general Q&A for troubleshooting and best practices. The maintainers are active in discussions and often implement suggestions from community feedback.

Discord Server

For real-time help and conversation, the OpenClaw Discord server has channels for general discussion, skill development, deployment help, and agent showcases. It is the fastest way to get help from other community members and the core team.

Newsletter and Updates

Subscribe to the OpenClaw newsletter via the Google Form linked in the repository README. It covers new releases, featured community agents, skill marketplace highlights, and tips for building better agents. Watch the repository on GitHub to receive notifications for releases and important discussions.

Related Guides

Frequently Asked Questions

What makes the OpenClaw AI agent GitHub repository different from other agent frameworks?

OpenClaw is the most starred AI agent project on GitHub with over 250K stars. Unlike Python-based frameworks like LangChain or CrewAI, OpenClaw runs on Node.js and uses plain markdown files (SOUL.md) for agent configuration instead of code. This makes it accessible to non-developers while remaining powerful enough for production deployments. The repository includes 162 ready-to-use agent templates and integrates with 13K skills on ClawHub.

Do I need programming experience to use the OpenClaw GitHub repository?

Basic terminal knowledge is enough to get started. You need to know how to run git clone, npm install, and edit markdown files. The SOUL.md configuration format is plain English with simple YAML-like headers. However, if you want to write custom skills, contribute to the core framework, or set up advanced CI/CD pipelines, programming experience in JavaScript or TypeScript is recommended.

How do I keep my local OpenClaw clone in sync with the GitHub repository?

If you cloned directly, run git pull origin main followed by npm install to pick up new dependencies. If you forked the repository, add the upstream remote with git remote add upstream https://github.com/openclaw/openclaw.git, then run git fetch upstream and git merge upstream/main. For npm installations, simply run npm update -g openclaw to get the latest published version.

What are the minimum system requirements for the OpenClaw GitHub repository?

You need Node.js 18 or higher, npm or yarn, and Git. The framework runs on macOS, Linux, and Windows (via WSL). For LLM access, you need an API key from Anthropic, OpenAI, Google, or a local Ollama installation. Hardware requirements are minimal since the heavy computation happens on the LLM provider side. A Raspberry Pi 4 with 4GB RAM can run multiple agents comfortably.

Can I use OpenClaw agents commercially from the GitHub source?

Yes. OpenClaw is released under a permissive open-source license that allows commercial use. You can build agents for your business, sell agent services to clients, or integrate OpenClaw into commercial products. The only cost is the LLM API usage. Many companies run OpenClaw agents in production for customer support, content creation, data analysis, and internal automation.

How do I report security vulnerabilities in the OpenClaw GitHub repository?

Do not open a public GitHub issue for security vulnerabilities. Instead, use the private security reporting feature available through the Security tab on the repository. The OpenClaw security team reviews reports within 48 hours and aims to release patches within 7 days for critical issues. The repository publishes security advisories for all confirmed vulnerabilities.

Skip the Manual Setup

CrewClaw generates a complete, production-ready OpenClaw agent package from 162 templates. Scan your site for a free AI team recommendation, or browse the full template library.

Deploy a Ready-Made AI Agent

Skip the setup. Pick a template and deploy in 60 seconds.

Get a Working AI Employee

Pick a role. Your AI employee starts working in 60 seconds. WhatsApp, Telegram, Slack & Discord. No setup required.

Get Your AI Employee
One-time payment Own the code Money-back guarantee