CRM Hygiene Bot

Dedupe leads, enrich missing firmographics, flag stale records, and queue cleanup tasks so your pipeline reports stay trustworthy.

Dedupe leads, enrich missing firmographics, flag stale records, and queue cleanup tasks so your pipeline reports stay trustworthy. Dirty CRM data costs more than dirty code. This runs nightly, queues clean fixes for humans, and never breaks pipeline reports.

This is the whole blueprint, nothing held back: the model, the tools, the exact prompt, the source on disk, and the setup. Everything you need to run CRM Hygiene Bot yourself is on this page, and it deploys in an afternoon.

See it running

Agents like CRM Hygiene Bot run behind a review queue where every action waits for a human. Here is that pattern, live: every action stays visible and reviewable. Click into it.

crescendo.51ultron.com/kits/agent-inbox

What it does

CRM Hygiene Bot handles the work end to end:

  • Detect duplicate leads using at least 2 matching signals
  • Enrich records with missing firmographics, every claim cited to a URL
  • Flag stale records while protecting open opps above $10k
  • Queue every cleanup as a human-approved task, never auto-mutate

The anatomy

An agent is a composition, not a prompt: a model, the tools it is allowed to call, the integrations that give those tools reach, and the rules that keep it honest. Here is CRM Hygiene Bot on one card.

CRM Hygiene Botblueprint
Model
claude-sonnet-4-6
Tools
detect_duplicatesenrich_recordflag_stalequeue_cleanup
Integrations
Exa.aiZod
Guardrails
never auto-merge or delete records. always queue for human approval.; duplicate detection must use at least 2 signals (email + domain, name + phone)

The instructions

Every run is governed by this prompt. It is short on purpose: enough to make CRM Hygiene Bot reliable, not so much that it can misread itself. Copy it as a starting point for any agent you build.

CRM Hygiene Bot
You are a CRM data steward. You keep the database clean without breaking it. WORKFLOW: 1. Call detect_duplicates by email + domain + fuzzy company name. 2. Call enrich_record for accounts missing firmographics. 3. Call flag_stale records with no activity in 90+ days and no open opp. 4. Call queue_cleanup tasks rather than auto-deleting; humans approve before merge or archive. RULES: - Never auto-merge or delete records. Always queue for human approval. - Duplicate detection must use at least 2 signals (email + domain, name + phone). - Enrichment must cite the source URL so reps can verify. - Stale records with open opps over $10k are protected from any cleanup queue.

The source, on disk

Three files carry the whole agent: the definition with its tools, the environment it expects, and the setup. Walk them.

crm-hygiene-bot/crm-hygiene-bot.ts1.4 KB
1import { agent, tool } from "@agent-sdk"
2import Exa from "exa-js"
3import { z } from "zod"
4
5const dedupeInput = z.object({
6 records: z.array(z.object({
7 id: z.string(),
8 email: z.string().email(),
9 company: z.string(),
10 domain: z.string().optional(),
11 })),
12})
13
14export default agent({
15 model: "claude-sonnet-4-6",
16 permissionMode: "bypassPermissions",
17 maxTurns: 30,
18 systemPrompt: `...`, // see System Prompt section above
19 tools: {
20 detect_duplicates: tool({
21 description: "Find dupes using email + domain + fuzzy company name",
22 inputSchema: dedupeInput,
23 execute: async ({ records }) => { /* clusters */ },
24 }),
25 enrich_record: tool({
26 description: "Fill missing firmographics with cited sources",
27 inputSchema: z.object({ recordId: z.string() }),
28 execute: async ({ recordId }) => {
29 const exa = new Exa(process.env.EXA_API_KEY)
30 return exa.search(recordId, { numResults: 4 })
31 },
32 }),
33 flag_stale: tool({
34 description: "Flag records with no activity in 90+ days",
35 inputSchema: z.object({ days: z.number().int().min(30) }),
36 execute: async ({ days }) => { /* stale[] */ },
37 }),
38 queue_cleanup: tool({
39 description: "Queue merge/archive tasks for human approval",
40 inputSchema: z.object({ tasks: z.array(z.any()) }),
41 execute: async ({ tasks }) => { /* job ids */ },
42 }),
43 },
44})

The business case

If you run an agency, CRM Hygiene Bot is also a product. It sells into revops, sales managers, b2b saas, and the numbers work at very small scale.

$2,600

setup you can charge

$420/mo

monthly retainer

4

jobs off your plate

Ship it

The whole install is a handful of commands and the keys from the env file. Run the list, then point CRM Hygiene Bot at real work.

Deploy checklist

0 of 4

That is the entire blueprint: one model, 4 tools, and a prompt. Built by hand it costs you an afternoon. Inside Ultron it costs you a sentence, because you can build this exact agent in the workforce and watch it run before you commit to anything.

Build CRM Hygiene Bot in Ultron

1
Describe what you want

Start from this blueprint or your own words. Ultron reads the intent and picks the tools.

2
It builds the agent

The model, the tools, the prompt, the console. Assembled in front of you, nothing to wire.

3
Watch it run

Test it live in the chat, then put it to work. You review what it does, it does the rest.

Keep reading