Skip to content

Instantly share code, notes, and snippets.

protoclaw — WhatsApp AI agent spec

Self-hosted WhatsApp AI agent that runs on a Linux box, polls for unread messages on a schedule, thinks with the Claude Code CLI, and replies (or stays silent). Personality, identity, and memory are loaded from markdown files at runtime; the agent can edit those files to persist learnings across runs.

This document is a reproduction spec: enough detail for a fresh Claude Code session to rebuild the project from scratch.


1. What it is

WhatsApp Composing Debounce Patch for OpenClaw

Version tested: OpenClaw 2026.3.1, Baileys 7.0.0-rc.9

Problem

OpenClaw's inbound debounce (default 6s) can't tell if the sender is still typing. Send "Hello", start writing a long follow-up → the bot responds to "Hello" alone before you finish.

Fix

@maraoz
maraoz / deploy.ts
Created July 11, 2022 20:14
Using WalletConnect from a hardhat script example
import { ethers } from "hardhat";
import { Signer } from "ethers";
import WalletConnectProvider from "@walletconnect/web3-provider";
async function deploy(deployer: Signer) {
const address = await deployer.getAddress();
console.log("Deploying contracts with the account:", address);
console.log("Account balance:", (await deployer.getBalance()).toString());
0xb0145Ae156D201d6E371d07265FE3C045071c967
// Proof of Existence contract, version 1
contract ProofOfExistence {
// state
bytes32 proof;
// constructor
function ProofOfExistence() {
}
# First, let's install truffle
$ sudo npm install -g truffle
# let's setup our project
$ mkdir solidity-experiments
$ cd solidity-experiments/
$ truffle init
$ ls
app contracts migrations test truffle.js
> eth.getBalance(eth.accounts[0])
0
> personal.newAccount()
Passphrase:
Repeat passphrase:
"0xa88614166227d83c93f4c50be37150b9500d51fc"
geth --testnet --rpc console 2>> geth.log
var clientID = "oC8AfNfY3JTOV5PIFkqKbIgLgzFqc0By";
var domain = "bitcorps.auth0.com";
var full = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: '');
var dict = {
title: "BitCorps",
}
var options = {
"responseType":"token",