Work / Tool · 2026
OpenClaw B2B Sales Agent
The OpenClaw B2B Sales Agent is the prospecting tool I designed, built and used for real Vidzy B2B sales. Running on the OpenClaw agent harness, it finds companies that match an ideal-customer profile, qualifies and scores them, audits their sites, finds decision-makers and drafts personalised outreach. Every email waits in a human approval queue, and deterministic Node scripts, not the AI, own every state change and the final send.
- case study
- live
- own product
- tool
- Type
- Tool · Applied AI: agentic B2B prospecting and outreach
- Built with
- JavaScript, Node.js, SMTP over TLS (node:tls), JSONL ledgers, LLM agent skills (Markdown)
- Also uses
- OpenClaw
- Last active
- 2026
Overview
The OpenClaw B2B Sales Agent is an AI-assisted prospecting and outreach agent. It finds companies that match an ideal-customer profile, qualifies and scores them, audits their sites, finds decision-makers and drafts personalised outreach, and every email waits in a human approval queue.
I built it as sales tooling for VidzyPlayer (False Logics) and used it for real Vidzy B2B prospecting.
Context and problem
The agent takes on the research-heavy part of B2B outreach, but an agent that can send email could also send messages nobody approved, send the same message twice, or state things it made up. Keeping that from happening is the problem the design is built around.
It appears to have been built first for my own use; the docs also explain how to swap in a different ideal-customer profile and scoring rubric.
My role
I designed and wrote all of it, and I ran it for Vidzy prospecting. Every commit in the repository is mine, and the public repository is the whole project.
My work is the skills, the knowledge files, the deterministic scripts and the safety model; scheduling, browser tools, permissions and orchestration come from the OpenClaw harness.
All the commits landed within about half an hour on one day in September 2026, including one that sanitised the examples, so the history likely shows a cleaned public release of earlier work rather than the build itself.
Constraints and requirements
- AI proposes, humans authorise, deterministic software executes: the model never changes state or sends email on its own word.
- Qualification does not imply approval, approval does not imply sending, and a ready message still needs an explicit operator instruction before it goes out.
- The agent may not guess personal email addresses or invent company metrics, budgets or contact details, and it must keep observations, inferences and unknowns apart.
- No npm dependencies: SMTP and hashing use Node built-ins.
Solution and user experience
The funnel runs in stages: broad discovery of about 15 to 25 candidates, a fast qualification pass, a deeper one, then a lead score. Only leads scoring 70 or more get the expensive research: a sales audit of their site, contact discovery and an evidence-based personalised draft.
Each draft then moves through explicit states: awaiting approval, approved, ready to send, and finally sent or failed. Once a message is approved, the scripts freeze it into an immutable snapshot, and a real send needs that snapshot's ID passed with a confirm flag; a test mode sends it to the operator instead.
Key features
- Staged funnel: discovery, fast and deep qualification and a lead score, with deep research only for leads scoring 70 or more.
- Research: sales audits, contact discovery and personalised outreach drafts.
- Approval queue: every message passes through explicit states before it can be sent.
- Immutable snapshots: a real send needs
--send --confirm <snapshot_id>, and--test-tosends to the operator. - Duplicate protection: snapshot fingerprints and recorded send attempts stop the same outreach from being prepared or sent twice.
- Configurable targeting: the ideal-customer profile and the scoring rubric are editable knowledge files.
- Claim rules: no guessed emails and no invented company facts.
Architecture and stack
Three layers split the work. The AI model reasons (research, scoring, personalisation); the OpenClaw harness orchestrates skills, tools and scheduling; deterministic Node scripts own every state change and the delivery step.
- Skills: eleven Markdown skill specs define the funnel, research, outreach and approval steps and their gating rules.
- State: append-only JSONL ledgers for prospects, approvals, ready-to-send snapshots and send events are the authoritative record.
- Scripts: Node.js ESM using only built-ins (
node:fs,node:path,node:tls,node:crypto), with nopackage.json. - Delivery: a hand-written SMTP-over-TLS client with a 30-second socket timeout and response checks.
Implementation details
The ledgers, not the agent's conversational memory, are the source of truth, which guards against duplicate sends, drift between the approved and the sent message, and approvals the model made up.
Snapshot IDs are SHA-256 hashes. Before delivery the send script checks the approved and ready states and records an ATTEMPT_STARTED event; afterwards it records SENT or FAILED, so an attempt is on file before any email leaves.
Challenges
- Letting an LLM agent run external sales outreach without it sending unapproved, duplicated or fabricated messages; the state gates, snapshots and duplicate checks are my answer to that.
- Publishing a tool I had used for real meant sanitising the examples and excluding local runtime files; the ledger folders in the repository are empty.
Trade-offs
- Gating deep research behind a score threshold likely limits cost and time per lead, at the risk of under-researching borderline prospects.
- A hand-written SMTP client avoids dependencies and keeps delivery auditable, but it is probably less complete than a mail library.
Links
Skills demonstrated
- AI agent design with human-in-the-loop control.
- LLM workflow authoring in Markdown skill specs.
- Deterministic state machines and idempotent delivery.
- Dependency-free Node.js scripting with TLS, SMTP and hashing.
- Safety rules for AI actions with external effects.


