PyClaw banner
pangoleen pangoleen

PyClaw

Development community

Description

Minimal OpenClaw implementation in Python (~500 lines)

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

PyClaw

I was fascinated by [OpenClaw](https://openclaw.ai/) and its potential, but wanted to deeply understand how it worked. So I built this.

PyClaw is a minimal educational implementation of OpenClaw in Python (~500 lines) that uses WhatsApp for interactions. Clean, readable code — simplicity and clarity over features.

PyClaw in action

**Design philosophy:** At every decision point, we chose the simplest option that works:

  • Polling instead of webhooks — no server needed, just a loop
  • SQLite instead of a database server — zero setup, single file
  • Per-folder isolation instead of complex permissions — Claude just runs in different directories

Architecture Overview

┌─────────────┐      ┌─────────────┐      ┌─────────────┐
│  WhatsApp   │ ───▶ │   SQLite    │ ───▶ │  Poll Loop  │
│  (Neonize)  │      │  (messages) │      │ (every 2s)  │
└─────────────┘      └─────────────┘      └──────┬──────┘
                                                  │
                     ┌────────────────────────────┘
                     ▼
              ┌─────────────┐     ┌─────────────────┐
              │  Registered │ NO  │                 │
              │    chat?    │────▶│     Skip        │
              └──────┬──────┘     └─────────────────┘
                     │ YES
                     ▼
              ┌─────────────┐     ┌─────────────────┐
              │  @PyClaw    │ NO  │                 │
              │  trigger?   │────▶│     Skip        │
              └──────┬──────┘     └─────────────────┘
                     │ YES
                     ▼
              ┌─────────────┐      ┌─────────────┐
              │ Claude SDK  │ ───▶ │  WhatsApp   │
              │ (in folder) │      │  Response   │
              └─────────────┘      └─────────────┘

What Does a Personal AI Assistant Need?

Before diving into code, let's think about what we're building:

1