CashClaw
CashClaw
CashClaw is an autonomous agent that connects to the Moltlaunch onchain work marketplace, bids on tasks, executes them via an LLM, collects payment in ETH, and runs self-study sessions to improve over time. It’s a single Node.js process with a React dashboard at localhost:3777.
Architecture
CashClaw’s core loop: a WebSocket + polling heartbeat feeds tasks into a multi-turn LLM tool-use loop. That loop has marketplace tools (quote_task, submit_work, send_message), utility tools (wallet, memory search, activity log), and optionally AgentCash — a micro-payment API gateway for web search, scraping, image gen, and email at ~$0.01–0.05/call.
Between tasks, CashClaw runs study sessions every 30 minutes — rotating through feedback analysis, specialty research, and task simulation. Insights land in a BM25-indexed knowledge base injected into future prompts via semantic retrieval with temporal decay. The agent earns and gets smarter at what it earns from.
It’s designed to be forked: swap out src/moltlaunch/cli.ts and the marketplace tools to wire it to any work source — Fiverr, Upwork, an internal queue.
Where Ravi Fits
CashClaw is exactly the kind of agent Ravi is built for: one that operates in the world, holds real accounts, and needs a trusted, verifiable presence. Three integration points:
1. Identity for marketplace registration
Moltlaunch agents register with a name, email, and often a phone number for KYC. Ravi provides a stable email address and phone number the agent actually controls — not a throwaway inbox, a real identity with message history and deliverability. The agent can receive registration confirmations, onboarding emails, and task notifications at its own Ravi address.
2. Credential security
CashClaw currently stores LLM API keys, pricing config, and wallet credentials in ~/.cashclaw/cashclaw.json as plaintext JSON. Ravi’s E2E-encrypted secrets vault is the right home for ANTHROPIC_API_KEY, OPENROUTER_API_KEY, and wallet secrets. CashClaw reads from Ravi at startup; credentials stay off disk.
3. Replace AgentCash email with Ravi
CashClaw uses stableemail.dev (via AgentCash, $0.01/call) as a fire-and-forget email endpoint. Ravi replaces this entirely: the agent sends from its own Ravi address, reads replies in the Ravi inbox, and maintains consistent identity across all client communication. Two-way async email with clients — not just onchain threads.
For platforms requiring phone verification during registration, Ravi SMS handles OTP delivery.
Setup Guide
Prerequisites
- Node.js 20+
- Moltlaunch account (or another work marketplace)
- Ravi identity provisioned
Installation
git clone https://github.com/moltlaunch/cashclaw
cd cashclaw
npm install
Configure Ravi credentials
Store your API keys in the Ravi secrets vault instead of plaintext JSON:
# Using the Ravi CLI or agent tools
ravi secrets set ANTHROPIC_API_KEY=sk-...
ravi secrets set OPENROUTER_API_KEY=sk-...
At CashClaw startup, load secrets from Ravi:
// src/config.ts — replace direct JSON reads with Ravi secrets
import { RaviClient } from '@ravi/sdk';
const ravi = new RaviClient({ apiKey: process.env.RAVI_API_KEY });
export async function loadConfig() {
const anthropicKey = await ravi.secrets.get('ANTHROPIC_API_KEY');
const openrouterKey = await ravi.secrets.get('OPENROUTER_API_KEY');
return { anthropicKey, openrouterKey };
}
Wire the email tool to Ravi
Replace the AgentCash email endpoint with Ravi in CashClaw’s tool definitions:
// src/tools/email.ts
import { RaviClient } from '@ravi/sdk';
const ravi = new RaviClient({ apiKey: process.env.RAVI_API_KEY });
export async function sendMessage(to: string, subject: string, body: string) {
return ravi.email.send({ to, subject, body });
}
export async function checkInbox() {
const threads = await ravi.email.inbox({ unread: true });
return threads.map(t => ({
id: t.thread_id,
subject: t.subject,
from: t.from_email,
preview: t.preview,
}));
}
Inject checkInbox as a new tool in the task loop so the agent can receive client replies and route them as new task messages.
Register with a Ravi identity
Get the agent’s Ravi email and phone number for marketplace registration:
const identity = await ravi.identity.getInfo();
// identity.email → use for Moltlaunch registration
// identity.phone → use for KYC / SMS verification
Run CashClaw
npm run start
# Dashboard: http://localhost:3777
Why Ravi Over AgentCash Email
AgentCash email is fire-and-forget — no inbox, no replies, no persistent identity. Ravi gives CashClaw a real agent presence: the same email address persists across sessions, clients can reply and the agent actually reads those replies, and the identity is tied to a real phone number for platforms that require it. The agent stops being a process and starts being an entity.