b2b-sdr-agent-template
# B2B SDR Agent Template [](https://opensource.org/licenses/MIT) [](https://github.com/iPythoning/b2b-sdr-agent-template/stargazers) [](https://github.com/iPythoning/b2b-sdr-agent-template/issues) <a href="https://www.producthunt.com/products/b2b-sdr-agent?embed=true&utm_source=badge-b2b-sdr-agent&utm_medium=badge&utm_source=badge-b2b-sdr-agent" target="_blank"><img src="https://ph-files.imgix.net/388786bc-d811-4059-9f0d-40d5fc49d848.png?auto=format&fit=crop&w=80&h=80" alt="PulseAgent B2B SDR Agent Skill - Product Hunt" width="80" height="80" align="left" style="margin-right:12px" /></a> **We're live on Product Hunt!** β [PulseAgent B2B SDR Agent Skill](https://www.producthunt.com/products/b2b-sdr-agent?embed=true&utm_source=embed&utm_medium=post_embed) β Open-source AI SDR for WhatsApp, Email & Telegram. An upvote means the world to us π <br clear="left" /> > Turn any B2B export business into an AI-powered sales machine in 5 minutes. > β **New Β· 2026-06-07** β **Template v3.8.0**: GitHub Actions CI for `npm test`, post-deploy `deploy/doctor.sh` health checks, configurable remote OpenClaw paths for non-root deployments, and expanded validation for skill counts + workspace path generation. [See full changelog β](./CHANGELOG.md) > π **New Β· 2026-06-09** β **OpenClaw v2026.6.5**: Parallel web-search integration for richer prospect research, ClawHub skill installation with pinned commits for safer deployments, Anthropic extended-thinking session recovery, Google Chat native approval cards, WhatsApp config-reload teardown fix, SQLite-backed auth profiles, and QQBot reasoning-tag filtering for cleaner channel replies. [See full changelog β](./CHANGELOG.md) > π¦ **Add-on Β· 2026-05-22** β **[WhatsApp Legacy Account Onboarding Spec v0.5](./whatsapp-old-account-onboarding/docs/README.md)** *(Path D β Multi-Device fetch)*: Lowest-friction history acquisition β customer scans one QR, waits for Multi-Device sync, `bootstrap.sh` pulls .txt files straight from PulseAgent. No backup, no password, no USB. Backup-extraction (v0.4) still default for zero-downtime tenants. Three-layer architecture (MemOS + sales_playbook + conversation_history), A/B/C/D delivery decision tree, strict auto-onboard gate. [Release notes β](https://github.com/iPythoning/b2b-sdr-agent-template/releases/tag/whatsapp-onboarding-v0.5) An open-source, production-ready template for building AI Sales Development Representatives (SDRs) that handle the **full sales pipeline** β from lead capture to deal closing β across WhatsApp, Telegram, and email. Built on [OpenClaw](https://openclaw.dev), battle-tested with real B2B export companies. **π English | [δΈζ](./README.zh-CN.md) | [EspaΓ±ol](./README.es.md) | [FranΓ§ais](./README.fr.md) | [Ψ§ΩΨΉΨ±Ψ¨ΩΨ©](./README.ar.md) | [PortuguΓͺs](./README.pt-BR.md) | [ζ₯ζ¬θͺ](./README.ja.md) | [Π ΡΡΡΠΊΠΈΠΉ](./README.ru.md)** --- ## Architecture: 7-Layer Context System ``` βββββββββββββββββββββββββββββββββββββββββββββββββββ β AI SDR Agent β βββββββββββββββββββββββββββββββββββββββββββββββββββ€ β IDENTITY.md β Who am I? Company, role β β SOUL.md β Personality, values, rules β β AGENTS.md β Full sales workflow (10 stages)β β USER.md β Owner profile, ICP, scoring β β HEARTBEAT.md β 14-item pipeline inspection β β MEMORY.md β 4-layer anti-amnesia protocol β β TOOLS.md β CRM, channels, integrations β βββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Skills β Extensible capabilities β β Product KB β Your product catalog β β Cron Jobs β 14 automated pipeline checks β βββββββββββββββββββββββββββββββββββββββββββββββββββ€ β OpenClaw Gateway (WhatsApp / Telegram / Email) β βββββββββββββββββββββββββββββββββββββββββββββββββββ ``` Each layer is a Markdown file you customize for your business. The AI reads all layers on every conversation, giving it deep context about your company, products, and sales strategy. ## Quick Start ### Option A: OpenClaw Users (1 Command) If you already have [OpenClaw](https://openclaw.dev) running: ```bash clawhub install b2b-sdr-agent ``` > Browse more skills on [ClawHub](https://clawhub.ai) β the AI agent skill marketplace. Done. The skill installs the full 7-layer context system, delivery-queue, and sdr-humanizer into your workspace. Then customize: ```bash # Edit the key files for your business vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md # Or copy to your main workspace cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/ ``` Replace all `{{placeholders}}` with your actual company info, and your AI SDR is live. ### Option A2: Hermes Agent Users (1 Command) If you use [Hermes Agent](https://github.com/NousResearch/hermes-agent) instead of OpenClaw: ```bash hermes skills install github:iPythoning/b2b-sdr-hermes-skill ``` Same 10-stage SDR pipeline, adapted for Hermes conventions (native cron, skill config, built-in WhatsApp). Migrating from OpenClaw? Run `hermes claw migrate` first, then install the skill. β [**b2b-sdr-hermes-skill repo**](https://github.com/iPythoning/b2b-sdr-hermes-skill) ### Option B: Full Deployment (5 Minutes) #### 1. Clone & Configure ```bash git clone https://github.com/iPythoning/b2b-sdr-agent-template.git cd b2b-sdr-agent-template # Edit the 7 workspace files for your business vim workspace/IDENTITY.md # Company info, role, pipeline vim workspace/USER.md # Your products, ICP, competitors vim workspace/SOUL.md # AI personality and rules ``` #### 2. Set Up Deployment Config ```bash cd deploy cp config.sh.example config.sh vim config.sh # Fill in: server IP, API key, WhatsApp number ``` #### 3. Validate Locally ```bash cd .. npm test ``` This checks the template structure, shell scripts, product KB JSON, proforma invoice generation, Chroma memory smoke flow, and generated OpenClaw config before you touch a server. #### 4. Deploy ```bash cd deploy ./deploy.sh my-company # Output: # β Deploy Complete: my-company # Gateway: ws://your-server:18789 # WhatsApp: Enabled # ChromaDB Memory: Enabled (chromadb + local chroma-memory) # Skills: b2b_trade (41 skills) ``` #### 5. Verify Remote Health ```bash ./doctor.sh ``` Doctor checks SSH, Node/npm, OpenClaw CLI, `openclaw.json` permissions, workspace context files, local skills, Gateway service state, Gateway `/health`, and Chroma memory. That's it. Your AI SDR is live on WhatsApp and ready to sell. ## What It Does ### Full-Pipeline Sales Automation (10 Stages) | Stage | What the AI Does | |-------|------------------| | **1. Lead Capture** | Auto-detect inbound messages (WhatsApp/Telegram/CTWA ads), create CRM records | | **2. BANT Qualification** | Natural conversation to assess Budget, Authority, Need, Timeline | | **3. CRM Entry** | Structured data capture β name, company, country, ICP score, product interest | | **4. Research & Enrichment** | Jina AI web search + company website analysis, 3-layer enrichment pipeline | | **5. Quotation** | Auto-generate PDF quotes, multi-language, send to owner for approval | | **6. Negotiation** | Track counter-offers, recommend strategy, escalate when needed | | **7. Reporting** | Daily 09:00 pipeline reports, 15:00 stalled alerts, weekly summaries | | **8. Nurture** | Automated follow-ups, industry news, post-sale care, quarterly check-ins | | **9. Email Outreach** | Personalized cold email sequences (Day 1/3/7/14), auto follow-up | | **10. Multi-Channel Orchestration** | Cross-channel coordination (WhatsApp + Email + Telegram), auto-switching | ### Automated Scheduling (14 Pipeline Checks) | Schedule | Task | |----------|------| | Every heartbeat | New lead intake, quote tracking, meeting prep, and data-quality checks | | Every 30 min | Gmail inbox scan for client replies | | Daily 09:00 | Pipeline report to owner via WhatsApp | | Daily 10:00 | AI lead discovery (market rotation: Africa/ME/SEA/LatAm) | | Daily 11:00 | Email follow-up sequence check | | Daily 15:00 | Stalled lead detection | | Weekly Wed | Nurture campaign | | Weekly Fri | Competitor intelligence gathering | | Weekly Mon | Weekly summary report | | Daily 12:00 | CRM snapshot to ChromaDB (L4 disaster recovery) | | Daily 14:00 | Memory health check (Supermemory + ChromaDB stats) | | Every heartbeat | Microsoft Teams mention/DM scan for sales handoff | | Every 30 min | WhatsApp 72h window expiry check β auto-switch to Telegram | ### Human-Like Conversations - Responds in the customer's language (auto-detected) - Natural message pacing with delivery-queue skill (3-90s delays, message splitting) - Timezone-aware sending (7 market timezone mappings) - Cultural adaptation (Middle East, Africa, SEA, LatAm, Europe) - Never reveals AI identity β presents as your sales consultant ### Dynamic ICP Scoring - Initial score based on 5 weighted dimensions (purchase volume, product match, region, payment ability, authority) - **Auto-adjusts** based on interaction: fast reply +1, asks for quote +2, mentions competitor +2, 7d no reply -1 - Hot leads (ICP>=7) auto-flagged, owner notified immediately ### 4-Layer Anti-Amnesia System AI agents lose context in long conversations and across sessions. Our **4-layer anti-amnesia architecture** ensures your AI SDR never forgets: ``` Message In βββ L1 MemOS auto-recall (structured memory injection) β ββββ L3 ChromaDB per-turn store (customer-isolated, auto-tagged) β ββββ L2 Proactive Summary at 65% tokens (haiku compression, zero info loss) β ββββ L4 CRM Snapshot daily 12:00 (disaster recovery fallback) ``` | Layer | Engine | What It Does | |-------|--------|-------------| | **L1: MemOS** | Structured memory | Auto-extracts BANT, commitments, objections every turn. Injects into System Prompt at conversation start. | | **L2: Proactive Summary** | Token monitoring | Compresses at 65% context usage via haiku-class model. All numbers, quotes, commitments preserved verbatim. | | **L3: ChromaDB** | Per-turn vector store | Every conversation turn stored with `customer_id` isolation. Auto-tags quotes, commitments, objections. Semantic retrieval across sessions. | | **L4: CRM Snapshot** | Daily backup | Stores full pipeline state daily to ChromaDB as disaster recovery. If any layer fails, L4 has the data. | **Result**: Your AI SDR remembers every customer, every quote, every commitment β even after 100+ turns, weeks of silence, or system restarts. > See **[ANTI-AMNESIA.md](./ANTI-AMNESIA.md)** for the full implementation spec with code, prompts, and deployment guide. ## The 7 Layers Explained | Layer | File | Purpose | |-------|------|---------| | **Identity** | `IDENTITY.md` | Company info, role definition, pipeline stages, lead tiering | | **Soul** | `SOUL.md` | AI personality, communication style, hard rules, growth mindset | | **Agents** | `AGENTS.md` | 10-stage sales workflow, BANT qualification, multi-channel orchestration | | **User** | `USER.md` | Owner profile, product lines, ICP scoring, competitors | | **Heartbeat** | `HEARTBEAT.md` | 14-item automated pipeline inspection + memory health | | **Memory** | `MEMORY.md` | 4-layer anti-amnesia protocol (MemOS + Summary + ChromaDB + CRM) | | **Tools** | `TOOLS.md` | CRM commands, channel config, web research, email access | ## Skills Pre-built capabilities that extend your AI SDR: | Skill | Description | |-------|-------------| | **delivery-queue** | Schedule messages with human-like delays. Drip campaigns, timed follow-ups. | | **supermemory** | Semantic memory engine. Store research notes, competitor intel, market insights. | | **chroma-memory** | Per-turn conversation storage with customer isolation, auto-tagging, and CRM snapshots. | | **telegram-toolkit** | Bot commands, inline keyboards, large file handling, and Telegram-first market strategies. | | **sdr-humanizer** | Rules for natural conversation β pacing, cultural adaptation, anti-patterns. | | **lead-discovery** | AI-driven lead discovery. Web search for potential buyers, ICP evaluation, CRM auto-entry. | | **quotation-generator** | Auto-generate PDF proforma invoices with company letterhead, multi-language support. | | **graphify** | Knowledge graph engine β map product relationships, customer intelligence, and market research into queryable graphs. Powered by [graphify](https://github.com/safishamsi/graphify). | ### Skill Profiles Choose a pre-configured skill set based on your needs: | Profile | Skills | Best For | |---------|--------|----------| | `b2b_trade` | 41 skills | B2B export companies (default) | | `lite` | 16 skills | Getting started, low-volume | | `social` | 14 skills | Social media-focused sales | | `full` | 40+ skills | Everything enabled | ## Industry Examples Ready-to-use configurations for common B2B export verticals: | Industry | Directory | Highlights | |----------|-----------|------------| | **Heavy Vehicles** | `examples/heavy-vehicles/` | Trucks, machinery, fleet sales, African/ME markets | | **Consumer Electronics** | `examples/electronics/` | OEM/ODM, Amazon sellers, sample-driven sales | | **Textiles & Garments** | `examples/textiles/` | Sustainable fabrics, GOTS certified, EU/US markets | To use an example, copy it into your workspace: ```bash cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md cp examples/heavy-vehicles/USER.md workspace/USER.md # Then customize for your specific business ``` ## Product Knowledge Base Structure your product catalog so the AI can generate accurate quotes: ``` product-kb/ βββ catalog.json # Product catalog with specs, MOQ, lead times βββ products/ β βββ example-product/info.json # Detailed product info βββ scripts/ βββ generate-pi.js # Proforma invoice generator ``` ## Control Dashboard After deployment, your AI SDR comes with a built-in web dashboard: ``` http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN ``` The dashboard shows: - Real-time bot status and WhatsApp connection - Message history and conversation threads - Cron job execution status - Channel health monitoring The token is auto-generated during deployment and printed in the output. Keep it private β anyone with the URL+token has full access. > **Security note**: Set `GATEWAY_BIND="loopback"` in config.sh to disable remote dashboard access. Default is `"lan"` (accessible from network). ## WhatsApp Configuration By default, the AI SDR accepts messages from **all WhatsApp contacts** (`dmPolicy: "open"`). This is the recommended setting for sales agents β you want every potential customer to be able to reach you. | Setting | Value | Meaning | |---------|-------|---------| | `WHATSAPP_DM_POLICY` | `"open"` (default) | Accept DMs from anyone | | | `"allowlist"` | Only accept from `ADMIN_PHONES` | | | `"pairing"` | Require pairing code first | | `WHATSAPP_GROUP_POLICY` | `"allowlist"` (default) | Only respond in whitelisted groups | To change after deployment, edit `~/.openclaw/openclaw.json` on the server: ```json { "channels": { "whatsapp": { "dmPolicy": "open", "allowFrom": ["*"] } } } ``` Then restart: `systemctl --user restart openclaw-gateway` ## Deployment ### Prerequisites - A Linux server (Ubuntu 20.04+ recommended) - Node.js 18+ - An AI model API key (OpenAI, Anthropic, Google, Kimi, etc.) - WhatsApp Business account (optional but recommended) ### Configuration All configuration lives in `deploy/config.sh`. Key sections: ```bash # Server SERVER_HOST="your-server-ip" # AI Model PRIMARY_API_KEY="sk-..." # Channels WHATSAPP_ENABLED=true TELEGRAM_BOT_TOKEN="..." # CRM SHEETS_SPREADSHEET_ID="your-google-sheets-id" # Admin (who can manage the AI) ADMIN_PHONES="+1234567890" ``` For non-root servers or custom OpenClaw locations, set the remote paths instead of editing deploy scripts: ```bash SERVER_USER="openclaw" REMOTE_HOME="/srv/openclaw" REMOTE_OPENCLAW_HOME="/srv/openclaw/.openclaw" REMOTE_CONFIG_HOME="/srv/openclaw/.config" REMOTE_WORKSPACE_DIR="/srv/openclaw/.openclaw/workspace" ``` CI runs `npm test` on every push and pull request to `main`. ### WhatsApp IP Isolation (Multi-Tenant) When running multiple agents on the same server, each should have a unique exit IP so WhatsApp sees independent devices. This prevents cross-account flagging. ```bash # After deploying a client, isolate their WhatsApp IP: ./deploy/ip-isolate.sh acme-corp # Or with a specific SOCKS5 port: ./deploy/ip-isolate.sh acme-corp 40010 ``` **How it works:** ``` ββ wireproxy :40001 β WARP Account A β CF IP-A β β tenant-a ββββββββββ ALL_PROXY=socks5://host:40001 tenant-b ββββββββββ ALL_PROXY=socks5://host:40002 β β ββ wireproxy :40002 β WARP Account B β CF IP-B ``` Each tenant gets: - A dedicated free [Cloudflare WARP](https://1.1.1.1/) account - An isolated [wireproxy](https://github.com/pufferffish/wireproxy) instance (~4MB RAM) - A unique Cloudflare exit IP for all outbound traffic (including WhatsApp) To auto-enable during deploy, set `IP_ISOLATE=true` in `config.sh`. ### Managed Deployment Don't want to self-host? **[PulseAgent](https://pulseagent.io/app)** offers fully managed B2B SDR agents with: - One-click deployment - Dashboard & analytics - Multi-channel management - Priority support [Get Started β](https://pulseagent.io/app) ## Community Join the conversation, ask questions, and share your use cases: - [Discord](https://discord.gg/V3M23TJ3) β Real-time chat with the team - [Telegram](https://t.me/PACommunitybot) β Community discussions - [X / Twitter](https://x.com/PulseAgentHQ) β Announcements & updates - [Product Hunt](https://www.producthunt.com/products/b2b-sdr-agent) β Upvote & reviews **Learn more:** - [PulseAgent Blog](https://pulseagent.io/en/blog) β Tutorials, release notes, and case studies - [Open Source Hub](https://pulseagent.io/en/open-source) β All repos, docs, and ecosystem links - [ClawHub](https://clawhub.ai) β Browse and install AI agent skills - [Running on Kimi K2.6](docs/RUNNING-ON-KIMI.md) β LLM setup guide (pitfalls, auth profiles, context budgeting) ## Contributing Contributions welcome! See our **[Contributing Guide](CONTRIBUTING.md)** for details. Areas where we'd love help: - **Industry templates**: Add examples for your industry - **Skills**: Build new capabilities - **Translations**: Translate workspace templates to other languages - **Documentation**: Improve guides and tutorials ## License MIT β use it for anything. --- <p align="center"> Built with β€οΈ by <a href="https://pulseagent.io/app">PulseAgent</a><br/> <em>Context as a Service β AI SDR for B2B Export</em> </p>