The OpenClaw + Paperclip Setup Guide

**Build Your AI Command Center from Zero in One Afternoon** By Garfield Lawrence, Founder of OpenClaw Skill Packs --- You are about to build something most people think requires a team of engineers and six months of development. By the end of this guide, you will have a **fully operational AI command center** running on your own machine. Not a toy. Not a demo. A real system with agents that research, write, build, and execute tasks — on autopilot, 24 hours a day, 7 days a week.

guidesScanned Apr 1, 2026Scanner: Fleet Shield v1
A· 100/100Safe

Matching deployment kit

Want this deployed as a working system?

This scorecard is free to inspect. The matching kit gives you the setup order, templates, example outputs, test checklist, and launch path for using this kind of skill in a real workflow.

See matching kit

Fleet Shield Scorecard

Scanned with AI Fleet Shield · Apr 1, 2026

Grade ARated Safe
Safety Score100/100

Total

20

Passed

20

Warned

0

Failed

0

Critical Findings

No critical findings detected in scan.

Warnings

No warnings surfaced in scan.

Positive Signals

No positive signals detected. Review findings before running.

Permissions & external calls

  • Calls an LLM API
  • Calls third-party SaaS APIs

Plain-English breakdown

What this skill does

Overview


title: "The OpenClaw + Paperclip Setup Guide" author: "Garfield Lawrence, Founder of OpenClaw Skill Packs" date: 2026-03-30 slug: openclaw-paperclip-setup-guide price: 29

The OpenClaw + Paperclip Setup Guide

Build Your AI Command Center from Zero in One Afternoon

By Garfield Lawrence, Founder of OpenClaw Skill Packs


Part 1: The Promise

You are about to build something most people think requires a team of engineers and six months of development.

By the end of this guide, you will have a fully operational AI command center running on your own machine. Not a toy. Not a demo. A real system with agents that research, write, build, and execute tasks — on autopilot, 24 hours a day, 7 days a week.

Here is what you will have when you finish:

  • An AI gateway that routes tasks to the right agent automatically
  • Multiple specialized agents with their own identities, goals, and capabilities
  • A task queue that manages work across your entire agent team
  • Local AI inference so you are not bleeding $200/month on API calls
  • Persistent memory so your agents learn and improve over time
  • Always-on operation that survives reboots and keeps running while you sleep

No coding experience needed. If you can open a terminal and paste commands, you can do this.

The system you are building is the same architecture behind HIVE OS — the multi-agent operating system that runs three real businesses and six SaaS products simultaneously. We stripped it down to the essentials so you can deploy it in one afternoon.

One afternoon. $29. Your own AI workforce.

Let's build it.


Part 2: Prerequisites

You need five things. Most of them are free.

Hardware

  • Mac (M1 or later recommended, Intel works) or Linux (Ubuntu 22.04+, Debian 12+)
  • 16 GB RAM minimum (32 GB recommended if running local models)
  • 20 GB free disk space (50 GB if running local models)

Software You Will Install

Do not install these yet. The step-by-step section walks you through each one in order.

| Tool | What It Does | Cost | |------|-------------|------| | Homebrew | Package manager (installs everything else) | Free | | Node.js 20+ | Runs the OpenClaw gateway | Free | | Python 3.12+ | Runs agent workers and scripts | Free | | Git | Clones repositories | Free | | Ollama | Local AI model inference | Free |

API Keys (You Need At Least One)

| Provider | What You Get | Cost | |----------|-------------|------| | Anthropic (Claude) | Best reasoning, best for complex tasks | ~$3/M input, ~$15/M output tokens | | OpenAI (GPT-4o) | Strong alternative, wide compatibility | ~$2.50/M input, ~$10/M output tokens |

Get your key now. You will need it during setup.

Pro tip: Start with Anthropic. Claude is purpose-built for agent work — tool use, long context, structured output. It is what we run in production.

Terminal Access

  • Mac: Open Terminal (Applications → Utilities → Terminal) or iTerm2
  • Linux: Your default terminal emulator

If you have never used a terminal before, here is all you need to know: you type a command, press Enter, and the computer executes it. That is it. Every command in this guide is copy-paste ready.


Part 3: The Architecture

Before you build, you need to understand what you are building. This takes three minutes to read and will save you hours of confusion later.

The Big Picture

┌─────────────────────────────────────────────────┐
│                  YOUR MACHINE                    │
│                                                  │
│  ┌──────────┐    ┌───────────────────────────┐  │
│  │  YOU      │───▶│  OPENCLAW GATEWAY         │  │
│  │ (terminal)│    │  (routes tasks to agents) │  │
│  └──────────┘    └─────────┬─────────────────┘  │
│                            │                     │
│              ┌─────────────┼─────────────┐       │
│              ▼             ▼             ▼       │
│       ┌──────────┐  ┌──────────┐  ┌──────────┐ │
│       │ AGENT 1  │  │ AGENT 2  │  │ AGENT 3  │ │
│       │ Research  │  │ Writer   │  │ Builder  │ │
│       │          │  │          │  │          │ │
│       │ SOUL.md  │  │ SOUL.md  │  │ SOUL.md  │ │
│       │IDENTITY  │  │IDENTITY  │  │IDENTITY  │ │
│       └────┬─────┘  └────┬─────┘  └────┬─────┘ │
│            │             │             │        │
│            ▼             ▼             ▼        │
│       ┌─────────────────────────────────────┐   │
│       │         TASK QUEUE                  │   │
│       │  (Supabase or local SQLite)         │   │
│       └─────────────────────────────────────┘   │
│                                                  │
│  ┌──────────────┐  ┌────────────────────────┐   │
│  │   OLLAMA     │  │   PAPERCLIP            │   │
│  │ (local LLMs) │  │ (agent orchestration)  │   │
│  └──────────────┘  └────────────────────────┘   │
│                                                  │
│  ┌──────────────────────────────────────────┐   │
│  │         MEMORY / PERSISTENCE             │   │
│  │  (Qdrant vector DB + Supabase)           │   │
│  └──────────────────────────────────────────┘   │
└─────────────────────────────────────────────────┘

The Core Components

The Gateway is the front door. Every request goes through it. It decides which agent handles the task, manages rate limits, and tracks what is happening. Think of it as the dispatcher in a taxi company.

Agents are specialized workers. Each one has a defined role, personality, and set of capabilities. A research agent searches the web. A writer agent creates content. A builder agent writes code. They do not overlap. They do not fight. Each one does its job.

SOUL.md is the agent's operating manual. It defines the agent's purpose, rules, constraints, and behavior. Without a SOUL.md, an agent is just a chatbot. With one, it is a specialist.

IDENTITY.md is the agent's self-awareness file. It knows its name, its role, who it reports to, and what success looks like. This prevents agents from going off-script.

The Task Queue is how work flows through the system. Tasks go in. Agents claim them. Results come out. No agent works without a task. No task runs without approval. This is the control mechanism that keeps your system predictable.

Ollama runs AI models locally on your machine. Instead of sending every request to the cloud (and paying for it), routine tasks run on local models. Complex tasks still go to Claude or GPT-4o. You choose.

Paperclip is the orchestration layer that ties everything together. It is an open-source Node.js server and React dashboard that manages your agents as a company — with org charts, budgets, governance, ticketing, and coordination. If OpenClaw is an employee, Paperclip is the company that employee works inside. Think of it as the management layer.

Memory/Persistence is how agents remember. Qdrant stores vector embeddings (semantic memory). Supabase stores structured data (task history, logs, metrics). Without persistence, every session starts from zero. With it, your agents get smarter over time.

How They Communicate

1. You submit a task → Gateway receives it
2. Gateway checks task type → Routes to the right agent
3. Agent claims the task from the queue
4. Agent executes (calls LLM, runs tools, produces output)
5. Agent marks task complete → Result stored
6. Next task is claimed → Cycle repeats

This is an asynchronous system. Agents do not wait for each other. Three agents can work on three different tasks simultaneously. The queue manages the flow.


Part 4: Step-by-Step Implementation

This is the build. Follow every step in order. Do not skip ahead.

Estimated time: 2-3 hours for complete setup.

Phase 1: Install Dependencies (20 minutes)

Step 1: Install Homebrew

Homebrew is the package manager that installs everything else.

Mac:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After installation, add Homebrew to your PATH. The installer will show you the exact command. It looks like this:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Linux (Ubuntu/Debian):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Verify it works:

brew --version

You should see something like Homebrew 4.x.x.

Step 2: Install Node.js

brew install node@20

Verify:

node --version
npm --version

You need Node.js 20 or higher.

Step 3: Install Python

brew install python@3.12

Important: Use the Homebrew Python, not the system Python.

Verify:

/opt/homebrew/bin/python3 --version

You should see Python 3.12.x or higher. If you see Python 3.9, you are using the wrong Python. Always use the full path /opt/homebrew/bin/python3 or set up an alias:

echo 'alias python3="/opt/homebrew/bin/python3"' >> ~/.zshrc
source ~/.zshrc

Step 4: Install Git

brew install git

Verify:

git --version

Step 5: Install Ollama

Ollama runs AI models locally on your hardware.

Mac:

brew install ollama

Linux:

curl -fsSL https://ollama.com/install.sh | sh

Start Ollama:

ollama serve &

Pull your first model:

ollama pull llama3.2:3b

This downloads a 2GB model that runs fast on any Apple Silicon Mac. It handles routine tasks — classification, formatting, simple Q&A — without touching your API budget.

Verify:

ollama list

You should see llama3.2:3b in the list.

Phase 2: Install OpenClaw (30 minutes)

Step 6: Create Your Workspace

mkdir -p ~/openclaw-workspace
cd ~/openclaw-workspace

This is your home base. Everything lives here.

Step 7: Install OpenClaw Core

npm install -g @anthropic-ai/openclaw

Verify:

openclaw --version

If the global install does not work (permissions issue), fix npm permissions first:

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
npm install -g @anthropic-ai/openclaw

Step 8: Initialize Your OpenClaw Project

cd ~/openclaw-workspace
openclaw setup

Follow the interactive prompts to configure your workspace. This creates the directory structure:

~/openclaw-workspace/
├── openclaw.json          ← Main configuration
├── agents/                ← Agent definitions live here
│   └── .gitkeep
├── workspaces/            ← Agent work areas
│   └── .gitkeep
├── logs/                  ← Execution logs
│   └── .gitkeep
└── queue/                 ← Task queue storage
    └── .gitkeep

Step 9: Configure openclaw.json

Open the configuration file:

nano ~/openclaw-workspace/openclaw.json

Replace the contents with this production-ready configuration:

{
  "version": "1.0",
  "project": "my-ai-command-center",
  "gateway": {
    "port": 18789,
    "host": "127.0.0.1",
    "cors": true
  },
  "models": {
    "primary": {
      "provider": "anthropic",
      "model": "claude-sonnet-4-20250514",
      "api_key_env": "ANTHROPIC_API_KEY",
      "max_tokens": 8192
    },
    "fast": {
      "provider": "anthropic",
      "model": "claude-haiku-4-20250414",
      "api_key_env": "ANTHROPIC_API_KEY",
      "max_tokens": 4096
    },
    "local": {
      "provider": "ollama",
      "model": "llama3.2:3b",
      "endpoint": "http://localhost:11434",
      "max_tokens": 4096
    },
    "fallback_chain": ["primary", "fast", "local"]
  },
  "queue": {
    "type": "sqlite",
    "path": "./queue/tasks.db",
    "max_concurrent": 3,
    "retry_limit": 2
  },
  "logging": {
    "level": "info",
    "output": "./logs/openclaw.log",
    "rotate": true,
    "max_size_mb": 50
  },
  "agents_dir": "./agents",
  "workspaces_dir": "./workspaces"
}

Key settings explained:

  • fallback_chain: If Claude is down or rate-limited, it tries Haiku, then falls back to local Ollama. Your system never stops.
  • max_concurrent: 3: Three agents can work simultaneously. Increase this if you have more RAM.
  • retry_limit: 2: Failed tasks retry twice before being marked as failed. Prevents infinite loops.

Save and exit (Ctrl+X, then Y, then Enter in nano).

Step 10: Set Your API Keys

echo 'export ANTHROPIC_API_KEY="your-key-here"' >> ~/.zshrc
echo 'export OPENAI_API_KEY="your-key-here"' >> ~/.zshrc
source ~/.zshrc

Replace your-key-here with your actual keys. If you only have one provider, that is fine. The fallback chain handles the rest.

Verify:

echo $ANTHROPIC_API_KEY

You should see your key (not blank).

Phase 3: Create Your First Agent (30 minutes)

Step 11: Create the Agent Directory

mkdir -p ~/openclaw-workspace/agents/researcher
mkdir -p ~/openclaw-workspace/workspaces/researcher

Step 12: Write the SOUL.md

This is the most important file in the entire system. It defines who this agent is and how it operates.

cat > ~/openclaw-workspace/agents/researcher/SOUL.md << 'SOUL'
# SOUL.md — Research Agent

PURPOSE

You are a research specialist. Your job is to find accurate, current information on any topic and deliver it in a structured format.

RULES

  1. Every claim must include a source
  2. Prioritize primary sources over secondary
  3. If you cannot verify a claim, say so explicitly
  4. Never fabricate information — say "I could not find this" instead
  5. Deliver results in markdown format with clear headings

OUTPUT FORMAT

Every research task produces:

  • Summary (3-5 sentences)
  • Key Findings (bulleted list)
  • Sources (numbered list with URLs)
  • Confidence Level (High / Medium / Low)

CONSTRAINTS

  • Do not browse or visit websites unless given explicit tool access
  • Do not make assumptions about data you have not verified
  • Complete tasks within the scope given — do not expand scope without approval

TOOLS

  • Web search (when available)
  • File reading
  • Data analysis

SUCCESS METRIC

Research is considered successful when the requester can make a decision based on your output without needing to verify it themselves. SOUL


#### Step 13: Write the IDENTITY.md

```bash
cat > ~/openclaw-workspace/agents/researcher/IDENTITY.md << 'IDENTITY'
# IDENTITY.md — Research Agent

name: Researcher
role: Research Specialist
reports_to: Gateway
department: Intelligence
status: active

WHO I AM

I am the Research Agent. I find information, verify it, and deliver it in a format that enables decisions. I do not create content. I do not write code. I research.

WHAT I DO

  • Market research
  • Competitive analysis
  • Fact-checking
  • Data gathering
  • Trend identification

WHAT I DO NOT DO

  • Content writing (that is the Writer agent)
  • Code generation (that is the Builder agent)
  • Task management (that is the Gateway)

MY KPI

Tasks completed with High confidence rating / Total tasks assigned Target: 85%+ IDENTITY


#### Step 14: Create a Writer Agent

Repeat the process for a second agent:

```bash
mkdir -p ~/openclaw-workspace/agents/writer
mkdir -p ~/openclaw-workspace/workspaces/writer
cat > ~/openclaw-workspace/agents/writer/SOUL.md << 'SOUL'
# SOUL.md — Writer Agent

PURPOSE

You are a content specialist. You write clear, compelling, conversion-focused content for any medium — blog posts, social media, email, sales pages, documentation.

RULES

  1. Write for the target audience, not for yourself
  2. Every piece has a purpose — inform, persuade, or convert
  3. Short paragraphs. Bold key terms. No filler.
  4. Include a clear call-to-action in every piece
  5. Optimize for readability: 8th grade reading level

OUTPUT FORMAT

Every content task produces:

  • Headline/Title
  • Body Content (formatted for the target medium)
  • CTA (call to action)
  • Metadata (word count, reading time, target audience)

VOICE

Professional. Direct. Authoritative. Accessible. Never: salesy, hype-driven, or vague.

SUCCESS METRIC

Content that drives the intended action (click, buy, share, respond). SOUL


```bash
cat > ~/openclaw-workspace/agents/writer/IDENTITY.md << 'IDENTITY'
# IDENTITY.md — Writer Agent

name: Writer
role: Content Specialist
reports_to: Gateway
department: Content
status: active

WHO I AM

I am the Writer Agent. I produce content that drives action. Every word has a job.

WHAT I DO

  • Blog posts and articles
  • Social media content
  • Email sequences
  • Sales copy
  • Documentation

WHAT I DO NOT DO

  • Research (that is the Researcher agent)
  • Code (that is the Builder agent)

MY KPI

Content pieces published per week / Content engagement rate Target: 10+ pieces/week, 3%+ engagement IDENTITY


#### Step 15: Create a Builder Agent

```bash
mkdir -p ~/openclaw-workspace/agents/builder
mkdir -p ~/openclaw-workspace/workspaces/builder
cat > ~/openclaw-workspace/agents/builder/SOUL.md << 'SOUL'
# SOUL.md — Builder Agent

PURPOSE

You are a software builder. You write clean, tested, production-ready code. You build tools, scripts, automations, and integrations.

RULES

  1. Write code that works the first time
  2. Include error handling in everything
  3. Comment complex logic — not obvious logic
  4. Follow the language's standard conventions
  5. Test before marking complete

OUTPUT FORMAT

Every build task produces:

  • Working code (in the specified language)
  • Usage instructions (how to run it)
  • Dependencies (what needs to be installed)
  • Test results (proof it works)

CONSTRAINTS

  • Never overwrite existing files without confirmation
  • Never install packages outside the workspace
  • Never execute commands that could damage the host system

SUCCESS METRIC

Code that runs without modification on the first deploy. Target: 90%+ first-run success rate SOUL


```bash
cat > ~/openclaw-workspace/agents/builder/IDENTITY.md << 'IDENTITY'
# IDENTITY.md — Builder Agent

name: Builder
role: Software Builder
reports_to: Gateway
department: Engineering
status: active

WHO I AM

I am the Builder Agent. I write code that works. No prototypes. No drafts. Production-ready output.

WHAT I DO

  • Scripts and automations
  • API integrations
  • Tool building
  • System configuration
  • Database operations

WHAT I DO NOT DO

  • Research (Researcher agent)
  • Content writing (Writer agent)

MY KPI

First-run success rate on deployed code Target: 90%+ IDENTITY


### Phase 4: Wire Up the Gateway (20 minutes)

#### Step 16: Verify Your Agent Workspace

Your agents are defined by their SOUL.md and IDENTITY.md files in the `agents/` directory. The gateway discovers them automatically when it starts.

**Verify the structure is correct:**
```bash
ls -la ~/openclaw-workspace/agents/*/SOUL.md
ls -la ~/openclaw-workspace/agents/*/IDENTITY.md

You should see three SOUL.md files and three IDENTITY.md files (researcher, writer, builder).

Step 17: Start the Gateway

cd ~/openclaw-workspace
openclaw gateway --port 18789

You should see the gateway start and bind to the port. If a previous process is using the port:

openclaw gateway --port 18789 --force

Verify it is running:

curl http://127.0.0.1:18789/health

Step 18: Test With a Simple Task

Send your first task to the research agent:

openclaw agent \
  --agent researcher \
  --message "Find the top 5 open-source AI agent frameworks in 2026. For each, provide: name, GitHub stars, key features, and primary use case. Rank by adoption." \
  --local

The --local flag runs the agent embedded using your configured model provider. You will see the agent process the request and return structured research output based on its SOUL.md rules.

Check your session history:

openclaw sessions

Congratulations. Your AI command center just completed its first task.

Phase 5: Set Up Paperclip for Agent Orchestration (30 minutes)

Paperclip is the orchestration layer that manages your agents as a company. It is an open-source Node.js server and React dashboard (39,000+ GitHub stars, MIT license) that gives you org charts, budgets, governance, ticketing, and agent coordination — all from one interface. If OpenClaw is an employee, Paperclip is the company that employee works inside.

What Paperclip gives you:

  • A ticket-based task system where agents claim and complete work
  • Org charts with roles, reporting lines, and delegation
  • Cost tracking with per-agent budgets that auto-pause on overspend
  • Governance gates so you approve strategy before agents execute
  • Scheduled heartbeats so agents wake up, check for work, and act — 24/7
  • Multi-company support from a single deployment
  • A React dashboard to monitor everything from your browser or phone

Requirements: Node.js 20+, pnpm 9.15+

Step 19: Install Paperclip

The fastest way to get running is the one-line installer:

npx paperclipai onboard --yes

This clones the repo, installs dependencies, runs migrations, and starts the server in one command.

Or install manually if you prefer more control:

cd ~/openclaw-workspace
git clone https://github.com/paperclipai/paperclip.git
cd paperclip

Install pnpm if you do not have it:

npm install -g pnpm@9.15.4

Install dependencies and start:

pnpm install
pnpm dev

This starts the API server and UI at http://localhost:3100. An embedded PostgreSQL database (PGlite) is created automatically — no database setup required.

Verify it is running:

curl -s http://localhost:3100/api/health | head -5

You should see a JSON response with a healthy status. Open http://localhost:3100 in your browser to see the Paperclip dashboard.

Step 20: Create Your Company

In the Paperclip dashboard at http://localhost:3100:

  1. Click Create Company
  2. Give it a name (e.g., "My AI Command Center")
  3. Define your company's mission (e.g., "Automate content creation and research for my business")

This creates your company workspace with a default org chart structure. Every agent, task, and budget will be scoped to this company.

Step 21: Connect Your OpenClaw Agents to Paperclip

Paperclip uses an invite-based onboarding flow to connect OpenClaw agents:

  1. In the Paperclip dashboard, navigate to your company settings
  2. In the Invites section, click Generate OpenClaw Invite Prompt
  3. Copy the generated invite prompt
  4. Paste it into your OpenClaw main chat as one message
  5. Back in the Paperclip dashboard, approve the join request when it appears
  6. Your OpenClaw agent now shows up in the Paperclip org chart as a managed employee

Repeat this for each OpenClaw agent you want Paperclip to manage. Each agent gets a role, a title, a reporting line, and a job description inside the org chart.

Step 22: Pull Additional Local Models

For code tasks, add a specialized coding model:

ollama pull qwen2.5-coder:7b

For embeddings (semantic search and memory):

ollama pull snowflake-arctic-embed2

Verify all models:

ollama list

You should see:

NAME                        SIZE
llama3.2:3b                 2.0 GB
qwen2.5-coder:7b           4.7 GB
snowflake-arctic-embed2     669 MB

Step 23: Configure Budgets and Governance

In the Paperclip dashboard, set up cost controls for each agent:

  1. Click on an agent in the org chart
  2. Set a monthly budget (e.g., $10/month for routine agents, $50/month for heavy workers)
  3. When an agent hits its budget limit, Paperclip automatically pauses it — no runaway costs

Set up governance gates:

  1. Navigate to company settings
  2. Enable approval gates for high-impact actions (hiring new agents, changing strategy, large spend)
  3. You are the board — agents propose, you approve

Step 24: Create Your First Managed Task

Test the full loop:

  1. In the Paperclip dashboard, create a new Issue (task)
  2. Write clear instructions (e.g., "Research the top 5 competitors in [your niche] and write a summary")
  3. Assign it to your Research agent
  4. Watch the agent claim the task, execute it, and mark it done — all visible in the dashboard

You now have a fully managed AI company where work is tracked, agents are accountable, and you have visibility into everything from one screen.

Tip: Paperclip supports scheduled heartbeats. Configure your agents to wake on a schedule (e.g., every hour), check for new tasks, and execute them autonomously. This is how you get 24/7 operation without babysitting.

Phase 6: Connect to Supabase for Persistence (Optional — 30 minutes)

This step is optional but recommended. Supabase gives your agents persistent memory — task history, execution logs, and structured data that survives restarts.

Step 24: Create a Supabase Project

  1. Go to supabase.com
  2. Create a new project (free tier works)
  3. Note your Project URL and Service Role Key from Settings → API

Step 25: Set Up the Database Schema

In the Supabase SQL Editor, run:

-- Task queue table
CREATE TABLE IF NOT EXISTS task_queue (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  agent TEXT NOT NULL,
  title TEXT NOT NULL,
  description TEXT,
  status TEXT DEFAULT 'pending' CHECK (status IN ('pending', 'approved', 'claimed', 'running', 'complete', 'failed')),
  priority TEXT DEFAULT 'normal' CHECK (priority IN ('low', 'normal', 'high', 'critical')),
  result JSONB,
  claimed_by TEXT,
  created_at TIMESTAMPTZ DEFAULT now(),
  updated_at TIMESTAMPTZ DEFAULT now(),
  completed_at TIMESTAMPTZ
);

-- Agent actions log
CREATE TABLE IF NOT EXISTS agent_actions (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  agent TEXT NOT NULL,
  action TEXT NOT NULL,
  details JSONB,
  status TEXT DEFAULT 'success',
  created_at TIMESTAMPTZ DEFAULT now()
);

-- Indexes for performance
CREATE INDEX idx_task_queue_status ON task_queue(status);
CREATE INDEX idx_task_queue_agent ON task_queue(agent);
CREATE INDEX idx_agent_actions_agent ON agent_actions(agent);
CREATE INDEX idx_agent_actions_created ON agent_actions(created_at);

-- Enable Row Level Security
ALTER TABLE task_queue ENABLE ROW LEVEL SECURITY;
ALTER TABLE agent_actions ENABLE ROW LEVEL SECURITY;

-- Service role has full access (your backend)
CREATE POLICY "service_role_full_access_tasks" ON task_queue
  FOR ALL USING (auth.role() = 'service_role');

CREATE POLICY "service_role_full_access_actions" ON agent_actions
  FOR ALL USING (auth.role() = 'service_role');

Step 26: Configure Supabase in OpenClaw

echo 'export SUPABASE_URL="https://your-project-id.supabase.co"' >> ~/.zshrc
echo 'export SUPABASE_SERVICE_KEY="your-service-role-key"' >> ~/.zshrc
source ~/.zshrc

Update openclaw.json:

{
  "queue": {
    "type": "supabase",
    "url_env": "SUPABASE_URL",
    "key_env": "SUPABASE_SERVICE_KEY",
    "table": "task_queue",
    "max_concurrent": 3,
    "retry_limit": 2
  },
  "logging": {
    "supabase": true,
    "table": "agent_actions"
  }
}

Restart the gateway:

openclaw gateway --port 18789 --force

Phase 7: Always-On Operation (15 minutes)

Your agents should run whether you are at your desk or not. LaunchAgents (Mac) or systemd (Linux) handle this.

Step 27: Create the LaunchAgent (Mac)

cat > ~/Library/LaunchAgents/com.openclaw.gateway.plist << 'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.openclaw.gateway</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/node</string>
        <string>/opt/homebrew/bin/openclaw</string>
        <string>gateway</string>
        <string>--port</string>
        <string>18789</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/Users/YOUR_USERNAME/openclaw-workspace</string>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
        <key>HOME</key>
        <string>/Users/YOUR_USERNAME</string>
    </dict>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/Users/YOUR_USERNAME/openclaw-workspace/logs/gateway-stdout.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/YOUR_USERNAME/openclaw-workspace/logs/gateway-stderr.log</string>
</dict>
</plist>
PLIST

Replace YOUR_USERNAME with your actual username. Find it with:

whoami

Load it:

launchctl load ~/Library/LaunchAgents/com.openclaw.gateway.plist

Verify it is running:

launchctl list | grep openclaw

Step 28: Create the Ollama LaunchAgent (Mac)

cat > ~/Library/LaunchAgents/com.ollama.serve.plist << 'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.ollama.serve</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/ollama</string>
        <string>serve</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>
PLIST
launchctl load ~/Library/LaunchAgents/com.ollama.serve.plist

Linux Alternative: systemd

sudo cat > /etc/systemd/system/openclaw-gateway.service << 'SERVICE'
[Unit]
Description=OpenClaw Gateway
After=network.target

[Service]
Type=simple
User=YOUR_USERNAME
WorkingDirectory=/home/YOUR_USERNAME/openclaw-workspace
ExecStart=/home/linuxbrew/.linuxbrew/bin/node /home/linuxbrew/.linuxbrew/bin/openclaw gateway --port 18789
Restart=always
RestartSec=5
Environment=PATH=/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
Environment=HOME=/home/YOUR_USERNAME

[Install]
WantedBy=multi-user.target
SERVICE
sudo systemctl enable openclaw-gateway
sudo systemctl start openclaw-gateway
sudo systemctl status openclaw-gateway

Part 5: The Monetizer Section — Sell This as a Service

You just built something most business owners cannot build themselves. That gap is your opportunity.

The Service: AI Infrastructure Setup

What you sell: Set up and configure an OpenClaw + Paperclip AI command center for a business.

Who buys it: Small business owners, agencies, and solopreneurs who want AI automation but cannot (or do not want to) set it up themselves.

Why they pay: Because this guide took you one afternoon. For them, it would take two weeks of Googling, debugging, and frustration — if they finish at all.

Pricing Tiers

Tier 1: Basic Setup — $497

What they get:

  • OpenClaw + Paperclip orchestration dashboard installed on their machine or VPS
  • 3 pre-configured agents (Research, Writer, Builder)
  • Gateway running and tested
  • Local Ollama models installed
  • 30-minute walkthrough call

Time investment: 2-3 hours (you have done this before — it goes fast)

Your hourly rate: $166-$249/hr

Tier 2: Business Custom — $997

Everything in Basic, plus:

  • Custom agents designed for their specific business
  • Supabase persistence configured
  • Task queue pre-loaded with their actual workflows
  • 5 custom SOUL.md files tailored to their operations
  • LaunchAgents configured for always-on operation
  • 60-minute training session

Time investment: 4-6 hours

Your hourly rate: $166-$249/hr

Tier 3: Enterprise Deploy — $1,497

Everything in Business Custom, plus:

  • Full security audit and hardening
  • API key rotation strategy
  • Cost monitoring and alerts configured
  • Team onboarding (up to 3 users)
  • Custom dashboard for task monitoring
  • 90-minute training + recorded walkthrough

Time investment: 8-10 hours

Your hourly rate: $150-$187/hr

Monthly Maintenance Retainer

After the initial setup, offer ongoing support:

| Plan | Price | What's Included | |------|-------|-----------------| | Basic | $99/mo | Monthly health check, model updates, email support | | Standard | $199/mo | Weekly monitoring, new agent creation (2/mo), priority support | | Premium | $299/mo | Daily monitoring, unlimited agent updates, Slack/Discord support, quarterly strategy call |

How to Find Clients

The pitch is simple: "I set up AI systems that run your business operations on autopilot. Research, content, customer outreach, data analysis — all handled by AI agents running 24/7 on your own machine. No monthly SaaS fees. You own the whole thing."

Where to find them:

  1. Local business Facebook groups — Post a screen recording of your own system running. Show, do not tell.
  2. LinkedIn — Target small business owners posting about "AI overwhelm" or "too many tools"
  3. Upwork/Fiverr — List as "AI Automation Setup" — the demand is massive and the supply is weak
  4. X (Twitter) — Share your build process. The build IS the marketing.
  5. Local networking events — Bring your laptop. Demo it live. Close on the spot.

The math:

  • 4 Basic setups per month = $1,988/mo
  • 2 Business Custom setups per month = $1,994/mo
  • 10 maintenance retainers at $199/mo = $1,990/mo
  • Combined: $5,972/month from a skill you learned in one afternoon

The Close

When a prospect asks "What do you do?" — your answer is:

"I build AI workforces for small businesses. Instead of hiring three people, you get three AI agents that work 24/7 for a one-time setup fee. Most clients see ROI in the first week."

That is it. No jargon. No buzzwords. Just results.


Part 6: Troubleshooting & FAQ

Port Conflicts

Problem: Error: EADDRINUSE: address already in use :::18789

Fix:

# Find what is using the port
lsof -i :18789

# Kill it
kill -9 <PID>

# Or use a different port in openclaw.json

API Key Issues

Problem: Error: 401 Unauthorized or Invalid API key

Fix:

# Check your key is set
echo $ANTHROPIC_API_KEY

# If blank, set it again
export ANTHROPIC_API_KEY="your-key-here"

# Make it permanent
echo 'export ANTHROPIC_API_KEY="your-key-here"' >> ~/.zshrc
source ~/.zshrc

Common mistake: Copying the key with leading/trailing spaces. Make sure there are no spaces around the key.

Python Version Mismatch

Problem: ModuleNotFoundError: No module named 'xxx' or scripts failing silently

Fix: You are using system Python instead of Homebrew Python.

# Check which Python you are using
which python3

# If it shows /usr/bin/python3, that is wrong
# Always use:
/opt/homebrew/bin/python3

# Set the alias permanently
echo 'alias python3="/opt/homebrew/bin/python3"' >> ~/.zshrc
echo 'alias pip3="/opt/homebrew/bin/pip3"' >> ~/.zshrc
source ~/.zshrc

Permission Errors

Problem: EACCES: permission denied when installing npm packages globally

Fix:

# Option 1: Fix npm permissions
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

# Then reinstall
npm install -g @openclaw/cli

Gateway Not Starting

Problem: Gateway command hangs or exits immediately

Fix:

# Check the error log
cat ~/openclaw-workspace/logs/gateway-stderr.log

# Common cause: missing openclaw.json
ls ~/openclaw-workspace/openclaw.json

# Common cause: invalid JSON
python3 -c "import json; json.load(open('openclaw.json'))"

# Common cause: Ollama not running (if using local models)
curl http://localhost:11434/api/tags
# If this fails, start Ollama:
ollama serve &

Ollama Models Not Loading

Problem: Error: model 'llama3.2:3b' not found

Fix:

# Check what is installed
ollama list

# Pull the model again
ollama pull llama3.2:3b

# If pull fails, check disk space
df -h

Task Stuck in "Running" State

Problem: A task has been in "running" status for too long

Fix:

# Check your active sessions
openclaw sessions --active 60

# If using Supabase, check the task queue directly
curl -H "apikey: $SUPABASE_SERVICE_KEY" \
  -H "Authorization: Bearer $SUPABASE_SERVICE_KEY" \
  "$SUPABASE_URL/rest/v1/task_queue?status=eq.running"

# If using SQLite, check the database
sqlite3 ~/openclaw-workspace/queue/tasks.db "SELECT id, title, status FROM task_queue WHERE status='running';"

# Update a stuck task to failed
sqlite3 ~/openclaw-workspace/queue/tasks.db "UPDATE task_queue SET status='failed' WHERE id='<TASK_ID>';"

Supabase Connection Fails

Problem: FetchError or Connection refused when using Supabase queue

Fix:

# Test the connection
curl -H "apikey: $SUPABASE_SERVICE_KEY" \
  -H "Authorization: Bearer $SUPABASE_SERVICE_KEY" \
  "$SUPABASE_URL/rest/v1/task_queue?limit=1"

# If it fails:
# 1. Check your SUPABASE_URL (should end with .supabase.co, no trailing slash)
# 2. Check your SUPABASE_SERVICE_KEY (use service_role key, NOT anon key)
# 3. Check that the tables exist (run the SQL schema again)

Mac: LaunchAgent Not Starting on Boot

Problem: Gateway does not start after reboot

Fix:

# Check if it is loaded
launchctl list | grep openclaw

# If not listed, load it
launchctl load ~/Library/LaunchAgents/com.openclaw.gateway.plist

# If load fails, check plist syntax
plutil ~/Library/LaunchAgents/com.openclaw.gateway.plist

# Check for errors
cat ~/openclaw-workspace/logs/gateway-stderr.log

# Common fix: PATH not set correctly in plist
# Make sure /opt/homebrew/bin is in the PATH environment variable

FAQ

Q: How much does it cost to run per month? With Ollama handling routine tasks locally (free) and Paperclip tracking your agent budgets, only complex tasks hit the cloud API. Typical monthly cost: $5-$25/month for moderate usage. Without local models: $100-$300/month. Paperclip's built-in budget enforcement auto-pauses agents before costs run away.

Q: Can I run this on a VPS/cloud server? Yes. Any Linux VPS with 16GB+ RAM works. DigitalOcean, Hetzner, and Linode all work well. Skip the Ollama setup if your server does not have a GPU — use API-only models instead.

Q: Can I use GPT-4o instead of Claude? Yes. Change the provider to openai and model to gpt-4o in your openclaw.json. Both work. We recommend Claude for agent work because of its superior tool use and long context window.

Q: How many agents can I run simultaneously? Depends on your hardware. 16GB RAM: 3-5 agents. 32GB RAM: 10-15 agents. The bottleneck is usually API rate limits, not local resources.

Q: Is my data private? Everything runs on your machine. Local model inference never leaves your hardware. Cloud API calls go to Anthropic/OpenAI (subject to their privacy policies). Supabase data is in your own project. You own everything.

Q: Can I use this for a client's business? Absolutely. That is the entire point of Part 5. Set it up on their machine or a VPS they own. You do the setup, they get the system.


Bonus Section

OpenClaw Roadmap

The OpenClaw ecosystem is growing fast. See what is coming next:

openclawskillpacks.com/roadmap

Upcoming features include:

  • Visual workflow builder — drag-and-drop agent orchestration
  • Skill marketplace — pre-built agent skills you can install in one click
  • Team collaboration — multiple users managing the same agent fleet
  • Mobile monitoring — check your agents from your phone

Token Cost Reduction: From $200/Month to $2.50/Month

This is the single most valuable tip in this guide.

The problem: Running everything through Claude or GPT-4o costs $150-$300/month for active usage. Most of that spend is wasted on simple tasks that do not need a frontier model.

The solution: Route tasks by complexity. Use local Ollama models for simple tasks and cloud APIs for complex ones. Paperclip's budget tracking (set up in Phase 5) monitors spend per agent and auto-pauses before you overshoot.

Here is the breakdown of a typical workload:

| Task Type | % of Total Tasks | Model | Cost per 1K tokens | |-----------|-----------------|-------|-------------------| | Simple (classify, format, short Q&A) | 60% | Ollama llama3.2:3b | $0.00 | | Medium (content, analysis) | 25% | Claude Haiku | $0.001 | | Complex (research, strategy, code) | 15% | Claude Sonnet | $0.003 |

Before optimization (all tasks on Claude Sonnet):

  • 1,000 tasks/month × avg 2K tokens = 2M tokens
  • Cost: ~$200/month

After optimization (Ollama for simple tasks, cloud for complex):

  • 600 simple tasks → Ollama → $0.00
  • 250 medium tasks → Haiku → $0.50
  • 150 complex tasks → Sonnet → $2.00
  • Total: ~$2.50/month

That is a 98.75% cost reduction with zero quality loss on the tasks that matter.

To maximize savings:

  1. Pull more local models. Add deepseek-r1:14b for reasoning tasks that do not need cloud APIs:
ollama pull deepseek-r1:14b
  1. Set agent budgets in Paperclip. In the Paperclip dashboard, set monthly budgets per agent. When an agent hits its limit, Paperclip auto-pauses it — no runaway costs. You configured this in Phase 5, Step 23.

  2. Monitor spend from the dashboard. Paperclip tracks token costs per agent, per task, and per company. Check the dashboard weekly to see where your budget is going and adjust agent assignments accordingly.

  3. Monitor your spend. Open the Paperclip dashboard at http://localhost:3100 and check the cost breakdown per agent. You can also use the CLI:

cd ~/openclaw-workspace/paperclip
pnpm paperclipai dashboard

What You Built Today

Take a step back and look at what you have:

  • An AI gateway routing tasks to specialized agents
  • Three production agents — Researcher, Writer, Builder — each with defined roles and KPIs
  • Local AI inference via Ollama, cutting your costs by 98%
  • Agent orchestration and governance via Paperclip
  • Persistent storage (optional) via Supabase
  • Always-on operation that survives reboots

This is not a tutorial project. This is infrastructure. The same architecture runs real businesses generating real revenue.

Your next moves:

  1. Build more agents. Every repetitive task in your business is a new agent waiting to be created.
  2. Sell the setup. You now have a skill worth $497-$1,497 per client. (See Part 5.)
  3. Join the community. Visit openclawskillpacks.com for pre-built skills, agent templates, and the latest updates.

You went from zero to a fully operational AI command center in one afternoon.

Now make it pay for itself.


Built by Garfield Lawrence | OpenClaw Skill Packs | 2026

Typical setup time

Varies — most OpenClaw skills take 5-20 minutes to wire up once prerequisites (API keys, accounts) are ready.

Required accounts / keys

This skill calls external APIs — expect to supply at least one API key. See the source for the exact list.

Who it's for

  • Operators wiring up automations inside OpenClaw / HIVE stacks
  • Builders who want a scanned starting point, not a black box
  • Teams that care about safety review over marketing claims

Who it's not for

  • Users who can't review source before running third-party code
  • Compliance-bound teams needing formal certification
  • Production deploys without a staging review step

Related playbooks

No playbook yet — this skill may feature in future outcome guides.

Related skills in guides

Ready to review the source?

Email delivery — we will send the preview, scan notes, and setup next step + matching playbook recommendations.

Access Skill →
FREE AI ASSESSMENT

Need the right fit first?

Tell us what you want AI to fix. We’ll show you the AI agent that can help.

Takes 30 seconds. No spam.

Fleet Shield scanned on Apr 1, 2026. Scores are informational, based on automated pattern review. We do not guarantee security or fitness for purpose. Review findings before running.