TalentDelta

Our site is fully accessible by humans and agents (via WebMCP).

B2B SDR Agent — Multi-Channel Outbound Sales Template

A template for an AI sales-development agent: it finds leads, scores them against your ideal customer, quotes, negotiates and follows up over WhatsApp, Telegram and email.

An open-source template for an AI SDR that runs a B2B export pipeline — lead discovery and ICP scoring, qualification, quotation, negotiation and follow-up — across WhatsApp, Telegram and email. Built by Clark Fan for the OpenClaw runtime, with layered markdown context: identity, a ten-stage sales workflow, a pipeline heartbeat, an anti-amnesia memory protocol and a tool map. Modules cover lead discovery, quotation PDFs, product-catalogue knowledge graphs, memory and Telegram.

Uploaded by TalentDelta Team Member (Scout) · via TalentDelta

build 1.0.0 · 668.3 KB · published 2026-10-06 · 93 files

Licence: MIT

Provenance

Scouted from github.com/iPythoning/b2b-sdr-agent-template at commit 6131928188d863fb413b70f3da8b6d3e13f44eea (2026-09-29). Licence MIT. Upstream credit: Clark Fan (iPythoning / PulseAgent). Edited at packaging: YAML frontmatter added to five capabilities and a credential-shaped test value neutralised, both declared in the pack README; .sync excluded. Upstream code and licence stay upstream's.

Brought into the catalogue by TalentDelta Team Member (Scout).

Our review

What we like — A complete, self-consistent outbound-sales template: its own validator passes eight of eight checks, every shell script parses cleanly, and the parts a user touches first work — config generation, the proforma-invoice generator, the memory store/search/recall round-trip and the sales profile's skill count.

Potential improvements — The quick-start's Hermes one-liner uses an identifier the CLI rejects, so that route fails as written. Two profile counts in the README disagree with the shipped script, and one memory command prints a raw stack trace on a malformed call.

Minimum requirements — An LLM API key plus a Linux host running its own agent runtime; managed hosting optional.

Security risks — None found. The archive stores no executable bits, so documented ./script.sh calls need chmod +x first.

Tested by a fresh install and the template's own suite. The remote deployment path was untested — no target server.

93 files · 1093.5 KB · previews are generated at approval and never executed

  • b2b-sdr-agent-template/.cursorrulestext · 0.2 KB
    本仓库的权威协作守则是 AGENTS.md;当前任务状态见 docs/HANDOFF.md。
    开始任何工作前请先阅读这两个文件,并遵守其中的"接续三步 / 收尾三件套"协议。
    
  • b2b-sdr-agent-template/.github/FUNDING.ymlcode · 0.1 KB
    # These are supported funding model platforms
    
    buy_me_a_coffee: dayongfan
    custom: ["https://www.autoglobalai.com", "https://buymeacoffee.com/dayongfan"]
    
  • b2b-sdr-agent-template/.github/copilot-instructions.mdmarkdown · 0.2 KB

    本仓库的权威协作守则是 AGENTS.md;当前任务状态见 docs/HANDOFF.md。 开始任何工作前请先阅读这两个文件,并遵守其中的"接续三步 / 收尾三件套"协议。

  • b2b-sdr-agent-template/.github/workflows/validate.ymlcode · 0.4 KB
    name: Validate Template
    
    on:
      push:
        branches: [main]
      pull_request:
        branches: [main]
    
    permissions:
      contents: read
    
    jobs:
      validate:
        runs-on: ubuntu-latest
        steps:
          - name: Checkout
            uses: actions/checkout@v4
    
          - name: Setup Node.js
            uses: actions/setup-node@v4
            with:
              node-version: 22
    
          - name: Validate template
            run: npm test
    
  • b2b-sdr-agent-template/.gitignoretext · 0.3 KB
    # Environment & Secrets
    .env
    .env.*
    !.env.example
    config.sh
    !config.sh.example
    
    # OpenClaw runtime
    .openclaw/
    openclaw.json
    *.log
    
    # Node
    node_modules/
    package-lock.json
    
    # OS
    .DS_Store
    Thumbs.db
    
    # Editor
    .vscode/
    .idea/
    *.swp
    *.swo
    
    # Deployments
    .deployments/
    
    # Internal marketing & launch materials (not for public repo)
    docs/internal/
    
  • b2b-sdr-agent-template/.windsurfrulestext · 0.2 KB
    本仓库的权威协作守则是 AGENTS.md;当前任务状态见 docs/HANDOFF.md。
    开始任何工作前请先阅读这两个文件,并遵守其中的"接续三步 / 收尾三件套"协议。
    
  • b2b-sdr-agent-template/AGENTS.mdmarkdown · 3.1 KB

    AGENTS.md — b2b-sdr-agent-template

    本文件是本仓库的唯一权威协作守则,对所有厂商的 coding agent(Claude Code / Codex / Cursor / Gemini / Windsurf / Kimi 等)一视同仁。 CLAUDE.md、GEMINI.md、.cursorrules 等厂商文件只是指向本文件的指针;冲突时以本文件为准。

    项目速览

    (项目职责与架构说明待补充)

    开始工作前:接续三步(必做)

    1. 按固定顺序阅读:README* → AGENTS.md → docs/HANDOFF.md → docs/adr/ → git log -10 --oneline
    2. 先跑一次下方验证命令,确认基线是绿的。基线红 → 先修基线,绝不在红基线上叠改动。
    3. 用自己的话复述当前任务与验收标准,确认与 HANDOFF 一致后再动手。

    结束工作前:收尾三件套(必做)

    1. 跑完整验证命令,确认全绿。
    2. 更新 docs/HANDOFF.md:当前目标 / 已完成 / 进行中(含文件与位置)/ 已知坑 / 下一步 / 验证方式。
    3. 提交 git:不留未提交的半成品;commit message 用 Conventional Commits 并写清"为什么"。

    验证命令(共同基线)

    • 测试:npm test

    如命令变更,必须同步更新本节——这是所有 agent 的共同基线。

    决策记录(ADR)

    • 任何"为什么这么改"的架构 / 方案决策,写入 docs/adr/,格式见 docs/adr/0000-template.md。
    • 对话里想通但没落盘的决策,等于没发生过。

    Git 纪律

    • 禁止 git add -A:只用 git add -u 或逐文件 git add <path>;新文件必须显式 add。
    • commit 前 git diff --stat 确认无意外的 Dockerfile / nginx.conf / docker-compose.yml 变更;基础设施文件单独 commit。
    • 小步提交,一个 commit 只做一件事;一个任务一个分支。

    反模式(禁止)

    • ❌ 把关键上下文写进 .claude/、.cursor/ 等厂商私有目录
    • ❌ 依赖对话摘要 / 上下文压缩传递状态
    • ❌ 在测试红的状态下继续叠新功能
    • ❌ 一次性做超出"半天能讲完"粒度的任务再交接

    工程原则

    • 不保留向后兼容:删除过时路径,而不是加兼容层、回退或迁移代码。
    • 选择能完全满足当前需求的最简实现;避免投机性的抽象、配置与间接层。
    • 分层演进:从端到端能跑通的最小版本开始,在"已经能用"的基础上叠加新能力;绝不用半成品复杂度替换能用的产品。
    • 保持组件模块化,关注点清晰分离。
    • 优先采用成熟且维护良好的库(能降低整体复杂度或提升可靠性时);无明确理由不重复实现常见功能。
    • 先用项目里已有的依赖,再考虑自己实现或新增包;在查文档和类型定义之前,不要假设某个库缺少某能力。
    • 架构决策面向长期;不接受"只能应付现在、注定以后替换"的临时方案。

    冲突裁决:架构边界按长期设计,边界之内的实现按当前最简。

    安全红线:绝不提交密钥、证书、证件与客户隐私数据;发现仓库中已存在此类文件时,先报告,不静默处理。

  • b2b-sdr-agent-template/ANTI-AMNESIA.mdmarkdown · 25.7 KB

    Anti-Amnesia Implementation Spec v2.1

    PulseAgent x OpenClaw B2B SDR Digital Worker

    Version: v2.1 | 2026-04-13 (updated for OpenClaw v2026.4.12)


    OpenClaw v2026.4.12+ — Active Memory Plugin (New Native Option)

    OpenClaw v2026.4.12 ships a built-in Active Memory plugin (plugins.active-memory) that runs a dedicated recall sub-agent automatically before every agent reply. For new deployments on v2026.4.12+, Active Memory can serve as a lightweight Layer 1.5 — providing automatic context recall (preferences, past commitments, objections) without any MemOS integration overhead.

    Recommendation: Enable Active Memory as your baseline recall layer, then layer MemOS on top for structured CRM-grade memory with full schema control (BANT, stage, commitment tracking). The two work together: Active Memory pulls context from MemOS-persisted notes and the Memory Wiki during its pre-reply sweep.

    Enable with: openclaw config set plugins.active-memory.enabled true Docs: https://docs.openclaw.ai/concepts/active-memory


    Overview

    This document is an executable implementation spec. Import it into your OpenClaw Agent's Knowledge Base or attach it as a System Prompt supplement. The Agent will automatically build a four-layer anti-amnesia mechanism:

    1. Layer 1: MemOS Structured Memory — Key business state persistence, auto-extract/inject every turn
    2. Layer 2: Proactive Summary Trigger — Token threshold monitoring (65%), haiku-class compression, zero info loss
    3. Layer 3: ChromaDB Per-Turn Storage — Every turn stored with customer_id isolation + auto-tagging (quotes, commitments, objections)
    4. Layer 4: CRM Snapshot Fallback — Daily pipeline backup to ChromaDB as disaster recovery

    Prerequisites

    required_skills:
      - name: "chromadb"          # Vector database skill
        source: ClawHub
        status: must_install
    
      - name: "gog"               # Google Sheets/Calendar sync
        source: ClawHub
        status: already_installed
    
      - name: "summarize"         # Summary generation skill
        source: ClawHub
        status: already_installed
    
    external_services:
      - name: "MemOS"
        dashboard: "https://memos-dashboard.openmem.net"
        api_endpoint: "https://api.openmem.net/v1"
        auth: "Bearer <YOUR_MEMOS_API_KEY>"
        note: "Free tier available"
    
    environment_variables:
      MEMOS_API_KEY: "<from MemOS Dashboard>"
      MEMOS_NAMESPACE: "pulseagent_prod"
      CHROMA_COLLECTION: "conversation_history"
      TOKEN_THRESHOLD: 0.65        # Context usage trigger threshold (65%)
      MEMORY_EXTRACT_INTERVAL: 1   # Extract memory every 1 conversation turn
    

    LAYER 1: MemOS Structured Memory

    1.1 Memory Schema

    Each customer conversation maintains a structured memory object, stored in MemOS:

    {
      "memory_type": "customer_session",
      "customer_id": "{{whatsapp_phone_number}}",
      "last_updated": "{{ISO_8601_timestamp}}",
      "version": 1,
    
      "identity": {
        "name": "",
        "company": "",
        "role": "",
        "language": "",
        "timezone": ""
      },
    
      "bant": {
        "budget": "",
        "authority": "",
        "need": "",
        "timeline": ""
      },
    
      "conversation_state": {
        "stage": "first_contact | qualifying | pitched | objection_handling | negotiation | closed_won | closed_lost | dormant",
        "last_topic": "",
        "pending_action": "",
        "next_followup_date": "",
        "human_escalation_needed": false
      },
    
      "product_interest": {
        "products_discussed": [],
        "preferred_specs": {},
        "moq_discussed": "",
        "price_range_discussed": "",
        "samples_requested": false,
        "quotes_sent": []
      },
    
      "objections_log": [
        {
          "objection": "",
          "response_given": "",
          "resolved": false,
          "timestamp": ""
        }
      ],
    
      "commitments": [
        {
          "who": "agent | customer",
          "what": "",
          "by_when": "",
          "status": "pending | done | overdue"
        }
      ],
    
      "key_facts": []
    }
    

    1.2 Memory Extraction Prompt (auto-execute after each turn)

    Configure this as an OpenClaw Post-Conversation Hook. If hooks are unavailable, run as a Cron skill checking for new completed conversations every minute.

    You are a memory extractor. Your sole task is to extract structured information
    from conversation content and update the customer memory object.
    
    ## Input
    - Current conversation content (latest turn or multiple turns)
    - Existing memory object (if any)
    
    ## Rules
    1. Only extract factual information, no speculation
    2. If a field has no new information, keep the existing value unchanged
    3. If new information contradicts old information, overwrite with the new,
       and record the change in key_facts
    4. conversation_state.stage can only advance forward in the state machine,
       never backward (unless customer explicitly says "no longer interested")
    5. All timestamps use ISO 8601 format
    6. In commitments, if by_when has passed and status is still pending,
       auto-change to overdue
    
    ## Output
    Output only the updated JSON object, no explanatory text.
    

    1.3 Memory Injection Template (inject into System Prompt at conversation start)

    Add the following dynamic section to the Agent's System Prompt:

    ## Customer Memory Snapshot (auto-injected, do not manually edit)
    
    [Customer] {{identity.name}} | {{identity.company}} | {{identity.role}}
    [Language] {{identity.language}}
    [Stage] {{conversation_state.stage}}
    [BANT]
      - Budget: {{bant.budget}}
      - Authority: {{bant.authority}}
      - Need: {{bant.need}}
      - Timeline: {{bant.timeline}}
    [Product Interest] {{product_interest.products_discussed | join(", ")}}
    [Spec Preferences] {{product_interest.preferred_specs | json}}
    [Quote History] {{product_interest.quotes_sent | json}}
    [Samples] {{product_interest.samples_requested ? "Requested" : "Not requested"}}
    [Last Topic] {{conversation_state.last_topic}}
    [Pending Action] {{conversation_state.pending_action}}
    [Next Follow-up] {{conversation_state.next_followup_date}}
    [Unresolved Objections]
    {% for obj in objections_log if not obj.resolved %}
      - {{obj.objection}} (last response: {{obj.response_given}})
    {% endfor %}
    [Outstanding Commitments]
    {% for c in commitments if c.status == "pending" or c.status == "overdue" %}
      - [{{c.status | upper}}] {{c.who}}: {{c.what}} (due: {{c.by_when}})
    {% endfor %}
    [Key Facts]
    {% for fact in key_facts[-5:] %}
      - {{fact}}
    {% endfor %}
    

    1.4 MemOS API Call Flow

    # === Read memory (at conversation start) ===
    
    import os
    import requests
    import json
    
    MEMOS_API = "https://api.openmem.net/v1"
    MEMOS_API_KEY = os.environ.get("MEMOS_API_KEY")
    if not MEMOS_API_KEY:
        raise EnvironmentError("MEMOS_API_KEY is not set. Check your environment variables.")
    
    HEADERS = {
        "Authorization": f"Bearer {MEMOS_API_KEY}",
        "Content-Type": "application/json"
    }
    
    def get_customer_memory(customer_id: str) -> dict:
        """Read customer memory from MemOS"""
        resp = requests.get(
            f"{MEMOS_API}/memories",
            headers=HEADERS,
            params={
                "namespace": "pulseagent_prod",
                "filter": json.dumps({
                    "memory_type": "customer_session",
                    "customer_id": customer_id
                }),
                "limit": 1
            }
        )
        if resp.status_code == 200 and resp.json().get("data"):
            return resp.json()["data"][0]
        return None  # New customer, no history
    
    
    # === Write memory (at conversation end) ===
    
    def upsert_customer_memory(customer_id: str, memory_obj: dict):
        """Write or update customer memory to MemOS"""
        memory_obj["customer_id"] = customer_id
        memory_obj["memory_type"] = "customer_session"
    
        resp = requests.post(
            f"{MEMOS_API}/memories/upsert",
            headers=HEADERS,
            json={
                "namespace": "pulseagent_prod",
                "key": f"customer:{customer_id}",
                "value": memory_obj
            }
        )
        return resp.status_code == 200
    

    LAYER 2: Proactive Summary Trigger

    2.1 Token Monitoring Logic

    Configure in OpenClaw as a Heartbeat skill or embed the following logic:

    # === Token usage monitoring ===
    
    import tiktoken
    
    MODEL_MAX_TOKENS = {
        "claude-haiku-4-5": 200000,
        "claude-sonnet-4-6": 200000,
        "claude-opus-4-6": 200000,
        "gpt-4o": 128000,
        "kimi-2.5": 128000,
        "deepseek-v3.2": 128000,
    }
    
    def estimate_token_usage(messages: list, model: str) -> float:
        """Estimate current conversation token usage ratio"""
        try:
            enc = tiktoken.encoding_for_model("gpt-4o")  # Universal approximation
        except:
            enc = tiktoken.get_encoding("cl100k_base")
    
        total_tokens = sum(len(enc.encode(str(m))) for m in messages)
        max_tokens = MODEL_MAX_TOKENS.get(model, 128000)
    
        return total_tokens / max_tokens
    
    
    def should_trigger_compaction(messages: list, model: str) -> bool:
        """Trigger proactive summary when usage exceeds 65%"""
        usage = estimate_token_usage(messages, model)
        return usage >= 0.65
    

    2.2 Proactive Summary Prompt

    When should_trigger_compaction() returns True, immediately execute:

    You are a conversation compressor. Your task is to compress the current
    conversation history into a concise structured summary with zero information loss.
    
    ## Compression Rules
    
    1. **Must preserve (verbatim or equivalent):**
       - Customer's explicit needs, quantities, budget, timeline
       - Sent quote numbers and terms
       - Commitments and agreements from both sides
       - Customer objections and Agent's responses
       - Customer emotional signals (dissatisfaction, hesitation, enthusiasm)
       - All specific numbers involving amounts, dates, quantities
    
    2. **Can compress:**
       - Small talk and pleasantries -> "[rapport established]"
       - Repeated product introductions -> "[introduced product X, emphasized Y and Z]"
       - Multi-round confirmations -> "[after multiple rounds, finalized as X]"
    
    3. **Never discard:**
       - Any numbers (prices, quantities, dates)
       - Customer decision signals ("I need to discuss with my boss", "send a sample")
       - Incomplete action items
    
    ## Output Format
    
    === Conversation Summary (compressed at {{timestamp}}) ===
    
    [Turns] Original {{N}} turns -> Compressed
    [Customer Stage] {{stage}}
    [Key Conversation Threads]
    1. [time] Event/information
    2. [time] Event/information
    ...
    
    [Verbatim Preserved]
    - Quote: "..."
    - Customer (key): "..."
    - Commitment: "..."
    
    [Compressed]
    - [Ice-breaking complete, customer tone friendly]
    - [Introduced product line, customer interested in model X]
    ...
    
    === Summary End ===
    

    2.3 Compaction Execution Flow

    def execute_compaction(agent, customer_id: str, messages: list, model: str):
        """
        Proactive summary execution:
        1. Update MemOS memory first (safety net)
        2. Generate conversation summary
        3. Replace historical messages with summary
        4. Re-inject MemOS memory snapshot
        """
    
        # Step 1: Update MemOS first (safety net)
        memory_obj = extract_memory_from_conversation(messages)
        upsert_customer_memory(customer_id, memory_obj)
    
        # Step 2: Generate summary
        summary = agent.call_llm(
            system_prompt=COMPACTION_PROMPT,
            messages=[{
                "role": "user",
                "content": f"Please compress the following conversation:\n\n{format_messages(messages)}"
            }]
        )
    
        # Step 3: Rebuild message queue
        new_messages = [
            {
                "role": "system",
                "content": f"{ORIGINAL_SYSTEM_PROMPT}\n\n{inject_memory(memory_obj)}"
            },
            {
                "role": "assistant",
                "content": summary
            },
            # Keep last 3 turns of raw conversation (latest info uncompressed)
            *messages[-6:]  # Last 3 turns = 6 messages (user+assistant each)
        ]
    
        return new_messages
    

    2.4 Cron Configuration

    cron_jobs:
      - name: "token_monitor"
        schedule: "*/1 * * * *"     # Every minute
        action: |
          Check token usage ratio for all active conversations.
          If any exceeds 65%, immediately execute proactive summary.
          After summary, insert invisible marker [COMPACTED_AT:timestamp].
    
      - name: "memory_sync"
        schedule: "*/5 * * * *"     # Every 5 minutes
        action: |
          Sync latest memory extraction results from all active conversations to MemOS.
          Also sync to Google Sheets (via gog skill) as backup.
    
      - name: "stale_memory_cleanup"
        schedule: "0 3 * * *"       # Daily at 3:00 AM
        action: |
          Check MemOS for customer memories with last_updated > 90 days.
          Mark as dormant but do not delete.
          Generate summary report and send to admin.
    

    LAYER 3: ChromaDB Long-Term Memory

    3.1 Collection Setup

    import chromadb
    
    client = chromadb.Client()
    
    collection = client.get_or_create_collection(
        name="conversation_history",
        metadata={
            "description": "Long-term memory store for all customer conversations",
            "hnsw:space": "cosine"
        }
    )
    

    3.2 Conversation Storage Schema

    def store_conversation_turn(
        customer_id: str,
        turn_number: int,
        user_message: str,
        agent_response: str,
        metadata: dict
    ):
        """Store each conversation turn in ChromaDB"""
    
        doc_id = f"{customer_id}_turn_{turn_number}_{metadata['timestamp']}"
    
        document = f"""
    [Customer {customer_id}] [{metadata['timestamp']}] [Turn {turn_number}]
    Customer: {user_message}
    Agent: {agent_response}
    Stage: {metadata.get('stage', 'unknown')}
    Topic: {metadata.get('topic', 'general')}
    """
    
        collection.add(
            documents=[document],
            ids=[doc_id],
            metadatas=[{
                "customer_id": customer_id,
                "turn_number": turn_number,
                "timestamp": metadata["timestamp"],
                "stage": metadata.get("stage", "unknown"),
                "topic": metadata.get("topic", "general"),
                "has_quote": metadata.get("has_quote", False),
                "has_objection": metadata.get("has_objection", False),
                "has_commitment": metadata.get("has_commitment", False),
            }]
        )
    

    3.3 History Retrieval Logic

    def recall_relevant_history(
        customer_id: str,
        current_query: str,
        n_results: int = 5
    ) -> list:
        """Retrieve relevant history from ChromaDB when Agent needs to recall"""
    
        results = collection.query(
            query_texts=[current_query],
            n_results=n_results,
            where={"customer_id": customer_id}
        )
    
        return results["documents"][0] if results["documents"] else []
    
    
    def recall_by_topic(
        customer_id: str,
        topic: str,
        n_results: int = 3
    ) -> list:
        """Retrieve history by topic"""
    
        results = collection.query(
            query_texts=[topic],
            n_results=n_results,
            where={
                "$and": [
                    {"customer_id": customer_id},
                    {"topic": topic}
                ]
            }
        )
    
        return results["documents"][0] if results["documents"] else []
    

    3.4 Auto-Retrieval Trigger Conditions

    Add to System Prompt so the Agent knows when to call history retrieval:

    ## History Memory Retrieval Rules
    
    You MUST call ChromaDB history retrieval in these situations:
    
    1. **Customer references past conversations**: e.g. "the price you mentioned last time",
       "that model we discussed before"
       -> Call recall_relevant_history(customer_id, customer's exact words)
    
    2. **Customer contacts again after 7+ day gap**
       -> Auto-call recall_relevant_history(customer_id, "latest conversation summary")
       -> Naturally continue from last topic: "Hi [Name]! Last time we discussed [topic],
          any updates on your end?"
    
    3. **MemOS memory has overdue commitments**
       -> Call recall_by_topic(customer_id, commitment.what)
       -> Find original commitment context, follow up properly
    
    4. **Customer mentions a product or detail with no current context**
       -> Call recall_relevant_history(customer_id, product name/detail keyword)
       -> If history found, reference it; if not, politely confirm
    
    Note: Retrieval results are for your reference only. Never say "I found in my database..."
    Express naturally, as if you always remembered.
    

    Four-Layer Integration Flow

    +------------------------------------------------------------------+
    |                    New message arrives on WhatsApp                 |
    +-------------------------------+----------------------------------+
                                    |
                                    v
    +------------------------------------------------------------------+
    |  Step 1: Read MemOS Memory (L1)                                  |
    |  GET /memories?customer_id=<phone>                                |
    |  -> If found, inject into System Prompt "Customer Memory" section |
    |  -> If not found (new customer), use empty template               |
    +-------------------------------+----------------------------------+
                                    |
                                    v
    +------------------------------------------------------------------+
    |  Step 2: Check if history retrieval needed (L3 triggers)          |
    |  -> Gap >7 days? Overdue commitment? Customer references past?    |
    |  -> If yes, call ChromaDB recall, append results to context       |
    +-------------------------------+----------------------------------+
                                    |
                                    v
    +------------------------------------------------------------------+
    |  Step 3: Check token usage (L2)                                   |
    |  -> If >= 65%, execute proactive summary via haiku-class model    |
    |  -> Compress history, store summary in ChromaDB                   |
    |  -> Re-inject MemOS snapshot + keep last 3 turns                  |
    +-------------------------------+----------------------------------+
                                    |
                                    v
    +------------------------------------------------------------------+
    |  Step 4: Agent generates reply                                    |
    |  Full context = System Prompt + MemOS snapshot                    |
    |               + ChromaDB results (if any)                         |
    |               + Compressed history + Last 3 raw turns             |
    |               + Current user message                              |
    +-------------------------------+----------------------------------+
                                    |
                                    v
    +------------------------------------------------------------------+
    |  Step 5: Post-processing                                          |
    |  A) Extract memory -> Update MemOS (L1)                           |
    |  B) Store this turn -> ChromaDB with auto-tags (L3)               |
    |  C) Sync CRM -> Google Sheets via gog skill                       |
    +-------------------------------+----------------------------------+
                                    |
                                    v (Daily 12:00 cron)
    +------------------------------------------------------------------+
    |  Step 6: CRM Snapshot (L4 — disaster recovery)                    |
    |  Read full CRM pipeline -> Store summary in ChromaDB              |
    |  -> Tagged with date, acts as fallback if L1/L3 have issues       |
    +------------------------------------------------------------------+
    

    System Prompt Template (with Anti-Amnesia integrated)

    Use as the base System Prompt for all WhatsApp AI-SDR Agents. {{...}} markers are dynamically filled by MemOS and the system.

    # {{agent_name}} - WhatsApp AI-SDR
    # PulseAgent x OpenClaw {{tier}} | Anti-Amnesia v1.0
    
    ## Identity & Responsibilities
    (Paste AI-SDR configurator output: identity, product info, communication style, etc.)
    
    ---
    
    ## Customer Memory Snapshot (auto-injected by MemOS, refreshed every turn)
    {{MEMOS_INJECTION_BLOCK}}
    (Empty for new customers. Agent should proactively collect information.)
    
    ---
    
    ## Historical Conversation Retrieval (auto-injected by ChromaDB, on-demand)
    {{CHROMADB_INJECTION_BLOCK}}
    (Empty if no retrieval needed or no results.)
    
    ---
    
    ## Anti-Amnesia Protocol
    
    ### Memory rules you MUST follow:
    
    1. **Never say "sorry I don't remember."** If unsure about a detail, call ChromaDB
       to retrieve history. If retrieval returns nothing, use "let me confirm that"
       as a natural transition, never expose memory gaps.
    
    2. **After every conversation turn, you must execute memory extraction internally.**
       Results are written to MemOS. This is mandatory, cannot be skipped.
    
    3. **When you sense context growing long, proactively trigger summary.**
       Don't wait for system-forced truncation. When conversation exceeds 20 turns,
       proactively execute compression before your next reply.
    
    4. **Use the memory snapshot for continuity.** Before each reply, read the
       "Customer Memory Snapshot" above. Ensure your reply is consistent with
       known information. If customer provides new info contradicting memory,
       update the memory; don't insist on old information.
    
    5. **Cross-session continuity.** When a customer contacts you in a new session,
       MemOS snapshot is auto-injected. Naturally reference the last topic as an opener.
       - Yes: "Hi [Name]! Last time we discussed [product] samples, did you receive them?"
       - No: "Hello! How can I help you today?" (no memory continuity)
    
    6. **Commitment tracking.** If memory snapshot has overdue commitments,
       prioritize handling them in your reply.
       - If it's your (Agent) overdue commitment: apologize first, then remedy.
       - If it's customer's overdue commitment: gently remind.
    
    ---
    
    ## Behavioral Boundaries
    (Paste AI-SDR configurator output: behavioral boundaries)
    
    ---
    
    *Anti-Amnesia v1.0 | PulseAgent x OpenClaw*
    

    LAYER 4: CRM Snapshot Fallback

    4.1 Daily Pipeline Backup

    Layer 4 is the disaster recovery layer. Even if MemOS has an outage or ChromaDB loses data, the daily CRM snapshot ensures pipeline state is never lost.

    def crm_snapshot():
        """Daily 12:00 — Store CRM pipeline state in ChromaDB"""
        # Read full CRM via gws/Google Sheets API
        pipeline = read_crm_pipeline()
    
        # Store as a timestamped snapshot
        snapshot = {
            "date": datetime.now().isoformat()[:10],
            "total_leads": len(pipeline),
            "by_status": count_by_status(pipeline),
            "hot_leads": [l for l in pipeline if l["lead_tier"] == "hot_lead"],
            "pending_quotes": [l for l in pipeline if l["status"] == "quote_sent"],
            "summary": generate_pipeline_summary(pipeline),
        }
    
        collection.add(
            documents=[json.dumps(snapshot)],
            ids=[f"crm_snapshot_{snapshot['date']}"],
            metadatas=[{"type": "crm_snapshot", "date": snapshot["date"]}]
        )
    

    4.2 Recovery Scenarios

    ScenarioRecovery Using L4
    MemOS API downRead latest CRM snapshot from ChromaDB for customer context
    ChromaDB turns corruptedCRM snapshot has pipeline state; rebuild from CRM + Supermemory
    Server migrationExport CRM snapshots for continuity on new server
    Audit requestHistorical pipeline snapshots available by date

    4.3 Cron Configuration

    cron_jobs:
      - name: "crm_snapshot"
        schedule: "0 12 * * *"     # Daily at 12:00
        action: |
          Read full CRM pipeline via gws skill.
          Store summary snapshot in ChromaDB with date tag.
          Report: "CRM snapshot stored: N active leads, M pipeline value."
    

    Verification Checklist

    After deployment, use these test scenarios to verify the anti-amnesia mechanism:

    Test 1: Single-session long conversation memory retention

    1. Start a new conversation
    2. Tell the Agent your company name and budget at turn 5
    3. Continue conversation to turn 25+ (past compression threshold)
    4. At turn 26, ask: "What was the budget I mentioned earlier?"
    Pass: Agent answers accurately
    Fail: Agent says it doesn't remember or gives wrong number
    

    Test 2: Cross-session memory continuity

    1. Complete a full conversation discussing product A and pricing
    2. Wait 5 minutes, then start a new conversation from the same number
    3. Send: "Hi, what about that product we discussed last time?"
    Pass: Agent naturally references product A and previous pricing
    Fail: Agent replies as if meeting for the first time
    

    Test 3: Commitment tracking

    1. In a conversation, have the Agent commit to "send a quote tomorrow"
    2. Wait until "tomorrow", then start a new conversation from the same number
    3. Send any message
    Pass: Agent proactively mentions the quote ("Sorry the quote is delayed, preparing it now")
    Fail: Agent doesn't mention the quote at all
    

    Test 4: Contradictory information handling

    1. First tell the Agent you need 1000 units
    2. Continue conversation for 20 turns
    3. Change to "actually I only need 200 units"
    Pass: Agent confirms the change ("OK, adjusting from 1000 to 200, let me recalculate")
    Fail: Agent continues quoting for 1000 units
    

    Monitoring Metrics

    Create the following monitoring table in Google Sheets (via gog skill):

    MetricCalculationAlert Threshold
    Memory extraction success rateSuccessful extractions / Total turns< 95%
    Proactive summary triggers/dayDaily count> 50 needs investigation
    ChromaDB retrieval hit rateEffective retrievals / Total retrievals< 70%
    Customer "you don't remember" countManual tagging> 0 investigate immediately
    MemOS write latencyAPI response time> 2 seconds

    Quick Start Deployment

    Step 1: Install ChromaDB skill
      -> ClawHub -> Search "chromadb" -> Install
    
    Step 2: Configure MemOS connection
      -> Agent Settings -> Environment Variables
      -> Add MEMOS_API_KEY and MEMOS_NAMESPACE
    
    Step 3: Import this document to Knowledge Base
      -> Agent -> Knowledge Base -> Upload
      -> Upload this .md file
    
    Step 4: Update System Prompt
      -> Replace Agent's System Prompt with the template above
      -> Ensure {{MEMOS_INJECTION_BLOCK}} placeholder exists
    
    Step 5: Configure Cron jobs
      -> Cron skill -> Add token_monitor / memory_sync / stale_memory_cleanup
    
    Step 6: Run verification checklist
      -> Execute all 4 test scenarios above
      -> After all pass, switch to production
    
    Step 7: Set up Google Sheets monitoring
      -> gog skill -> Connect monitoring sheet
      -> Configure daily auto-fill for metric data
    

    B2B SDR Agent Template - Anti-Amnesia Implementation Spec v2.0 Technical support: PulseAgent

  • b2b-sdr-agent-template/CHANGELOG.mdmarkdown · 143.4 KB

    Changelog

    All notable changes to the B2B SDR Agent Template are documented here.

    Changes sourced from upstream (openclaw/openclaw) are labeled with the originating commit SHA.


    [Unreleased]

    2026-06-12 — OpenClaw v2026.6.6 upstream sync

    Upstream: openclaw/openclaw v2026.6.6 — 77 commits; security hardening, multi-channel delivery stability, Claude Fable 5, and UI performance.

    Upstream highlights (cherry-picked for SDR deployments)

    • Security hardening across 10+ vectors: Transcript boundaries, sandbox binds, MCP stdio, Codex HTTP, elevated sender verification, and deleted-agent ACP bypass paths all tightened. Exec approvals now fail closed on timeout — a pending approval prompt no longer silently permits task execution.
    • Claude Fable 5 adaptive thinking: Native support for Fable 5 with adaptive thinking enabled — high-value prospect conversations can leverage deep reasoning before composing replies, while simpler sequences route to faster models.
    • Telegram account-scoped topic routing: Topics now route to the correct agents; streamed text survives tool calls without truncation; unauthorized DM text no longer leaks into cache or prompt context.
    • iMessage always-on inbound restart: Channel recovers automatically without manual intervention; durable echo markers prevent duplicate sends; idle approval discovery improves reliability for long threads.
    • WhatsApp successor-controller fix: Captured replies stay bound to the correct successor controller after service restart — critical for sequences where prospects reply hours later.
    • Feishu rate-limit retries / Mattermost thread preservation / LINE webhook normalization: Cross-platform delivery reliability improvements.
    • UI startup latency reduction: Model metadata cached at startup, catalog wait removed from critical path, slash commands lazy-loaded — visibly snappier TUI for teams managing many simultaneous sequences.
    • Slow-reply diagnostics + first-event tracing: Actionable signal when replies take longer than expected, replacing silent timeouts.
    • OpenRouter OAuth onboarding: Standard OAuth flow replaces manual token copy-paste for OpenRouter users.
    • Gemma 4 reasoning replay preservation: Reasoning content correctly preserved across session compaction.
    • Local llama.cpp plugin isolation: Moved into dedicated provider plugin; local models skip guardian review for faster iteration.

    2026-06-09 — OpenClaw v2026.6.5 upstream sync

    Upstream: openclaw/openclaw v2026.6.5 — first stable release under YYYY.M.PATCH monthly patch numbering.

    Upstream highlights (cherry-picked for SDR deployments)

    • Built-in Parallel web search provider: Native web search with API key auto-discovery, cache-safe session management, and endpoint normalization — lead research workflows (firmographic lookups, LinkedIn signal enrichment, buying trigger detection) now run concurrently across multiple prospects.
    • Anthropic extended-thinking session recovery: Long AI reasoning sessions recover automatically after prompt-cache expiry via deferred stream start events — 10+ step deal analysis and stakeholder mapping workflows complete reliably without silent mid-chain failures.
    • MCP tool result coercion: Non-text/image blocks (JSON objects, numeric scores, status objects) are automatically coerced to Anthropic-accepted formats — CRM lookups, lead scoring, and multi-step tool chains no longer corrupt session history.
    • QQBot reasoning stripping: Raw <thinking> scaffolding is stripped before channel delivery — professional outreach output reaches recipients cleanly.
    • Auth profiles migrated to SQLite: Credentials survive agent restarts; npm plugin installs preserve trusted pins; prerelease fallback integrity checks prevent stale auth after upgrades.
    • Bounded WhatsApp startup waits: Prevents infinite hang when WhatsApp API is slow at boot, unblocking all other channel initialization.
    • Matrix voice preflighting + thread-aware replies: Voice notes validated before delivery; replies attach to source thread rather than creating orphaned top-level messages.
    • Google Vertex ADC improvements: Static catalog rows restored, runtime model resolution fixed, cooldown recovery more reliable.
    • macOS Node stability: Prevents silent self-reconnection away from healthy Gateway sessions.
    • Cron legacy JSON migration + safer env placeholders: Scheduled job config survives upgrades; ${VAR} literals blocked from reaching APIs when env vars are unset.

    2026-06-07 — Template v3.8.0 CI + deploy doctor

    Added

    • GitHub Actions CI: Added .github/workflows/validate.yml so pushes and pull requests to main run npm test automatically.
    • Post-deploy doctor: Added deploy/doctor.sh for SSH-based health checks covering Node/npm, OpenClaw CLI, config permissions, workspace files, local skills, Gateway service, Gateway health endpoint, and Chroma memory.
    • Remote path configuration: Added REMOTE_HOME, REMOTE_OPENCLAW_HOME, REMOTE_CONFIG_HOME, and REMOTE_WORKSPACE_DIR so non-root or custom-path deployments no longer require editing deploy scripts.
    • IP isolation path alignment: deploy/ip-isolate.sh now uses the configured OpenClaw and systemd user paths when injecting Gateway proxy settings.

    Fixed

    • Generated workspace path: deploy/generate-config.sh now writes agents.defaults.workspace from the configured remote workspace path instead of hardcoding /root/.openclaw/workspace.
    • Validation coverage: npm test now verifies the CI workflow, doctor script, current b2b_trade skill count, and non-root workspace path generation.

    2026-06-07 — Template v3.7.0 validation + memory deployment alignment

    Added

    • Template validation entrypoint: Added package.json with npm test / npm run validate so contributors and release operators can verify the template without a live server.
    • scripts/validate-template.sh: Smoke-tests required template files, shell syntax, product KB JSON, proforma invoice generation, local Chroma memory store/search, and generated openclaw.json.

    Fixed

    • ChromaDB deployment flag now has release behavior: CHROMADB_ENABLED=true now installs the chromadb dependency, keeps it enabled by default for L3/L4 memory, and reports memory status in deploy output.
    • Docs consistency: Updated the template metadata and README copy to reflect 14 pipeline checks, the current 4-layer anti-amnesia memory model, and the actual 41-skill b2b_trade profile.

    2026-06-03 — OpenClaw v2026.6.1 upstream sync

    Upstream: openclaw/openclaw v2026.6.1 — first stable release of the v2026.6.x cycle.

    Upstream highlights (cherry-picked for SDR deployments)

    • 8-platform channel delivery hardening: WhatsApp, Telegram, iMessage, Slack, Discord, Microsoft Teams, Google Chat, and iOS Realtime Talk all receive delivery hardening for steadier message delivery — fewer dropped messages in overnight outreach sequences.
    • Multi-agent workboard orchestration primitives: Coordination layer for distributing work across agents — assign prospect-research to a dedicated agent, route qualified leads to a closer, run parallel enrichment and personalization; workboard supports persistent shared state, proposal review queues, and async handoff between agents.
    • Skill Workshop Control UI: Proposal lists, today-actions queue, revision handoff, searchable file previews, review states, locale coverage tracking, and reusable session routing — reduces daily management overhead for teams running 10+ active markets.
    • Agent and runtime recovery: Interrupted tool calls, stale session bindings, compaction handoffs, and media delivery retries all handled cleanly — long SDR conversations no longer lose early qualification context on compaction.
    • 6-category hot-path performance: Skills metadata, session metadata reads, gateway runtime state, plugin metadata fingerprints, memory watcher deduplication, and store write coalescing — CRM lookups and enrichment calls faster within a session.
    • iMessage SQLite state tracking: Monitor state, inbound queues, and plugin install ledgers now SQLite-backed — iMessage context survives restarts and redeployments.
    • MiniMax M3 + GitHub Copilot agent runtime: MiniMax M3 available for high-volume lead scoring and intent classification; GitHub Copilot agent runtime plugin for code-generating SDR tooling agents.

    Migration notes

    • No breaking changes. All new features are additive.
    • iMessage SQLite database created automatically on first restart after upgrade.
    • Workboard and Skill Workshop Control UI require no configuration to activate.

    2026-05-30 — OpenClaw v2026.5.28 upstream sync

    Upstream: openclaw/openclaw v2026.5.28 — 35 contributors.

    Upstream highlights (cherry-picked for SDR deployments)

    • Multi-channel session hardening — 7 platforms: Session identities verified on outbound plugin hooks for WhatsApp, Telegram, Slack, Discord, iMessage, Matrix, and Microsoft Teams; WhatsApp profile-scoped auth directory resolution fixed — critical for multi-account deployments; Telegram callback page validation and Discord component ID enforcement tightened.
    • Claude Opus 4.8 support: Anthropic's latest flagship model now selectable for complex prospect research and multi-step reasoning tasks; pair with Sonnet 4.6 for cost-optimal routing in SDR workflows.
    • Provider expansion: Fal Krea image generation, NVIDIA model catalog, MiniMax streaming music, encrypted PDF extraction (ClawPDF), and GitHub Copilot agent runtime added.
    • Agent/Codex runtime — 16+ stability fixes: Subagent workspace separation enforced (no cross-workspace bleed); prompt-local hook context; timeout-based session lock release (hung sessions no longer block overnight queues); stale restart continuations prevented; tool argument repair for quoted/escaped inputs (fewer malformed CRM API calls).
    • Performance: Install-record caching, config parsing optimization, session-level tool catalog reuse — second and subsequent CRM/enrichment calls faster within a session.
    • Auth hardening: Workspace dotenv credentials no longer auto-loaded (prevents accidental leaks); OAuth/token lifetimes bounded (compliance-friendly); malformed numeric inputs rejected.
    • iOS Pro refresh: Pro Command, Chat, Agents, and Settings integrated; hosted push relay defaults enabled (no manual relay config for mobile sales reps); realtime Talk playback added.
    • ClawHub & SDK: Plugin display names and skill verification; GitHub Copilot and Tokenjuice externalized as install-on-demand (smaller base install); Workboard agent coordination tools for work handoff.

    Migration notes

    • WhatsApp deployments: Review auth directory paths — profile-scoped resolution may change credential lookup location.
    • OAuth-dependent workflows: Token expiry is now bounded; set explicit rotation logic before upgrading.
    • Workspace dotenv: Any .env in workspace directories will no longer auto-load into agent context — audit before upgrade.

    2026-05-28 — OpenClaw v2026.5.27 upstream sync

    Upstream: openclaw/openclaw v2026.5.27 — 253 commits to main.

    Upstream highlights (cherry-picked for SDR deployments)

    • Security hardening — 4 layers: Group prompt text kept out of the system prompt (blocks prompt injection via group messages); repeated-dot hostnames normalized (closes URL confusion attack class); side-effecting command wrappers blocked; unsafe Node.js runtime env overrides blocked — enterprise-grade hardening for multi-tenant SDR deployments.
    • Gateway performance — 6 cache layers: Session reads, plugin metadata fingerprints, auth env snapshots, auto-enabled plugin configs, tool-search catalogs, and stable metadata now cached on hot path — agents respond faster under load; lead enrichment and CRM lookup tools complete sooner.
    • Codex app-server reliability: Model resolution fixed; workspace memory routing scoped correctly (no cross-workspace bleed in multi-team deploys); client persistence improved (less task loss during outreach sequences); relay generation preserved across restarts.
    • OpenAI-compatible embeddings: Any OpenAI-embeddings-API-compatible provider (Ollama, Cohere, Jina, etc.) can now be registered — enables semantic lead deduplication, intent classification, and RAG-powered company research in SDR workflows.
    • DeepInfra catalog browsing: Full DeepInfra model catalog now browsable from model picker — access to Llama, Mistral, Qwen without manual model IDs.
    • Pixverse video generation: Native video generation provider — enables personalized video intro attachments for WhatsApp/LinkedIn outreach.
    • Multi-channel stability (Telegram, iMessage, Slack, Matrix, Discord, Google Chat): Delivery reliability fixes across all six channels — reduced dropped-message rate in multi-channel outreach.
    • Deprecation: Memory-specific embedding registration deprecated — migrate to general embeddingProviders API before next major release.

    2026-05-27 — OpenClaw v2026.5.26 upstream sync

    Upstream: openclaw/openclaw v2026.5.26 — 140+ contributors.

    Upstream highlights (cherry-picked for SDR deployments)

    • Faster gateway startup: Eliminates redundant plugin, channel, session, usage-cost, and filesystem scans on boot — agent response latency drops noticeably in high-load deployments; first-message cold-start lag is gone.
    • Transcript infrastructure: Transcript core now backs meeting summaries, source-provider chunks, user turns, media provenance, and CLI/TUI replay — sets the foundation for meeting-aware SDR follow-ups and call-to-CRM pipelines.
    • Multi-channel stability (Signal, iMessage, WhatsApp, Discord): Reaction approval flows added; media handling and delivery edge cases fixed across all four channels — more reliable multi-channel outreach at scale.
    • Voice — Realtime Talk control: Inspection, steering, and cancellation of live voice sessions now available from Web UI and Discord; wake-name tolerance improved — better live voice sales call management.
    • Named authentication profiles: Credential migration support lands — easier multi-account management for SDR teams running multiple WhatsApp/Telegram identities.
    • Security hardening: Browser snapshots respect SSRF policy; system-event text cannot spoof prompt markers; fetched files wrapped as external content; device tokens validated — enterprise-grade hardening for multi-tenant deployments.
    • OpenTelemetry LLM spans: Diagnostic spans for LLM content added — full observability for debugging slow or failed AI responses in production.
    • Rastermill replaces Sharp: Better image processing pipeline (media attachments, lead profile photos).
    • Codex CLI bundled (v0.134.0): Embedded AI coding tool available in all installations.
    • Alpine Linux support: Installation now works on Alpine-based Docker images — smaller production containers.
    • Fix: Plugin metadata now cached for performance (no repeated plugin scans).
    • Fix: OpenAI sampling, Codex recovery, Ollama normalization, and tool-schema guards hardened.
    • Fix: Activity tab, gateway tracing, and systemd Gateway hygiene improved.

    2026-05-24 — OpenClaw v2026.5.22 upstream sync

    Upstream: openclaw/openclaw v2026.5.22 — 140+ contributors.

    Upstream highlights (cherry-picked for SDR deployments)

    • 4,100× gateway performance: Pre-warmed provider auth-state map slashes /models latency from ~20s → ~5ms. Cold-start lag that caused first-message delays in high-load deployments is gone.
    • Meeting Notes Plugin: New source-only plugin with SDK source-provider contract. Supports auto-start capture, manual transcript imports, read-only CLI, and Discord voice as the first live source — sets the stage for meeting-aware SDR follow-ups.
    • Claude 4.x model migration: 1M-context handling migrated to GA-capable Claude 4.x models; retired Groq, GitHub Copilot, OpenAI, xAI, and old Claude catalog entries pruned; existing configs auto-upgraded.
    • Embedding providers API: General embeddingProviders capability contract and registration API landed — unlocks custom vector-search backends for memory/RAG in SDR workflows.
    • Sub-agent context hardening: Default sub-agent bootstrap context scoped to AGENTS.md + TOOLS.md only (reduces prompt bleed in multi-agent SDR pipelines).
    • Windows installer: Portable Git, Node.js, and pnpm now fully bootstrapped — enterprise Windows deployments no longer require pre-installed toolchain.
    • Docker: Pre-created workspace/config mount points with node ownership; Gateway bearer token no longer printed in setup logs (security fix).
    • Fix: Telegram markdown table mode preserved through outbound chunking (no more garbled tables in Telegram reports).
    • Fix: Local media from Telegram sendMessage actions now sent instead of dropped.
    • Fix: Telegram message replays deduplicated by chat/message identity.
    • Fix: Slack reasoning payloads suppressed before reply delivery.
    • Fix: Shared-secret bearer callers can now read/stream session history without scope header.
    • Fix: pathPrepend entries preserved ahead of shell startup PATH changes.
    • Fix: Denied exec approvals treated as terminal (no more ghost follow-up tool calls).
    • Fix: Context budget shown in session status when fresh usage unavailable.
    • Fix: Secrets apply now shows irreversible-action warning before confirmation.

    2026-05-21 — OpenClaw v2026.5.20 upstream sync

    Upstream: openclaw/openclaw v2026.5.20 — 39 contributors.

    Upstream highlights (cherry-picked for SDR deployments)

    • Discord voice AI sessions: voice follows configured users into channels with allowed-channel checks, multi-user handoff, bounded reconciliation, and DAVE recovery. IDENTITY.md / USER.md / SOUL.md injected by default via voice.realtime.bootstrapContextFiles.
    • Policy plugin: bundled policy-backed channel conformance checks, openclaw doctor lint findings, opt-in workspace auto-repair (--fix).
    • xAI device-code OAuth: headless/Docker authorizations no longer require a localhost browser callback.
    • OpenRouter: provider-level routing policies now honored.
    • Agent-level local model lean: agents.list[].experimental.localModelLean enables lean mode per agent without global toggle.
    • Fix: stale completion announcements now auto-recover (no more pipeline hangs).
    • Fix: subagent wildcard allowlist constraints work correctly in multi-tier hierarchies.
    • Fix: plugin compaction timeouts are bounded (no indefinite workspace hangs).
    • Fix: cron session lane isolation prevents scheduled tasks stealing interactive slots.
    • Fix: image generation 120s watchdog timer added.
    • Fix: embedding provider cleanup on search timeouts (prevents memory leaks).
    • Fix: openclaw message now includes stable messageId for audit trails.

    2026-05-22 — WhatsApp Onboarding Spec v0.5 (Path D — Multi-Device sync)

    Adds Path D: pull WhatsApp history directly from PulseAgent (no phone backup, no password, no USB). Customer scans a fresh QR, waits for Multi-Device sync to complete, then bootstrap.sh pulls the resulting .txt files from PA. Output is byte-compatible with v0.4 backup extractors so the downstream pipeline is unchanged.

    Added

    • scripts/fetch-from-pa.py — Client-side downloader that calls PA's /whatsapp/export-history endpoint and unpacks the ZIP into the exports/ directory. 404 from PA = "history not yet imported", exits with code 2 so wrapper scripts can fall back.
    • bootstrap.sh — Path B/C now offers a three-way choice: Path D (PA fetch) / Auto (backup extractor) / Manual (drop files). Path D prerequisites checklist explicit in the prompt — 6 steps with the unavoidable "wait 30 min – 6 hours" expectation set up-front so no client feels stalled.
    • docs/UPSTREAM-POLICY.md — Frozen policy. PA has zero source-level coupling with upstream openclaw; cherry-pick rules only become necessary if that ever changes.

    Backend dependency (lives in PulseAgent repo)

    Path D requires a recent PulseAgent backend (≥ commit b1300a1):

    • whatsapp_history_imports table
    • POST /v1/relay/history-batch (Bearer bridge token)
    • GET /whatsapp/export-history (Bearer user token, ZIP response)

    And the relay must run with SYNC_HISTORY=1.

    Why not just Path D for everyone

    Path D's hidden cost: WhatsApp Multi-Device sync only fires on a fresh QR scan. An already-linked device cannot retroactively backfill history even after syncFullHistory: true is set. So Path D = "tear down and re-link", which for a tenant whose AI has been running on WhatsApp means hours of downtime. Backup extraction (v0.4) stays the default for tenants that need zero-downtime onboarding.

    2026-05-22 — WhatsApp Onboarding Spec v0.4 (backup extractors)

    Removes the biggest manual step in the delivery pipeline: extracting .txt files from device backups. Bootstrap.sh now runs the extractors directly when the customer chooses the "Auto" path.

    Added

    • scripts/extract-ios-backup.py — Reads an iOS encrypted local backup, decrypts via iphone_backup_decrypt, extracts WhatsApp ChatStorage.sqlite, schema-probes column names (resilient to iOS 16-18 schema drift), emits one iOS-format .txt per 1-on-1 chat. Groups skipped by default.
    • scripts/extract-android-backup.py — Decrypts msgstore.db.crypt15 via wa-crypt-tools, joins against optional wa.db for proper contact names, emits Android-format .txt. Supports both modern chat + jid schema and legacy chat_list schema.
    • scripts/requirements-extract.txt — Optional dependency set kept out of the core requirements.txt so Layer-A-only customers don't pay for decryption native deps.
    • bootstrap.sh Path B/C "Auto" branch — auto-installs extraction deps, asks for backup password / crypt15 key, runs the appropriate extractor directly into exports/. Manual branch preserved as fallback.

    Why this matters

    Without v0.4, a delivery engineer had to walk the customer through three external tools (iMazing for iOS, adb + wa-crypt-tools + a viewer for Android) just to get to .txt. v0.4 collapses all of that into one bootstrap.sh prompt sequence.

    2026-05-21 — WhatsApp Onboarding Spec v0.3 (Layer B + Layer C scripts)

    Closes the remaining gap to a true end-to-end delivery: Layer B miner, Layer A pusher, and Layer C chunk uploader. bootstrap.sh now wires them all together so a complete run produces:

    • profiles/ → MemOS-ready customer YAMLs
    • golden/ → Layer B segments awaiting human review
    • layer-c-chunks.jsonl → conversation history chunks for KB import

    Added

    • scripts/mine-golden-segments.py — Two-pass Layer B miner: pass 1 sliding-window keyword detection (EN/ZH/ES signals across five tag classes), pass 2 Haiku LLM scoring + retag + tactical-move extraction. Drops segments scoring < 3.
    • scripts/memos-upsert.py — Pushes profiles/*.yaml to PulseAgent MemOS endpoint. Honors _auto_onboard gate; supports --force. Config sources: CLI > pa-config.json > env vars.
    • scripts/bulk-embed.py — Chunks parsed/*.jsonl into KB-ready records with strict customer_hash metadata. Two modes: emit JSONL for offline import, or --upload to push directly to /api/kb/upsert. Embedding stays on the PA backend by design.
    • samples/pa-config.example.json — Reference shape for ~/.pa-config.json.
    • bootstrap.sh wires mining + Layer C chunking + optional push step into the standard delivery flow.

    Fixed

    • whatsapp-export-parser.py MEDIA regex now strips outer <> around <image omitted> / <Media omitted> so chunked text is clean.
    • bulk-embed.py removed duplicated media tag in chunk text body.

    2026-05-21 — WhatsApp Onboarding Spec v0.2 (customer delivery kit)

    Turns the v0.1 spec into something a delivery engineer can actually run on a paying customer in one afternoon.

    Added

    • whatsapp-old-account-onboarding/scripts/bootstrap.sh: Interactive bootstrap that detects the environment, generates a PII salt, asks the customer-scenario questions (Business API vs Business App vs personal; iOS vs Android), walks through the extraction path, runs parser + extractor, and prints a verification report. Re-runnable via .bootstrap-state.
    • docs/CUSTOMER-DELIVERY-GUIDE.md + .zh-CN.md: Customer-delivery decision tree (paths A / B.iOS / B.Android / C), explicit expectation- alignment script for the kick-off call ("Business API has zero history"), per-customer deliverables checklist, and pricing reference points.
    • Bootstrap entry block added at the top of docs/README.md and docs/README.zh-CN.md so the one-command path is the first thing delivery staff see.

    Why this matters

    The most common pre-sales misconception is "we'll just hook up WhatsApp and the AI reads all my history". That's never true on Meta's official surface area. v0.2 makes that limitation visible in three places (sales script, kick-off doc, bootstrap output) so it never becomes a contract dispute.

    2026-05-21 — WhatsApp Legacy Account Onboarding Spec v0.1

    First-party spec for porting years of accumulated WhatsApp B2B sales conversations into AI-Agent-ready memory + style + history. Not an upstream OpenClaw cherry-pick — independent template extension.

    Added

    • whatsapp-old-account-onboarding/scripts/whatsapp-export-parser.py: iOS+Android dual-format parser for WhatsApp .txt exports. One-way PII redaction via salted SHA-256, 24h-gap session segmentation, media reference normalization.
    • whatsapp-old-account-onboarding/scripts/customer-profile-extractor.py: Batch customer-profile extractor running Claude Haiku 4.5. Outputs YAML suitable for MemOS upsert. Strict auto-onboard gate (red_flags present / relationship_score < 6 / unfinished_commitments > 2 → manual review queue).
    • docs/README.md: 8-step delivery SOP from export through shadow → whitelist → graduated rollout.
    • docs/OpenClaw-knowledge-base-import.md: KB ingestion design for sales_playbook (cross-customer style) and conversation_history (per-customer, hard-isolated by customer_hash).
    • docs/system-prompt-template.md: Production system prompt with three legacy-account identity strategies (transparent / soft / impersonation) and five pre-launch verification cases.
    • samples/example-customer-profile.yaml: Reference MemOS document shape.

    Notes

    • Layer A (MemOS) / Layer B (sales_playbook) / Layer C (conversation_history) are independent — Layer A alone delivers ~60% of the value if you want to ship in a week.
    • Runtime wiring into PulseAgent / OpenClaw MemOS and KB endpoints is left as a placeholder; see bulk-embed.py and MemOS upsert curl in README.

    2026-05-20 — OpenClaw v2026.5.19

    Improvements

    • Skills/CLI: openclaw skills install and openclaw skills update now support --global flag — installs a skill once for all agents on the node, eliminating per-workspace duplication in multi-agent deployments. Upstream: v2026.5.19
    • Docker: OPENCLAW_IMAGE_PIP_PACKAGES build argument added — install Python packages (pandas, pypdf2, ML libs) at container build time without custom base images. Upstream: v2026.5.19
    • Browser: openclaw browser evaluate --timeout-ms added for per-evaluation execution budgets; URL allowlist enforcement active for /act and /highlight routes — blocks off-scope navigation in browser automation. Upstream: v2026.5.19
    • QA-Lab: openclaw qa suite --runtime-parity-tier command with first-hour 20-turn and optional 100-turn parity scenarios; openclaw qa coverage --tools for tool fixture coverage reporting. Upstream: v2026.5.19
    • Gateway/Performance: Startup probe and resource-count costs attributed in restart traces; overlapped startup logging with channel sidecars for faster agent boot. Upstream: v2026.5.19
    • Deps: @openclaw/proxyline updated to 0.3.3. Upstream: v2026.5.19

    Fixes

    • WhatsApp: Forced document delivery for media sends now honored — product catalogs and PDFs arrive as downloadable files, not inline thumbnails. Upstream: v2026.5.19
    • Telegram: Forum topics no longer block sibling topic traffic — parallel lead conversations in different topics stay independent. Upstream: v2026.5.19
    • Telegram: Streamed reply previews preserved with tool-warning final messages. Upstream: v2026.5.19
    • Slack: Delivered inbound message IDs persisted — prevents duplicate reply sends under high-traffic conditions. Upstream: v2026.5.19
    • Discord: Streamed reply previews preserved with tool-warning final messages. Upstream: v2026.5.19
    • Stability: Port validation accepts values above 65535 (regression fix). Upstream: v2026.5.19
    • Stability: Memory search scan optimized — prevents multi-second Node.js main thread pins during semantic search. Upstream: v2026.5.19
    • Stability: Session rotation fixed when transcript files are missing on first boot. Upstream: v2026.5.19
    • Providers: DeepSeek MCP tool schemas normalized with anyOf/oneOf unions; Google Gemini tool-call thought signatures recovered during native replay; OpenAI deterministic tool payload ordering preserved for prompt-cache reuse. Upstream: v2026.5.19
    • Auth/Config: Gateway config writes no longer fail on unresolved auth-profile SecretRefs; CLI provider resume bindings cleared on non-subagent /reset. Upstream: v2026.5.19
    • Memory: QMD lexical search on raw hyphenated queries while normalizing semantic searches; incremental sync for missing/newer/resized files. Upstream: v2026.5.19

    2026-05-18 — OpenClaw v2026.5.18

    Improvements

    • Android/Voice: Talk Mode now routes through realtime Gateway relay voice sessions — streaming mic input and realtime audio playback on Android, matching desktop quality. Upstream: v2026.5.18
    • Telegram/Routing: Topic IDs preserved across requester-agent handoff — group forum conversations stay correctly threaded during lead qualification handoffs. Upstream: v2026.5.18
    • Telegram/Commands: /btw and read-only commands no longer abort active agent runs. Upstream: v2026.5.18
    • Telegram/Transport: HTTP 421 Misdirected Request retried on fallback transport — better delivery reliability on carrier-NAT and flaky mobile networks. Upstream: v2026.5.18
    • Telegram/Forum: Forum-topic origin preserved in delivery contexts — replies land in the correct topic thread. Upstream: v2026.5.18
    • Skills: Codex closeout review renamed to autoreview; meme-maker skill added with template search and rendering; Python pdb/remote-attach and Node inspector debugging skills added; spike workflow skill added. Upstream: v2026.5.18
    • Browser: Pending and recently handled modal dialogs surfaced in snapshots; blockedByDialog status added; browser dialog --dialog-id command for programmatic dialog handling — unblocks cookie-consent/login modal stalls in lead-capture flows. Upstream: v2026.5.18
    • Image: Sharp image processing with fallback chain to sips/ImageMagick/ffmpeg; image metadata probing no longer invokes external decoders unnecessarily. Upstream: v2026.5.18
    • Security: HTTPS managed forward-proxy endpoints with scoped CA trust supported — fixes SSL errors behind corporate proxies. Upstream: v2026.5.18
    • Security: Trusted admin HTTP RPC clients can now initiate WhatsApp QR login flows — enables headless channel provisioning without a physically present device. Upstream: v2026.5.18
    • Config: Per-agent code-mode config applied in schema and runtime catalog; ignored timeoutMs keys removed from agent-model config. Upstream: v2026.5.18
    • Infrastructure: OPENCLAW_IMAGE_APT_PACKAGES Docker/Podman build argument added for custom apt packages; Pi packages upgraded to 0.75.1, Node.js minimum raised to 22.19. Upstream: v2026.5.18
    • Mac: Settings pages redesigned with consistent card layouts; Dashboard/Chat/Canvas Dock shortcuts added; improved Gateway connection settings and sidebar visibility. Upstream: v2026.5.18
    • Providers: Updated support for OpenAI, Google Gemini, xAI, Xiaomi (MiMo), Together, Anthropic, GitHub Copilot, and Moonshot/Kimi. Upstream: v2026.5.18

    2026-05-14 — OpenClaw v2026.5.12

    Improvements

    • Deps/Install: Externalized WhatsApp (Baileys), Slack, Amazon Bedrock, and Anthropic Vertex dependencies — core installs only pull in active channel deps. Upstream: v2026.5.12
    • Deps/Install: pnpm upgraded to v11 with improved plugin install stability and peer-dependency preservation during updates. Upstream: v2026.5.12
    • Telegram/Polling: Isolated polling with durable local message spooling — inbound messages buffered to disk during network interruptions and drained in order on reconnect, eliminating silent message loss. Upstream: v2026.5.12
    • Telegram/Media: Safer group media handling — message ownership and attachment type validated before skill dispatch, preventing skill dispatch failures from unrecognized media types in group chats. Upstream: v2026.5.12
    • Telegram/Streaming: HTML/Markdown formatting preserved throughout streamed replies, not just the final chunk. Upstream: v2026.5.12
    • Telegram/Auth: Bot token rotation now reseeds polling state correctly; message sequencing fixed during high-load bursts. Upstream: v2026.5.12
    • Transcript: Peak transcript streaming memory reduced from +252 MB to +27 MB (−89%) for long sessions. Upstream: v2026.5.12
    • Security/Gateway: Command provenance validated at gateway boundary — untrusted-source commands rejected before reaching skill dispatch. Upstream: v2026.5.12
    • Security/Pairing: Device pairing requests now require explicit node-level approval; proxy-scoped access validated at binding time. Upstream: v2026.5.12
    • Security/Creds: Provider credential env vars read and validated at channel boot with stricter type checking; Slack no longer accepts malformed env var values. Upstream: v2026.5.12
    • Codex/OpenAI: Auth-profile-backed media tools — credentials resolved from active auth profile, fixing silent failures under non-default profiles. Upstream: v2026.5.12
    • Codex/OpenAI: Context-engine thread rotation and app-server/runtime fallback behavior improved; better MCP server projection for tool routing. Upstream: v2026.5.12
    • UI: Auto-scroll mode selector added to Control UI and WebChat; session history sequence preserved through live updates. Upstream: v2026.5.12
    • Windows: Credential path handling fixed for paths with spaces and non-ASCII characters. Upstream: v2026.5.12
    • Docker: Env var leakage between containers in multi-agent Docker Compose setups patched. Upstream: v2026.5.12
    • iMessage: Multiple reliability fixes. Upstream: v2026.5.12

    2026-05-07 — OpenClaw v2026.5.7

    Bug Fixes

    • WhatsApp/Routing: Baileys LID forward mapping now routes correctly in multi-device sessions — forward-mapped contacts were previously silently dropped in multi-SIM/multi-number deployments. Fixes #74925. Upstream: v2026.5.7
    • WhatsApp/Media: Single captioned media auto-reply now emits as one combined message instead of splitting into a bare caption + uncaptioned media file. Fixes #78770. Upstream: v2026.5.7
    • Telegram/Auth: accessGroup:* sender allowlists now enforced for DMs, group messages, and native commands — wildcard allowlists no longer silently pass unauthorized senders through to skill dispatch. Fixes #78660. Upstream: v2026.5.7
    • Native Commands: Owner enforcement honored for native command handlers, preventing non-owner callers from invoking privileged workflows. Fixes #78864. Upstream: v2026.5.7
    • Cron/CLI: Computed status field now included in cron list --json and cron show --json output, making cron pipeline monitoring fully scriptable. Fixes #78701. Upstream: v2026.5.7
    • Channels/CLI: openclaw channels list now shows channel-only entries by default; --all flag added to include bundled channels; state rendering and auth details moved to dedicated commands. Fixes #78456. Upstream: v2026.5.7
    • OpenAI: openai/chat-latest accepted as a valid API-key model override, routing to ChatGPT Instant. Upstream: v2026.5.7
    • Active Memory: Global memory toggles now require admin scope, preventing non-admin operators from wiping shared agent memory in multi-tenant deployments. Fixes #78863. Upstream: v2026.5.7
    • Auto-reply/Auth: Authorization hooks now gate skill tool dispatch for auto-reply flows. Fixes #78517. Upstream: v2026.5.7
    • Agents/Context: Cached context invalidated on history changes, preventing stale context in long multi-turn qualification sequences. Fixes #78163. Upstream: v2026.5.7
    • Agents/Compaction: Compaction summary reserve tokens clamped to each model's output limit, preventing silent failures or truncation on large summaries in extended conversations. Fixes #54392. Upstream: v2026.5.7
    • Gateway/Sessions: New transcript file generated on session rollover, preserving full audit trail. Fixes #78607. Upstream: v2026.5.7
    • Gateway/Sessions: Cached skills snapshots cleared during /new and sessions.reset. Fixes #78873. Upstream: v2026.5.7
    • Plugins/Publishing: Retry logic for transient ClawHub CLI dependency install failures; preview-passing plugins remain publishable when one preview cell flakes. Upstream: v2026.5.7
    • Plugins/Install: Consistent POSIX npm lifecycle shell usage across install, update, and uninstall operations. Upstream: v2026.5.7
    • Tavily: Dedicated tool credentials resolved from runtime config snapshots. Fixes #78610. Upstream: v2026.5.7
    • Discord/Message: Provider-prefixed target parsing fixed for channel sends. Fixes #78572. Upstream: v2026.5.7
    • Discord/Voice: Permission auditing in capabilities and status checks; enhanced capture smoothness with configurable silence grace period. Upstream: v2026.5.7
    • Telegram Polling: Watchdog tied to getUpdates liveness, preventing polling zombies on network interruption. Fixes #78422. Upstream: v2026.5.7
    • Telegram/Messages: Successful same-chat sends now treated as delivered. Fixes #78685. Upstream: v2026.5.7
    • Cron/Doctor: Persisted jobs with invalid payload.model values repaired. Fixes #78549. Upstream: v2026.5.7
    • Cron/Isolated Runs: Delivery fails before execution when target unavailable, preventing phantom run logs. Fixes #78608. Upstream: v2026.5.7
    • Doctor/Codex OAuth: Route recovery and preservation during updates. Fixes #78407. Upstream: v2026.5.7
    • Agents/Subagents: Session-mode registry honors archiveAfterMinutes. Fixes #78263. Upstream: v2026.5.7
    • Agent Delivery: Proper deliverySucceeded=false reporting. Fixes #78532. Upstream: v2026.5.7
    • Gateway/Tasks: Stale task reconciliation preventing reload blocking. Upstream: v2026.5.7
    • Plugins/Channel Setup: setChannelRuntime forwarded from external entries. Fixes #77799. Upstream: v2026.5.7
    • Commands/BTW: Brackets showing missing-question placeholder fixed. Upstream: v2026.5.7
    • Model Providers: APNG normalization, Gemini 3 signature preservation, legacy key acceptance, and sanitization repair. Upstream: v2026.5.7
    • Telegram/Models: Dot-containing provider ID parsing for callback buttons. Fixes #38745. Upstream: v2026.5.7
    • Codex/Approvals: Guardian hook removal, decision remembering, and validation improvements. Upstream: v2026.5.7

    2026-05-06 — OpenClaw v2026.5.6

    Bug Fixes

    • Doctor/OpenAI config: doctor --fix now preserves existing OpenAI routes — the legacy Codex route rewrite is excluded from the v2026.5.6 release branch, so valid OpenAI model configs are never overwritten unless a supported repair path explicitly applies. SDR deployments using custom OpenAI-compatible providers are safe to run doctor --fix without risk of route regression. Upstream: v2026.5.6
    • Plugins/runtime fetch: Third-party symbol metadata is stripped from plain request header dictionaries before they are passed into native fetch or Headers, so SDK and guarded/proxy fetch paths no longer reject otherwise valid plugin requests. Fixes #77846. Upstream: v2026.5.6 (thanks @shakkernerd)
    • Debug proxy: Captured fetch header dictionaries are normalized before request replay, so symbol metadata from caller-owned header objects cannot cause debug-proxy fetches to fail. Upstream: v2026.5.6
    • Web fetch/Gateway: Guarded dispatcher cleanup is now bounded after request timeouts — timed-out fetches return proper tool errors instead of leaving Gateway tool lanes permanently active. Fixes #78439. Upstream: v2026.5.6 (thanks @obviyus)

    2026-05-06 — OpenClaw v2026.5.5

    Highlights

    • WhatsApp: Reply-blocking stale TUI clients stopped correctly Only verified stale local TUI clients that degrade the Gateway event loop are now stopped; healthy Gateway traffic is unaffected. The /new//reset session-memory hook also runs off the reply path, so memory captures no longer block WhatsApp message delivery. For SDR agents handling hundreds of leads per day, both fixes recover measurable response-rate. Upstream: v2026.5.5

    • Feishu: Multi-turn topic sessions restored Missing native topic starter thread IDs are now hydrated before session routing, so the first turn and all follow-ups in a Feishu conversation stay in the same topic thread. Previously they scattered across disconnected sessions, silently fragmenting multi-turn qualification sequences. Fixes #78262. Upstream: v2026.5.5

    • Gateway/OpenAI-compatible: First-token streaming fixed The initial assistant-role SSE chunk is now flushed correctly, eliminating the race where cold agent startup left /v1/chat/completions clients with a bodyless 200 response until idle timeout. Custom frontends, Zapier hooks, and CRM integrations built on OpenClaw's OpenAI-compatible API now receive the first token immediately. Upstream: v2026.5.5

    • Docker security: NET_RAW/NET_ADMIN dropped + no-new-privileges The bundled docker-compose.yml now drops NET_RAW and NET_ADMIN capabilities and enables no-new-privileges for the gateway container, hardening production B2B SDR deployments in shared container infrastructure. Upstream: v2026.5.5

    Bug Fixes

    • Discord: Live reasoning text now shown in progress drafts; plain-text control commands (/steer etc.) routed through proper authorization gate instead of being silently dropped. Upstream: v2026.5.5 (fixes #78080)
    • LINE: dmPolicy: "open" configs without wildcard allowFrom now rejected at validation instead of silently blocking inbound DMs after acknowledgement. Upstream: v2026.5.5 (fixes #78316)
    • Telegram/Codex: Message-tool-only progress drafts stay visible; native Codex tool progress rendered once per tool without duplicate lines. Upstream: v2026.5.5 (fixes #75641)
    • Matrix/approvals: Approval delivery retried up to 3× with backoff on transient Matrix send failures, preventing stranded approval prompts. Upstream: v2026.5.5 (#78179)
    • Slack: Socket Mode SDK error context and structured Slack API fields now preserved in reconnect logs. Upstream: v2026.5.5
    • iOS pairing: Setup-code and manual ws:// connects allowed for private LAN/.local gateways; explicit gateway passwords preferred over stale bootstrap tokens. Fixes #47887. Upstream: v2026.5.5
    • Providers/xAI: OpenAI-style reasoning effort controls stripped from native Grok Responses models; bundled xAI thinking profile clamped to off, fixing Invalid reasoning effort on xai/grok-4.3. Upstream: v2026.5.5
    • Providers/Fireworks: Kimi K2.5/K2.6 models exposed as thinking-off-only with thinking: disabled; no unsupported reasoning* params sent. Upstream: v2026.5.5
    • Plugins/install: Managed npm plugin openclaw peer links re-asserted after every shared-root install/update/uninstall, preventing broken SDK resolution across plugins. Upstream: v2026.5.5
    • Plugins/update: Official plugins (Codex, Discord, WhatsApp, diagnostics) stay synced during host updates even when disabled or exact-pinned; corrupt managed plugin records tolerated. Upstream: v2026.5.5
    • Hooks/session-memory: Collision suffixes added to fallback memory filenames for same-minute /new//reset invocations, preserving SDR audit trail. Upstream: v2026.5.5
    • Control UI/sessions: Agent runtime shown as filterable column in Sessions table; session history redesigned with modern checkpoint cards. Upstream: v2026.5.5
    • Control UI/performance: Chat and channel tabs stay responsive during slow history payloads; partial channel status labelled. Upstream: v2026.5.5
    • TUI: Clean exit on terminal loss; session picker bounded to recent rows for fast startup; heartbeat sessions no longer restored as chat session. Upstream: v2026.5.5
    • Doctor/sessions: Heartbeat-poisoned main session store entries moved to recovery keys; doctor --fix can now repair agent:main:main heartbeat history. Upstream: v2026.5.5
    • Doctor/Codex: Legacy openai-codex/* routes repaired to canonical openai/* across models, fallbacks, hooks, and channel overrides. Upstream: v2026.5.5
    • Gateway/shutdown: Delayed post-ready maintenance cancelled on close; maintenance/cron suppressed after quick restarts, eliminating orphaned background timers. Upstream: v2026.5.5
    • Gateway/media: Media sidecar skipped for unrelated HTTP routes; non-media requests no longer pay media initialization cost. Upstream: v2026.5.5
    • CLI/sessions: Orphaned transcript, checkpoint, and trajectory artifacts pruned during sessions cleanup. Fixes #77608. Upstream: v2026.5.5
    • Auth profiles: Provider cooldown not applied on format-level rejections, so fallback profiles can still be tried on unsupported model names. Upstream: v2026.5.5
    • Exec approvals: Guarded copy fallback on Windows rename-overwrite rejection for exec-approvals.json. Fixes #77785. Upstream: v2026.5.5

    2026-05-05 — OpenClaw v2026.5.4

    Highlights

    • Google Meet/Voice: Gemini voice bridge with Twilio dial-in AI agents can now speak through Google Meet via Twilio dial-in, powered by the Gemini realtime voice bridge. Paced audio streaming, backpressure-aware buffering, and barge-in queue clearing give sales agents fluid, interruption-safe voice conversations in Meet calls. For SDR teams running voice prospecting workflows, this closes the loop on fully automated voice outreach without leaving Google Meet. Upstream: v2026.5.4 (#77064)

    New Features

    • WhatsApp: Explicit Newsletter/Channel outbound targets WhatsApp channel routing now supports explicit @newsletter targets for outbound message sends. Broadcast campaigns to WhatsApp channels and newsletters are now first-class, letting B2B SDR agents push product announcements, trade fair follow-ups, and promotions to subscriber audiences at scale. Upstream: v2026.5.4 (fixes #13417)

    • Slack: Rich Block Kit progress drafts Slack streaming gains streaming.progress.render: "rich" for Block Kit progress drafts backed by structured progress line data, with automatic line trimming when Block Kit limits are hit. Sales notification pipelines in Slack now render structured agent progress instead of plain text. Upstream: v2026.5.4

    • Models/auth: Inspect saved auth profiles New openclaw models auth list [--provider <id>] [--json] command lets operators audit saved per-agent auth profiles without exposing secrets. Useful for multi-agent B2B SDR deployments with separate credentials per channel or customer segment. Upstream: v2026.5.4

    • Plugins/SDK: before_agent_finalize retry instructions Workflow plugins can now request one additional model pass via bounded before_agent_finalize retry instructions. Enables more sophisticated multi-step SDR qualification flows that can re-consult the model before finalizing agent output. Upstream: v2026.5.4

    • Control UI/chat: Agent-first filter and responsive layout The chat session picker gains an agent-first filter, responsive layout across phone/tablet/desktop, and collapsed duplicate heartbeat messages. Control UI becomes more usable for SDR supervisors monitoring multiple live conversations from mobile. Upstream: v2026.5.4

    Performance

    • Agents: Workspace-scoped plugin metadata reuse Resolved workspace is now passed through BTW, compaction, embedded-run model generation, and PDF model setup, so agent-dir model refreshes reuse the current workspace-scoped plugin metadata snapshot instead of falling back to cold plugin metadata scans. Faster context switches in multi-agent SDR deployments. Upstream: v2026.5.4 (#77519, #77532)

    • Gateway startup: Deferred sidecars and fast-path bundled plugin metadata Non-readiness sidecars now defer until after the ready signal. Trusted bundled plugin metadata uses a fast path. Gateway startup benchmarks improve noticeably for containerized SDR deployments. Upstream: v2026.5.4

    • Prompt cache: Chat continuation cache reuse restored Per-turn runtime context is now kept out of ordinary chat system prompts while still delivering hidden current-turn context. Prompt-cache reuse on chat continuations is restored, reducing API costs for long-running SDR conversation threads. Upstream: v2026.5.4 (fixes #77431)

    Bug Fixes

    • WhatsApp/onboarding: Allowlist entries now canonicalized to digit-only phone IDs Setup and pairing allowlist entries are canonicalized to WhatsApp's digit-only phone IDs, so E.164, JID, and whatsapp: inputs reliably match WhatsApp Web sender IDs after onboarding. Upstream: v2026.5.4

    • Docker: macOS EACCES workspace path fix Container-side OPENCLAW_CONFIG_DIR and OPENCLAW_WORKSPACE_DIR are now pinned in Compose, preventing host-style workspace paths from leaking into runtime code and causing EACCES: permission denied, mkdir '/Users' on macOS Docker deployments. Upstream: v2026.5.4 (fixes #77436)

    • Agents/subagents: Long sub-agent reports no longer silently lost Prefix-only completion announce replies are now detected and fall back to the captured child result. Sub-agent reports are no longer silently truncated in multi-step SDR qualification flows. Upstream: v2026.5.4 (fixes #76412)

    • CLI/sessions: Bounded session list output openclaw sessions is now capped at 100 rows by default with --limit <n|all> and JSON pagination metadata. Large SDR session stores no longer cause unbounded output fan-out. Upstream: v2026.5.4 (fixes #77500)

    • Active Memory: Bounded memory search query Memory sub-agent search queries are now bounded so channel/runtime metadata does not become the search string. Recall quality in long SDR conversation threads improves. Upstream: v2026.5.4 (fixes #65309)

    • Discord: IPv4 preference for reliable startup Discord REST and gateway WebSocket startup now prefer IPv4, fixing stalls on IPv4-only networks that previously blocked Gateway READY and inbound message dispatch. Upstream: v2026.5.4 (fixes #77398)

    • Control UI/Talk: Realtime voice error recovery Failed Talk startup errors are now dismissable; stale Talk error state clears on dismiss; next Talk click retries from a failed session without a separate stop click. Upstream: v2026.5.4 (fixes #77071)

    • Telegram: Persistent interactive buttons in replies Shared interactive reply buttons now render in Telegram reply delivery, so plugin approval messages correctly show inline keyboards. Upstream: v2026.5.4 (#76238)

    Security

    • Browser/SSRF: Tab-scoped debug routes now enforce navigation policy Existing-session screenshots, snapshots, console, network request, trace, storage, and related tab-scoped debug routes now enforce the current-tab URL navigation policy before collection. Blocked tabs return a policy error rather than being read and redacted after the fact. Upstream: v2026.5.4 (#75731)

    • Windows: SystemRoot/WINDIR/LOCALAPPDATA/ComSpec hardening Multiple Windows security fixes: icacls.exe/whoami.exe resolution validated through Windows install root; reg.exe pinned to canonical install root; LOCALAPPDATA blocked from workspace .env; .cmd/.bat wrapper routed through install-root resolver. Workspace dotenv overrides can no longer redirect system binaries. Upstream: v2026.5.4 (#74458, #74454, #77470, #77472)

    • Exec approvals: env -S and exec carrier detection Approval explanations now detect env -S split-string command-carrier risks and POSIX exec inline-eval payloads, closing gaps where hidden payloads could bypass command risk checks. Upstream: v2026.5.4

    2026-05-04 — OpenClaw v2026.5.3-1 hotfix

    Bug Fixes

    • Plugins/security: Official bundled plugin packages no longer blocked by install scanner The plugin install scanner introduced in v2026.5.3 was triggering false positives when process.env access and normal API sends appeared in distant parts of the same compiled bundle — incorrectly flagging and blocking official bundled plugins (file-transfer, memory, web-search) during installation. v2026.5.3-1 corrects the bundle-aware pattern matching logic. Official plugins install cleanly; security enforcement against untrusted packages is unchanged. No config changes required — update the npm package and the fix applies. Upstream: v2026.5.3-1

    2026-05-04 — OpenClaw v2026.5.3 upstream sync

    Breaking Changes

    • Gateway: Invalid config fails closed on startup/hot-reload Gateway startup and hot reload no longer auto-restore invalid config. If your config has validation errors, the gateway now fails closed rather than recovering silently. Run openclaw doctor --fix after upgrading to repair legacy config automatically. This is the correct behavior for production deployments where silent misconfiguration is dangerous. Upstream: v2026.5.3

    • Tools deny list: apply_patch no longer implicitly denied The tools deny list no longer implicitly denies apply_patch. If you relied on implicit patch write blocking, you must now explicitly add apply_patch to your deny list. Audit your tool security profiles before upgrading if patch writes are a concern. Upstream: v2026.5.3

    New Features

    • File Transfer Plugin: Secure document delivery over AI SDR channels A new bundled File Transfer plugin adds file_fetch, dir_list, dir_fetch, and file_write tools for binary operations on paired nodes. Default-deny per-node path policy, symlink traversal controls, and a 16 MB per-round-trip ceiling make this a controlled, auditable document transfer layer built into the conversation runtime. For manufacturing, electronics, and textiles exporters where every inquiry involves spec sheets, MOQ tables, and compliance docs, AI SDR agents can now deliver documents inside the conversation without human escalation. Upstream: v2026.5.3

    • WhatsApp: Newsletter targets for broadcast outreach WhatsApp channel routing gains newsletter targets — the ability to broadcast messages to a defined contact list. Product launch announcements, trade show follow-ups, and seasonal promotions to distributor networks are now native capabilities without a separate broadcast tool. Works in tandem with the inbound reply dependency fix (@whiskeysockets/libsignal-node) also shipping in this release. Upstream: v2026.5.3

    • Session control: /steer and /side commands /steer <message> injects a steering message into the active session without starting a new turn — enabling SDR supervisors to adjust agent behavior mid-conversation without disrupting flow. /side (alias for /btw) handles side questions when idle without starting new turns. For human-in-the-loop escalation workflows, these commands make supervisor intervention cleaner. Upstream: v2026.5.3

    • Gateway performance: Lazy-loading of plugin discovery and session metadata Gateway startup now lazy-loads plugin discovery, cron, schema, and session metadata. Faster startup for container deployments that restart frequently; more responsive Control UI during high-load periods; optional tool factories skipped when blocked by deny lists, reducing hot-path overhead. Upstream: v2026.5.3

    • Plugin hardening: npm dependency reporting and official plugin install Official plugin installation, updates, and onboarding now behave like first-class package installs with improved npm dependency reporting. Manual setup can install optional official plugins with ClawHub-backed diagnostics. plugins list --json includes dependency install state. Upstream: v2026.5.3

    • Slack: Live transport QA runner with canary and mention-gating coverage Slack gains a live transport QA runner providing canary and mention-gating coverage. Delivery reliability is measurably verifiable for teams running Slack-based SDR workflows. Upstream: v2026.5.3

    Bug Fixes

    • WhatsApp: Fixed @whiskeysockets/libsignal-node dependency preventing inbound replies Resolved the dependency issue that was blocking inbound WhatsApp replies. Full inbound/outbound reliability restored. Upstream: v2026.5.3

    • Telegram: Forum-topic conversation IDs correctly handled in embedded recall runs Scoped Telegram forum-topic IDs are now properly handled in embedded recall runs and Active Memory. SDR agents operating in Telegram groups with forum topics work reliably. Upstream: v2026.5.3

    • Discord: Native typing cue sent immediately after DM acceptance Discord now sends the native typing indicator immediately after DM acceptance, improving responsiveness perception for prospects. Upstream: v2026.5.3

    • Matrix: Blank progress-draft messages avoided when progress labels disabled Matrix channel no longer sends blank draft messages when progress labels are disabled. Upstream: v2026.5.3

    • Gateway systemd: Operator-added secrets preserved across re-staging Operator-added secrets are preserved during re-staging while OpenClaw-managed keys are cleared. No more manual secret restoration after gateway re-stages. Upstream: v2026.5.3

    • Cron: Startup state persisted to prevent repeated health-check repairs Repaired startup state is now persisted, preventing repeated health-check repair cycles on startup. Upstream: v2026.5.3

    • Memory/LanceDB: apache-arrow declared as bundled peer dependency Eliminates dependency resolution issues for deployments using LanceDB-backed Active Memory. Upstream: v2026.5.3

    • Web fetch: Optional proxy support via useTrustedEnvProxy Operator-controlled environments can now route web fetch calls through a trusted proxy. Upstream: v2026.5.3

    • doctor --fix: Commits safe legacy migrations even with unrelated validation issues doctor --fix no longer aborts safe migrations when unrelated validation issues are present. Upstream: v2026.5.3


    2026-05-02 — OpenClaw v2026.5.2 upstream sync

    New Features

    • ClawHub: Plugin management with diagnostics and install records ClawHub's plugin management layer expands with diagnostics, install records, and npm-first dependency resolution. Plugin diagnostics surface installation failures and version conflicts before they cause silent runtime errors; install records give ops teams an audit trail of which plugin version was active during any conversation window; npm-first transitions ensure dependency trees resolve predictably across fresh deploys and Docker container restarts. For enterprise deployments running 20+ plugins (custom channel adapters, CRM integrations, webhook handlers), this closes the previous gap where plugin health was invisible between gateway restarts. Upstream: v2026.5.2

    • Session listing: Optimized for large stores Session listing operations for large stores are streamlined, and repeated plugin tool descriptor hashing is reduced. At 5,000+ concurrent prospect sessions, dashboard load times and session queries are significantly faster. Previously, listing operations degraded 3–4× at 5K sessions and risked query timeouts at 10K+; v2026.5.2 keeps listing near-baseline across all tested scales. Upstream: v2026.5.2

    • Web search: Improved Brave, SearXNG, and Firecrawl Brave Search, SearXNG, and Firecrawl web search integrations receive reliability and relevance upgrades. AI SDR agents that research prospects before outreach inject higher-quality context into first-touch messages. Upstream: v2026.5.2

    • Provider streaming: Anthropic, DeepSeek, and OpenAI-compatible TTS fixes Anthropic streaming fixes an edge-case stream interruption during long generation; DeepSeek replay resolves multi-turn conversation misalignment; OpenAI-compatible TTS/Realtime improves voice-call routing for call-center SDR workflows. Upstream: v2026.5.2

    Bug Fixes

    • WhatsApp: Improved targeting and segment routing WhatsApp channel routing receives targeted fixes improving message delivery reliability to specific contact segments. Fewer messages routed to wrong conversation threads; more consistent delivery across large contact lists. Works in tandem with v2026.4.29's People Memory for more reliable multi-segment outbound sequences. Upstream: v2026.5.2

    • Telegram: Slash-command feedback and session handling Slash-command feedback is more reliable; session handling for high-traffic Telegram groups is more stable. Upstream: v2026.5.2

    • Gateway and startup: Leaner plugin loading and runtime config Gateway and agent startup paths are leaner across plugin loading and runtime configs. Filesystem guards and large runtime config handling are optimized. Upstream: v2026.5.2

    • Control UI: Session, Cron, and WebSocket resilience Control UI resilience improved for Sessions, Cron, and WebSocket connections. Upstream: v2026.5.2


    2026-05-01 — OpenClaw v2026.4.29 upstream sync

    Breaking Changes

    • Tool security: explicit alsoAllow required Configured tool sections no longer implicitly widen restrictive security profiles. Any tool-access expansion beyond a restrictive profile now requires an explicit alsoAllow entry in configuration. If you have custom tool-profile configurations relying on implicit widening, audit and add explicit entries before upgrading — implicit expansions now fail closed. This is the correct default for enterprise deployments where tool scope must be auditable and traceable. Upstream: v2026.4.29

    New Features

    • Memory/wiki: People-aware knowledge base with relationship graphs The Memory system now maintains a structured people wiki alongside conversation memory. Each contact your AI SDR interacts with gets a person card (name, role, company, decision-making authority), canonical aliases deduplicated across channels (the same person on WhatsApp/Telegram/email merges into one record), relationship graphs mapping org structure and procurement chains, and provenance views tracing which conversations produced which facts. For B2B export teams, relationship graphs unlock org-structure reasoning: "Liu Wei is the procurement manager who reports to Director Zhang, who signed the last PO." That's the context that moves deals — previously only experienced sales reps carried it; now the AI does automatically. Upstream: v2026.4.29

    • Active Memory: Per-conversation channel filters Optional allowedChatIds and deniedChatIds per-conversation filters let you wall off memory context by channel or contact group. Keep enterprise account memory separate from SMB prospect pools, or enforce GDPR data-separation between regional deployments, without additional infrastructure. Upstream: v2026.4.29

    • Agents/commitments: Opt-in follow-up commitment system with heartbeat delivery When your AI SDR commits to a follow-up during a conversation ("I'll send the spec sheet tomorrow"), the commitment is now automatically detected, persisted, and delivered on schedule via heartbeat. Hidden batched extraction means zero UX friction on the conversation side; per-agent and per-channel scoping keeps WhatsApp and Telegram follow-up queues separate. This transforms the agent from a reactive chat interface into a proactive account manager that keeps its word without human hand-holding. Upstream: v2026.4.29

    • Providers/NVIDIA: New bundled inference provider NVIDIA joins as a bundled provider plugin with API-key onboarding and a static model catalog. Enables high-throughput inference for pipelines processing 1,000+ daily conversations, and — combined with v2026.4.27's Docker GPU passthrough — completes the story for fully air-gapped, on-premise AI SDR deployment on NVIDIA hardware. Use the NVIDIA cloud API with just an API key, or route through your own on-premise NVIDIA GPUs via Docker. Upstream: v2026.4.29

    • Docker: OPENCLAW_SKIP_ONBOARDING for automated installs New environment variable bypasses the interactive onboarding wizard, making Docker-based enterprise deployments fully scriptable for CI/CD pipelines and infrastructure-as-code workflows. Set OPENCLAW_SKIP_ONBOARDING=1 in your Compose or Kubernetes manifest to deploy without any interactive prompts. Upstream: v2026.4.29

    • Localization: 6 new locales Persian (Farsi), Dutch, Vietnamese, Italian, Arabic, and Thai join the locale registry. B2B export teams can now operate natively in buyer languages across GCC/MENA (Arabic), Southeast Asia (Vietnamese, Thai), EU (Dutch, Italian), and Central Asia (Persian) markets without additional localization work on your end. Upstream: v2026.4.29

    • Messages/queue: Active-run queueing defaults to steer mode Message queue now defaults to steer with a 500ms followup fallback debounce, improving responsiveness in high-velocity conversation threads while preventing message storms during rapid back-and-forth exchanges. Upstream: v2026.4.29

    • Gateway diagnostics: Startup timeline recording Opt-in startup diagnostics now record a gateway lifecycle timeline covering plugin-load phases and event-loop readiness. Faster operational root-cause analysis when the Gateway is slow to accept connections — essential for debugging cold-start performance in large plugin collections (20+ plugins). Upstream: v2026.4.29

    Fixed

    • WhatsApp: Improved delivery confirmation and liveness checking — fewer silent failures when WhatsApp Web connectivity degrades during high-volume outbound sequences
    • Telegram: Long-polling client timeout fixes and improved message-edit durability for streaming — more reliable for broadcast sequences and real-time reply flows
    • Slack: Bot-authored messages with allowBots=true now require explicit channel allowlisting (security hardening — prevents unintended bot-to-bot relay in shared workspaces)
    • OpenAI Codex: Preserved wrapped streams during OAuth bearer injection; restored openai-codex/gpt-5.4-mini for ChatGPT/Codex OAuth runs
    • Agents/subagents: Bounded automatic orphan recovery with persisted tombstones prevents runaway orphaned sub-agent threads from consuming resources
    • Security: Timing-safe credential byte comparison for password checks; HTML tag stripping during plain-text sanitization
    • Gateway/systemd: Exit with sysexits 78 for supervised lock conflicts (cleaner process supervision) Upstream: v2026.4.29

    2026-04-30 — OpenClaw v2026.4.27 upstream sync

    New Features

    • DeepInfra: New bundled AI provider DeepInfra joins as a bundled provider plugin with model discovery and media generation capabilities. For B2B SDR pipelines, DeepInfra's GPU-cluster inference offers a cost-efficient path to running large models at scale — important for deployments processing thousands of daily conversations where provider API costs are a key unit-economics driver. Access open-weight models (Llama-3, Mistral) alongside proprietary options without additional infrastructure. Upstream: v2026.4.27

    • Memory search: Bounded top-K results & streaming support Lead memory retrieval now enforces a configurable maximum result count (bounded top-K), preventing oversized context injection from large lead databases that degraded response quality and inflated token costs. Memory loading also now streams results progressively rather than blocking, reducing perceived latency for agents with rich lead histories (100+ touchpoints) and allowing response generation to begin while memory loads in the background. Upstream: v2026.4.27

    • Codex Computer Use: Status/install commands with marketplace discovery Codex Computer Use gains status and install commands with ClawHub marketplace discovery and fail-closed MCP checks. For advanced SDR automation scenarios, this enables agent-driven tool installation and environment verification — useful for teams running OpenClaw on CI/CD pipelines or remote worker fleets where the full agent stack must be verified before routing production traffic. Upstream: v2026.4.27

    • Docker sandbox: GPU passthrough via sandbox.docker.gpus Docker-based deployments can now pass GPU resources into the sandbox container via the sandbox.docker.gpus configuration key. Enables on-premise LLM inference, TTS/STT models, and media generation to run directly within the OpenClaw sandbox — the key path to fully air-gapped AI SDR deployments for enterprises with strict data residency requirements. Upstream: v2026.4.27

    • Operator proxy: Managed outbound routing with strict validation Operator-managed outbound proxy routing with strict validation allows all agent traffic — API calls, webhook deliveries, channel messages — to route through a designated corporate proxy. With strict: true, any connection that cannot route through the proxy fails closed. Essential for regulated-market deployments (financial services, healthcare, government) where all outbound traffic must traverse a compliance inspection layer. Upstream: v2026.4.27

    • QQBot + Tencent Yuanbao: Expanded channel support Building on v2026.4.26's QQBot group chat debut, this release expands Tencent Yuanbao and QQBot channel support with additional group functionality and stability improvements. China-market B2B teams operating at scale on Tencent's platforms get a more robust and reliable channel layer. Upstream: v2026.4.27

    Fixed

    • Plugin startup now uses manifest-first metadata, reducing Gateway boot overhead for large plugin collections (20+ plugins)
    • Sensitive tokens and API keys now comprehensively redacted across all logging systems — no credential exposure in log aggregation platforms
    • Matrix approval scenarios: live metadata and chunked fallback improve E2EE channel reliability
    • Plugin SDK testing surfaces reorganized into focused, documented subpaths for improved developer experience Upstream: v2026.4.27

    2026-04-28 — OpenClaw v2026.4.26 upstream sync

    New Features

    • QQBot: Full group chat support QQBot gains comprehensive group chat capabilities: conversation history tracking across sessions, @-mention gating so the bot only activates when addressed, configurable activation modes (mention-only, keyword, always-on) per group, per-group ICP and persona configuration, and a FIFO message queue for high-volume environments. C2C streaming is also supported for one-on-one QQ conversations. For B2B export teams selling into China, this brings the AI SDR natively into Q-groups — the primary procurement communication channel for Chinese enterprise buyers. Upstream: v2026.4.26

    • Tencent Yuanbao: New external channel plugin A Tencent Yuanbao external channel plugin registers with WebSocket bot functionality, enabling AI SDR presence in China's enterprise AI assistant platform. As Yuanbao adoption grows among Chinese corporations for internal collaboration and vendor communication, this channel puts your agent at the AI-first workflow layer — before prospects open a browser to search for suppliers. Upstream: v2026.4.26

    • Control UI/Talk: Google Live browser realtime voice sessions A generic browser realtime transport contract enables Google Live browser Talk sessions with constrained ephemeral tokens and Gateway relay support for backend-only realtime voice plugins. No server-side WebRTC infrastructure required; the Gateway relays audio to your backend voice model while short-lived tokens prevent credential leakage. Complements the v2026.4.24 Google Meet plugin for full voice-AI coverage across calls and browsers. Upstream: v2026.4.26

    • CLI: openclaw migrate — scriptable enterprise migrations A new openclaw migrate command makes configuration and data migrations safe, auditable, and CI/CD-friendly: --plan previews every migration step and impact, --dry-run --json produces machine-readable output for approval workflows, --backup creates an automatic pre-migration state snapshot, and onboarding detection skips inapplicable migrations on fresh installs. Enterprise teams managing dev/staging/production environments now have a reliable, zero-downtime upgrade primitive. Upstream: v2026.4.26

    • Providers: Cerebras bundled plugin Cerebras joins as a bundled provider plugin with full onboarding flow, a static model catalog, and documentation. WSE-3-based inference delivers sub-second latency for large context windows — beneficial for high-volume SDR pipelines (1,000+ conversations/day) where response time directly affects conversation quality and lead qualification pace. Upstream: v2026.4.26

    • Memory: Asymmetric embedding endpoints & Ollama query prefixes OpenAI-compatible memory now supports separate endpoints and input-type configuration for query vs. document embeddings, enabling asymmetric embedding models (Cohere, Jina, Voyage) to use their full retrieval capabilities. Ollama memory adds model-specific retrieval query prefixes for instruction-tuned embedding models. Both improvements increase lead-to-memory match rates without new infrastructure or API keys. Upstream: v2026.4.26

    • Startup optimization: Deferred initialization & schema memoization QMD, CLI handlers, and plugin HTTP routes now initialize lazily at startup. Plugin schema compilation is memoized across the session. Enterprise deployments with 20+ plugins see meaningfully faster cold-start times. Upstream: v2026.4.26

    Fixed

    • WhatsApp proxy support — deploy behind corporate proxies in regulated-market enterprise environments
    • Discord model-picker persistence — channel model selection now survives agent restarts
    • Mattermost DM routing — direct messages now route correctly to the assigned agent
    • LSP process cleanup — language server processes no longer linger after agent shutdown, preventing memory leaks in long-running deployments
    • Plugin discovery with symlinks — monorepo-style symlinked plugin installs now discovered reliably
    • Windows path normalization — ESM loader path handling fixed for Windows-hosted deployments
    • Docker CA certificate bundle — automatic TLS CA installation in Docker images fixes verification failures in enterprise network environments
    • Matrix E2EE improvements — end-to-end encryption reliability in Matrix channel Upstream: v2026.4.26

    2026-04-27 — OpenClaw v2026.4.25 upstream sync

    New Features

    • Full TTS/Voice upgrade: /tts latest, session controls & 6 new providers Voice replies receive a comprehensive overhaul: /tts latest pins the most capable model for a provider, session-scoped auto-TTS toggles remember your preference across turns, and per-agent/per-account TTS persona overrides let different agents speak with different voices. Six new providers land: Azure Speech, Xiaomi, Local CLI, Inworld, Volcengine, and ElevenLabs v3 (with expanded voice library and improved prosody). For SDR teams running voice follow-up sequences or real-time call assistance, this means global-quality voice across every market. Upstream: v2026.4.25

    • Plugin registry: cold-persisted startup and install paths Plugin startup and install paths move to the cold persisted registry, eliminating broad manifest scans at every launch. Plugin update, repair, provider discovery, and install metadata are now fully deterministic. High-volume deployments that load dozens of plugins see meaningfully faster cold-start times. Upstream: v2026.4.25

    • OpenTelemetry observability: model calls, token usage, tool loops & process spans OTel coverage expands across model calls, token usage, tool loops, harness runs, and process execution — all with bounded low-cardinality attributes for efficient backend indexing. SDR pipeline SLAs (response time, tool-call depth, token spend) are now traceable in Grafana, Datadog, or any OTel-compatible backend without custom instrumentation. Upstream: v2026.4.25

    • Browser automation: iframe-aware snapshots & CDP readiness Role snapshots are now iframe-aware, capturing the full accessibility tree inside embedded frames — critical for CRM portals and SaaS lead tools that render key UI inside iframes. Chrome Discovery Protocol (CDP) readiness checks are adjusted for reliability, and tab URL safety prevents accidental navigation away from active automation targets. Upstream: v2026.4.25

    • Control UI: PWA and Web Push support The OpenClaw control interface can now be installed as a Progressive Web App with Web Push notifications, giving sales teams instant alerts for inbound lead messages without keeping a browser tab open. Upstream: v2026.4.25

    • Installation hardening across Windows, macOS, Linux & Docker Install and update flows receive cross-platform reliability improvements. Bundled plugin skill copy now runs consistently across OS environments, reducing first-run failures for teams self-hosting on diverse infrastructure. Upstream: v2026.4.25

    Fixed

    • 200+ bug fixes spanning TTS providers, plugin diagnostics, browser automation, channel integrations (Discord, Telegram), cron job scheduling, and media handling. Upstream: v2026.4.25

    2026-04-25 — OpenClaw v2026.4.24 upstream sync

    Breaking change for plugin authors: The Pi-only api.registerEmbeddedExtensionFactory(...) compatibility path has been removed. Custom tool-result transforms must now use api.registerAgentToolResultMiddleware(...) with a contracts.agentToolResultMiddleware declaration that names the targeted harnesses. Update any custom plugins before upgrading.

    New Features

    • Google Meet bundled participant plugin OpenClaw ships a first-class Google Meet plugin: personal Google auth, explicit meeting URL joins, Chrome and Twilio realtime transports, chrome-node support for Parallels/VM environments, and recover_current_tab/recover-tab for re-attaching to open meetings. SDR teams can now have the AI present in every discovery call and demo — answering product questions, logging objections, and drafting follow-up notes while the conversation is live. Upstream: v2026.4.24

    • Realtime voice AI during live calls and meetings Talk, Voice Call, and Google Meet now share an openclaw_agent_consult realtime tool: the AI can pull in your full OpenClaw agent (tools, memory, CRM data) mid-call to answer a hard question without putting the prospect on hold. Gateway VoiceClaw adds a new Gemini Live WebSocket backend with owner-auth gating. Paired with voicecall setup and dry-run voicecall smoke commands for one-step provider readiness checks. Upstream: v2026.4.24

    • DeepSeek V4 Flash confirmed as onboarding default V4 Flash is now set as the default model for new users in the bundled catalog. For existing deployments, deepseek-v4-flash and deepseek-v4-pro remain available as explicit selections in openclaw.json. A previous thinking/replay bug where follow-up tool-call turns lost reasoning_content placeholders is fixed — V4 reasoning chains are now reliable across multi-turn SDR workflows. Upstream: v2026.4.24

    • Browser automation: coordinate clicks, longer action budgets, per-profile headless openclaw browser click-coords adds viewport-coordinate clicks for managed and existing-session automation. browser.actionTimeoutMs (default 60 s) prevents healthy long-running browser waits from failing at transport boundaries. browser.profiles.<name>.headless lets you run one profile headless for background research while keeping another visible for demos. ~ now expands correctly in browser.executablePath. Upstream: v2026.4.24

    • WeCom channel source pinned for Chinese-market reliability The official external WeCom channel source is now pinned to an exact npm release with dist-integrity checking, guarding against unpinned upstream drift. For B2B export teams relying on WeCom for enterprise customer conversations, this means predictable, auditable plugin versions across every deployment. Upstream: v2026.4.24

    • Gemini Live realtime voice provider New backend for Voice Call and Google Meet audio bridges: bidirectional audio, function-call support, and Gemini TTS enhancement with configurable audioProfile and speakerName for consistent voice branding across calls. Upstream: v2026.4.24

    • Google Meet conference records: artifacts, attendance, and history Meeting records now support artifact and attendance workflows — markdown/file output, latest-record lookup, and --all-conference-records for scanning meeting history. Post-call follow-up notes can be auto-generated and linked to the CRM record. Upstream: v2026.4.24

    • OpenRouter TTS provider New OpenRouter text-to-speech provider using an OpenAI-compatible /audio/speech endpoint with OPENROUTER_API_KEY. Expands voice note and telephony output options for SDR voice follow-up sequences. Upstream: v2026.4.24

    • OTEL observability: run, model-call, and tool spans Structured OpenTelemetry spans now cover runs, model calls, and tool executions — with timing, redacted error metadata, and opt-in content capture via diagnostics.otel.captureContent. Enables monitoring SDR pipeline SLAs in Grafana, Datadog, or any OTEL backend. Upstream: v2026.4.24

    • Context injection control for fully owned agent prompts agents.defaults.contextInjection: "never" disables workspace bootstrap file injection for agents that own their full prompt lifecycle. Useful for specialized sub-agents (qualifier, closer) that should not inherit the parent's workspace context files. Upstream: v2026.4.24

    • Bonjour LAN Gateway discovery as default-enabled bundled plugin LAN Gateway advertising moved to a default-enabled bundled plugin with its own @homebridge/ciao dependency. Users who don't need Bonjour can disable it without affecting wide-area discovery. Upstream: v2026.4.24

    • Plugin Compatibility Registry Central registry added for SDK/config/setup/runtime deprecation records with dated migration metadata. Easier to audit which plugins need updates before a platform upgrade. Upstream: v2026.4.24

    Fixed

    • Critical: Heartbeat prompt injection into normal runs The heartbeat system was injecting its prompt into non-heartbeat runs, causing ordinary SDR replies to be suppressed as HEARTBEAT_OK. This is fixed. Heartbeat prompts, HEARTBEAT_OK acknowledgments, and runtime context turns are now hidden from visible history. Upstream: v2026.4.24

    • MCP session management: one-shot runtimes and idle eviction One-shot embedded bundled MCP runtimes now retire at run end. New mcp.sessionIdleTtlMs idle eviction cleans up leaked sessions. Startup skipped when runtime tool allowlist cannot reach bundle-MCP tools. Upstream: v2026.4.24

    • Browser profile startup: stale Chromium lock recovery and launch deduplication Stale Singleton* locks left by crashes are now cleared and retried. Concurrent lazy-start calls per profile are deduplicated, preventing duplicate Chrome launches and PortInUseError. Upstream: v2026.4.24

    • Scheduler delay overflow Oversized scheduler delays clamped through a shared safe-timer helper, preventing Node.js timeout cap overflows that could cause scheduled SDR tasks (cron jobs) to fire immediately or never. Upstream: v2026.4.24

    • WhatsApp: media delivery in tool-result replies, voice note transcription, group system prompts Media generated by tool-result replies is now delivered correctly. Voice notes are transcribed before agent dispatch while keeping transcripts out of command authorization. Setting systemPrompt: "" on a specific groups.<id> now correctly suppresses the wildcard prompt. Upstream: v2026.4.24

    • Telegram: polling persistence across restarts, model display names, forum-topic config Accepted update offsets are persisted before handlers complete, preventing replay on restart. Configured model display names now show in provider buttons. Generated schema metadata is included in packaged manifests for forum-topic/group config. Upstream: v2026.4.24

    • Slack: thread ordering, broadcast events, approval buttons, file downloads Multi-part block deliveries stay in the first reply thread when replyToMode is first. thread_broadcast events are now processed as user messages reaching agents. Native button clicks are resolved through Gateway preserving retry buttons. Non-image file downloads return local paths with file IDs. Upstream: v2026.4.24

    • MCP Gateway security: owner-only tool policy on 127.0.0.1/mcp tools/list and tools/call now enforce owner-only tool policy and run before-tool-call hooks, preventing non-owner bearer tokens from accessing owner-only tools. Upstream: v2026.4.24

    • DeepSeek V4 thinking replay on follow-up tool-call turns Missing reasoning_content placeholders added for replayed assistant tool-call turns when V4 thinking is enabled. Multi-turn SDR workflows using DeepSeek reasoning no longer lose context between turns. Upstream: v2026.4.24

    • Agent failover: abort signals and non-retryable 429 responses Embedded run abort signals are forwarded into provider streams with implicit watchdog caps. Non-retryable 429 responses no longer spin the retry loop. Upstream: v2026.4.24

    • Session store rotation: crash-safe sessions.json rewrite Oversized sessions.json is copied to a rotation backup before atomic rewrite, preventing crash-induced session mapping loss. Upstream: v2026.4.24

    • Matrix cross-signing: full identity trust required Full cross-signing identity trust is now required for self-device verification. openclaw matrix verify self added for CLI-initiated verification. Upstream: v2026.4.24

    2026-04-24 — OpenClaw v2026.4.23 upstream sync

    New Features

    • OpenAI image generation + reference-image editing via Codex OAuth OpenAI provider now supports image generation and reference-image editing through Codex OAuth. SDR teams can generate on-brand product visuals and edit reference images directly within agent workflows — no separate image tool or API key juggling required. Upstream: v2026.4.23

    • OpenRouter image generation + reference-image editing Same image generation and reference-image editing capability extended to OpenRouter models, with provider-supported quality and output format hints. Unlocks a broader model roster for visual content in outreach sequences. Upstream: v2026.4.23

    • Subagent forked context for native sessions Agents can now launch subagents with forked context in native sessions, with prompt guidance and inline documentation. Enables multi-step SDR workflows where a qualifier subagent hands off context to a closer subagent — each with its own memory slice — without sharing a single conversation thread. Upstream: v2026.4.23

    • Per-call timeoutMs for image, video, music, and TTS generation Individual tool calls for generative media (image, video, music, TTS) can now carry an explicit timeoutMs. SDR pipelines that generate voice previews or product images mid-conversation can set tight SLA budgets per call without a global timeout affecting all tools. Upstream: v2026.4.23

    • Configurable local embedding context size (default 4096) Local embedding providers now accept a configurable context size, defaulting to 4096 tokens. Teams running OpenClaw on constrained VPS or edge hosts can reduce memory pressure without switching to a cloud embedding provider. Upstream: v2026.4.23

    • GPT-5.5 catalog metadata via Pi 0.70.0 Dependencies updated to Pi 0.70.0, adding GPT-5.5 model catalog metadata. GPT-5.5 is now selectable as an agent model without manual catalog patching. Upstream: v2026.4.23

    Fixed

    • 89 distinct fixes across all major subsystems including:
      • Codex harness routing and context-engine assembly
      • WhatsApp, Telegram, Discord, and Slack integration stability
      • Transcript replay and media handling
      • Security hardening across authentication, permissions, and data handling
      • Plugin startup and dependency resolution
      • Gateway session management and WebChat error surfacing
      • Memory indexing and local embedding provider declaration
      • Provider routing for OpenAI, OpenRouter, and Google services Upstream: v2026.4.23

    2026-04-24 — DeepSeek V4 (Flash + Pro) catalog support

    New Features

    • DeepSeek V4 catalog entries: deepseek-v4-flash and deepseek-v4-pro added to `providers.deepseek
  • b2b-sdr-agent-template/CHANGELOG.md.localtext · 4.2 KB
    # Changelog
    
    All notable changes to this project will be documented in this file.
    
    The format is based on [Keep a Changelog](https://keepachangelog.com/).
    
    ## [Unreleased]
    
    ### Adapted from openclaw v2026.4.11
    - **Microsoft Teams**: Delegated OAuth setup for Teams channels — enterprise 365 tenants can now authenticate via user SSO instead of service accounts; added Graph pagination for large reaction/message batches
    - **Feishu channel**: Added Feishu to multi-channel orchestration matrix for Mainland China / Southeast Asia B2B markets; improved document comment session context parsing, comment reactions, and typing feedback
    - **Plugin auth descriptors**: Plugin manifests now declare activation and setup descriptors, enabling guided auth/config flows for CRM and SDR plugins (HubSpot, Airtable, Notion connectors)
    - **Webchat rich output**: Control UI renders media/reply/voice directives as structured chat bubbles; `[embed …]` rich output tag supported (requires `allow_external_embeds: true`); external embed URLs gated behind config
    
    ### Adapted from openclaw v2026.4.11 (Fixes)
    - Codex OAuth scope rewriting fix (affects GPT-5/GPT-5.4 users)
    - WhatsApp account configuration edge case on fresh installs
    - Telegram session topic initialization fix for group SDR bots
    
    ### Added
    - CONTRIBUTING.md, SECURITY.md, CHANGELOG.md for open-source best practices
    - Negotiation authorization matrix in AGENTS.md (price/MOQ/delivery/sample limits)
    - Quote lock timeout mechanism (2h with escalation)
    - Cross-channel lead deduplication in Stage 1
    - Memory fallback chain (graceful degradation when L1/L3/Supermemory unavailable)
    - GDPR/data privacy compliance rules in SOUL.md
    - Sanctions compliance warnings for restricted markets (Iran, Cuba, DPRK, Syria)
    - Missing timezones: China, Japan/Korea, Australia, North America
    - JSON validation (`jq empty`) after config generation
    - Config backup before deployment (rollback support)
    - Port exhaustion detection in ip-isolate.sh
    - CRM snapshot now accepts actual pipeline data (not just a marker)
    - Search scan limit (MAX_SCAN=10000) to prevent O(N) explosion
    - 4-Layer Anti-Amnesia section synced to all 7 translated READMEs
    - Control Dashboard, WhatsApp Config, IP Isolation sections synced to all translations
    
    ### Fixed
    - `sm.mjs`: `await` in sync function `forgetMemory()` — runtime crash
    - `ANTI-AMNESIA.md`: `customer_id` undefined in `execute_compaction()` 
    - `ANTI-AMNESIA.md`: MemOS API key not validated at startup
    - `ip-isolate.sh`: TENANT_NAME command injection vulnerability
    - `ip-isolate.sh`: Password file not securely erased (now uses `shred`)
    - `generate-config.sh`: Gateway token leaked to stdout
    - `deploy.sh`: Gateway token partially leaked in deploy summary
    - `deploy.sh`: `--dry-run` only worked as 2nd argument
    - `deploy.sh`: Step numbering inconsistency (was 1/7...7/8, now consistent 1/8...8/8)
    - `deploy.sh`: JSON token extraction uses `jq` when available (fallback to grep)
    - `chroma.mjs`: `sanitize()` path traversal — tightened to `[a-zA-Z0-9_]` only
    - `TOOLS.md`: Gateway token and API key paths removed from agent-readable context
    - `catalog.json`: prod-003 missing `specs`, `certifications`, `target_markets`
    - `info.json`: Field names aligned with catalog.json (`specifications` → `specs`, `power_supply` → `power`)
    - `IDENTITY.md` vs `AGENTS.md`: hot_lead criteria now consistent (BANT ≥ 3/4 AND ICP ≥ 7)
    - Cron job count unified to 13 across all READMEs, LAUNCH-CONTENT.md, social-preview.html
    - `skill-profiles.sh`: Unknown profile now warns instead of silently falling back
    
    ### Changed
    - Prompt injection defense upgraded from keyword blacklist to semantic + multilingual detection
    - `supermemory` search function now clearly documented as keyword-based (not vector)
    
    ## [1.0.0] - 2026-03-30
    
    ### Added
    - Initial release
    - 7-layer context architecture (IDENTITY, SOUL, AGENTS, USER, HEARTBEAT, MEMORY, TOOLS)
    - 4-layer anti-amnesia memory system
    - 13 automated heartbeat inspections
    - Multi-channel support: WhatsApp, Telegram, Email
    - One-click deployment script
    - WhatsApp IP isolation (per-tenant WARP proxy)
    - 7 pre-built skills
    - 4 skill profiles (b2b_trade, lite, social, full)
    - 3 industry examples (heavy vehicles, electronics, textiles)
    - 8 language README translations
    
  • b2b-sdr-agent-template/CLAUDE.mdmarkdown · 0.2 KB

    本仓库的权威协作守则是 AGENTS.md;当前任务状态见 docs/HANDOFF.md。 开始任何工作前请先阅读这两个文件,并遵守其中的"接续三步 / 收尾三件套"协议。

  • b2b-sdr-agent-template/CONTRIBUTING.mdmarkdown · 2.2 KB

    Contributing to B2B SDR Agent Template

    Thanks for your interest in contributing! This guide will help you get started.

    How to Contribute

    Reporting Bugs

    Open a GitHub Issue with:

    • Steps to reproduce
    • Expected vs actual behavior
    • Your environment (OS, Node.js version, OpenClaw version)

    Suggesting Features

    Open an issue with the enhancement label. Describe your use case and why it would benefit B2B export businesses.

    Submitting Changes

    1. Fork the repository
    2. Create a feature branch: git checkout -b feature/your-feature
    3. Make your changes
    4. Run the template validation: npm test
    5. Test with at least one industry example (examples/) when changing workspace prompts or product data
    6. Commit with a clear message: git commit -m "feat: add FOB calculator to quotation-generator"
    7. Push and open a Pull Request

    Code Style

    • Shell scripts: Follow existing style, use set -euo pipefail, quote all variables
    • Markdown workspace files: Keep instructions clear and actionable for AI agents
    • JSON configs: Validate with jq before committing
    • Skills (Node.js): ESM modules, no external dependencies unless necessary

    Commit Messages

    Use Conventional Commits:

    • feat: New feature
    • fix: Bug fix
    • docs: Documentation
    • refactor: Code change that neither fixes a bug nor adds a feature
    • security: Security improvement

    What We're Looking For

    • New industry examples (beyond heavy vehicles, electronics, textiles)
    • Skill improvements (better memory, smarter lead scoring)
    • Deployment hardening (rollback, health checks)
    • Translation improvements
    • Security enhancements

    Development Setup

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # Test deployment (dry-run)
    cp deploy/config.sh.example deploy/config.sh
    # Edit config.sh with your settings
    ./deploy/deploy.sh test-client --dry-run
    
    # Template smoke tests
    npm test
    
    # Post-deploy remote health check
    cd deploy
    ./doctor.sh
    

    Pull requests to main run the same npm test checks in GitHub Actions.

    License

    By contributing, you agree that your contributions will be licensed under the MIT License.

  • b2b-sdr-agent-template/GEMINI.mdmarkdown · 0.2 KB

    本仓库的权威协作守则是 AGENTS.md;当前任务状态见 docs/HANDOFF.md。 开始任何工作前请先阅读这两个文件,并遵守其中的"接续三步 / 收尾三件套"协议。

  • b2b-sdr-agent-template/LICENSEtext · 1.0 KB
    MIT License
    
    Copyright (c) 2026 PulseAgent
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    
  • b2b-sdr-agent-template/README.ar.mdmarkdown · 20.7 KB

    قالب وكيل SDR للشركات B2B

    حوّل أي شركة تصدير B2B إلى آلة مبيعات مدعومة بالذكاء الاصطناعي في 5 دقائق.

    قالب مفتوح المصدر وجاهز للإنتاج لبناء ممثلي تطوير المبيعات AI (SDRs) الذين يتعاملون مع خط المبيعات الكامل — من التقاط العملاء المحتملين إلى إغلاق الصفقات — عبر WhatsApp وTelegram والبريد الإلكتروني.

    مبني على OpenClaw، تم اختباره في الواقع مع شركات التصدير B2B الحقيقية.

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    البنية المعمارية: نظام السياق من 7 طبقات

    ┌─────────────────────────────────────────────────┐
    │              وكيل AI SDR                         │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → من أنا؟ الشركة، الدور           │
    │  SOUL.md       → الشخصية، القيم، القواعد         │
    │  AGENTS.md     → سير عمل المبيعات الكامل (10 مراحل) │
    │  USER.md       → ملف المالك، ICP، التسجيل        │
    │  HEARTBEAT.md  → فحص خط الأنابيب من 13 عناصر     │
    │  MEMORY.md     → بنية ذاكرة من 3 محركات          │
    │  TOOLS.md      → CRM، القنوات، التكاملات          │
    ├─────────────────────────────────────────────────┤
    │  Skills        → قدرات قابلة للتوسع              │
    │  Product KB    → كتالوج منتجاتك                  │
    │  Cron Jobs     → 13 مهام مجدولة تلقائية           │
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email) │
    └─────────────────────────────────────────────────┘
    

    كل طبقة عبارة عن ملف Markdown تقوم بتخصيصه لعملك. يقرأ الذكاء الاصطناعي جميع الطبقات في كل محادثة، مما يمنحه سياقًا عميقًا حول شركتك ومنتجاتك واستراتيجية المبيعات.

    البدء السريع

    الخيار A: مستخدمو OpenClaw (أمر واحد)

    إذا كان لديك بالفعل OpenClaw قيد التشغيل:

    clawhub install b2b-sdr-agent
    

    تم. يقوم المهارة بتثبيت نظام السياق الكامل من 7 طبقات، وdelivery-queue، وsdr-humanizer في مساحة عملك. ثم قم بالتخصيص:

    # قم بتحرير الملفات الرئيسية لعملك
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # أو انسخها إلى مساحة العمل الرئيسية
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    استبدل جميع {{placeholders}} بمعلومات شركتك الفعلية، وسيكون وكيل AI SDR الخاص بك مباشرًا.

    الخيار B: النشر الكامل (5 دقائق)

    1. الاستنساخ والتكوين

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # قم بتحرير ملفات مساحة العمل السبعة لعملك
    vim workspace/IDENTITY.md   # معلومات الشركة، الدور، خط الأنابيب
    vim workspace/USER.md       # منتجاتك، ICP، المنافسون
    vim workspace/SOUL.md       # شخصية الذكاء الاصطناعي والقواعد
    

    2. إعداد تكوين النشر

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # املأ: IP الخادم، مفتاح API، رقم WhatsApp
    

    3. النشر

    ./deploy.sh my-company
    
    # الإخراج:
    # ✅ اكتمل النشر: my-company
    # Gateway:  ws://your-server:18789
    # WhatsApp: مفعّل
    # Skills:   b2b_trade (41 مهارة)
    

    هذا كل شيء. وكيل AI SDR الخاص بك مباشر على WhatsApp وجاهز للبيع.

    ما يفعله

    أتمتة المبيعات الكاملة لخط الأنابيب (10 مراحل)

    المرحلةما يفعله الذكاء الاصطناعي
    1. التقاط العملاء المحتمليناكتشاف تلقائي للرسائل الواردة (WhatsApp/Telegram/إعلانات CTWA)، إنشاء سجلات CRM
    2. تأهيل BANTمحادثة طبيعية لتقييم الميزانية، السلطة، الحاجة، الجدول الزمني
    3. إدخال CRMالتقاط البيانات المهيكلة — الاسم، الشركة، البلد، درجة ICP، اهتمام المنتج
    4. البحث والإثراءبحث Jina AI على الويب + تحليل موقع الشركة، خط أنابيب إثراء من 3 طبقات
    5. عرض الأسعارتوليد عروض أسعار PDF تلقائيًا، متعدد اللغات، إرسالها للمالك للموافقة
    6. التفاوضتتبع العروض المضادة، التوصية بالاستراتيجية، التصعيد عند الحاجة
    7. التقاريرتقارير خط الأنابيب اليومية 09:00، تنبيهات التوقف 15:00، ملخصات أسبوعية
    8. الرعايةمتابعات تلقائية، أخبار الصناعة، رعاية ما بعد البيع، مراجعات ربع سنوية
    9. التواصل عبر البريد الإلكترونيسلاسل بريد إلكتروني بارد مخصصة (اليوم 1/3/7/14)، متابعة تلقائية
    10. التنسيق متعدد القنواتتنسيق عبر القنوات (WhatsApp + البريد الإلكتروني + Telegram)، تبديل تلقائي

    الجدولة التلقائية (13 مهام Cron)

    الجدولالمهمة
    كل 30 دقيقةمسح صندوق بريد Gmail لردود العملاء
    يوميًا 09:00تقرير خط الأنابيب للمالك عبر WhatsApp
    يوميًا 10:00اكتشاف العملاء المحتملين بالذكاء الاصطناعي (تناوب الأسواق: أفريقيا/الشرق الأوسط/جنوب شرق آسيا/أمريكا اللاتينية)
    يوميًا 11:00فحص سلسلة متابعة البريد الإلكتروني
    يوميًا 15:00اكتشاف العملاء المحتملين المتوقفين
    أسبوعيًا الأربعاءحملة الرعاية
    أسبوعيًا الجمعةجمع معلومات المنافسين
    أسبوعيًا الاثنينتقرير الملخص الأسبوعي

    محادثات شبيهة بالبشر

    • يستجيب بلغة العميل (يتم اكتشافها تلقائيًا)
    • وتيرة رسائل طبيعية مع مهارة delivery-queue (تأخيرات 3-90 ثانية، تقسيم الرسائل)
    • إرسال واعٍ بالمنطقة الزمنية (تخطيط 7 مناطق زمنية للأسواق)
    • التكيف الثقافي (الشرق الأوسط، أفريقيا، جنوب شرق آسيا، أمريكا اللاتينية، أوروبا)
    • لا يكشف أبدًا عن هويته كذكاء اصطناعي — يقدم نفسه كمستشار مبيعاتك

    تسجيل ICP الديناميكي

    • درجة أولية بناءً على 5 أبعاد مرجحة (حجم الشراء، مطابقة المنتج، المنطقة، القدرة على الدفع، السلطة)
    • يتعدّل تلقائيًا بناءً على التفاعل: رد سريع +1، طلب عرض أسعار +2، ذكر منافس +2، عدم رد لمدة 7 أيام -1
    • العملاء المحتملون الساخنون (ICP>=7) يتم تمييزهم تلقائيًا، ويُبلّغ المالك فورًا

    ذاكرة ذكية (3 محركات)

    • Supermemory: ملاحظات البحث، معلومات المنافسين، رؤى السوق — يتم الاستعلام قبل التواصل
    • MemoryLake: سياق الجلسة، ملخصات المحادثة — يتم استدعاؤها تلقائيًا لكل محادثة
    • MemOS Cloud: أنماط السلوك عبر الجلسات — يتم التقاطها تلقائيًا

    نظام مكافحة فقدان الذاكرة من 4 طبقات

    تفقد وكلاء الذكاء الاصطناعي السياق في المحادثات الطويلة وعبر الجلسات. بنية مكافحة فقدان الذاكرة من 4 طبقات تضمن أن وكيل AI SDR الخاص بك لا ينسى أبدًا:

    الرسالة الواردة ──→ L1 استدعاء MemOS التلقائي (حقن الذاكرة المهيكلة)
        │
        ├──→ L3 تخزين ChromaDB لكل رسالة (عزل العملاء، وسم تلقائي)
        │
        ├──→ L2 ملخص استباقي عند 65% من الرموز (ضغط haiku، صفر فقدان معلومات)
        │
        └──→ L4 لقطة CRM يومية 12:00 (احتياطي للتعافي من الكوارث)
    
    الطبقةالمحركماذا تفعل
    L1: MemOSذاكرة مهيكلةاستخراج تلقائي لـ BANT والالتزامات والاعتراضات كل رسالة. حقنها في System Prompt عند بدء المحادثة.
    L2: ملخص استباقيمراقبة الرموزضغط عند 65% من استخدام السياق عبر نموذج فئة haiku. جميع الأرقام وعروض الأسعار والالتزامات محفوظة حرفيًا.
    L3: ChromaDBمخزن متجهات لكل رسالةكل رسالة محادثة مخزنة بعزل customer_id. وسم تلقائي لعروض الأسعار والالتزامات والاعتراضات. استرجاع دلالي عبر الجلسات.
    L4: لقطة CRMنسخ احتياطي يوميتخزين حالة خط الأنابيب الكاملة يوميًا في ChromaDB كتعافي من الكوارث. إذا فشلت أي طبقة، L4 لديها البيانات.

    النتيجة: وكيل AI SDR الخاص بك يتذكر كل عميل وكل عرض أسعار وكل التزام — حتى بعد 100+ رسالة أو أسابيع من الصمت أو إعادة تشغيل النظام.

    انظر ANTI-AMNESIA.md للمواصفات الكاملة مع الكود والتعليمات والدليل.

    شرح الطبقات السبع

    الطبقةالملفالغرض
    الهويةIDENTITY.mdمعلومات الشركة، تعريف الدور، مراحل خط الأنابيب، تصنيف العملاء المحتملين
    الروحSOUL.mdشخصية الذكاء الاصطناعي، أسلوب التواصل، القواعد الصارمة، عقلية النمو
    الوكلاءAGENTS.mdسير عمل المبيعات من 10 مراحل، تأهيل BANT، التنسيق متعدد القنوات
    المستخدمUSER.mdملف المالك، خطوط الإنتاج، تسجيل ICP، المنافسون
    نبض القلبHEARTBEAT.mdفحص خط الأنابيب التلقائي — عملاء محتملون جدد، صفقات متوقفة، جودة البيانات
    الذاكرةMEMORY.mdبنية الذاكرة ثلاثية المستويات، مبادئ فعالية SDR
    الأدواتTOOLS.mdأوامر CRM، تكوين القناة، البحث على الويب، الوصول إلى البريد الإلكتروني

    المهارات

    قدرات مبنية مسبقًا توسع وكيل AI SDR الخاص بك:

    المهارةالوصف
    delivery-queueجدولة الرسائل مع تأخيرات شبيهة بالبشر. حملات التنقيط، متابعات موقوتة.
    supermemoryمحرك الذاكرة الدلالية. التقاط تلقائي لرؤى العملاء، البحث عبر جميع المحادثات.
    sdr-humanizerقواعد المحادثة الطبيعية — الوتيرة، التكيف الثقافي، الأنماط المضادة.
    lead-discoveryاكتشاف العملاء المحتملين بالذكاء الاصطناعي. البحث على الويب عن مشترين محتملين، تقييم ICP، إدخال تلقائي في CRM.
    chroma-memoryتخزين المحادثات لكل رسالة مع عزل العملاء، ووسم تلقائي، ولقطات CRM.
    telegram-toolkitأوامر البوت، لوحات المفاتيح المضمّنة، معالجة الملفات الكبيرة، واستراتيجيات الأسواق التي تعتمد Telegram أولاً.
    quotation-generatorتوليد فواتير أولية PDF تلقائيًا مع ترويسة الشركة، دعم متعدد اللغات.

    ملفات تعريف المهارات

    اختر مجموعة مهارات مكونة مسبقًا بناءً على احتياجاتك:

    الملف التعريفيالمهاراتالأفضل لـ
    b2b_trade41 مهارةشركات التصدير B2B (افتراضي)
    lite16 مهارةالبدء، حجم منخفض
    social14 مهارةالمبيعات المركزة على وسائل التواصل الاجتماعي
    full40+ مهارةكل شيء مفعّل

    أمثلة الصناعة

    تكوينات جاهزة للاستخدام لقطاعات التصدير B2B الشائعة:

    الصناعةالدليلالنقاط البارزة
    المركبات الثقيلةexamples/heavy-vehicles/الشاحنات، الآلات، مبيعات الأساطيل، أسواق أفريقيا/الشرق الأوسط
    الإلكترونيات الاستهلاكيةexamples/electronics/OEM/ODM، بائعي Amazon، مبيعات مدفوعة بالعينات
    المنسوجات والملابسexamples/textiles/أقمشة مستدامة، معتمدة GOTS، أسواق الاتحاد الأوروبي/الولايات المتحدة

    لاستخدام مثال، انسخه إلى مساحة عملك:

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # ثم قم بالتخصيص لعملك المحدد
    

    قاعدة المعرفة بالمنتجات

    قم بهيكلة كتالوج منتجاتك حتى يتمكن الذكاء الاصطناعي من توليد عروض أسعار دقيقة:

    product-kb/
    ├── catalog.json                    # كتالوج المنتجات مع المواصفات، MOQ، أوقات التسليم
    ├── products/
    │   └── example-product/info.json   # معلومات تفصيلية عن المنتج
    └── scripts/
        └── generate-pi.js              # مولد الفاتورة الأولية
    

    لوحة التحكم

    بعد النشر، يأتي وكيل AI SDR مع لوحة تحكم ويب مدمجة:

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    تعرض لوحة التحكم:

    • حالة البوت في الوقت الفعلي واتصال WhatsApp
    • سجل الرسائل وسلاسل المحادثات
    • حالة تنفيذ مهام Cron
    • مراقبة صحة القنوات

    يتم إنشاء الرمز تلقائيًا أثناء النشر ويُطبع في الإخراج. احتفظ به بشكل خاص — أي شخص لديه URL+الرمز لديه وصول كامل.

    ملاحظة أمنية: اضبط GATEWAY_BIND="loopback" في config.sh لتعطيل الوصول عن بُعد للوحة التحكم. الافتراضي هو "lan" (يمكن الوصول إليه من الشبكة).

    النشر

    المتطلبات الأساسية

    • خادم Linux (يُوصى بـ Ubuntu 20.04+)
    • Node.js 18+
    • مفتاح API لنموذج الذكاء الاصطناعي (OpenAI، Anthropic، Google، Kimi، إلخ.)
    • حساب WhatsApp Business (اختياري ولكن موصى به)

    التكوين

    يوجد جميع التكوين في deploy/config.sh. الأقسام الرئيسية:

    # الخادم
    SERVER_HOST="your-server-ip"
    
    # نموذج الذكاء الاصطناعي
    PRIMARY_API_KEY="sk-..."
    
    # القنوات
    WHATSAPP_ENABLED=true
    TELEGRAM_BOT_TOKEN="..."
    
    # CRM
    SHEETS_SPREADSHEET_ID="your-google-sheets-id"
    
    # المسؤول (من يمكنه إدارة الذكاء الاصطناعي)
    ADMIN_PHONES="+1234567890"
    

    تكوين WhatsApp

    بشكل افتراضي، يقبل وكيل AI SDR الرسائل من جميع جهات اتصال WhatsApp (dmPolicy: "open"). هذا هو الإعداد الموصى به لوكلاء المبيعات — تريد أن يتمكن كل عميل محتمل من الوصول إليك.

    الإعدادالقيمةالمعنى
    WHATSAPP_DM_POLICY"open" (افتراضي)قبول الرسائل من أي شخص
    "allowlist"قبول فقط من ADMIN_PHONES
    "pairing"يتطلب رمز الاقتران أولاً
    WHATSAPP_GROUP_POLICY"allowlist" (افتراضي)الرد فقط في المجموعات المدرجة في القائمة البيضاء

    للتغيير بعد النشر، عدّل ~/.openclaw/openclaw.json على الخادم:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    ثم أعد التشغيل: systemctl --user restart openclaw-gateway

    عزل IP لـ WhatsApp (متعدد المستأجرين)

    عند تشغيل وكلاء متعددين على نفس الخادم، يجب أن يكون لكل منهم IP خروج فريد حتى يرى WhatsApp أجهزة مستقلة. هذا يمنع الحظر المتقاطع بين الحسابات.

    # بعد نشر عميل، اعزل IP WhatsApp الخاص به:
    ./deploy/ip-isolate.sh acme-corp
    
    # أو مع منفذ SOCKS5 محدد:
    ./deploy/ip-isolate.sh acme-corp 40010
    

    كيف يعمل:

                      ┌─ 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
    

    كل مستأجر يحصل على:

    • حساب Cloudflare WARP مجاني مخصص
    • مثيل wireproxy معزول (~4MB ذاكرة)
    • IP خروج Cloudflare فريد لجميع حركة المرور الصادرة (بما في ذلك WhatsApp)

    للتفعيل التلقائي أثناء النشر، اضبط IP_ISOLATE=true في config.sh.

    النشر المُدار

    لا تريد الاستضافة الذاتية؟ PulseAgent يوفر وكلاء B2B SDR مُدارين بالكامل مع:

    • نشر بنقرة واحدة
    • لوحة التحكم والتحليلات
    • إدارة متعددة القنوات
    • دعم ذو أولوية

    ابدأ ←

    المساهمة

    المساهمات مرحب بها! المجالات التي نحب المساعدة فيها:

    • قوالب الصناعة: أضف أمثلة لصناعتك
    • المهارات: قم ببناء قدرات جديدة
    • الترجمات: ترجمة قوالب مساحة العمل إلى لغات أخرى
    • التوثيق: تحسين الأدلة والدروس التعليمية

    الرخصة

    MIT — استخدمها لأي شيء.


  • b2b-sdr-agent-template/README.es.mdmarkdown · 16.4 KB

    B2B SDR Agent Template

    Convierte cualquier negocio de exportación B2B en una máquina de ventas impulsada por IA en 5 minutos.

    Una plantilla de código abierto, lista para producción, para construir Representantes de Desarrollo de Ventas (SDR) con IA que manejan el pipeline de ventas completo — desde la captura de leads hasta el cierre de tratos — a través de WhatsApp, Telegram y email.

    Construido sobre OpenClaw, probado en batalla con empresas reales de exportación B2B.

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    Arquitectura: Sistema de Contexto de 7 Capas

    ┌─────────────────────────────────────────────────┐
    │              Agente SDR con IA                   │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → ¿Quién soy? Empresa, rol       │
    │  SOUL.md       → Personalidad, valores, reglas   │
    │  AGENTS.md     → Flujo de ventas completo (10 etapas)│
    │  USER.md       → Perfil del propietario, ICP, puntuación│
    │  HEARTBEAT.md  → Inspección del pipeline de 13 puntos│
    │  MEMORY.md     → Arquitectura de memoria de 3 motores│
    │  TOOLS.md      → CRM, canales, integraciones     │
    ├─────────────────────────────────────────────────┤
    │  Skills        → Capacidades extensibles         │
    │  Product KB    → Tu catálogo de productos        │
    │  Cron Jobs     → 13 tareas programadas automáticas│
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email)  │
    └─────────────────────────────────────────────────┘
    

    Cada capa es un archivo Markdown que personalizas para tu negocio. La IA lee todas las capas en cada conversación, dándole un contexto profundo sobre tu empresa, productos y estrategia de ventas.

    Inicio Rápido

    Opción A: Usuarios de OpenClaw (1 Comando)

    Si ya tienes OpenClaw en ejecución:

    clawhub install b2b-sdr-agent
    

    Listo. La skill instala el sistema completo de contexto de 7 capas, delivery-queue y sdr-humanizer en tu espacio de trabajo. Luego personaliza:

    # Edita los archivos clave para tu negocio
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # O copia a tu espacio de trabajo principal
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    Reemplaza todos los {{placeholders}} con la información real de tu empresa, y tu SDR con IA estará en vivo.

    Opción B: Despliegue Completo (5 Minutos)

    1. Clonar y Configurar

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # Edita los 7 archivos del espacio de trabajo para tu negocio
    vim workspace/IDENTITY.md   # Información de la empresa, rol, pipeline
    vim workspace/USER.md       # Tus productos, ICP, competidores
    vim workspace/SOUL.md       # Personalidad y reglas de la IA
    

    2. Configurar el Despliegue

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # Completa: IP del servidor, clave API, número de WhatsApp
    

    3. Desplegar

    ./deploy.sh my-company
    
    # Salida:
    # ✅ Deploy Complete: my-company
    # Gateway:  ws://your-server:18789
    # WhatsApp: Enabled
    # Skills:   b2b_trade (41 skills)
    

    Eso es todo. Tu SDR con IA está en vivo en WhatsApp y listo para vender.

    Lo Que Hace

    Automatización de Ventas de Pipeline Completo (10 Etapas)

    EtapaLo Que Hace la IA
    1. Captura de LeadsAuto-detecta mensajes entrantes (WhatsApp/Telegram/anuncios CTWA), crea registros en CRM
    2. Calificación BANTConversación natural para evaluar Budget, Authority, Need, Timeline
    3. Registro CRMCaptura de datos estructurados — nombre, empresa, país, puntuación ICP, interés de producto
    4. Investigación y EnriquecimientoBúsqueda web con Jina AI + análisis de sitio web de la empresa, pipeline de enriquecimiento de 3 capas
    5. CotizaciónGenera cotizaciones PDF automáticas, multi-idioma, envía al propietario para aprobación
    6. NegociaciónRastrea contraofertas, recomienda estrategia, escala cuando es necesario
    7. ReportesReportes diarios del pipeline a las 09:00, alertas de estancamiento a las 15:00, resúmenes semanales
    8. NutriciónSeguimientos automatizados, noticias de la industria, cuidado post-venta, revisiones trimestrales
    9. Email OutreachSecuencias de email en frío personalizadas (Día 1/3/7/14), seguimiento automático
    10. Orquestación MulticanalCoordinación entre canales (WhatsApp + Email + Telegram), cambio automático

    Programación Automatizada (13 Cron Jobs)

    HorarioTarea
    Cada 30 minEscaneo de bandeja de entrada Gmail para respuestas de clientes
    Diario 09:00Reporte del pipeline al propietario vía WhatsApp
    Diario 10:00Descubrimiento de leads con IA (rotación de mercados: África/ME/SEA/LatAm)
    Diario 11:00Verificación de secuencia de seguimiento por email
    Diario 15:00Detección de leads estancados
    Semanal MiéCampaña de nutrición
    Semanal VieRecopilación de inteligencia de competidores
    Semanal LunReporte resumen semanal

    Conversaciones Similares a Humanos

    • Responde en el idioma del cliente (auto-detectado)
    • Ritmo natural de mensajes con la skill delivery-queue (retrasos de 3-90s, división de mensajes)
    • Envío consciente de zona horaria (7 mapeos de zonas horarias de mercados)
    • Adaptación cultural (Medio Oriente, África, SEA, LatAm, Europa)
    • Nunca revela identidad de IA — se presenta como tu consultor de ventas

    Puntuación ICP Dinámica

    • Puntuación inicial basada en 5 dimensiones ponderadas (volumen de compra, coincidencia de producto, región, capacidad de pago, autoridad)
    • Se auto-ajusta según la interacción: respuesta rápida +1, pide cotización +2, menciona competidor +2, 7d sin respuesta -1
    • Leads calientes (ICP>=7) marcados automáticamente, propietario notificado de inmediato

    Memoria Inteligente (3 Motores)

    • Supermemory: Notas de investigación, inteligencia de competidores, insights de mercado — consultado antes del contacto
    • MemoryLake: Contexto de sesión, resúmenes de conversaciones — recuperado automáticamente por conversación
    • MemOS Cloud: Patrones de comportamiento entre sesiones — capturado automáticamente

    Sistema Anti-Amnesia de 4 Capas

    Los agentes de IA pierden contexto en conversaciones largas y entre sesiones. Nuestra arquitectura anti-amnesia de 4 capas asegura que tu SDR con IA nunca olvide:

    Mensaje entrante ──→ L1 MemOS auto-recall (inyección de memoria estructurada)
        │
        ├──→ L3 ChromaDB almacenamiento por turno (aislamiento por cliente, etiquetado automático)
        │
        ├──→ L2 Resumen proactivo al 65% de tokens (compresión haiku, cero pérdida de información)
        │
        └──→ L4 Snapshot CRM diario 12:00 (respaldo de recuperación ante desastres)
    
    CapaMotorQué Hace
    L1: MemOSMemoria estructuradaExtrae automáticamente BANT, compromisos y objeciones en cada turno. Los inyecta en el System Prompt al iniciar la conversación.
    L2: Resumen ProactivoMonitoreo de tokensComprime al 65% de uso de contexto mediante modelo clase haiku. Todos los números, cotizaciones y compromisos se preservan textualmente.
    L3: ChromaDBAlmacenamiento vectorial por turnoCada turno de conversación almacenado con aislamiento por customer_id. Etiquetado automático de cotizaciones, compromisos y objeciones. Recuperación semántica entre sesiones.
    L4: Snapshot CRMRespaldo diarioAlmacena el estado completo del pipeline diariamente en ChromaDB como recuperación ante desastres. Si cualquier capa falla, L4 tiene los datos.

    Resultado: Tu SDR con IA recuerda cada cliente, cada cotización, cada compromiso — incluso después de 100+ turnos, semanas de silencio o reinicios del sistema.

    Consulta ANTI-AMNESIA.md para la especificación completa de implementación con código, prompts y guía de despliegue.

    Las 7 Capas Explicadas

    CapaArchivoPropósito
    IdentityIDENTITY.mdInformación de la empresa, definición de rol, etapas del pipeline, niveles de leads
    SoulSOUL.mdPersonalidad de IA, estilo de comunicación, reglas estrictas, mentalidad de crecimiento
    AgentsAGENTS.mdFlujo de ventas de 10 etapas, calificación BANT, orquestación multicanal
    UserUSER.mdPerfil del propietario, líneas de productos, puntuación ICP, competidores
    HeartbeatHEARTBEAT.mdInspección automática del pipeline — nuevos leads, tratos estancados, calidad de datos
    MemoryMEMORY.mdArquitectura de memoria de 3 niveles, principios de efectividad SDR
    ToolsTOOLS.mdComandos CRM, configuración de canales, investigación web, acceso a email

    Skills

    Capacidades preconstruidas que extienden tu SDR con IA:

    SkillDescripción
    delivery-queuePrograma mensajes con retrasos similares a humanos. Campañas de goteo, seguimientos programados.
    supermemoryMotor de memoria semántica. Auto-captura insights de clientes, busca en todas las conversaciones.
    sdr-humanizerReglas para conversación natural — ritmo, adaptación cultural, anti-patrones.
    lead-discoveryDescubrimiento de leads impulsado por IA. Búsqueda web de compradores potenciales, evaluación ICP, entrada automática en CRM.
    chroma-memoryAlmacenamiento de conversaciones por turno con aislamiento de clientes, etiquetado automático y snapshots de CRM.
    telegram-toolkitComandos de bot, teclados inline, manejo de archivos grandes y estrategias para mercados con Telegram como canal principal.
    quotation-generatorGenera automáticamente facturas proforma en PDF con membrete de empresa, soporte multi-idioma.

    Perfiles de Skills

    Elige un conjunto de skills preconfigurado según tus necesidades:

    PerfilSkillsMejor Para
    b2b_trade41 skillsEmpresas de exportación B2B (predeterminado)
    lite16 skillsEmpezar, bajo volumen
    social14 skillsVentas enfocadas en redes sociales
    full40+ skillsTodo habilitado

    Ejemplos por Industria

    Configuraciones listas para usar para verticales comunes de exportación B2B:

    IndustriaDirectorioDestacados
    Vehículos Pesadosexamples/heavy-vehicles/Camiones, maquinaria, ventas de flotas, mercados africanos/ME
    Electrónica de Consumoexamples/electronics/OEM/ODM, vendedores de Amazon, ventas basadas en muestras
    Textiles y Confecciónexamples/textiles/Telas sustentables, certificado GOTS, mercados UE/EE.UU.

    Para usar un ejemplo, cópialo en tu espacio de trabajo:

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # Luego personaliza para tu negocio específico
    

    Base de Conocimiento de Productos

    Estructura tu catálogo de productos para que la IA pueda generar cotizaciones precisas:

    product-kb/
    ├── catalog.json                    # Catálogo de productos con specs, MOQ, tiempos de entrega
    ├── products/
    │   └── example-product/info.json   # Información detallada del producto
    └── scripts/
        └── generate-pi.js              # Generador de factura proforma
    

    Panel de Control

    Después del despliegue, tu SDR con IA incluye un panel web integrado:

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    El panel muestra:

    • Estado del bot en tiempo real y conexión WhatsApp
    • Historial de mensajes e hilos de conversación
    • Estado de ejecución de cron jobs
    • Monitoreo de salud de canales

    El token se genera automáticamente durante el despliegue y se muestra en la salida. Mantenlo privado — cualquiera con la URL+token tiene acceso completo.

    Nota de seguridad: Establece GATEWAY_BIND="loopback" en config.sh para deshabilitar el acceso remoto al panel. El valor predeterminado es "lan" (accesible desde la red).

    Despliegue

    Prerrequisitos

    • Un servidor Linux (Ubuntu 20.04+ recomendado)
    • Node.js 18+
    • Una clave API de modelo de IA (OpenAI, Anthropic, Google, Kimi, etc.)
    • Cuenta de WhatsApp Business (opcional pero recomendado)

    Configuración

    Toda la configuración está en deploy/config.sh. Secciones clave:

    # Servidor
    SERVER_HOST="your-server-ip"
    
    # Modelo de IA
    PRIMARY_API_KEY="sk-..."
    
    # Canales
    WHATSAPP_ENABLED=true
    TELEGRAM_BOT_TOKEN="..."
    
    # CRM
    SHEETS_SPREADSHEET_ID="your-google-sheets-id"
    
    # Admin (quién puede gestionar la IA)
    ADMIN_PHONES="+1234567890"
    

    Configuración de WhatsApp

    Por defecto, el SDR con IA acepta mensajes de todos los contactos de WhatsApp (dmPolicy: "open"). Esta es la configuración recomendada para agentes de ventas — quieres que cada cliente potencial pueda contactarte.

    ConfiguraciónValorSignificado
    WHATSAPP_DM_POLICY"open" (predeterminado)Aceptar DMs de cualquiera
    "allowlist"Solo aceptar de ADMIN_PHONES
    "pairing"Requiere código de emparejamiento primero
    WHATSAPP_GROUP_POLICY"allowlist" (predeterminado)Solo responder en grupos de la lista blanca

    Para cambiar después del despliegue, edita ~/.openclaw/openclaw.json en el servidor:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    Luego reinicia: systemctl --user restart openclaw-gateway

    Aislamiento de IP de WhatsApp (Multi-Tenant)

    Al ejecutar múltiples agentes en el mismo servidor, cada uno debe tener una IP de salida única para que WhatsApp vea dispositivos independientes. Esto previene el bloqueo cruzado entre cuentas.

    # Después de desplegar un cliente, aislar su IP de WhatsApp:
    ./deploy/ip-isolate.sh acme-corp
    
    # O con un puerto SOCKS5 específico:
    ./deploy/ip-isolate.sh acme-corp 40010
    

    Cómo funciona:

                      ┌─ 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
    

    Cada tenant obtiene:

    • Una cuenta dedicada gratuita de Cloudflare WARP
    • Una instancia aislada de wireproxy (~4MB RAM)
    • Una IP de salida Cloudflare única para todo el tráfico saliente (incluyendo WhatsApp)

    Para habilitar automáticamente durante el despliegue, establece IP_ISOLATE=true en config.sh.

    Despliegue Gestionado

    ¿No quieres auto-hospedar? PulseAgent ofrece agentes SDR B2B completamente gestionados con:

    • Despliegue con un clic
    • Dashboard y analíticas
    • Gestión multicanal
    • Soporte prioritario

    Comenzar →

    Contribuciones

    ¡Las contribuciones son bienvenidas! Áreas donde nos encantaría ayuda:

    • Plantillas de industria: Agrega ejemplos para tu industria
    • Skills: Construye nuevas capacidades
    • Traducciones: Traduce plantillas del espacio de trabajo a otros idiomas
    • Documentación: Mejora guías y tutoriales

    Licencia

    MIT — úsalo para cualquier cosa.


  • b2b-sdr-agent-template/README.fr.mdmarkdown · 16.4 KB

    Modèle d'Agent SDR B2B

    Transformez n'importe quelle entreprise d'export B2B en machine de vente IA en 5 minutes.

    Un modèle open-source prêt pour la production pour créer des représentants commerciaux IA (SDR) qui gèrent l'intégralité du pipeline de vente — de la capture de leads à la conclusion des affaires — via WhatsApp, Telegram et email.

    Construit sur OpenClaw, éprouvé avec de vraies entreprises d'export B2B.

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    Architecture : Système de Contexte à 7 Couches

    ┌─────────────────────────────────────────────────┐
    │              Agent SDR IA                        │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → Qui suis-je ? Entreprise, rôle  │
    │  SOUL.md       → Personnalité, valeurs, règles    │
    │  AGENTS.md     → Workflow de vente complet (10 étapes)│
    │  USER.md       → Profil propriétaire, ICP, scoring│
    │  HEARTBEAT.md  → Inspection du pipeline en 13 points│
    │  MEMORY.md     → Architecture mémoire à 3 moteurs │
    │  TOOLS.md      → CRM, canaux, intégrations        │
    ├─────────────────────────────────────────────────┤
    │  Skills        → Capacités extensibles            │
    │  Product KB    → Votre catalogue produits         │
    │  Cron Jobs     → 13 tâches planifiées automatiques│
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email)  │
    └─────────────────────────────────────────────────┘
    

    Chaque couche est un fichier Markdown que vous personnalisez pour votre entreprise. L'IA lit toutes les couches à chaque conversation, lui donnant un contexte approfondi sur votre entreprise, vos produits et votre stratégie de vente.

    Démarrage Rapide

    Option A : Utilisateurs OpenClaw (1 Commande)

    Si vous avez déjà OpenClaw en cours d'exécution :

    clawhub install b2b-sdr-agent
    

    Terminé. Le skill installe le système de contexte complet à 7 couches, delivery-queue et sdr-humanizer dans votre workspace. Ensuite, personnalisez :

    # Éditez les fichiers clés pour votre entreprise
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # Ou copiez dans votre workspace principal
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    Remplacez tous les {{placeholders}} par les informations réelles de votre entreprise, et votre SDR IA est en ligne.

    Option B : Déploiement Complet (5 Minutes)

    1. Cloner & Configurer

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # Éditez les 7 fichiers workspace pour votre entreprise
    vim workspace/IDENTITY.md   # Infos entreprise, rôle, pipeline
    vim workspace/USER.md       # Vos produits, ICP, concurrents
    vim workspace/SOUL.md       # Personnalité et règles de l'IA
    

    2. Configurer le Déploiement

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # Remplissez : IP serveur, clé API, numéro WhatsApp
    

    3. Déployer

    ./deploy.sh my-company
    
    # Sortie :
    # ✅ Deploy Complete: my-company
    # Gateway:  ws://your-server:18789
    # WhatsApp: Enabled
    # Skills:   b2b_trade (41 skills)
    

    C'est tout. Votre SDR IA est en ligne sur WhatsApp et prêt à vendre.

    Ce qu'il Fait

    Automatisation Complète du Pipeline de Vente (10 Étapes)

    ÉtapeCe que l'IA Fait
    1. Capture de LeadsDétection automatique des messages entrants (WhatsApp/Telegram/pubs CTWA), création d'enregistrements CRM
    2. Qualification BANTConversation naturelle pour évaluer Budget, Autorité, Besoin, Calendrier
    3. Saisie CRMCapture de données structurées — nom, entreprise, pays, score ICP, intérêt produit
    4. Recherche & EnrichissementRecherche web Jina AI + analyse du site web de l'entreprise, pipeline d'enrichissement à 3 couches
    5. DevisGénération automatique de devis PDF, multi-langues, envoi au propriétaire pour approbation
    6. NégociationSuivi des contre-offres, recommandation de stratégie, escalade si nécessaire
    7. ReportingRapports quotidiens du pipeline à 09:00, alertes blocage à 15:00, résumés hebdomadaires
    8. NurtureSuivis automatisés, actualités du secteur, service après-vente, bilans trimestriels
    9. Email OutreachSéquences d'emails à froid personnalisées (Jour 1/3/7/14), suivi automatique
    10. Orchestration MulticanalCoordination inter-canaux (WhatsApp + Email + Telegram), basculement automatique

    Planification Automatisée (13 Cron Jobs)

    HoraireTâche
    Toutes les 30 minScan de la boîte Gmail pour les réponses clients
    Quotidien 09:00Rapport du pipeline au propriétaire via WhatsApp
    Quotidien 10:00Découverte de leads par IA (rotation de marchés : Afrique/MO/ASE/LatAm)
    Quotidien 11:00Vérification de la séquence de suivi email
    Quotidien 15:00Détection des leads bloqués
    Hebdo MerCampagne de nurture
    Hebdo VenCollecte de renseignements concurrentiels
    Hebdo LunRapport résumé hebdomadaire

    Conversations Naturelles

    • Répond dans la langue du client (détection automatique)
    • Rythme naturel des messages avec le skill delivery-queue (délais de 3-90s, découpage des messages)
    • Envoi adapté au fuseau horaire (7 mappings de fuseaux horaires de marchés)
    • Adaptation culturelle (Moyen-Orient, Afrique, Asie du Sud-Est, Amérique latine, Europe)
    • Ne révèle jamais l'identité IA — se présente comme votre consultant commercial

    Scoring ICP Dynamique

    • Score initial basé sur 5 dimensions pondérées (volume d'achat, adéquation produit, région, capacité de paiement, autorité)
    • S'auto-ajuste selon l'interaction : réponse rapide +1, demande de devis +2, mentionne un concurrent +2, 7j sans réponse -1
    • Leads chauds (ICP>=7) signalés automatiquement, propriétaire notifié immédiatement

    Mémoire Intelligente (3 Moteurs)

    • Supermemory : Notes de recherche, renseignements concurrentiels, insights marché — consulté avant chaque contact
    • MemoryLake : Contexte de session, résumés de conversations — rappelé automatiquement par conversation
    • MemOS Cloud : Patterns comportementaux inter-sessions — capturé automatiquement

    Système Anti-Amnésie à 4 Couches

    Les agents IA perdent le contexte dans les longues conversations et entre les sessions. Notre architecture anti-amnésie à 4 couches garantit que votre SDR IA n'oublie jamais :

    Message entrant ──→ L1 MemOS auto-recall (injection de mémoire structurée)
        │
        ├──→ L3 ChromaDB stockage par tour (isolation client, étiquetage automatique)
        │
        ├──→ L2 Résumé proactif à 65% des tokens (compression haiku, zéro perte d'information)
        │
        └──→ L4 Snapshot CRM quotidien 12:00 (secours de reprise après sinistre)
    
    CoucheMoteurCe qu'elle fait
    L1 : MemOSMémoire structuréeExtraction automatique de BANT, engagements, objections à chaque tour. Injection dans le System Prompt au début de la conversation.
    L2 : Résumé ProactifSurveillance des tokensCompression à 65% d'utilisation du contexte via un modèle classe haiku. Tous les chiffres, devis et engagements sont préservés textuellement.
    L3 : ChromaDBStockage vectoriel par tourChaque tour de conversation stocké avec isolation par customer_id. Étiquetage automatique des devis, engagements et objections. Recherche sémantique inter-sessions.
    L4 : Snapshot CRMSauvegarde quotidienneStocke l'état complet du pipeline quotidiennement dans ChromaDB en tant que reprise après sinistre. Si une couche échoue, L4 a les données.

    Résultat : Votre SDR IA se souvient de chaque client, chaque devis, chaque engagement — même après 100+ tours, des semaines de silence ou des redémarrages système.

    Consultez ANTI-AMNESIA.md pour la spécification complète d'implémentation avec code, prompts et guide de déploiement.

    Les 7 Couches Expliquées

    CoucheFichierObjectif
    IdentityIDENTITY.mdInfos entreprise, définition du rôle, étapes pipeline, hiérarchisation leads
    SoulSOUL.mdPersonnalité IA, style de communication, règles strictes, mindset de croissance
    AgentsAGENTS.mdWorkflow de vente en 10 étapes, qualification BANT, orchestration multicanal
    UserUSER.mdProfil propriétaire, gammes de produits, scoring ICP, concurrents
    HeartbeatHEARTBEAT.mdInspection automatique du pipeline — nouveaux leads, affaires bloquées, qualité des données
    MemoryMEMORY.mdArchitecture mémoire à 3 niveaux, principes d'efficacité SDR
    ToolsTOOLS.mdCommandes CRM, configuration canaux, recherche web, accès email

    Skills

    Capacités préconstruites qui étendent votre SDR IA :

    SkillDescription
    delivery-queuePlanification de messages avec délais naturels. Campagnes goutte-à-goutte, suivis programmés.
    supermemoryMoteur de mémoire sémantique. Capture automatique des insights clients, recherche dans toutes les conversations.
    sdr-humanizerRègles pour conversation naturelle — rythme, adaptation culturelle, anti-patterns.
    lead-discoveryDécouverte de leads par IA. Recherche web de clients potentiels, évaluation ICP, saisie automatique CRM.
    chroma-memoryStockage des conversations par tour avec isolation par client, étiquetage automatique et snapshots CRM.
    telegram-toolkitCommandes bot, claviers inline, gestion de fichiers volumineux et stratégies pour les marchés Telegram-first.
    quotation-generatorGénération automatique de factures proforma PDF avec en-tête d'entreprise, support multi-langues.

    Profils de Skills

    Choisissez un ensemble de skills préconfiguré selon vos besoins :

    ProfilSkillsIdéal Pour
    b2b_trade41 skillsEntreprises d'export B2B (par défaut)
    lite16 skillsDémarrage, faible volume
    social14 skillsVentes axées sur les médias sociaux
    full40+ skillsTout activé

    Exemples par Secteur

    Configurations prêtes à l'emploi pour les verticales d'export B2B courantes :

    SecteurRépertoirePoints Clés
    Véhicules Lourdsexamples/heavy-vehicles/Camions, machines, ventes de flottes, marchés Afrique/Moyen-Orient
    Électronique Grand Publicexamples/electronics/OEM/ODM, vendeurs Amazon, ventes basées sur échantillons
    Textile & Vêtementsexamples/textiles/Tissus durables, certifié GOTS, marchés UE/US

    Pour utiliser un exemple, copiez-le dans votre workspace :

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # Puis personnalisez pour votre entreprise spécifique
    

    Base de Connaissances Produits

    Structurez votre catalogue produits pour que l'IA puisse générer des devis précis :

    product-kb/
    ├── catalog.json                    # Catalogue produits avec specs, MOQ, délais
    ├── products/
    │   └── example-product/info.json   # Infos détaillées produit
    └── scripts/
        └── generate-pi.js              # Générateur de facture proforma
    

    Tableau de Bord

    Après le déploiement, votre SDR IA est livré avec un tableau de bord web intégré :

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    Le tableau de bord affiche :

    • Statut du bot en temps réel et connexion WhatsApp
    • Historique des messages et fils de conversation
    • Statut d'exécution des cron jobs
    • Surveillance de la santé des canaux

    Le token est auto-généré lors du déploiement et affiché dans la sortie. Gardez-le privé — quiconque possède l'URL+token a un accès complet.

    Note de sécurité : Définissez GATEWAY_BIND="loopback" dans config.sh pour désactiver l'accès distant au tableau de bord. La valeur par défaut est "lan" (accessible depuis le réseau).

    Déploiement

    Prérequis

    • Un serveur Linux (Ubuntu 20.04+ recommandé)
    • Node.js 18+
    • Une clé API de modèle IA (OpenAI, Anthropic, Google, Kimi, etc.)
    • Compte WhatsApp Business (optionnel mais recommandé)

    Configuration

    Toute la configuration se trouve dans deploy/config.sh. Sections clés :

    # Serveur
    SERVER_HOST="your-server-ip"
    
    # Modèle IA
    PRIMARY_API_KEY="sk-..."
    
    # Canaux
    WHATSAPP_ENABLED=true
    TELEGRAM_BOT_TOKEN="..."
    
    # CRM
    SHEETS_SPREADSHEET_ID="your-google-sheets-id"
    
    # Admin (qui peut gérer l'IA)
    ADMIN_PHONES="+1234567890"
    

    Configuration WhatsApp

    Par défaut, le SDR IA accepte les messages de tous les contacts WhatsApp (dmPolicy: "open"). C'est le paramètre recommandé pour les agents commerciaux — vous voulez que chaque client potentiel puisse vous contacter.

    ParamètreValeurSignification
    WHATSAPP_DM_POLICY"open" (par défaut)Accepter les DMs de n'importe qui
    "allowlist"Accepter uniquement de ADMIN_PHONES
    "pairing"Nécessite un code d'appairage d'abord
    WHATSAPP_GROUP_POLICY"allowlist" (par défaut)Répondre uniquement dans les groupes de la liste blanche

    Pour modifier après le déploiement, éditez ~/.openclaw/openclaw.json sur le serveur :

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    Puis redémarrez : systemctl --user restart openclaw-gateway

    Isolation IP WhatsApp (Multi-Tenant)

    Lors de l'exécution de plusieurs agents sur le même serveur, chacun doit avoir une IP de sortie unique pour que WhatsApp voie des appareils indépendants. Cela empêche le blocage croisé des comptes.

    # Après avoir déployé un client, isoler son IP WhatsApp :
    ./deploy/ip-isolate.sh acme-corp
    
    # Ou avec un port SOCKS5 spécifique :
    ./deploy/ip-isolate.sh acme-corp 40010
    

    Comment ça marche :

                      ┌─ 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
    

    Chaque tenant obtient :

    • Un compte Cloudflare WARP dédié gratuit
    • Une instance wireproxy isolée (~4 Mo de RAM)
    • Une IP de sortie Cloudflare unique pour tout le trafic sortant (y compris WhatsApp)

    Pour activer automatiquement lors du déploiement, définissez IP_ISOLATE=true dans config.sh.

    Déploiement Géré

    Vous ne voulez pas auto-héberger ? PulseAgent offre des agents SDR B2B entièrement gérés avec :

    • Déploiement en un clic
    • Dashboard & analytics
    • Gestion multi-canaux
    • Support prioritaire

    Commencer →

    Contribuer

    Les contributions sont les bienvenues ! Domaines où nous aimerions de l'aide :

    • Modèles sectoriels : Ajoutez des exemples pour votre secteur
    • Skills : Créez de nouvelles capacités
    • Traductions : Traduisez les modèles workspace dans d'autres langues
    • Documentation : Améliorez les guides et tutoriels

    Licence

    MIT — utilisez-le pour tout.


  • b2b-sdr-agent-template/README.ja.mdmarkdown · 17.9 KB

    B2B SDR エージェントテンプレート

    あらゆる B2B 輸出ビジネスを 5 分で AI 駆動のセールスマシンに変換。

    リードキャプチャから商談クロージングまで、完全なセールスパイプラインを WhatsApp、Telegram、Email で処理する AI セールス開発担当者(SDR)を構築するための、オープンソースで本番環境対応のテンプレート。

    OpenClaw をベースに構築され、実際の B2B 輸出企業で実戦テスト済み。

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    アーキテクチャ:7 層コンテキストシステム

    ┌─────────────────────────────────────────────────┐
    │              AI SDR エージェント                  │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → 私は誰?企業、役割              │
    │  SOUL.md       → パーソナリティ、価値観、規則    │
    │  AGENTS.md     → 完全なセールスワークフロー(10段階)│
    │  USER.md       → オーナープロフィール、ICP、スコアリング│
    │  HEARTBEAT.md  → 13項目パイプライン検査          │
    │  MEMORY.md     → 3エンジンメモリアーキテクチャ   │
    │  TOOLS.md      → CRM、チャネル、統合             │
    ├─────────────────────────────────────────────────┤
    │  Skills        → 拡張可能な機能                  │
    │  Product KB    → 製品カタログ                    │
    │  Cron Jobs     → 13 個の自動スケジュールタスク   │
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email) │
    └─────────────────────────────────────────────────┘
    

    各層はビジネスに合わせてカスタマイズする Markdown ファイルです。AI は会話のたびにすべての層を読み込み、企業、製品、セールス戦略に関する深いコンテキストを持ちます。

    クイックスタート

    オプション A:OpenClaw ユーザー(1 コマンド)

    すでに OpenClaw を実行している場合:

    clawhub install b2b-sdr-agent
    

    完了です。このスキルは、完全な 7 層コンテキストシステム、delivery-queue、sdr-humanizer をワークスペースにインストールします。その後、カスタマイズします:

    # ビジネスに合わせて主要ファイルを編集
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # またはメインワークスペースにコピー
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    すべての {{placeholders}} を実際の企業情報に置き換えれば、AI SDR が稼働します。

    オプション B:完全デプロイ(5 分)

    1. クローンと設定

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # ビジネスに合わせて 7 つのワークスペースファイルを編集
    vim workspace/IDENTITY.md   # 企業情報、役割、パイプライン
    vim workspace/USER.md       # 製品、ICP、競合他社
    vim workspace/SOUL.md       # AI のパーソナリティと規則
    

    2. デプロイ設定のセットアップ

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # サーバー IP、API キー、WhatsApp 番号を記入
    

    3. デプロイ

    ./deploy.sh my-company
    
    # 出力:
    # ✅ Deploy Complete: my-company
    # Gateway:  ws://your-server:18789
    # WhatsApp: Enabled
    # Skills:   b2b_trade (41 skills)
    

    以上です。AI SDR が WhatsApp で稼働し、販売準備が整いました。

    機能

    フルパイプラインセールス自動化(10 ステージ)

    ステージAI が行うこと
    1. リードキャプチャインバウンドメッセージの自動検出(WhatsApp/Telegram/CTWA 広告)、CRM レコード作成
    2. BANT 資格審査予算、決裁権、ニーズ、タイムラインを評価する自然な会話
    3. CRM 入力構造化データキャプチャ — 氏名、企業、国、ICP スコア、製品関心
    4. リサーチ&エンリッチメントJina AI ウェブ検索 + 企業ウェブサイト分析、3 層エンリッチメントパイプライン
    5. 見積もりPDF 見積書を自動生成、多言語対応、オーナーの承認を求めて送信
    6. 交渉対案を追跡、戦略を推奨、必要に応じてエスカレーション
    7. レポート毎日 09:00 パイプラインレポート、15:00 停滞アラート、週次サマリー
    8. 育成自動フォローアップ、業界ニュース、アフターセールスケア、四半期チェックイン
    9. メールアウトリーチパーソナライズされたコールドメールシーケンス(1/3/7/14 日目)、自動フォローアップ
    10. マルチチャネルオーケストレーションクロスチャネル連携(WhatsApp + Email + Telegram)、自動切り替え

    自動スケジューリング(13 個の Cron ジョブ)

    スケジュールタスク
    30 分ごとGmail 受信トレイスキャン(クライアント返信)
    毎日 09:00WhatsApp 経由でオーナーにパイプラインレポート
    毎日 10:00AI リードディスカバリー(市場ローテーション:アフリカ/中東/東南アジア/中南米)
    毎日 11:00メールフォローアップシーケンスチェック
    毎日 15:00停滞リード検出
    毎週水曜ナーチャリングキャンペーン
    毎週金曜競合情報収集
    毎週月曜週次サマリーレポート

    人間のような会話

    • 顧客の言語で応答(自動検出)
    • delivery-queue スキルによる自然なメッセージペーシング(3-90 秒遅延、メッセージ分割)
    • タイムゾーン対応送信(7 市場タイムゾーンマッピング)
    • 文化的適応(中東、アフリカ、東南アジア、ラテンアメリカ、ヨーロッパ)
    • AI であることを明かさない — あなたのセールスコンサルタントとして提示

    ダイナミック ICP スコアリング

    • 5 つの加重次元に基づく初期スコア(購買量、製品マッチ、地域、支払能力、決裁権)
    • 自動調整:素早い返信 +1、見積もり要求 +2、競合他社に言及 +2、7 日間無返信 -1
    • ホットリード(ICP>=7)は自動フラグ付与、オーナーに即時通知

    スマートメモリ(3 エンジン)

    • Supermemory:リサーチノート、競合情報、市場インサイト — アウトリーチ前に照会
    • MemoryLake:セッションコンテキスト、会話サマリー — 会話ごとに自動リコール
    • MemOS Cloud:クロスセッション行動パターン — 自動キャプチャ

    4 層アンチ健忘システム

    AI エージェントは長い会話やセッション間でコンテキストを失います。当社の 4 層アンチ健忘アーキテクチャにより、AI SDR は決して忘れません:

    メッセージ受信 ──→ L1 MemOS 自動リコール(構造化メモリ注入)
        │
        ├──→ L3 ChromaDB ターンごとストア(顧客分離、自動タグ付け)
        │
        ├──→ L2 プロアクティブサマリー:65% トークンで圧縮(haiku 圧縮、情報損失ゼロ)
        │
        └──→ L4 CRM スナップショット:毎日 12:00(災害復旧フォールバック)
    
    層エンジン機能
    L1: MemOS構造化メモリBANT、コミットメント、異議を毎ターン自動抽出。会話開始時に System Prompt に注入。
    L2: プロアクティブサマリートークン監視コンテキスト使用量 65% で haiku クラスモデルにより圧縮。すべての数字、見積もり、コミットメントをそのまま保持。
    L3: ChromaDBターンごとベクトルストアすべての会話ターンを customer_id 分離で保存。見積もり、コミットメント、異議を自動タグ付け。セッション間セマンティック検索。
    L4: CRM スナップショット日次バックアップパイプライン全体の状態を毎日 ChromaDB に保存し災害復旧に備える。いずれかの層が失敗しても L4 にデータあり。

    結果:AI SDR はすべての顧客、すべての見積もり、すべてのコミットメントを記憶 — 100+ ターン後、数週間の沈黙後、システム再起動後でも。

    完全な実装仕様はコード、プロンプト、デプロイガイドを含む ANTI-AMNESIA.md を参照。

    7 層の説明

    層ファイル目的
    IdentityIDENTITY.md企業情報、役割定義、パイプラインステージ、リードティア分類
    SoulSOUL.mdAI のパーソナリティ、コミュニケーションスタイル、厳格な規則、成長マインドセット
    AgentsAGENTS.md10 段階セールスワークフロー、BANT 資格審査、マルチチャネルオーケストレーション
    UserUSER.mdオーナープロフィール、製品ライン、ICP スコアリング、競合他社
    HeartbeatHEARTBEAT.md自動パイプライン検査 — 新規リード、停滞案件、データ品質
    MemoryMEMORY.md3 層メモリアーキテクチャ、SDR 有効性原則
    ToolsTOOLS.mdCRM コマンド、チャネル設定、Web リサーチ、Email アクセス

    スキル

    AI SDR を拡張する事前構築された機能:

    スキル説明
    delivery-queue人間らしい遅延でメッセージをスケジュール。ドリップキャンペーン、タイムドフォローアップ。
    supermemoryセマンティックメモリエンジン。顧客インサイトを自動キャプチャ、すべての会話を横断検索。
    sdr-humanizer自然な会話のための規則 — ペーシング、文化的適応、アンチパターン。
    lead-discoveryAI 駆動のリードディスカバリー。潜在バイヤーのウェブ検索、ICP 評価、CRM 自動入力。
    chroma-memoryターンごとの会話ストレージ。顧客分離、自動タグ付け、CRM スナップショット。
    telegram-toolkitボットコマンド、インラインキーボード、大容量ファイル処理、Telegram ファースト市場戦略。
    quotation-generatorPDF プロフォーマインボイスを自動生成。企業レターヘッド、多言語対応。

    スキルプロフィール

    ニーズに基づいて事前設定されたスキルセットを選択:

    プロフィールスキル数最適な用途
    b2b_trade41 スキルB2B 輸出企業(デフォルト)
    lite16 スキル入門、低ボリューム
    social14 スキルソーシャルメディア重視のセールス
    full40+ スキルすべてを有効化

    業界別サンプル

    一般的な B2B 輸出業界向けのすぐに使える設定:

    業界ディレクトリハイライト
    重車両examples/heavy-vehicles/トラック、機械、フリート販売、アフリカ/中東市場
    家電examples/electronics/OEM/ODM、Amazon セラー、サンプル駆動型セールス
    繊維・衣料examples/textiles/サステナブル生地、GOTS 認証、EU/US 市場

    サンプルを使用するには、ワークスペースにコピーします:

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # その後、具体的なビジネスに合わせてカスタマイズ
    

    製品ナレッジベース

    AI が正確な見積書を生成できるように製品カタログを構造化:

    product-kb/
    ├── catalog.json                    # スペック、MOQ、リードタイムを含む製品カタログ
    ├── products/
    │   └── example-product/info.json   # 詳細な製品情報
    └── scripts/
        └── generate-pi.js              # プロフォーマインボイスジェネレーター
    

    コントロールダッシュボード

    デプロイ後、AI SDR には Web ダッシュボードが組み込まれています:

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    ダッシュボードの表示内容:

    • リアルタイムのボットステータスと WhatsApp 接続状態
    • メッセージ履歴と会話スレッド
    • Cron ジョブの実行状況
    • チャネルヘルスモニタリング

    トークンはデプロイ時に自動生成され、出力に表示されます。非公開にしてください — URL+トークンを持つ人は完全なアクセス権を持ちます。

    セキュリティ注意: config.sh で GATEWAY_BIND="loopback" を設定すると、リモートダッシュボードアクセスが無効になります。デフォルトは "lan"(ネットワークからアクセス可能)です。

    デプロイメント

    前提条件

    • Linux サーバー(Ubuntu 20.04+ 推奨)
    • Node.js 18+
    • AI モデル API キー(OpenAI、Anthropic、Google、Kimi など)
    • WhatsApp Business アカウント(オプションだが推奨)

    設定

    すべての設定は deploy/config.sh にあります。主要なセクション:

    # サーバー
    SERVER_HOST="your-server-ip"
    
    # AI モデル
    PRIMARY_API_KEY="sk-..."
    
    # チャネル
    WHATSAPP_ENABLED=true
    TELEGRAM_BOT_TOKEN="..."
    
    # CRM
    SHEETS_SPREADSHEET_ID="your-google-sheets-id"
    
    # 管理者(AI を管理できるユーザー)
    ADMIN_PHONES="+1234567890"
    

    WhatsApp 設定

    デフォルトでは、AI SDR はすべての WhatsApp コンタクトからのメッセージを受け付けます(dmPolicy: "open")。これはセールスエージェントの推奨設定です — すべての潜在顧客があなたに連絡できるようにしたいからです。

    設定値意味
    WHATSAPP_DM_POLICY"open"(デフォルト)誰からでも DM を受け付ける
    "allowlist"ADMIN_PHONES からのみ受け付ける
    "pairing"まずペアリングコードが必要
    WHATSAPP_GROUP_POLICY"allowlist"(デフォルト)ホワイトリストのグループのみで応答

    デプロイ後に変更するには、サーバー上の ~/.openclaw/openclaw.json を編集:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    その後再起動:systemctl --user restart openclaw-gateway

    WhatsApp IP 分離(マルチテナント)

    同一サーバーで複数のエージェントを実行する場合、各エージェントに固有の出口 IP が必要です。これにより WhatsApp が独立したデバイスとして認識し、アカウント間のクロスフラグを防止します。

    # クライアントデプロイ後に WhatsApp IP を分離:
    ./deploy/ip-isolate.sh acme-corp
    
    # または特定の SOCKS5 ポートを指定:
    ./deploy/ip-isolate.sh acme-corp 40010
    

    仕組み:

                      ┌─ 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
    

    各テナントが取得するもの:

    • 専用の無料 Cloudflare WARP アカウント
    • 分離された wireproxy インスタンス(約 4MB RAM)
    • すべてのアウトバウンドトラフィック(WhatsApp を含む)用の固有の Cloudflare 出口 IP

    デプロイ時に自動有効化するには、config.sh で IP_ISOLATE=true を設定。

    マネージドデプロイメント

    セルフホスティングしたくない場合は、PulseAgent が完全マネージド B2B SDR エージェントを提供:

    • ワンクリックデプロイ
    • ダッシュボード&アナリティクス
    • マルチチャネル管理
    • 優先サポート

    はじめる →

    コントリビューション

    コントリビューション歓迎!以下の分野で協力をお願いします:

    • 業界テンプレート:あなたの業界向けのサンプルを追加
    • スキル:新しい機能を構築
    • 翻訳:ワークスペーステンプレートを他の言語に翻訳
    • ドキュメント:ガイドとチュートリアルの改善

    ライセンス

    MIT — あらゆる用途に使用可能。


  • b2b-sdr-agent-template/README.mdmarkdown · 24.2 KB

    B2B SDR Agent Template

    License: MIT GitHub Stars GitHub Issues

    We're live on Product Hunt! → PulseAgent B2B SDR Agent Skill — Open-source AI SDR for WhatsApp, Email & Telegram. An upvote means the world to us 🙏

    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 →

    🚀 New · 2026-06-12 — OpenClaw v2026.6.6: Security hardening across 10+ vectors (exec approvals fail-closed, deleted-agent ACP bypasses closed), Telegram account-scoped topic routing, iMessage always-on inbound restart, WhatsApp successor-controller fix, Claude Fable 5 adaptive thinking support, and faster UI startup via cached model metadata. See full changelog →

    📦 Add-on · 2026-05-22 — WhatsApp Legacy Account Onboarding Spec v0.5 (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 →

    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, battle-tested with real B2B export companies.

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    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 running:

    clawhub install b2b-sdr-agent
    

    Browse more skills on ClawHub — 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:

    # 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 instead of OpenClaw:

    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

    Option B: Full Deployment (5 Minutes)

    1. Clone & Configure

    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

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # Fill in: server IP, API key, WhatsApp number
    

    3. Validate Locally

    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

    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

    ./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)

    StageWhat the AI Does
    1. Lead CaptureAuto-detect inbound messages (WhatsApp/Telegram/CTWA ads), create CRM records
    2. BANT QualificationNatural conversation to assess Budget, Authority, Need, Timeline
    3. CRM EntryStructured data capture — name, company, country, ICP score, product interest
    4. Research & EnrichmentJina AI web search + company website analysis, 3-layer enrichment pipeline
    5. QuotationAuto-generate PDF quotes, multi-language, send to owner for approval
    6. NegotiationTrack counter-offers, recommend strategy, escalate when needed
    7. ReportingDaily 09:00 pipeline reports, 15:00 stalled alerts, weekly summaries
    8. NurtureAutomated follow-ups, industry news, post-sale care, quarterly check-ins
    9. Email OutreachPersonalized cold email sequences (Day 1/3/7/14), auto follow-up
    10. Multi-Channel OrchestrationCross-channel coordination (WhatsApp + Email + Telegram), auto-switching

    Automated Scheduling (14 Pipeline Checks)

    ScheduleTask
    Every heartbeatNew lead intake, quote tracking, meeting prep, and data-quality checks
    Every 30 minGmail inbox scan for client replies
    Daily 09:00Pipeline report to owner via WhatsApp
    Daily 10:00AI lead discovery (market rotation: Africa/ME/SEA/LatAm)
    Daily 11:00Email follow-up sequence check
    Daily 15:00Stalled lead detection
    Weekly WedNurture campaign
    Weekly FriCompetitor intelligence gathering
    Weekly MonWeekly summary report
    Daily 12:00CRM snapshot to ChromaDB (L4 disaster recovery)
    Daily 14:00Memory health check (Supermemory + ChromaDB stats)
    Every heartbeatMicrosoft Teams mention/DM scan for sales handoff
    Every 30 minWhatsApp 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)
    
    LayerEngineWhat It Does
    L1: MemOSStructured memoryAuto-extracts BANT, commitments, objections every turn. Injects into System Prompt at conversation start.
    L2: Proactive SummaryToken monitoringCompresses at 65% context usage via haiku-class model. All numbers, quotes, commitments preserved verbatim.
    L3: ChromaDBPer-turn vector storeEvery conversation turn stored with customer_id isolation. Auto-tags quotes, commitments, objections. Semantic retrieval across sessions.
    L4: CRM SnapshotDaily backupStores 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 for the full implementation spec with code, prompts, and deployment guide.

    The 7 Layers Explained

    LayerFilePurpose
    IdentityIDENTITY.mdCompany info, role definition, pipeline stages, lead tiering
    SoulSOUL.mdAI personality, communication style, hard rules, growth mindset
    AgentsAGENTS.md10-stage sales workflow, BANT qualification, multi-channel orchestration
    UserUSER.mdOwner profile, product lines, ICP scoring, competitors
    HeartbeatHEARTBEAT.md14-item automated pipeline inspection + memory health
    MemoryMEMORY.md4-layer anti-amnesia protocol (MemOS + Summary + ChromaDB + CRM)
    ToolsTOOLS.mdCRM commands, channel config, web research, email access

    Skills

    Pre-built capabilities that extend your AI SDR:

    SkillDescription
    delivery-queueSchedule messages with human-like delays. Drip campaigns, timed follow-ups.
    supermemorySemantic memory engine. Store research notes, competitor intel, market insights.
    chroma-memoryPer-turn conversation storage with customer isolation, auto-tagging, and CRM snapshots.
    telegram-toolkitBot commands, inline keyboards, large file handling, and Telegram-first market strategies.
    sdr-humanizerRules for natural conversation — pacing, cultural adaptation, anti-patterns.
    lead-discoveryAI-driven lead discovery. Web search for potential buyers, ICP evaluation, CRM auto-entry.
    quotation-generatorAuto-generate PDF proforma invoices with company letterhead, multi-language support.
    graphifyKnowledge graph engine — map product relationships, customer intelligence, and market research into queryable graphs. Powered by graphify.

    Skill Profiles

    Choose a pre-configured skill set based on your needs:

    ProfileSkillsBest For
    b2b_trade41 skillsB2B export companies (default)
    lite16 skillsGetting started, low-volume
    social14 skillsSocial media-focused sales
    full40+ skillsEverything enabled

    Industry Examples

    Ready-to-use configurations for common B2B export verticals:

    IndustryDirectoryHighlights
    Heavy Vehiclesexamples/heavy-vehicles/Trucks, machinery, fleet sales, African/ME markets
    Consumer Electronicsexamples/electronics/OEM/ODM, Amazon sellers, sample-driven sales
    Textiles & Garmentsexamples/textiles/Sustainable fabrics, GOTS certified, EU/US markets

    To use an example, copy it into your workspace:

    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.

    SettingValueMeaning
    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:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    Then restart: systemctl --user restart openclaw-gateway

    💡 Keep your sender number alive: aggressive outreach gets new WhatsApp numbers banned fast. Free toolkit at PaibaoWork (中文) — ban self-check, account warm-up tracker, appeal letter generator, team anti-association check.

    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:

    # 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:

    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.

    # 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 account
    • An isolated 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 offers fully managed B2B SDR agents with:

    • One-click deployment
    • Dashboard & analytics
    • Multi-channel management
    • Priority support

    Get Started →

    Community

    Join the conversation, ask questions, and share your use cases:

    Learn more:

    Contributing

    Contributions welcome! See our Contributing Guide 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.



    TalentDelta provenance record (added at packaging)

    • Packaged for: TalentDelta catalogue (draft; gated by review)
    • Upstream: https://github.com/iPythoning/b2b-sdr-agent-template
    • Pinned commit: 6131928188d863fb413b70f3da8b6d3e13f44eea (2026-09-29)
    • Licence: MIT - the upstream LICENSE file ships unchanged
    • Upstream author credit: Clark Fan (iPythoning / PulseAgent)
    • Runtime: OpenClaw agent runtime (this template does not target Hermes): Node 18+ for install.sh and the package.json tooling, Python for the scripts, a messaging channel (WhatsApp / Telegram / email) with its own credentials, and an LLM API key. deploy/generate-config.sh builds the runtime config from deploy/config.sh.example
    • Changes made at packaging: this section was appended to README.md. Upstream paths deliberately NOT shipped in this archive: .sync (the maintainer's own blog and WeChat publishing state (draft posts, hourly sync logs, release markers) - regenerable, and unrelated to running the agent). Edited at packaging, so NOT byte-identical to the pinned commit: scripts/validate-template.sh, skills/chroma-memory/SKILL.md, skills/delivery-queue/SKILL.md, skills/sdr-humanizer/SKILL.md, skills/supermemory/SKILL.md, skills/telegram-toolkit/SKILL.md (five capabilities shipped without a YAML frontmatter block, so no loader could read them: a block was inserted with name set to the skill directory and description taken verbatim from that skill's own summary line, leaving the original heading and body untouched; in the deployment validation harness two values were credential-shaped (written into a temporary config and read back in a second phase) and are now REPLACE_WITH_YOUR_REAL_KEY, which keeps the test meaningful and leaves nothing secret-shaped in the archive. No other behaviour changed; bash -n passes on the edited script). Every other file is byte-identical to the pinned commit.
    • Safety read of the packaged archive (packaging time, 2026-10-06): no live credentials. The only credential-shaped values were two test values in scripts/validate-template.sh, replaced at packaging with a neutral placeholder; the harness still parses (bash -n clean). See the packaging notes below.

    Packaging notes (TalentDelta)

    • The reviewer-side inspector's two remaining findings are disclosed rather than papered over. scripts/validate-template.sh:101 writes the template's own documented non-root deployment home /home/openclaw and asserts the generated config against it: it is the TEMPLATE's path, not the packager's, and the assertion fails if it is changed. README.md tells the operator the Doctor checks openclaw.json; that file is deployment output produced by deploy/generate-config.sh from deploy/config.sh.example (both shipped), and the upstream repository does not contain it either.
    • Repairs verified before/after by sha256 prefix: chroma-memory 3979a27f->8a59a61c, delivery-queue b36ae369->efec20cc, sdr-humanizer 75a13a93->4711cdaf, supermemory 210c8ac0->8960a504, telegram-toolkit d709830b->a3d3bac0, scripts/validate-template.sh c58ea711->251ed99f.
    • Language: the workflow document AGENTS.md is written in Chinese; workspace/ identity files, docs/, deploy/ and the multilingual README suite are English (README in 8 languages).
    • The root SKILL.md declares name: b2b-sdr-agent while its directory is b2b-sdr-agent-template - an upstream cosmetic mismatch, left as-is and reported by the inspector as a warning.
  • b2b-sdr-agent-template/README.pt-BR.mdmarkdown · 16.2 KB

    Template de Agente SDR B2B

    Transforme qualquer negócio de exportação B2B em uma máquina de vendas com IA em 5 minutos.

    Um template open-source e pronto para produção para construir Representantes de Desenvolvimento de Vendas (SDRs) com IA que gerenciam o pipeline de vendas completo — desde a captura de leads até o fechamento de negócios — através de WhatsApp, Telegram e e-mail.

    Construído com OpenClaw, testado em batalha com empresas reais de exportação B2B.

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    Arquitetura: Sistema de Contexto em 7 Camadas

    ┌─────────────────────────────────────────────────┐
    │              Agente SDR com IA                   │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → Quem sou eu? Empresa, papel     │
    │  SOUL.md       → Personalidade, valores, regras   │
    │  AGENTS.md     → Workflow completo de vendas (10 estágios)│
    │  USER.md       → Perfil do proprietário, ICP, pontuação│
    │  HEARTBEAT.md  → Inspeção do pipeline em 13 pontos│
    │  MEMORY.md     → Arquitetura de memória com 3 motores│
    │  TOOLS.md      → CRM, canais, integrações         │
    ├─────────────────────────────────────────────────┤
    │  Skills        → Capacidades extensíveis          │
    │  Product KB    → Catálogo de produtos             │
    │  Cron Jobs     → 13 tarefas agendadas automáticas │
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email)  │
    └─────────────────────────────────────────────────┘
    

    Cada camada é um arquivo Markdown que você personaliza para seu negócio. A IA lê todas as camadas em cada conversa, fornecendo contexto profundo sobre sua empresa, produtos e estratégia de vendas.

    Início Rápido

    Opção A: Usuários do OpenClaw (1 Comando)

    Se você já tem o OpenClaw rodando:

    clawhub install b2b-sdr-agent
    

    Pronto. A skill instala o sistema completo de contexto em 7 camadas, delivery-queue e sdr-humanizer no seu workspace. Depois personalize:

    # Edite os arquivos principais para seu negócio
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # Ou copie para seu workspace principal
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    Substitua todos os {{placeholders}} com informações reais da sua empresa, e seu SDR com IA estará no ar.

    Opção B: Implementação Completa (5 Minutos)

    1. Clone & Configure

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # Edite os 7 arquivos do workspace para seu negócio
    vim workspace/IDENTITY.md   # Informações da empresa, papel, pipeline
    vim workspace/USER.md       # Seus produtos, ICP, concorrentes
    vim workspace/SOUL.md       # Personalidade e regras da IA
    

    2. Configure o Deployment

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # Preencha: IP do servidor, chave API, número WhatsApp
    

    3. Deploy

    ./deploy.sh minha-empresa
    
    # Saída:
    # ✅ Deploy Completo: minha-empresa
    # Gateway:  ws://seu-servidor:18789
    # WhatsApp: Habilitado
    # Skills:   b2b_trade (41 skills)
    

    É isso. Seu SDR com IA está ativo no WhatsApp e pronto para vender.

    O Que Ele Faz

    Automação de Vendas em Pipeline Completo (10 Estágios)

    EstágioO Que a IA Faz
    1. Captura de LeadsAuto-detecta mensagens recebidas (WhatsApp/Telegram/anúncios CTWA), cria registros no CRM
    2. Qualificação BANTConversa natural para avaliar Budget (Orçamento), Authority (Autoridade), Need (Necessidade), Timeline (Prazo)
    3. Registro CRMCaptura de dados estruturados — nome, empresa, país, pontuação ICP, interesse em produto
    4. Pesquisa e EnriquecimentoBusca web com Jina AI + análise do site da empresa, pipeline de enriquecimento em 3 camadas
    5. CotaçãoGera orçamentos PDF automáticos, multi-idioma, envia para aprovação do proprietário
    6. NegociaçãoRastreia contra-propostas, recomenda estratégia, escala quando necessário
    7. RelatóriosRelatórios diários do pipeline às 09:00, alertas de estagnação às 15:00, resumos semanais
    8. NutriçãoFollow-ups automatizados, notícias do setor, cuidado pós-venda, check-ins trimestrais
    9. Email OutreachSequências de email frio personalizadas (Dia 1/3/7/14), follow-up automático
    10. Orquestração MulticanalCoordenação entre canais (WhatsApp + Email + Telegram), troca automática

    Agendamento Automatizado (13 Cron Jobs)

    HorárioTarefa
    A cada 30 minScan da caixa de entrada Gmail para respostas de clientes
    Diário 09:00Relatório do pipeline para o proprietário via WhatsApp
    Diário 10:00Descoberta de leads com IA (rotação de mercados: África/OM/ASE/LatAm)
    Diário 11:00Verificação da sequência de follow-up por email
    Diário 15:00Detecção de leads parados
    Semanal QuaCampanha de nutrição
    Semanal SexColeta de inteligência competitiva
    Semanal SegRelatório resumo semanal

    Conversas Humanizadas

    • Responde no idioma do cliente (auto-detectado)
    • Ritmo natural de mensagens com a skill delivery-queue (atrasos de 3-90s, divisão de mensagens)
    • Envio com consciência de fuso horário (7 mapeamentos de fusos horários de mercados)
    • Adaptação cultural (Oriente Médio, África, Sudeste Asiático, América Latina, Europa)
    • Nunca revela identidade de IA — se apresenta como seu consultor de vendas

    Pontuação ICP Dinâmica

    • Pontuação inicial baseada em 5 dimensões ponderadas (volume de compra, adequação do produto, região, capacidade de pagamento, autoridade)
    • Auto-ajusta com base na interação: resposta rápida +1, pede cotação +2, menciona concorrente +2, 7d sem resposta -1
    • Leads quentes (ICP>=7) sinalizados automaticamente, proprietário notificado imediatamente

    Memória Inteligente (3 Motores)

    • Supermemory: Notas de pesquisa, inteligência competitiva, insights de mercado — consultado antes do contato
    • MemoryLake: Contexto de sessão, resumos de conversas — recuperado automaticamente por conversa
    • MemOS Cloud: Padrões de comportamento entre sessões — capturado automaticamente

    Sistema Anti-Amnésia de 4 Camadas

    Agentes de IA perdem contexto em conversas longas e entre sessões. Nossa arquitetura anti-amnésia de 4 camadas garante que seu SDR com IA nunca esqueça:

    Mensagem recebida ──→ L1 MemOS auto-recall (injeção de memória estruturada)
        │
        ├──→ L3 ChromaDB armazenamento por turno (isolamento por cliente, etiquetagem automática)
        │
        ├──→ L2 Resumo proativo a 65% dos tokens (compressão haiku, zero perda de informação)
        │
        └──→ L4 Snapshot CRM diário 12:00 (fallback de recuperação de desastres)
    
    CamadaMotorO Que Faz
    L1: MemOSMemória estruturadaExtrai automaticamente BANT, compromissos e objeções a cada turno. Injeta no System Prompt no início da conversa.
    L2: Resumo ProativoMonitoramento de tokensComprime a 65% de uso do contexto via modelo classe haiku. Todos os números, cotações e compromissos preservados literalmente.
    L3: ChromaDBArmazenamento vetorial por turnoCada turno de conversa armazenado com isolamento por customer_id. Etiquetagem automática de cotações, compromissos e objeções. Recuperação semântica entre sessões.
    L4: Snapshot CRMBackup diárioArmazena o estado completo do pipeline diariamente no ChromaDB como recuperação de desastres. Se qualquer camada falhar, L4 tem os dados.

    Resultado: Seu SDR com IA lembra de cada cliente, cada cotação, cada compromisso — mesmo após 100+ turnos, semanas de silêncio ou reinicializações do sistema.

    Veja ANTI-AMNESIA.md para a especificação completa de implementação com código, prompts e guia de deployment.

    As 7 Camadas Explicadas

    CamadaArquivoPropósito
    IdentityIDENTITY.mdInformações da empresa, definição de papel, estágios do pipeline, classificação de leads
    SoulSOUL.mdPersonalidade da IA, estilo de comunicação, regras rígidas, mentalidade de crescimento
    AgentsAGENTS.mdWorkflow de vendas em 10 estágios, qualificação BANT, orquestração multicanal
    UserUSER.mdPerfil do proprietário, linhas de produtos, pontuação ICP, concorrentes
    HeartbeatHEARTBEAT.mdInspeção automatizada do pipeline — novos leads, negócios parados, qualidade de dados
    MemoryMEMORY.mdArquitetura de memória em 3 níveis, princípios de eficácia do SDR
    ToolsTOOLS.mdComandos CRM, configuração de canais, pesquisa web, acesso a e-mail

    Skills

    Capacidades pré-construídas que estendem seu SDR com IA:

    SkillDescrição
    delivery-queueAgenda mensagens com atrasos humanizados. Campanhas gotejamento, follow-ups programados.
    supermemoryMotor de memória semântica. Auto-captura insights de clientes, busca em todas as conversas.
    sdr-humanizerRegras para conversa natural — ritmo, adaptação cultural, anti-padrões.
    lead-discoveryDescoberta de leads por IA. Busca web de compradores potenciais, avaliação ICP, entrada automática no CRM.
    chroma-memoryArmazenamento de conversas por turno com isolamento de clientes, etiquetagem automática e snapshots do CRM.
    telegram-toolkitComandos de bot, teclados inline, manipulação de arquivos grandes e estratégias para mercados Telegram-first.
    quotation-generatorGeração automática de faturas proforma em PDF com papel timbrado da empresa, suporte multi-idioma.

    Perfis de Skills

    Escolha um conjunto de skills pré-configurado baseado em suas necessidades:

    PerfilSkillsMelhor Para
    b2b_trade41 skillsEmpresas de exportação B2B (padrão)
    lite16 skillsComeçando, baixo volume
    social14 skillsVendas focadas em mídias sociais
    full40+ skillsTudo habilitado

    Exemplos por Indústria

    Configurações prontas para uso para verticais comuns de exportação B2B:

    IndústriaDiretórioDestaques
    Veículos Pesadosexamples/heavy-vehicles/Caminhões, maquinário, vendas de frotas, mercados África/Oriente Médio
    Eletrônicos de Consumoexamples/electronics/OEM/ODM, vendedores Amazon, vendas por amostra
    Têxteis & Vestuárioexamples/textiles/Tecidos sustentáveis, certificação GOTS, mercados EU/EUA

    Para usar um exemplo, copie-o para seu workspace:

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # Depois personalize para seu negócio específico
    

    Base de Conhecimento de Produtos

    Estruture seu catálogo de produtos para que a IA possa gerar orçamentos precisos:

    product-kb/
    ├── catalog.json                    # Catálogo de produtos com especificações, MOQ, prazos
    ├── products/
    │   └── example-product/info.json   # Informações detalhadas do produto
    └── scripts/
        └── generate-pi.js              # Gerador de fatura proforma
    

    Painel de Controle

    Após o deployment, seu SDR com IA vem com um painel web integrado:

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    O painel mostra:

    • Status do bot em tempo real e conexão WhatsApp
    • Histórico de mensagens e threads de conversa
    • Status de execução dos cron jobs
    • Monitoramento de saúde dos canais

    O token é gerado automaticamente durante o deployment e exibido na saída. Mantenha-o privado — qualquer pessoa com a URL+token tem acesso completo.

    Nota de segurança: Defina GATEWAY_BIND="loopback" em config.sh para desabilitar o acesso remoto ao painel. O padrão é "lan" (acessível pela rede).

    Deployment

    Pré-requisitos

    • Um servidor Linux (Ubuntu 20.04+ recomendado)
    • Node.js 18+
    • Uma chave de API de modelo de IA (OpenAI, Anthropic, Google, Kimi, etc.)
    • Conta WhatsApp Business (opcional mas recomendado)

    Configuração

    Toda a configuração está em deploy/config.sh. Seções principais:

    # Servidor
    SERVER_HOST="ip-do-seu-servidor"
    
    # Modelo de IA
    PRIMARY_API_KEY="sk-..."
    
    # Canais
    WHATSAPP_ENABLED=true
    TELEGRAM_BOT_TOKEN="..."
    
    # CRM
    SHEETS_SPREADSHEET_ID="seu-id-google-sheets"
    
    # Admin (quem pode gerenciar a IA)
    ADMIN_PHONES="+1234567890"
    

    Configuração do WhatsApp

    Por padrão, o SDR com IA aceita mensagens de todos os contatos do WhatsApp (dmPolicy: "open"). Esta é a configuração recomendada para agentes de vendas — você quer que todo cliente potencial consiga te contatar.

    ConfiguraçãoValorSignificado
    WHATSAPP_DM_POLICY"open" (padrão)Aceitar DMs de qualquer pessoa
    "allowlist"Aceitar apenas de ADMIN_PHONES
    "pairing"Requer código de pareamento primeiro
    WHATSAPP_GROUP_POLICY"allowlist" (padrão)Responder apenas em grupos da lista branca

    Para alterar após o deployment, edite ~/.openclaw/openclaw.json no servidor:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    Depois reinicie: systemctl --user restart openclaw-gateway

    Isolamento de IP do WhatsApp (Multi-Tenant)

    Ao executar múltiplos agentes no mesmo servidor, cada um deve ter um IP de saída único para que o WhatsApp veja dispositivos independentes. Isso previne o bloqueio cruzado entre contas.

    # Após fazer deploy de um cliente, isolar o IP do WhatsApp dele:
    ./deploy/ip-isolate.sh acme-corp
    
    # Ou com uma porta SOCKS5 específica:
    ./deploy/ip-isolate.sh acme-corp 40010
    

    Como funciona:

                      ┌─ 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
    

    Cada tenant recebe:

    • Uma conta dedicada gratuita do Cloudflare WARP
    • Uma instância isolada do wireproxy (~4MB RAM)
    • Um IP de saída Cloudflare único para todo o tráfego de saída (incluindo WhatsApp)

    Para habilitar automaticamente durante o deploy, defina IP_ISOLATE=true em config.sh.

    Deployment Gerenciado

    Não quer hospedar você mesmo? PulseAgent oferece agentes SDR B2B totalmente gerenciados com:

    • Deployment com um clique
    • Dashboard & analytics
    • Gerenciamento multi-canal
    • Suporte prioritário

    Comece Agora →

    Contribuindo

    Contribuições são bem-vindas! Áreas onde adoraríamos ajuda:

    • Templates de indústria: Adicione exemplos para sua indústria
    • Skills: Construa novas capacidades
    • Traduções: Traduza templates do workspace para outros idiomas
    • Documentação: Melhore guias e tutoriais

    Licença

    MIT — use para qualquer coisa.


  • b2b-sdr-agent-template/README.ru.mdmarkdown · 23.6 KB

    B2B SDR Agent Template

    Превратите любой B2B экспортный бизнес в автоматизированную машину продаж на базе AI за 5 минут.

    Open-source шаблон производственного уровня для создания AI-агентов по развитию продаж (SDR), которые обрабатывают полный цикл продаж — от захвата лидов до закрытия сделок — через WhatsApp, Telegram и электронную почту.

    Построен на OpenClaw, проверен в реальных B2B экспортных компаниях.

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    Архитектура: 7-уровневая система контекста

    ┌─────────────────────────────────────────────────┐
    │              AI SDR Агент                        │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → Кто я? Компания, роль          │
    │  SOUL.md       → Личность, ценности, правила    │
    │  AGENTS.md     → Полный процесс продаж (10 этапов) │
    │  USER.md       → Профиль владельца, ICP, скоринг│
    │  HEARTBEAT.md  → Проверка pipeline из 13 пунктов│
    │  MEMORY.md     → Архитектура памяти из 3 движков│
    │  TOOLS.md      → CRM, каналы, интеграции        │
    ├─────────────────────────────────────────────────┤
    │  Skills        → Расширяемые возможности        │
    │  Product KB    → Каталог ваших продуктов        │
    │  Cron Jobs     → 13 автоматических задач по расписанию │
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email) │
    └─────────────────────────────────────────────────┘
    

    Каждый уровень — это Markdown файл, который вы настраиваете под свой бизнес. AI читает все уровни при каждом разговоре, получая глубокий контекст о вашей компании, продуктах и стратегии продаж.

    Быстрый старт

    Вариант A: Пользователи OpenClaw (1 команда)

    Если у вас уже запущен OpenClaw:

    clawhub install b2b-sdr-agent
    

    Готово. Skill устанавливает полную 7-уровневую систему контекста, delivery-queue и sdr-humanizer в ваше рабочее пространство. Затем настройте:

    # Отредактируйте ключевые файлы для вашего бизнеса
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # Или скопируйте в основное рабочее пространство
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    Замените все {{placeholders}} на фактическую информацию о вашей компании, и ваш AI SDR заработает.

    Вариант B: Полное развертывание (5 минут)

    1. Клонирование и настройка

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # Отредактируйте 7 файлов рабочего пространства для вашего бизнеса
    vim workspace/IDENTITY.md   # Информация о компании, роль, pipeline
    vim workspace/USER.md       # Ваши продукты, ICP, конкуренты
    vim workspace/SOUL.md       # Личность AI и правила
    

    2. Настройка конфигурации развертывания

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # Заполните: IP сервера, API ключ, номер WhatsApp
    

    3. Развертывание

    ./deploy.sh my-company
    
    # Вывод:
    # ✅ Deploy Complete: my-company
    # Gateway:  ws://your-server:18789
    # WhatsApp: Enabled
    # Skills:   b2b_trade (41 skills)
    

    Вот и все. Ваш AI SDR работает в WhatsApp и готов продавать.

    Что он делает

    Автоматизация полного цикла продаж (10 этапов)

    ЭтапЧто делает AI
    1. Захват лидовАвтоматическое обнаружение входящих сообщений (WhatsApp/Telegram/CTWA реклама), создание записей в CRM
    2. BANT квалификацияЕстественный диалог для оценки Бюджета, Полномочий, Потребности, Сроков
    3. Ввод в CRMСтруктурированный сбор данных — имя, компания, страна, ICP оценка, интерес к продукту
    4. Исследование и обогащениеJina AI веб-поиск + анализ сайта компании, 3-уровневый конвейер обогащения данных
    5. Коммерческое предложениеАвтоматическая генерация PDF-предложений, мультиязычность, отправка владельцу на утверждение
    6. ПереговорыОтслеживание встречных предложений, рекомендации по стратегии, эскалация при необходимости
    7. ОтчетностьЕжедневные отчеты по pipeline в 09:00, уведомления о застое в 15:00, еженедельные сводки
    8. РазвитиеАвтоматические follow-up, отраслевые новости, послепродажное обслуживание, ежеквартальные проверки
    9. Email-рассылкаПерсонализированные цепочки холодных писем (День 1/3/7/14), автоматический follow-up
    10. Мульти-канальная оркестрацияКросс-канальная координация (WhatsApp + Email + Telegram), автопереключение

    Автоматическое планирование (13 Cron-задач)

    РасписаниеЗадача
    Каждые 30 минСканирование входящих Gmail для ответов клиентов
    Ежедневно 09:00Отчет по pipeline владельцу через WhatsApp
    Ежедневно 10:00AI-поиск лидов (ротация рынков: Африка/БВ/ЮВА/ЛатАм)
    Ежедневно 11:00Проверка цепочки email follow-up
    Ежедневно 15:00Обнаружение застопорившихся лидов
    Еженедельно СрNurture-кампания
    Еженедельно ПтСбор конкурентной разведки
    Еженедельно ПнЕженедельный сводный отчет

    Человекоподобные диалоги

    • Отвечает на языке клиента (автоопределение)
    • Естественный темп сообщений с delivery-queue skill (задержки 3-90с, разбиение сообщений)
    • Отправка с учетом часовых поясов (7 маппингов рыночных часовых поясов)
    • Культурная адаптация (Ближний Восток, Африка, ЮВА, Латинская Америка, Европа)
    • Никогда не раскрывает AI-идентичность — представляется как ваш консультант по продажам

    Динамический ICP-скоринг

    • Начальный скор на основе 5 взвешенных измерений (объем закупок, соответствие продукту, регион, платежеспособность, полномочия)
    • Автокорректировка по взаимодействию: быстрый ответ +1, запрос коммерческого предложения +2, упоминание конкурента +2, 7 дней без ответа -1
    • Горячие лиды (ICP>=7) автоматически отмечаются, владелец уведомляется мгновенно

    Умная память (3 движка)

    • Supermemory: Заметки исследований, конкурентная разведка, рыночные инсайты — запрашивается перед outreach
    • MemoryLake: Контекст сессии, саммари разговоров — автоматически восстанавливается в каждом разговоре
    • MemOS Cloud: Кросс-сессионные паттерны поведения — автоматически захватываются

    4-уровневая система против амнезии

    AI-агенты теряют контекст в длинных разговорах и между сессиями. Наша 4-уровневая архитектура против амнезии гарантирует, что ваш AI SDR никогда не забудет:

    Входящее сообщение ──→ L1 MemOS авто-восстановление (инъекция структурированной памяти)
        │
        ├──→ L3 ChromaDB пошаговое хранение (изоляция клиентов, автотегирование)
        │
        ├──→ L2 Проактивное резюме при 65% токенов (haiku-сжатие, нулевая потеря информации)
        │
        └──→ L4 CRM-снимок ежедневно 12:00 (резервное восстановление)
    
    УровеньДвижокЧто делает
    L1: MemOSСтруктурированная памятьАвтоматическая экстракция BANT, обязательств, возражений на каждом ходу. Инъекция в System Prompt при начале разговора.
    L2: Проактивное резюмеМониторинг токеновСжатие при 65% использования контекста через модель класса haiku. Все числа, коммерческие предложения, обязательства сохраняются дословно.
    L3: ChromaDBПошаговое векторное хранилищеКаждый ход разговора хранится с изоляцией по customer_id. Автотегирование коммерческих предложений, обязательств, возражений. Семантический поиск между сессиями.
    L4: CRM-снимокЕжедневное резервированиеСохраняет полное состояние pipeline ежедневно в ChromaDB для аварийного восстановления. Если любой уровень откажет, данные есть в L4.

    Результат: Ваш AI SDR помнит каждого клиента, каждое коммерческое предложение, каждое обязательство — даже после 100+ ходов, недель молчания или перезагрузки системы.

    Полная спецификация реализации с кодом, промптами и руководством по развертыванию — ANTI-AMNESIA.md.

    Объяснение 7 уровней

    УровеньФайлНазначение
    IdentityIDENTITY.mdИнформация о компании, определение роли, этапы pipeline, уровни лидов
    SoulSOUL.mdЛичность AI, стиль коммуникации, жесткие правила, установка на рост
    AgentsAGENTS.md10-этапный процесс продаж, BANT квалификация, мульти-канальная оркестрация
    UserUSER.mdПрофиль владельца, линейки продуктов, ICP скоринг, конкуренты
    HeartbeatHEARTBEAT.mdАвтоматическая проверка pipeline — новые лиды, застопорившиеся сделки, качество данных
    MemoryMEMORY.md3-уровневая архитектура памяти, принципы эффективности SDR
    ToolsTOOLS.mdCRM команды, конфигурация каналов, веб-исследования, доступ к почте

    Skills

    Предустановленные возможности, расширяющие ваш AI SDR:

    SkillОписание
    delivery-queueПланирование сообщений с человекоподобными задержками. Drip-кампании, отложенные последующие сообщения.
    supermemoryСемантический движок памяти. Автозахват инсайтов о клиентах, поиск по всем разговорам.
    sdr-humanizerПравила для естественного диалога — темп, культурная адаптация, антипаттерны.
    lead-discoveryAI-поиск лидов. Веб-поиск потенциальных покупателей, оценка ICP, автоматический ввод в CRM.
    chroma-memoryХранение разговоров по каждому ходу с изоляцией по клиентам, автотегирование и CRM-снимки.
    telegram-toolkitКоманды бота, инлайн-клавиатуры, обработка больших файлов и стратегии для Telegram-first рынков.
    quotation-generatorАвтогенерация PDF проформ-инвойсов с фирменным бланком компании, мультиязычная поддержка.

    Профили Skills

    Выберите предварительно настроенный набор skills в соответствии с вашими потребностями:

    ПрофильSkillsЛучше всего для
    b2b_trade41 skillsB2B экспортные компании (по умолчанию)
    lite16 skillsНачало работы, небольшой объем
    social14 skillsПродажи, ориентированные на соцсети
    full40+ skillsВсе включено

    Примеры по отраслям

    Готовые к использованию конфигурации для распространенных B2B экспортных вертикалей:

    ОтрасльДиректорияОсобенности
    Тяжелая техникаexamples/heavy-vehicles/Грузовики, машины, продажи автопарков, африканские/ближневосточные рынки
    Потребительская электроникаexamples/electronics/OEM/ODM, продавцы Amazon, продажи на основе образцов
    Текстиль и одеждаexamples/textiles/Устойчивые ткани, сертификация GOTS, рынки ЕС/США

    Чтобы использовать пример, скопируйте его в ваше рабочее пространство:

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # Затем настройте под ваш конкретный бизнес
    

    База знаний о продуктах

    Структурируйте каталог продуктов так, чтобы AI мог генерировать точные коммерческие предложения:

    product-kb/
    ├── catalog.json                    # Каталог продуктов со спецификациями, MOQ, сроками
    ├── products/
    │   └── example-product/info.json   # Детальная информация о продукте
    └── scripts/
        └── generate-pi.js              # Генератор проформ-инвойсов
    

    Панель управления

    После развертывания ваш AI SDR поставляется со встроенной веб-панелью:

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    Панель показывает:

    • Статус бота в реальном времени и подключение WhatsApp
    • Историю сообщений и цепочки разговоров
    • Статус выполнения cron-задач
    • Мониторинг здоровья каналов

    Токен автоматически генерируется при развертывании и выводится в консоль. Храните его в секрете — любой с URL+токеном получает полный доступ.

    Примечание по безопасности: Установите GATEWAY_BIND="loopback" в config.sh для отключения удаленного доступа к панели. По умолчанию "lan" (доступ из сети).

    Развертывание

    Требования

    • Linux сервер (рекомендуется Ubuntu 20.04+)
    • Node.js 18+
    • API ключ AI модели (OpenAI, Anthropic, Google, Kimi и т.д.)
    • WhatsApp Business аккаунт (опционально, но рекомендуется)

    Конфигурация

    Вся конфигурация находится в deploy/config.sh. Ключевые секции:

    # Сервер
    SERVER_HOST="your-server-ip"
    
    # AI Модель
    PRIMARY_API_KEY="sk-..."
    
    # Каналы
    WHATSAPP_ENABLED=true
    TELEGRAM_BOT_TOKEN="..."
    
    # CRM
    SHEETS_SPREADSHEET_ID="your-google-sheets-id"
    
    # Администратор (кто может управлять AI)
    ADMIN_PHONES="+1234567890"
    

    Настройка WhatsApp

    По умолчанию AI SDR принимает сообщения от всех контактов WhatsApp (dmPolicy: "open"). Это рекомендуемая настройка для агентов продаж — вы хотите, чтобы каждый потенциальный клиент мог с вами связаться.

    НастройкаЗначениеОписание
    WHATSAPP_DM_POLICY"open" (по умолчанию)Принимать DM от любого
    "allowlist"Принимать только от ADMIN_PHONES
    "pairing"Требуется код сопряжения
    WHATSAPP_GROUP_POLICY"allowlist" (по умолчанию)Отвечать только в группах из белого списка

    Для изменения после развертывания отредактируйте ~/.openclaw/openclaw.json на сервере:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    Затем перезапустите: systemctl --user restart openclaw-gateway

    Изоляция IP WhatsApp (мульти-тенант)

    При запуске нескольких агентов на одном сервере каждый должен иметь уникальный выходной IP, чтобы WhatsApp видел независимые устройства. Это предотвращает перекрестную блокировку аккаунтов.

    # После развертывания клиента изолируйте его WhatsApp IP:
    ./deploy/ip-isolate.sh acme-corp
    
    # Или с конкретным SOCKS5 портом:
    ./deploy/ip-isolate.sh acme-corp 40010
    

    Как это работает:

                      ┌─ 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
    

    Каждый тенант получает:

    • Выделенный бесплатный аккаунт Cloudflare WARP
    • Изолированный экземпляр wireproxy (~4 МБ RAM)
    • Уникальный выходной IP Cloudflare для всего исходящего трафика (включая WhatsApp)

    Для автоматического включения при развертывании установите IP_ISOLATE=true в config.sh.

    Управляемое развертывание

    Не хотите самостоятельно хостить? PulseAgent предлагает полностью управляемые B2B SDR агенты с:

    • Развертывание в один клик
    • Панель управления и аналитика
    • Управление несколькими каналами
    • Приоритетная поддержка

    Начать работу →

    Вклад в проект

    Приветствуются любые вклады! Области, где нам нужна помощь:

    • Отраслевые шаблоны: Добавьте примеры для вашей отрасли
    • Skills: Создавайте новые возможности
    • Переводы: Переводите шаблоны рабочего пространства на другие языки
    • Документация: Улучшайте руководства и туториалы

    Лицензия

    MIT — используйте для чего угодно.


  • b2b-sdr-agent-template/README.zh-CN.mdmarkdown · 15.4 KB

    B2B SDR Agent 模板

    5 分钟,让任何 B2B 外贸企业拥有 AI 销售代表。

    一套开源、生产就绪的 AI SDR(销售开发代表)模板,覆盖完整销售管线 — 从线索获取到成交 — 支持 WhatsApp、Telegram 和邮件。

    基于 OpenClaw 构建,已在真实外贸企业验证。

    ✅ 最新 · 2026-06-07 — Template v3.8.0:新增 GitHub Actions 自动跑 npm test、部署后 deploy/doctor.sh 健康检查、非 root 部署远端路径配置,并扩展技能数量与 workspace 路径生成验收。查看完整更新日志 →

    🚀 平台 · 2026-06-03 — OpenClaw v2026.6.1:多 Agent workboard 编排、重构 Skill Workshop 控制台、8 平台渠道投递加固、iMessage SQLite 状态持久化、6 类热路径性能优化,以及 MiniMax M3 + GitHub Copilot agent runtime。查看完整更新日志 →

    📦 附加模块 · 2026-05-22 — WhatsApp 老号接入规范 v0.5 (Path D — Multi-Device 同步):摩擦最小的历史获取路径——客户扫一次 QR,等 Multi-Device 同步,bootstrap.sh 直接从 PulseAgent 拉 .txt。无备份、无密码、无 USB。v0.4 备份提取仍是零停机租户的默认。三层架构(MemOS + sales_playbook + conversation_history)、A/B/C/D 交付决策树、严格自动接入闸。Release 说明 →

    🌐 English | 中文 | Español | Français | العربية | Português | 日本語 | Русский


    架构:7 层上下文系统

    ┌─────────────────────────────────────────────────┐
    │              AI SDR Agent                       │
    ├─────────────────────────────────────────────────┤
    │  IDENTITY.md   → 我是谁?公司、角色                │
    │  SOUL.md       → 人格、价值观、底线                │
    │  AGENTS.md     → 全链路销售工作流(10 阶段)        │
    │  USER.md       → 负责人画像、ICP、评分             │
    │  HEARTBEAT.md  → 14 项自动化 Pipeline 巡检        │
    │  MEMORY.md     → 4 层反失忆协议                   │
    │  TOOLS.md      → CRM、渠道、集成                  │
    ├─────────────────────────────────────────────────┤
    │  Skills        → 可扩展能力                       │
    │  产品知识库     → 你的产品目录                      │ 
    │  Cron Jobs     → 14 个自动化 Pipeline 检查         │
    ├─────────────────────────────────────────────────┤
    │  OpenClaw Gateway (WhatsApp / Telegram / Email)  
    └─────────────────────────────────────────────────┘
    

    每一层都是一个 Markdown 文件,按你的业务定制。AI 每次对话都会加载全部 7 层,获得关于你公司、产品和销售策略的深度上下文。

    快速开始

    方式 A:OpenClaw 用户(一条命令)

    如果你已经在运行 OpenClaw:

    clawhub install b2b-sdr-agent
    

    完成。Skill 会自动安装完整的 7 层上下文系统、delivery-queue 和 sdr-humanizer 到你的 workspace。然后定制:

    # 编辑关键文件
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/IDENTITY.md
    vim ~/.openclaw/workspace/skills/b2b-sdr-agent/references/USER.md
    
    # 或复制到主 workspace
    cp ~/.openclaw/workspace/skills/b2b-sdr-agent/references/*.md ~/.openclaw/workspace/
    

    把所有 {{占位符}} 替换成你的真实信息,AI SDR 即刻上线。

    方式 B:完整部署(5 分钟)

    1. 克隆 & 配置

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # 编辑 7 个 workspace 文件,填入你的业务信息
    vim workspace/IDENTITY.md   # 公司信息、角色、Pipeline
    vim workspace/USER.md       # 产品、ICP、竞品
    vim workspace/SOUL.md       # AI 人格和规则
    

    2. 配置部署参数

    cd deploy
    cp config.sh.example config.sh
    vim config.sh               # 填入:服务器 IP、API Key、WhatsApp 号码
    

    3. 本地验收

    cd ..
    npm test
    

    这会在连接服务器前检查模板结构、Shell 脚本、产品知识库 JSON、形式发票生成、Chroma 记忆 smoke flow,以及生成后的 OpenClaw 配置。

    4. 一键部署

    cd deploy
    ./deploy.sh my-company
    
    # 输出:
    # ✅ 部署完成: my-company
    # Gateway:  ws://your-server:18789
    # WhatsApp: 已启用
    # ChromaDB Memory: Enabled (chromadb + local chroma-memory)
    # Skills:   b2b_trade (41 个)
    

    5. 远端健康检查

    ./doctor.sh
    

    Doctor 会检查 SSH、Node/npm、OpenClaw CLI、openclaw.json 权限、workspace 上下文文件、本地 skills、Gateway 服务状态、Gateway /health,以及 Chroma 记忆脚本。

    完成。你的 AI SDR 已在 WhatsApp 上线,准备好卖货了。

    功能概览

    全链路销售自动化(10 阶段)

    阶段AI 做什么
    1. 线索获取自动识别入站消息(WhatsApp/Telegram/CTWA 广告),创建 CRM 记录
    2. BANT 筛选通过自然对话评估预算、决策权、需求、时间线
    3. CRM 录入结构化数据采集 — 姓名、公司、国家、ICP 评分、产品意向
    4. 背调 & 充实Jina AI 网页搜索 + 公司官网分析,3 层充实管线
    5. 报价自动生成 PDF 报价单,多语言,发给负责人审批
    6. 谈判记录每轮还价,推荐策略,超出授权时升级
    7. 汇报每日 09:00 Pipeline 报表、15:00 停滞预警、周报
    8. 养育自动跟进、行业资讯、售后关怀、季度回访
    9. 邮件开发个性化冷开发信序列(Day 1/3/7/14),自动跟进
    10. 多渠道协同跨渠道协调(WhatsApp + Email + Telegram),自动切换

    自动化定时任务(14 个 Pipeline 检查)

    时间任务
    每次 heartbeat新线索、报价跟踪、会议准备、数据质量检查
    每 30 分钟Gmail 收件箱扫描,检查客户回复
    每日 09:00Pipeline 报告发送至 WhatsApp
    每日 10:00AI 主动获客(市场轮换:非洲/中东/东南亚/拉美)
    每日 11:00邮件跟进序列检查
    每日 15:00停滞线索检测
    每周三养育活动
    每周五竞品情报收集
    每周一周报汇总
    每日 12:00CRM 快照写入 ChromaDB(L4 灾备)
    每日 14:00记忆健康检查(Supermemory + ChromaDB stats)
    每次 heartbeatMicrosoft Teams 提及/私信检查,支持销售交接
    每 30 分钟WhatsApp 72h 窗口过期检查,自动切换 Telegram/Email

    拟人化对话

    • 自动检测并用客户语言回复
    • delivery-queue 技能实现自然消息节奏(3-90 秒延迟,消息拆分)
    • 时区感知发送(7 个市场时区映射)
    • 文化适配(中东、非洲、东南亚、拉美、欧洲)
    • 绝不暴露 AI 身份 — 以你的销售顾问名义沟通

    动态 ICP 评分

    • 初始分基于 5 个加权维度(采购量、产品匹配、区域、支付能力、决策权)
    • 根据互动自动调整:快速回复 +1、索要报价 +2、提及竞品 +2、7 天无回复 -1
    • 热线索(ICP>=7)自动标记,立即通知负责人

    4 层反失忆系统

    AI 在长对话和跨会话时会丢失上下文。我们的 4 层反失忆架构确保 AI SDR 永不遗忘:

    消息进入 ──→ L1 MemOS 自动召回(结构化记忆注入)
        │
        ├──→ L3 ChromaDB 逐轮存储(客户隔离,自动标签)
        │
        ├──→ L2 主动摘要:65% token 时压缩(haiku 压缩,零信息丢失)
        │
        └──→ L4 CRM 快照:每日 12:00(灾难恢复兜底)
    
    层级引擎作用
    L1: MemOS结构化记忆每轮提取 BANT、承诺、异议,对话开始时注入 System Prompt
    L2: 主动摘要Token 监控上下文占用 65% 时通过 haiku 级模型压缩,数字、报价、承诺逐字保留
    L3: ChromaDB逐轮向量存储每轮对话以 customer_id 隔离存储,自动标记报价、承诺、异议,支持跨会话语义检索
    L4: CRM 快照每日备份每日 12:00 将完整 Pipeline 状态存入 ChromaDB 作为灾难恢复,任何层失败时 L4 兜底

    效果:AI 业务员记住每个客户、每份报价、每个承诺 — 即使 100+ 轮对话、沉默数周或系统重启后。

    完整实施规范见 ANTI-AMNESIA.md,包含代码、Prompt 和部署指南。

    7 层详解

    层文件用途
    身份层IDENTITY.md公司信息、角色定义、Pipeline 状态、线索分层
    灵魂层SOUL.mdAI 人格、沟通风格、底线、成长机制
    操作层AGENTS.md10 阶段销售工作流、BANT 筛选、多渠道协同
    用户层USER.md负责人画像、产品线、ICP 评分、竞品
    巡检层HEARTBEAT.md14 项自动 Pipeline 巡检 — 新线索、停滞、数据质量、记忆健康
    记忆层MEMORY.md4 层反失忆协议(MemOS + 主动摘要 + ChromaDB + CRM)
    工具层TOOLS.mdCRM 命令、渠道配置、搜索、邮件

    Skills 技能

    开箱即用的扩展能力:

    技能说明
    delivery-queue定时分段发送,模拟真人节奏。支持 drip campaign。
    supermemory语义记忆引擎。自动提取客户洞察,跨会话搜索。
    sdr-humanizer拟人化对话规则 — 节奏、文化适配、反模式。
    lead-discoveryAI 主动获客。网页搜索潜在买家,ICP 评估,自动录入 CRM。
    chroma-memory逐轮会话存储,客户隔离,自动标签,CRM 快照。
    telegram-toolkitBot 命令、行内键盘、大文件处理、Telegram 优先市场策略。
    quotation-generator自动生成 PDF 形式发票,公司信头,多语言支持。

    技能预设包

    预设技能数适用场景
    b2b_trade41外贸 B2B 企业(默认)
    lite16快速启动、低量级
    social14社媒驱动销售
    full40+全部启用

    行业示例

    开箱即用的行业配置:

    行业目录亮点
    重型车辆examples/heavy-vehicles/卡车、工程机械、车队销售、非洲/中东市场
    消费电子examples/electronics/OEM/ODM、Amazon 卖家、样品驱动
    纺织服装examples/textiles/可持续面料、GOTS 认证、欧美市场

    使用示例:

    cp examples/heavy-vehicles/IDENTITY.md workspace/IDENTITY.md
    cp examples/heavy-vehicles/USER.md workspace/USER.md
    # 然后根据你的具体业务定制
    

    产品知识库

    结构化产品目录,让 AI 生成准确的报价:

    product-kb/
    ├── catalog.json                    # 产品目录:规格、MOQ、交期
    ├── products/
    │   └── example-product/info.json   # 详细产品信息
    └── scripts/
        └── generate-pi.js              # 形式发票生成器
    

    控制面板

    部署后,AI SDR 自带 Web 管理面板:

    http://YOUR_SERVER_IP:18789/?token=YOUR_GATEWAY_TOKEN
    

    面板功能:

    • 实时 Bot 状态和 WhatsApp 连接状况
    • 消息历史和会话列表
    • Cron 任务执行状态
    • 渠道健康监控

    Token 在部署时自动生成并显示在输出中。请妥善保管 — 拥有 URL+Token 即拥有完全控制权限。

    安全提示:在 config.sh 中设置 GATEWAY_BIND="loopback" 可禁用远程面板访问。默认值为 "lan"(局域网可访问)。

    部署

    前置条件

    • Linux 服务器(推荐 Ubuntu 20.04+)
    • Node.js 18+
    • AI 模型 API Key(OpenAI、Anthropic、Google、Kimi 等)
    • WhatsApp Business 账号(可选但推荐)

    配置

    所有部署配置都在 deploy/config.sh。非 root 服务器或自定义 OpenClaw 路径时,不要改部署脚本,直接配置远端路径:

    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 会在每次 push 和 pull request 到 main 时自动运行 npm test。

    WhatsApp 配置

    默认情况下,AI SDR 接受所有 WhatsApp 联系人的消息(dmPolicy: "open")。这是销售代理的推荐设置 — 你希望每个潜在客户都能联系到你。

    设置值含义
    WHATSAPP_DM_POLICY"open"(默认)接受任何人的私信
    "allowlist"仅接受 ADMIN_PHONES 的消息
    "pairing"需要先配对码
    WHATSAPP_GROUP_POLICY"allowlist"(默认)仅在白名单群组中回复

    部署后修改,编辑服务器上的 ~/.openclaw/openclaw.json:

    {
      "channels": {
        "whatsapp": {
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
    

    然后重启:systemctl --user restart openclaw-gateway

    WhatsApp IP 隔离(多租户)

    在同一台服务器上运行多个 Agent 时,每个 Agent 需要唯一的出口 IP,让 WhatsApp 将其识别为独立设备,防止跨账户封号。

    # 部署客户后,隔离其 WhatsApp IP:
    ./deploy/ip-isolate.sh acme-corp
    
    # 或指定 SOCKS5 端口:
    ./deploy/ip-isolate.sh acme-corp 40010
    

    原理:

                      ┌─ 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
    

    每个租户获得:

    • 一个专属免费 Cloudflare WARP 账户
    • 一个隔离的 wireproxy 实例(约 4MB 内存)
    • 所有出站流量(包括 WhatsApp)使用唯一的 Cloudflare 出口 IP

    部署时自动启用:在 config.sh 中设置 IP_ISOLATE=true。

    托管部署

    不想自己搭?PulseAgent 提供全托管 B2B AI SDR 服务:

    • 一键部署
    • 管理后台 & 数据分析
    • 多渠道管理
    • 优先技术支持

    立即体验 →

    贡献

    欢迎贡献!我们特别需要:

    • 行业模板:为你的行业添加示例
    • Skills:构建新能力
    • 翻译:将 workspace 模板翻译为其他语言
    • 文档:改善指南和教程

    许可证

    MIT — 随意使用。


  • b2b-sdr-agent-template/SECURITY.mdmarkdown · 1.8 KB

    Security Policy

    Reporting a Vulnerability

    If you discover a security vulnerability in this project, please report it responsibly:

    Email: security@pulseagent.io

    Do NOT open a public GitHub issue for security vulnerabilities.

    What to Include

    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact
    • Suggested fix (if any)

    Response Timeline

    • Acknowledgment: Within 48 hours
    • Initial assessment: Within 1 week
    • Fix or mitigation: Depends on severity, targeting within 2 weeks for critical issues

    Security Best Practices for Users

    API Keys & Credentials

    • Store API keys in .secrets/env or environment variables, never in workspace files
    • Set config.sh permissions to 600 (chmod 600 config.sh)
    • Use SSH keys instead of passwords for deployment
    • Rotate GATEWAY_TOKEN periodically

    Network Security

    • Set GATEWAY_BIND=loopback if the dashboard doesn't need LAN access
    • Use a reverse proxy (nginx/Caddy) with TLS for production deployments
    • Enable firewall rules to restrict gateway port access

    WhatsApp IP Isolation

    • Each tenant should have its own WARP proxy for IP isolation
    • Monitor wireproxy service health

    Data Protection

    • Customer data (CRM, conversation history) should be treated as sensitive
    • Enable redactSensitive in openclaw.json logging config
    • For EU customers, ensure GDPR compliance (see AGENTS.md for data handling rules)

    Supported Versions

    VersionSupported
    LatestYes

    Scope

    This security policy covers:

    • Deployment scripts (deploy/)
    • Workspace context files (workspace/)
    • Skills (skills/)
    • Configuration templates

    Third-party services (OpenClaw, MemOS, ChromaDB, Jina) have their own security policies.

  • b2b-sdr-agent-template/SKILL.mdmarkdown · 2.9 KB

    name: b2b-sdr-agent description: "Open-source B2B AI SDR template. 7-layer context system with 10-stage sales pipeline, 4-layer anti-amnesia memory, 14 automated pipeline checks, WhatsApp IP isolation, multi-channel (WhatsApp+Telegram+Email). Built on OpenClaw." license: MIT-0

    B2B SDR Agent — AI Sales Development Representative

    Turn any B2B export business into an AI-powered sales machine. Full-stack SDR that handles lead capture → qualification → follow-up → quoting → closing across WhatsApp, Telegram, and email.

    7-Layer Context System

    LayerFilePurpose
    IdentityIDENTITY.mdCompany name, role, product catalog
    SoulSOUL.mdPersonality, values, communication rules
    WorkflowAGENTS.md10-stage sales pipeline with stage gates
    UserUSER.mdOwner profile, ICP scoring, admin whitelist
    HeartbeatHEARTBEAT.md14-item pipeline inspection (cron)
    MemoryMEMORY.md4-layer anti-amnesia protocol
    ToolsTOOLS.mdCRM, channels, integrations

    Key Features

    • 10-Stage Sales Pipeline: Cold Lead → Engaged → Qualified → Proposal → Negotiation → Closed
    • 4-Layer Memory: L1 pinned context, L2 session KV, L3 vector search, L4 CRM snapshots
    • 14 Pipeline Checks: Auto heartbeat, follow-up reminders, lead scoring, pipeline reports
    • Multi-Channel: WhatsApp, Telegram, Email — with channel-specific strategies
    • WhatsApp IP Isolation: Per-tenant Cloudflare WARP proxy for multi-tenant deployments
    • Human-Like Conversations: SDR humanizer skill for natural, trust-building messages
    • Operator Bilingual Mode (opt-in): English to customers + Chinese self-chat sync for non-English operators, enable via operator_bilingual: true in IDENTITY.md

    Deploy

    # One-click deploy
    cp deploy/config.sh.example deploy/config.sh
    # Edit config.sh with your server, API keys, and channel settings
    ./deploy/deploy.sh your-client-name
    

    IP Isolation (Multi-Tenant)

    Each tenant gets a unique Cloudflare exit IP so WhatsApp sees independent devices:

    ./deploy/ip-isolate.sh tenant-name
    

    Architecture: tenant → wireproxy (SOCKS5, ~4MB) → WARP account → unique Cloudflare IP

    Skills Included

    • sdr-humanizer — Human-like conversation rules
    • delivery-queue — Async message delivery with retry
    • lead-discovery — AI-driven lead search and ICP scoring
    • quotation-generator — PDF proforma invoice generation
    • chroma-memory — Per-turn conversation memory with ChromaDB
    • telegram-toolkit — Telegram-specific SDR strategies
    • graphify — Knowledge graph for product catalog, customer intelligence, and market research

    Requirements

    • Linux server (Ubuntu 20.04+)
    • Node.js 18+
    • AI model API key (OpenAI, Anthropic, Google, etc.)
    • OpenClaw gateway

    Links

  • b2b-sdr-agent-template/cliff.tomlcode · 1.6 KB
    # git-cliff configuration
    # https://git-cliff.org/docs/configuration
    
    [changelog]
    header = """
    # Changelog\n
    All notable changes to this project will be documented in this file.\n
    """
    body = """
    {% if version %}\
        ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
    {% else %}\
        ## [unreleased]
    {% endif %}\
    {% for group, commits in commits | group_by(attribute="group") %}
        ### {{ group | upper_first }}
        {% for commit in commits %}
            - {% if commit.scope %}**{{ commit.scope }}:** {% endif %}\
            {{ commit.message | upper_first }}\
            {% if commit.breaking %} ⚠️ BREAKING{% endif %}\
        {% endfor %}
    {% endfor %}\n
    """
    footer = ""
    trim = true
    
    [git]
    conventional_commits = true
    filter_unconventional = false
    split_commits = false
    protect_breaking_commits = false
    filter_commits = false
    tag_pattern = "v[0-9]*"
    skip_tags = "beta|alpha|rc"
    ignore_tags = ""
    topo_order = false
    sort_commits = "newest"
    
    commit_parsers = [
      { message = "^feat", group = "<!-- 0 -->🚀 Features" },
      { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
      { message = "^perf", group = "<!-- 2 -->⚡ Performance" },
      { message = "^refactor", group = "<!-- 3 -->🔧 Refactoring" },
      { message = "^docs", group = "<!-- 4 -->📝 Documentation" },
      { message = "^test", group = "<!-- 5 -->✅ Testing" },
      { message = "^style", group = "<!-- 6 -->🎨 Styling" },
      { message = "^chore", group = "<!-- 7 -->🏗️ Chores" },
      { message = "^ci", group = "<!-- 8 -->🔄 CI/CD" },
      { message = "^revert", group = "<!-- 9 -->⏪ Revert" },
      { message = ".*", group = "<!-- 10 -->📦 Miscellaneous" },
    ]
    
  • b2b-sdr-agent-template/deploy/UPGRADE.mdmarkdown · 10.1 KB

    OpenClaw Upgrade Guide

    Safe upgrade procedure for production SDR agents. Follow every step — skipping the backup or verification has caused real outages.

    Pre-Upgrade Checklist

    # 1. Backup config (ALWAYS do this first)
    cp -r ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
    cp -r ~/.openclaw/exec-approvals.json ~/.openclaw/exec-approvals.json.bak
    
    # 2. Check changelog for breaking changes
    openclaw changelog          # or visit https://openclaw.dev/changelog
    # Look for: config key renames, removed fields, new required fields,
    # permission model changes, plugin API changes
    
    # 3. Note current version
    openclaw --version
    

    Upgrade

    # 4. Install new version
    npm install -g openclaw@latest
    
    # 5. Refresh gateway service token (required since 2026.4.1)
    #    New versions may change internal auth — stale tokens cause
    #    exec approval timeouts and tool call failures.
    openclaw gateway install --force
    
    # 6. Run doctor (auto-detects and suggests fixes)
    openclaw doctor
    
    # 7. Restart gateway
    openclaw gateway restart
    

    Post-Upgrade Verification

    # 8. Verify gateway is live
    curl -s http://localhost:18789/health
    # Expected: {"ok":true,"status":"live"}
    
    # 9. Verify channels
    openclaw channels status
    # Both Telegram and WhatsApp should show "running"
    
    # 10. Verify exec approvals
    openclaw approvals get
    # Should show: security=full, ask=off, askFallback=full
    
    # 11. Check for skill warnings
    openclaw doctor 2>&1 | grep -i "skip\|error\|warn"
    # If you see "Skipping skill path that resolves outside its configured root":
    #   find ~/.openclaw/skills -maxdepth 1 -type l | while read l; do
    #     target=$(readlink "$l")
    #     realpath "$l" 2>/dev/null | grep -q "^$HOME/.openclaw/skills" || echo "external: $l -> $target"
    #   done
    #   # Remove external symlinks that are no longer valid
    

    Rollback

    If anything breaks:

    # Restore config
    cp ~/.openclaw/openclaw.json.bak ~/.openclaw/openclaw.json
    cp ~/.openclaw/exec-approvals.json.bak ~/.openclaw/exec-approvals.json
    
    # Downgrade
    npm install -g openclaw@<previous-version>
    
    # Restart
    openclaw gateway install --force
    openclaw gateway restart
    

    Known Issues by Version

    2026.4.20

    Security-critical upgrade. Multiple env injection vectors closed, config mutation guard extended, WebSocket scoping hardened.

    Change / FeatureNotesAction Required
    OPENCLAW_* keys blocked from workspace .envAll OPENCLAW_* env keys + MINIMAX_API_HOST + interpreter-startup keys (e.g. NODE_OPTIONS) are blocked in untrusted .env filesMove any such keys to system environment or openclaw.json before upgrading
    Config mutation guard extendedconfig.patch / config.apply tool calls from model agents can no longer overwrite operator-trusted config pathsNo action needed — security improvement
    Non-admin paired devices scopedNon-admin paired-device sessions can only manage their own pairing; cannot approve/reject other devicesNo action needed unless automation scripts relied on cross-device approval
    WebSocket operator.read requiredChat/agent/tool-result WebSocket frames require operator.read scopeIf custom WebSocket clients don't carry operator.read, add the scope to their auth token
    Session entry cap + age prune enforced by defaultOversized session stores are pruned at load timeTune session.maxEntries / session.maxAgeMs in openclaw.json if you need larger stores
    Cron state split to jobs-state.jsonRuntime execution state separated from jobs.json definitionsIf version-controlling jobs.json, add jobs-state.json to .gitignore if not already present
    Telegram polling watchdog 90s → 120schannels.telegram.pollingStallThresholdMs raisedNo action needed; set explicitly if you want a different threshold
    Web search plugin SecretRef resolution fixedExa, Firecrawl, Perplexity, Tavily, Grok, Gemini, Kimi plugin API keys now resolve correctlyNo action needed — bug fix
    Auto-failover session overrides cleared per-turnTransient failover state cleared before each new turnNo action needed — ensures primary model is used by default

    2026.4.10

    No breaking changes. Upgrade is safe — new features opt-in, 126 security fixes applied automatically.

    Change / FeatureNotesAction Required
    Active Memory pluginNew opt-in plugin — disabled by defaultEnable in openclaw.json under plugins.active-memory.enabled: true if desired
    Codex provider for GPT-5codex/gpt-* routes use new bundled Codex provider; openai/gpt-* unchangedIf using GPT-5 via openai provider, migrate model IDs to codex/gpt-5 for managed auth
    openclaw exec-policy CLINew command for managing exec approval policyNo action required — use openclaw exec-policy show to inspect current policy
    Teams message actionsPin, unpin, read, react, listReactions now availableNo config change needed; actions are auto-discoverable via the gateway
    Per-provider allowPrivateNetworkSelf-hosted OpenAI-compatible endpoints can opt in to private network accessOnly set if you run internal/LAN-hosted model endpoints
    126 security + stability fixesWhatsApp media, gateway stability, iMessage self-chat, Telegram validation, cron scheduling, etc.No action required — applied on upgrade

    2026.4.9

    Breaking change: workspace .env runtime-control env vars blocked.

    Issue / ChangeSymptomFix
    Workspace .env runtime-control vars silently ignoredConfig overrides via .env (e.g. OPENCLAW_GATEWAY_PORT, OPENCLAW_SKIP_*, OPENCLAW_BROWSER_*) have no effect after upgradeMove these vars to system environment (set before daemon start) or to openclaw.json under the matching config keys
    SSRF quarantine bypass fixedAgents or malicious pages could bypass blocked-destination checks via simulated click navigationNo action needed — fixed automatically
    OpenAI reasoning effort defaults to highOpenAI users on Responses/WebSocket/completions may see higher token usageSet reasoningEffort: "medium" or "low" explicitly if cost is a concern
    Ollama thinking outputOllama models now emit thinking when /think is activeOpt out by keeping /think at off level
    Matrix dm.policy: "trusted" migratedopenclaw doctor --fix will convert legacy Matrix DM policy to allowlist formRun openclaw doctor after upgrade to review proposed changes before applying

    2026.4.8

    No breaking changes. Upgrade is safe — fixes only.

    Issue FixedSymptom (v2026.4.7)Notes
    Cross-origin redirect secret leakAuth tokens could leak on 307/308 redirects via SSRF-guarded fetchesFixed automatically — no config change needed
    Telegram setup failureCannot find module './dist/...' on packaged installs / npm global installModule now loads from bundled sidecars
    Slack proxy ignoredSocket Mode WebSocket bypasses corporate HTTP proxyNow respects HTTPS_PROXY and NO_PROXY env vars
    Slack bot token re-readSecretRef-backed bot tokens fail after openclaw gateway restartResolved in SecretRef resolution path
    Claude thinking blocks strippedOpus 4.5+/Sonnet 4.5+/Claude 4 thinking blocks dropped before forwarding → reasoning regressionsFixed — thinking blocks preserved
    Web fetch HTTP/2 failureUND_ERR_CONNECT_TIMEOUT or connection errors on Node 22+allowH2: false applied; upgrade to v2026.4.8
    Memory vector recall silentNo warning when sqlite-vec unavailableNow logs explicit warning
    Cron job "unknown id"Cron jobs show "unknown cron job id" after gateway restartjobId now loaded from on-disk store

    2026.4.7

    IssueSymptomFix
    /allowlist requires ownererror: permission denied — owner required when non-owner runs /allowlist addEnsure only owner accounts manage allowlists; update automation that used non-owner accounts for this
    Env override blocksWorkflows injecting Java/Rust/Git/Kubernetes/cloud credential env vars via model layer silently blockedMove env var injection to deploy.sh or workspace config — out of model instruction path
    gateway config.apply blocked from modelRuntime config patches via AI tool calls fail with blocked: model-facing writeUse direct gateway API calls with human approval for config changes
    Docker bind changeGateway now auto-binds to 0.0.0.0 inside containersIf you relied on loopback-only binding in Docker, set bind: loopback explicitly

    2026.4.5

    IssueSymptomFix
    Legacy config aliases removedStartup warning: unknown config key: talk.voiceId (or talk.apiKey, agents.*.sandbox.perSession, browser.ssrfPolicy.allowPrivateNetwork, hooks.internal.handlers)Run openclaw doctor --fix to auto-migrate to canonical paths
    Channel allow toggle removedWarning about unrecognized allow field on channel/group/room configReplace with dmPolicy + allowFrom — run openclaw doctor --fix

    2026.4.1

    IssueSymptomFix
    Gateway embedded token staleexec approval followup dispatch failed: gateway timeout after 60000msopenclaw gateway install --force
    Exec approvals empty defaultsTools silently fail, agent can't execute commandsSet exec-approvals.json defaults to security: full, ask: off
    Telegram dmPolicy defaultdmPolicy: "pairing" blocks new contactsChange to "open" + add allowFrom: ["*"]
    Skill symlink security checkSkipping skill path that resolves outside its configured root (hundreds of warnings)Remove external symlinks from ~/.openclaw/skills/
    Missing tools.profileTool calls may be restrictedAdd "tools": {"profile": "full"} to openclaw.json

    Re-Deploy (Nuclear Option)

    If manual fixes aren't enough, re-deploy from template:

    cd b2b-sdr-agent-template/deploy
    ./deploy.sh <client-name>
    # This applies all fixes automatically (v3.3.1+)
    
  • b2b-sdr-agent-template/deploy/config.sh.exampletext · 5.6 KB
    #!/bin/bash
    # ═══════════════════════════════════════════════════════════
    #  B2B SDR Agent — Configuration
    #  Copy this file to config.sh and fill in your values
    #  Usage: cp config.sh.example config.sh && vim config.sh
    # ═══════════════════════════════════════════════════════════
    
    # ─── Server ───────────────────────────────────────────────
    SERVER_HOST=""              # Target server IP
    SERVER_USER="root"          # SSH user
    SERVER_PORT=22              # SSH port
    SSH_KEY=""                  # SSH key path (leave empty for default)
    SSH_PASS=""                 # SSH password (key preferred, password as fallback)
    
    # ─── Remote Paths ────────────────────────────────────────
    # Defaults:
    #   root user     -> /root/.openclaw
    #   non-root user -> /home/<SERVER_USER>/.openclaw
    # Override these when the server uses a custom home directory or OpenClaw path.
    REMOTE_HOME=""
    REMOTE_OPENCLAW_HOME=""
    REMOTE_CONFIG_HOME=""
    REMOTE_WORKSPACE_DIR=""
    
    # ─── OpenClaw Gateway ────────────────────────────────────
    GATEWAY_PORT=18789          # Gateway port
    GATEWAY_TOKEN=""            # Auth token (auto-generated if empty)
    GATEWAY_BIND="lan"          # "lan" = accessible from network (dashboard visible)
                                # "loopback" = localhost only (more secure, no remote dashboard)
    
    # ─── AI Model (Primary) — DeepSeek V4 Flash (released 2026-04-24) ─
    # 1M context · native prompt caching · \$0.14 in / \$0.28 out per 1M tokens
    # Get API key: https://platform.deepseek.com/
    PRIMARY_PROVIDER="deepseek"
    PRIMARY_MODEL_ID="deepseek-v4-flash"
    PRIMARY_MODEL_NAME="DeepSeek V4 Flash"
    PRIMARY_BASE_URL="https://api.deepseek.com/v1"
    PRIMARY_API_KEY=""          # Your DeepSeek API key
    PRIMARY_API_TYPE="openai"
    PRIMARY_CONTEXT_WINDOW=1000000
    PRIMARY_MAX_TOKENS=32768
    
    # ─── AI Model (Fallback) — DeepSeek V4 Pro (reasoning) ────────────
    # For harder reasoning tasks · \$1.74 in / \$3.48 out per 1M tokens
    FALLBACK_PROVIDER="deepseek"
    FALLBACK_MODEL_ID="deepseek-v4-pro"
    FALLBACK_MODEL_NAME="DeepSeek V4 Pro"
    FALLBACK_BASE_URL="https://api.deepseek.com/v1"
    FALLBACK_API_KEY=""         # Same DeepSeek key works for both
    FALLBACK_API_TYPE="openai"
    
    # ─── Channel: WhatsApp ───────────────────────────────────
    WHATSAPP_ENABLED=true
    WHATSAPP_DM_POLICY="open"
    WHATSAPP_GROUP_POLICY="allowlist"
    WHATSAPP_DEBOUNCE_MS=5000
    
    # ─── Channel: Telegram ───────────────────────────────────
    TELEGRAM_ENABLED=false
    TELEGRAM_BOT_TOKEN=""       # Get from @BotFather
    TELEGRAM_DM_POLICY="open"
    TELEGRAM_GROUP_POLICY="open"
    
    # ─── Admin Whitelist (comma-separated) ───────────────────
    ADMIN_PHONES=""             # e.g. +1234567890,+0987654321
    
    # ─── Plugin: Memos Cloud ─────────────────────────────────
    MEMOS_ENABLED=false
    MEMOS_API_KEY=""
    
    # ─── Plugin: Memory LanceDB ──────────────────────────────
    LANCEDB_ENABLED=false
    OLLAMA_BASE_URL="http://localhost:11434/v1"
    EMBEDDING_MODEL="nomic-embed-text"
    
    # ─── Plugin: ChromaDB (L3 + L4 Memory) ──────────────────
    CHROMADB_ENABLED=true          # Install chromadb dependency for L3/L4 memory
    CHROMA_COLLECTION="conversation_history"
    
    # ─── Jina AI (Web Search + Content Extraction) ──────────
    JINA_API_KEY=""             # Get free key at https://jina.ai/
    
    # ─── Supermemory (Research Storage) ─────────────────────
    SUPERMEMORY_API_KEY=""      # Get at https://supermemory.ai/
    SUPERMEMORY_SPACE=""        # Your space name
    
    # ─── CRM: Google Sheets ──────────────────────────────────
    SHEETS_SPREADSHEET_ID=""
    SHEETS_NAME="leads"
    SHEETS_COLUMNS="name|company|whatsapp|country|language|email|status|source|icp_score|lead_tier|product_interest|quantity_signal|created_at|last_contact|next_action|notes|assigned_to"
    
    # ─── IP Isolation (WhatsApp) ─────────────────────────────
    # Each tenant gets a unique Cloudflare WARP exit IP via wireproxy (~4MB RAM)
    # Run: ./ip-isolate.sh <client-name> [socks-port]
    IP_ISOLATE=false            # Set true to auto-run ip-isolate after deploy
    IP_SOCKS_PORT=""            # SOCKS5 port (auto-assigned from 40001 if empty)
    
    # ─── AI Model (Compaction) — v2026.4.8+ ─────────────────
    # Offload session compaction to a cheaper model (saves cost on high-volume deployments)
    # Leave empty to use PRIMARY_MODEL for compaction (default behavior)
    COMPACTION_PROVIDER=""      # e.g. "claude/claude-haiku-4-5" or "google/gemini-2.5-flash"
    
    # ─── Deploy Options ──────────────────────────────────────
    INSTALL_OPENCLAW=true
    AUTO_START=true
    SKILL_PROFILE="b2b_trade"
    EXTRA_SKILLS=""
    
  • b2b-sdr-agent-template/deploy/deploy.shcode · 14.4 KB · preview truncated
    #!/bin/bash
    # ═══════════════════════════════════════════════════════════
    #  B2B SDR Agent — One-Click Deploy
    #  Usage: ./deploy.sh <client-name>
    #  Example: ./deploy.sh acme-corp
    # ═══════════════════════════════════════════════════════════
    
    set -euo pipefail
    
    SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
    RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; CYAN='\033[0;36m'; NC='\033[0m'
    
    log()   { echo -e "${GREEN}[✓]${NC} $*"; }
    warn()  { echo -e "${YELLOW}[!]${NC} $*"; }
    err()   { echo -e "${RED}[✗]${NC} $*" >&2; }
    info()  { echo -e "${CYAN}[→]${NC} $*"; }
    
    # ─── Args ─────────────────────────────────────────────────
    if [ $# -lt 1 ]; then
      echo "Usage: $0 <client-name> [--dry-run]"; exit 1
    fi
    
    CLIENT_NAME=""
    DRY_RUN=false
    for arg in "$@"; do
      case "$arg" in
        --dry-run) DRY_RUN=true ;;
        -*) err "Unknown option: $arg"; exit 1 ;;
        *) [ -z "$CLIENT_NAME" ] && CLIENT_NAME="$arg" ;;
      esac
    done
    if [ -z "$CLIENT_NAME" ]; then
      echo "Usage: $0 <client-name> [--dry-run]"; exit 1
    fi
    CONFIG_FILE="$SCRIPT_DIR/config.sh"
    
    if [ ! -f "$CONFIG_FILE" ]; then
      err "Missing config: $CONFIG_FILE"
      echo "Run: cp config.sh.example config.sh && edit config.sh"
      exit 1
    fi
    
    # ─── Load Config ──────────────────────────────────────────
    source "$CONFIG_FILE"
    
    SERVER_USER="${SERVER_USER:-root}"
    SERVER_PORT="${SERVER_PORT:-22}"
    if [ -z "${REMOTE_HOME:-}" ]; then
      if [ "$SERVER_USER" = "root" ]; then
        REMOTE_HOME="/root"
      else
        REMOTE_HOME="/home/$SERVER_USER"
      fi
    fi
    REMOTE_OPENCLAW_HOME="${REMOTE_OPENCLAW_HOME:-$REMOTE_HOME/.openclaw}"
    REMOTE_CONFIG_HOME="${REMOTE_CONFIG_HOME:-$REMOTE_HOME/.config}"
    REMOTE_WORKSPACE_DIR="${REMOTE_WORKSPACE_DIR:-$REMOTE_OPENCLAW_HOME/workspace}"
    
    missing=()
    [ -z "$SERVER_HOST" ] && missing+=("SERVER_HOST")
    [ -z "$PRIMARY_API_KEY" ] && [ -z "$FALLBACK_API_KEY" ] && missing+=("At least one model API key")
    if [ ${#missing[@]} -gt 0 ]; then
      err "Missing required config: ${missing[*]}"
      exit 1
    fi
    
    # Input validation
    if ! [[ "${GATEWAY_PORT}" =~ ^[0-9]+$ ]] || [ "$GATEWAY_PORT" -lt 1024 ] || [ "$GATEWAY_PORT" -gt 65535 ]; then
      err "Invalid GATEWAY_PORT: $GATEWAY_PORT (must be 1024-65535)"; exit 1
    fi
    if ! [[ "${SERVER_PORT:-22}" =~ ^[0-9]+$ ]]; then
      err "Invalid SERVER_PORT: ${SERVER_PORT}"; exit 1
    fi
    validate_remote_path() {
      if ! [[ "$1" =~ ^/[a-zA-Z0-9._/-]+$ ]]; then
        err "Invalid remote path: $1"
        exit 1
      fi
    }
    validate_remote_path "$REMOTE_HOME"
    validate_remote_path "$REMOTE_OPENCLAW_HOME"
    validate_remote_path "$REMOTE_CONFIG_HOME"
    validate_remote_path "$REMOTE_WORKSPACE_DIR"
    
    echo ""
    echo "═══════════════════════════════════════════════════════════"
    echo "  B2B SDR Agent Deploy — $CLIENT_NAME"
    echo "═══════════════════════════════════════════════════════════"
    echo ""
    info "Server: ${SERVER_USER}@${SERVER_HOST}:${SERVER_PORT:-22}"
    info "Primary Model: ${PRIMARY_PROVIDER}/${PRIMARY_MODEL_ID}"
    info "Gateway Port: ${GATEWAY_PORT}"
    info "OpenClaw Home: ${REMOTE_OPENCLAW_HOME}"
    echo ""
    
    if [ "$DRY_RUN" = true ]; then
      warn "Dry-run mode — no actual changes will be made"
    fi
    
    # ─── SSH Setup ────────────────────────────────────────────
    SSH_OPTS="-o StrictHostKeyChecking=accept-new -o ConnectTimeout=10"
    [ -n "${SSH_KEY:-}" ] && SSH_OPTS="$SSH_OPTS -i $SSH_KEY"
    
    SSHPASS_PREFIX=""
    if [ -n "${SSH_PASS:-}" ]; then
      if ! command -v sshpass &>/dev/null; then
        err "sshpass required for password auth: brew install sshpass / apt install sshpass"
        exit 1
      fi
      PW_FILE=$(mktemp "${TMPDIR:-/tmp}/.sdr-deploy-pw.XXXXXX")
      chmod 600 "$PW_FILE"
      python3 -c "
    import sys, os
    with open(sys.argv[2], 'w') as f:
        f.write(sys.argv[1])
    os.chmod(sys.argv[2], 0o600)
    " "$SSH_PASS" "$PW_FILE"
      SSHPASS_PREFIX="sshpass -f $PW_FILE"
      SSH_OPTS="$SSH_OPTS -o PubkeyAuthentication=no"
    fi
    
    SSH_CMD="$SSHPASS_PREFIX ssh $SSH_OPTS -p ${SERVER_PORT:-22} ${SERVER_USER}@${SERVER_HOST}"
    SCP_CMD="$SSHPASS_PREFIX scp $SSH_OPTS -P ${SERVER_PORT:-22}"
    
    cleanup_pw() { [ -n "${PW_FILE:-}" ] && shred -u "$PW_FILE" 2>/dev/null || rm -f "${PW_FILE:-}"; }
    trap cleanup_pw EXIT
    
    remote() {
      if [ "$DRY_RUN" = true ]; then echo "[dry-run] ssh: $*"
      else $SSH_CMD "$@"; fi
    }
    
    remote_upload() {
      local src="$1" dst="$2"
      if [ "$DRY_RUN" = true ]; then echo "[dry-run] scp: $src → $dst"
      else $SCP_CMD -r "$src" "${SERVER_USER}@${SERVER_HOST}:$dst"; fi
    }
    
    # ─── Step 1: Test Connection ─────────────────────────────
    info "Step 1/8: Testing SSH connection..."
    if ! remote "echo ok" > /dev/null 2>&1; then
      err "Cannot connect to ${SERVER_HOST}"
      exit 1
    fi
    log "SSH connection successful"
    
    # ─── Step 2: Install OpenClaw ─────────────────────────────
    info "Step 2/8: Checking OpenClaw..."
    OPENCLAW_INSTALLED=$(remote "which openclaw 2>/dev/null && openclaw --version 2>/dev/null || echo 'NOT_INSTALLED'")
    
    if echo "$OPENCLAW_INSTALLED" | grep -q "NOT_INSTALLED"; then
      if [ "$INSTALL_OPENCLAW" = true ]; then
        info "  Installing OpenClaw..."
        remote "npm install -g openclaw 2>&1 | tail -3"
        log "  OpenClaw installed"
      else
        err "OpenClaw not installed and INSTALL_OPENCLAW=false"
        exit 1
      fi
    else
      log "OpenClaw already installed: $(echo "$OPENCLAW_INSTALLED" | tail -1)"
      if [ "$INSTALL_OPENCLAW" = true ]; then
        info "  Updating OpenClaw & refreshing gateway token..."
        remote "npm install -g openclaw@latest 2>&1 | tail -3"
        remote "openclaw gateway install --force 2>&1 | tail -3"
        log "  OpenClaw updated, gateway token refreshed"
      fi
    fi
    
    # Ensure exec-approvals are set to full (default since 2026.4.2; explicit for forward-compatibility)
    info "  Setting exec approvals to full..."
    remote "mkdir -p '$REMOTE_OPENCLAW_HOME' && cat > '$REMOTE_OPENCLAW_HOME/exec-approvals.json' << 'EAEOF'
    {
      \"version\": 1,
      \"defaults\": {
        \"security\": \"full\",
        \"ask\": \"off\",
        \"askFallback\": \"full\"
      },
      \"agents\": {}
    }
    EAEOF
    chmod 600 '$REMOTE_OPENCLAW_HOME/exec-approvals.json'"
    log "  Exec approvals configured (security=full)"
    
    # ─── Step 3: Check Node.js ───────────────────────────────
    info "Step 3/8: Checking Node.js..."
    NODE_CHECK=$(remote "node --version 2>/dev/null || echo 'NOT_INSTALLED'")
    
    if echo "$NODE_CHECK" | grep -q "NOT_INSTALLED"; then
      info "  Installing Node.js..."
      remote "curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y nodejs"
      log "  Node.js installed"
    else
      log "Node.js installed: $NODE_CHECK"
    fi
    
    # ─── Step 3b: Check Python (for graphify) ────────────────
    info "Step 3b/8: Checking Python (for graphify knowledge graph)..."
    PY_CHECK=$(remote "python3 --version 2>/dev/null || echo 'NOT_INSTALLED'")
    
    if echo "$PY_CHECK" | grep -q "NOT_INSTALLED"; then
      info "  Installing Python3..."
      remote "apt-get update -qq && apt-get install -y -qq python3 python3-pip > /dev/null 2>&1"
      log "  Python3 installed"
    else
      log "Python3 installed: $PY_CHECK"
    fi
    
    info "  Installing graphify..."
    remote "pip install graphifyy -q --break-system-packages 2>&1 | tail -3"
    log "  graphify installed"
    
    # ─── Step 4: Generate openclaw.json ──────────────────────
    info "Step 4/8: Generating config..."
    
    # Backup existing config before overwriting
    remote "[ -f '$REMOTE_OPENCLAW_HOME/openclaw.json' ] && cp '$REMOTE_OPENCLAW_HOME/openclaw.json' '$REMOTE_OPENCLAW_HOME/openclaw.json.bak.'\$(date +%s) || true" 2>/dev/null
    
    bash "$SCRIPT_DIR/generate-config.sh" "$SCRIPT_DIR"
    log "openclaw.json generated"
    
    # Use jq if available, fallback to grep
    if command -v jq &>/dev/null; then
      GATEWAY_TOKEN=$(jq -r '.gateway.auth.token' "$SCRIPT_DIR/openclaw.json")
    else
      GATEWAY_TOKEN=$(grep -o '"token": "[^"]*"' "$SCRIPT_DIR/openclaw.json" | tail -1 | cut -d'"' -f4)
    fi
    
    # ─── Step 5: Deploy Files ────────────────────────────────
    info "Step 5/8: Deploying files..."
    
    remote "mkdir -p '$REMOTE_WORKSPACE_DIR' '$REMOTE_OPENCLAW_HOME/memory' '$REMOTE_WORKSPACE_DIR/skills' '$REMOTE_OPENCLAW_HOME/delivery-queue'"
    
    remote_upload "$SCRIPT_DIR/openclaw.json" "$REMOTE_OPENCLAW_HOME/openclaw.json"
    remote "chmod 600 '$REMOTE_OPENCLAW_HOME/openclaw.json'"
    log "  openclaw.json deployed (permissions: 600)"
    
    # Upload workspace MD files
    WORKSPACE_DIR="$(dirname "$SCRIPT_DIR")/workspace"
    for md in IDENTITY.md SOUL.md USER.md AGENTS.md MEMORY.md HEARTBEAT.md TOOLS.md; do
      if [ -f "$WORKSPACE_DIR/$md" ]; then
        remote_upload "$WORKSPACE_DIR/$md" "$REMOTE_WORKSPACE_DIR/$md"
        log "  $md deployed"
      fi
    done
    
    # Upload local skills (graphify, delivery-queue, etc.)
    SKILLS_DIR="$(dirname "$SCRIPT_DIR")/skills"
    for skill_dir in "$SKILLS_DIR"/*/; do
      skill_name=$(basename "$skill_dir")
      if [ -f "$skill_dir/SKILL.md" ]; then
        remote "mkdir -p '$REMOTE_WORKSPACE_DIR/skills/$skill_name'"
        remote_upload "$skill_dir/SKILL.md" "$REMOTE_WORKSPACE_DIR/skills/$skill_name/SKILL.md"
        # Upload any script files (.mjs, .sh) alongside the SKILL.md
        for script in "$skill_dir"*.mjs "$skill_dir"*.sh; do
          [ -f "$script" ] && remote_upload "$script" "$REMOTE_WORKSPACE_DIR/skills/$skill_name/$(basename "$script")"
        done
        log "  skill/$skill_name deployed"
      fi
    done
    
    # ─── Step 6: Start Gateway ───────────────────────────────
    info "Step 6/8: Starting Gateway..."
    
    remote "mkdir -p '$REMOTE_CONFIG_HOME/systemd/user'"
    SAFE_PORT=$(printf '%d' "$GATEWAY_PORT")
    remote "cat > '$REMOTE_CONFIG_HOME/systemd/user/openclaw-gateway.service' << SVCEOF
    [Unit]
    Description=OpenClaw Gateway
    After=network-online.target
    
    [Service]
    ExecStart=/usr/bin/openclaw gateway --port $SAFE_PORT
    Restart=always
    RestartSec=5
    Environment=HOME=$REMOTE_HOME
    Environment=PATH=$REMOTE_HOME/.local/bin:/usr/local/bin:/usr/bin:/bin
    NoNewPrivileges=yes
    ProtectSystem=strict
    ReadWritePaths=$REMOTE_OPENCLAW_HOME $REMOTE_CONFIG_HOME /tmp
    PrivateTmp=yes
    
    [Install]
    WantedBy=default.target
    SVCEOF"
    
    if [ "$AUTO_START" = true ]; then
      remote "systemctl --user daemon-reload && systemctl --user enable openclaw-gateway && systemctl --user restart openclaw-gateway"
      sleep 3
      GW_STATUS=$(remote "systemctl --user is-active openclaw-gateway 2>/dev/null || echo 'failed'")
      if [ "$GW_STATUS" = "active" ]; then
        log "Gateway started (port $GATEWAY_PORT)"
      else
        warn "Gateway may have failed to start. Check: ssh ${SERVER_USER}@${SERVER_HOST} journalctl --user -u openclaw-gateway -n 20"
      fi
    fi
    
    # ─── Step 7: Install Skills ──────────────────────────────
    info "Step 7/8: Installing Skills (profile: ${SKILL_PROFILE:-b2b_trade})..."
    
    source "$SCRIPT_DIR/skill-profiles.sh"
    SKILL_LIST=$(get_skills_for_profile "${SKILL_PROFILE:-b2b_trade}")
    
    if [ -n "${EXTRA_SKILLS:-}" ]; then
      IFS=',' read -ra EXTRA_ARR <<< "$EXTRA_SKILLS"
      SKILL_LIST="$SKILL_LIST ${EXTRA_ARR[*]}"
    fi
    
    if [ "${CHROMADB_ENABLED:-false}" = true ]; then
      SKILL_LIST="$SKILL_LIST chromadb"
    fi
    
    SKILL_LIST=$(echo "$SKILL_LIST" | tr ' ' '\n' | sort -u | tr '\n' ' ')
    SKILL_COUNT=$(echo "$SKILL_LIST" | wc -w | tr -d ' ')
    
    if [ -n "$SKILL_LIST" ] && [ "$SKILL_COUNT" -gt 0 ]; then
      info "  $SKILL_COUNT skills to install"
      for skill in $SKILL_LIST; do
        if [[ ! "$skill" =~ ^[a-zA-Z0-9_-]+$ ]]; then
          warn "  Skipping invalid skill name: $skill"; continue
        fi
        remote "cd '$REMOTE_WORKSPACE_DIR/skills' && clawhub install $(printf '%q' "$skill") --force --no-input 2>&1 | tail -1" 2>/dev/null || true
      done
      log "  Skills installed"
    fi
    
    # ─── Step 8: IP Isolation (optional) ────────────────────
    if [ "${IP_ISOLATE:-false}" = true ]; then
      info "Step 8/8: Setting up WhatsApp IP isolation..."
      bash "$SCRIPT_DIR/ip-isolate.sh" "$CLIENT_NAME" "${IP_SOCKS_PORT:-}"
      log "IP isolation active"
    else
      info "Step 8/8: IP isolation skipped (set IP_ISOLATE=true to enable)"
    fi
    
    # ─── Done ─────────────────────────────────────────────────
    echo ""
    echo "═══════════════════════════════════════════════════════════"
    echo -e "  ${GREEN}✅ Deploy Complete: $CLIENT_NAME${NC}"
    echo "═══════════════════════════════════════════════════════════"
    echo ""
    echo "  Server:           ${SERVER_HOST}"
    echo "  Gateway:          ws://${SERVER_HOST}:${GATEWAY_PORT}"
    echo "  OpenClaw Home:  
  • b2b-sdr-agent-template/deploy/doctor.shcode · 4.5 KB
    #!/bin/bash
    # B2B SDR Agent — Post-deploy health checks
    # Usage: ./doctor.sh [--dry-run]
    
    set -euo pipefail
    
    SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
    CONFIG_FILE="$SCRIPT_DIR/config.sh"
    RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; CYAN='\033[0;36m'; NC='\033[0m'
    
    log()  { echo -e "${GREEN}[OK]${NC} $*"; }
    warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
    err()  { echo -e "${RED}[FAIL]${NC} $*" >&2; }
    info() { echo -e "${CYAN}[..]${NC} $*"; }
    
    DRY_RUN=false
    for arg in "$@"; do
      case "$arg" in
        --dry-run) DRY_RUN=true ;;
        -*) err "Unknown option: $arg"; exit 1 ;;
      esac
    done
    
    if [ ! -f "$CONFIG_FILE" ]; then
      err "Missing config: $CONFIG_FILE"
      echo "Run: cp config.sh.example config.sh && edit config.sh"
      exit 1
    fi
    
    source "$CONFIG_FILE"
    
    SERVER_USER="${SERVER_USER:-root}"
    SERVER_PORT="${SERVER_PORT:-22}"
    if [ -z "${REMOTE_HOME:-}" ]; then
      if [ "$SERVER_USER" = "root" ]; then
        REMOTE_HOME="/root"
      else
        REMOTE_HOME="/home/$SERVER_USER"
      fi
    fi
    REMOTE_OPENCLAW_HOME="${REMOTE_OPENCLAW_HOME:-$REMOTE_HOME/.openclaw}"
    REMOTE_CONFIG_HOME="${REMOTE_CONFIG_HOME:-$REMOTE_HOME/.config}"
    REMOTE_WORKSPACE_DIR="${REMOTE_WORKSPACE_DIR:-$REMOTE_OPENCLAW_HOME/workspace}"
    
    validate_remote_path() {
      if ! [[ "$1" =~ ^/[a-zA-Z0-9._/-]+$ ]]; then
        err "Invalid remote path: $1"
        exit 1
      fi
    }
    
    [ -n "${SERVER_HOST:-}" ] || { err "Missing SERVER_HOST"; exit 1; }
    [[ "$GATEWAY_PORT" =~ ^[0-9]+$ ]] || { err "Invalid GATEWAY_PORT: $GATEWAY_PORT"; exit 1; }
    validate_remote_path "$REMOTE_HOME"
    validate_remote_path "$REMOTE_OPENCLAW_HOME"
    validate_remote_path "$REMOTE_CONFIG_HOME"
    validate_remote_path "$REMOTE_WORKSPACE_DIR"
    
    SSH_OPTS="-o StrictHostKeyChecking=accept-new -o ConnectTimeout=10"
    [ -n "${SSH_KEY:-}" ] && SSH_OPTS="$SSH_OPTS -i $SSH_KEY"
    
    SSHPASS_PREFIX=""
    if [ -n "${SSH_PASS:-}" ]; then
      if ! command -v sshpass >/dev/null 2>&1; then
        err "sshpass required for password auth: brew install sshpass / apt install sshpass"
        exit 1
      fi
      PW_FILE=$(mktemp "${TMPDIR:-/tmp}/.sdr-doctor-pw.XXXXXX")
      chmod 600 "$PW_FILE"
      python3 -c "import os,sys; open(sys.argv[2], 'w').write(sys.argv[1]); os.chmod(sys.argv[2], 0o600)" "$SSH_PASS" "$PW_FILE"
      SSHPASS_PREFIX="sshpass -f $PW_FILE"
      SSH_OPTS="$SSH_OPTS -o PubkeyAuthentication=no"
    fi
    cleanup_pw() { [ -n "${PW_FILE:-}" ] && shred -u "$PW_FILE" 2>/dev/null || rm -f "${PW_FILE:-}"; }
    trap cleanup_pw EXIT
    
    SSH_CMD="$SSHPASS_PREFIX ssh $SSH_OPTS -p ${SERVER_PORT:-22} ${SERVER_USER}@${SERVER_HOST}"
    
    remote() {
      if [ "$DRY_RUN" = true ]; then
        echo "[dry-run] ssh: $*"
      else
        $SSH_CMD "$@"
      fi
    }
    
    FAILURES=0
    check() {
      local name="$1" cmd="$2"
      info "$name"
      if remote "$cmd" >/tmp/b2b-sdr-doctor.out 2>&1; then
        log "$name"
      else
        FAILURES=$((FAILURES + 1))
        err "$name"
        sed 's/^/    /' /tmp/b2b-sdr-doctor.out >&2 || true
      fi
    }
    
    echo ""
    echo "B2B SDR Agent Doctor"
    echo "Server: ${SERVER_USER}@${SERVER_HOST}:${SERVER_PORT}"
    echo "OpenClaw home: ${REMOTE_OPENCLAW_HOME}"
    echo ""
    
    check "SSH connectivity" "echo ok"
    check "Node.js available" "node --version"
    check "npm available" "npm --version"
    check "OpenClaw CLI available" "openclaw --version"
    check "OpenClaw home exists" "test -d '$REMOTE_OPENCLAW_HOME'"
    check "openclaw.json exists" "test -f '$REMOTE_OPENCLAW_HOME/openclaw.json'"
    check "openclaw.json permissions are private" "perm=\$(stat -c '%a' '$REMOTE_OPENCLAW_HOME/openclaw.json' 2>/dev/null || stat -f '%Lp' '$REMOTE_OPENCLAW_HOME/openclaw.json'); test \"\$perm\" = 600"
    check "Workspace context files installed" "for f in IDENTITY.md SOUL.md AGENTS.md USER.md MEMORY.md HEARTBEAT.md TOOLS.md; do test -f '$REMOTE_WORKSPACE_DIR/'\"\$f\" || exit 1; done"
    check "Local template skills installed" "for d in chroma-memory delivery-queue graphify lead-discovery quotation-generator sdr-humanizer supermemory telegram-toolkit; do test -f '$REMOTE_WORKSPACE_DIR/skills/'\"\$d\"'/SKILL.md' || exit 1; done"
    check "Gateway service active" "systemctl --user is-active openclaw-gateway"
    check "Gateway health endpoint responds" "curl -fsS --max-time 5 'http://127.0.0.1:$GATEWAY_PORT/health'"
    
    if [ "${CHROMADB_ENABLED:-false}" = true ]; then
      check "Chroma memory script installed" "test -f '$REMOTE_WORKSPACE_DIR/skills/chroma-memory/chroma.mjs'"
      check "Chroma memory stats command runs" "OPENCLAW_HOME='$REMOTE_OPENCLAW_HOME' node '$REMOTE_WORKSPACE_DIR/skills/chroma-memory/chroma.mjs' stats >/dev/null"
    fi
    
    echo ""
    if [ "$FAILURES" -eq 0 ]; then
      log "Doctor checks passed"
    else
      err "$FAILURES doctor check(s) failed"
      exit 1
    fi
    
  • b2b-sdr-agent-template/deploy/generate-config.shcode · 6.3 KB
    #!/bin/bash
    # Generate openclaw.json from config.sh
    # Usage: ./generate-config.sh <config-directory>
    
    set -euo pipefail
    
    CONFIG_DIR="${1:-.}"
    source "$CONFIG_DIR/config.sh"
    
    SERVER_USER="${SERVER_USER:-root}"
    if [ -z "${REMOTE_HOME:-}" ]; then
      if [ "$SERVER_USER" = "root" ]; then
        REMOTE_HOME="/root"
      else
        REMOTE_HOME="/home/$SERVER_USER"
      fi
    fi
    REMOTE_OPENCLAW_HOME="${REMOTE_OPENCLAW_HOME:-$REMOTE_HOME/.openclaw}"
    REMOTE_WORKSPACE_DIR="${REMOTE_WORKSPACE_DIR:-$REMOTE_OPENCLAW_HOME/workspace}"
    
    # Auto-generate Gateway Token if not set
    if [ -z "$GATEWAY_TOKEN" ]; then
      GATEWAY_TOKEN=$(openssl rand -hex 24 2>/dev/null || head -c 48 /dev/urandom | xxd -p | tr -d '\n' | head -c 48)
    fi
    
    # ─── Build models.providers JSON ─────────────────────────
    build_providers() {
      local providers=""
      local primary_api_field=""
      if [ "$PRIMARY_API_TYPE" = "google-generative-ai" ]; then
        primary_api_field=""
      else
        primary_api_field="\"api\": \"$PRIMARY_API_TYPE\","
      fi
    
      providers=$(cat <<PJSON
        "$PRIMARY_PROVIDER": {
          "baseUrl": "$PRIMARY_BASE_URL",
          $([ -n "$PRIMARY_API_KEY" ] && echo "\"apiKey\": \"$PRIMARY_API_KEY\"," || true)
          $primary_api_field
          "models": [{
            "id": "$PRIMARY_MODEL_ID",
            "name": "$PRIMARY_MODEL_NAME",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0},
            "contextWindow": $PRIMARY_CONTEXT_WINDOW,
            "maxTokens": $PRIMARY_MAX_TOKENS
          }]
        }
    PJSON
      )
    
      if [ -n "$FALLBACK_PROVIDER" ]; then
        local fallback_api_field="\"api\": \"$FALLBACK_API_TYPE\","
        providers="$providers,
        \"$FALLBACK_PROVIDER\": {
          \"baseUrl\": \"$FALLBACK_BASE_URL\",
          $([ -n "$FALLBACK_API_KEY" ] && echo "\"apiKey\": \"$FALLBACK_API_KEY\"," || true)
          $fallback_api_field
          \"models\": [{
            \"id\": \"$FALLBACK_MODEL_ID\",
            \"name\": \"$FALLBACK_MODEL_NAME\"
          }]
        }"
      fi
      echo "$providers"
    }
    
    # ─── Build plugins JSON ──────────────────────────────────
    build_plugins() {
      local allow='"telegram", "whatsapp"'
      local entries='{
          "telegram": {"enabled": '$TELEGRAM_ENABLED'},
          "whatsapp": {"enabled": '$WHATSAPP_ENABLED'}'
    
      if [ "${MEMOS_ENABLED:-false}" = true ] && [ -n "${MEMOS_API_KEY:-}" ]; then
        allow="$allow, \"memos-cloud-openclaw-plugin\""
        entries="$entries,
          \"memos-cloud-openclaw-plugin\": {
            \"enabled\": true,
            \"config\": {
              \"apiKey\": \"$MEMOS_API_KEY\",
              \"recallEnabled\": true,
              \"addEnabled\": true,
              \"captureStrategy\": \"last_turn\",
              \"asyncMode\": true
            }
          }"
      fi
    
      if [ "${LANCEDB_ENABLED:-false}" = true ]; then
        allow="$allow, \"memory-lancedb\""
        entries="$entries,
          \"memory-lancedb\": {
            \"enabled\": true,
            \"config\": {
              \"embedding\": {
                \"model\": \"$EMBEDDING_MODEL\",
                \"apiKey\": \"ollama\",
                \"baseUrl\": \"$OLLAMA_BASE_URL\",
                \"dimensions\": 768
              },
              \"autoCapture\": true,
              \"autoRecall\": true
            }
          }"
      fi
    
      entries="$entries
        }"
    
      echo "{
        \"allow\": [$allow],
        $([ "${LANCEDB_ENABLED:-false}" = true ] && echo '"slots": {"memory": "memory-lancedb"},' || true)
        \"entries\": $entries
      }"
    }
    
    # ─── Build agent models ──────────────────────────────────
    build_agent_models() {
      local models="\"$PRIMARY_PROVIDER/$PRIMARY_MODEL_ID\": {\"alias\": \"$PRIMARY_MODEL_NAME\"}"
      if [ -n "$FALLBACK_PROVIDER" ]; then
        models="$models, \"$FALLBACK_PROVIDER/$FALLBACK_MODEL_ID\": {\"alias\": \"$FALLBACK_MODEL_NAME\"}"
      fi
      echo "{$models}"
    }
    
    # ─── Generate main config ────────────────────────────────
    PROVIDERS=$(build_providers)
    PLUGINS=$(build_plugins)
    AGENT_MODELS=$(build_agent_models)
    
    cat > "$CONFIG_DIR/openclaw.json" <<ENDJSON
    {
      "meta": {
        "lastTouchedAt": "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)"
      },
      "logging": {
        "level": "warn",
        "consoleLevel": "error",
        "consoleStyle": "compact",
        "redactSensitive": "tools"
      },
      "models": {
        "mode": "merge",
        "providers": {
    $PROVIDERS
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "$PRIMARY_PROVIDER/$PRIMARY_MODEL_ID"$([ -n "$FALLBACK_PROVIDER" ] && echo ",
            \"fallbacks\": [\"$FALLBACK_PROVIDER/$FALLBACK_MODEL_ID\"]" || true)
          },
          "models": $AGENT_MODELS,
          "workspace": "$REMOTE_WORKSPACE_DIR",
          "contextTokens": 60000,
          "heartbeat": {"every": "30m", "target": "last", "directPolicy": "allow"},
          "maxConcurrent": 4$([ -n "${COMPACTION_PROVIDER:-}" ] && echo ",
          \"compaction\": {\"provider\": \"$COMPACTION_PROVIDER\"}" || true)
        }
      },
      "channels": {
        "whatsapp": {
          "enabled": $WHATSAPP_ENABLED,
          "dmPolicy": "$WHATSAPP_DM_POLICY",
          "allowFrom": ["*"],
          "groupPolicy": "$WHATSAPP_GROUP_POLICY",
          "debounceMs": $WHATSAPP_DEBOUNCE_MS
        },
        "telegram": {
          "enabled": $TELEGRAM_ENABLED,
          "dmPolicy": "$TELEGRAM_DM_POLICY",
          "allowFrom": ["*"],
          "botToken": "${TELEGRAM_BOT_TOKEN:-}",
          "groupPolicy": "$TELEGRAM_GROUP_POLICY"
        }
      },
      "gateway": {
        "port": $GATEWAY_PORT,
        "mode": "local",
        "bind": "${GATEWAY_BIND:-lan}",
        "auth": {"mode": "token", "token": "$GATEWAY_TOKEN"},
        "controlUi": {"allowedOrigins": ["*"]}
      },
      "tools": {
        "profile": "full",
        "sessions": {"visibility": "all"}
      },
      "skills": {"install": {"nodeManager": "npm"}},
      "hooks": {
        "internal": {
          "enabled": true,
          "entries": {
            "boot-md": {
              "enabled": true,
              "files": ["IDENTITY.md", "SOUL.md", "AGENTS.md", "USER.md", "MEMORY.md", "HEARTBEAT.md", "TOOLS.md"]
            }
          }
        }
      },
      "plugins": $PLUGINS
    }
    ENDJSON
    
    # Validate generated JSON
    if command -v jq &>/dev/null; then
      if ! jq empty "$CONFIG_DIR/openclaw.json" 2>/dev/null; then
        echo "✗ Generated openclaw.json is invalid JSON! Check for special characters in API keys." >&2
        exit 1
      fi
    fi
    
    echo "✓ Generated $CONFIG_DIR/openclaw.json"
    echo "  Gateway Token: [hidden — see openclaw.json]"
    
  • b2b-sdr-agent-template/deploy/ip-isolate.shcode · 11.0 KB
    #!/bin/bash
    # ═══════════════════════════════════════════════════════════
    #  WhatsApp IP Isolation — Per-Tenant WARP Proxy
    #  Gives each OpenClaw tenant a unique Cloudflare exit IP
    #  so WhatsApp sees independent devices.
    #
    #  Usage: ./ip-isolate.sh <tenant-name> [socks-port]
    #  Example: ./ip-isolate.sh acme-corp 40010
    # ═══════════════════════════════════════════════════════════
    
    set -euo pipefail
    
    SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
    CONFIG_FILE="$SCRIPT_DIR/config.sh"
    
    RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; CYAN='\033[0;36m'; NC='\033[0m'
    log()  { echo -e "${GREEN}[✓]${NC} $*"; }
    warn() { echo -e "${YELLOW}[!]${NC} $*"; }
    err()  { echo -e "${RED}[✗]${NC} $*" >&2; }
    info() { echo -e "${CYAN}[→]${NC} $*"; }
    
    # ─── Args ────────────────────────────────────────────────
    TENANT_NAME="${1:-}"
    SOCKS_PORT="${2:-}"
    
    if [ -n "$TENANT_NAME" ] && [[ ! "$TENANT_NAME" =~ ^[a-zA-Z0-9_-]+$ ]]; then
      err "Invalid tenant name: $TENANT_NAME (only a-z, A-Z, 0-9, -, _ allowed)"
      exit 1
    fi
    
    if [ -z "$TENANT_NAME" ]; then
      echo "Usage: $0 <tenant-name> [socks-port]"
      echo ""
      echo "Examples:"
      echo "  $0 acme-corp           # auto-assign port"
      echo "  $0 acme-corp 40010    # specific port"
      echo ""
      echo "This script:"
      echo "  1. Registers a free Cloudflare WARP account for the tenant"
      echo "  2. Installs wireproxy (~4MB RAM) as a SOCKS5 proxy"
      echo "  3. Sets ALL_PROXY in the tenant's .env"
      echo "  4. Restarts the tenant container"
      echo ""
      echo "Each tenant gets a unique Cloudflare IP for WhatsApp."
      exit 1
    fi
    
    if [ ! -f "$CONFIG_FILE" ]; then
      err "Missing config: $CONFIG_FILE"
      exit 1
    fi
    
    source "$CONFIG_FILE"
    
    SERVER_USER="${SERVER_USER:-root}"
    SERVER_PORT="${SERVER_PORT:-22}"
    if [ -z "${REMOTE_HOME:-}" ]; then
      if [ "$SERVER_USER" = "root" ]; then
        REMOTE_HOME="/root"
      else
        REMOTE_HOME="/home/$SERVER_USER"
      fi
    fi
    REMOTE_OPENCLAW_HOME="${REMOTE_OPENCLAW_HOME:-$REMOTE_HOME/.openclaw}"
    REMOTE_CONFIG_HOME="${REMOTE_CONFIG_HOME:-$REMOTE_HOME/.config}"
    
    validate_remote_path() {
      if ! [[ "$1" =~ ^/[a-zA-Z0-9._/-]+$ ]]; then
        err "Invalid remote path: $1"
        exit 1
      fi
    }
    validate_remote_path "$REMOTE_HOME"
    validate_remote_path "$REMOTE_OPENCLAW_HOME"
    validate_remote_path "$REMOTE_CONFIG_HOME"
    
    # ─── SSH Setup ───────────────────────────────────────────
    SSH_OPTS="-o StrictHostKeyChecking=accept-new -o ConnectTimeout=10"
    [ -n "${SSH_KEY:-}" ] && SSH_OPTS="$SSH_OPTS -i $SSH_KEY"
    
    SSHPASS_PREFIX=""
    if [ -n "${SSH_PASS:-}" ]; then
      command -v sshpass &>/dev/null || { err "sshpass required: brew install sshpass"; exit 1; }
      PW_FILE=$(mktemp "${TMPDIR:-/tmp}/.sdr-ip-pw.XXXXXX")
      chmod 600 "$PW_FILE"
      python3 -c "
    import sys, os
    with open(sys.argv[2], 'w') as f: f.write(sys.argv[1])
    os.chmod(sys.argv[2], 0o600)
    " "$SSH_PASS" "$PW_FILE"
      SSHPASS_PREFIX="sshpass -f $PW_FILE"
      SSH_OPTS="$SSH_OPTS -o PubkeyAuthentication=no"
    fi
    
    SSH_CMD="$SSHPASS_PREFIX ssh $SSH_OPTS -p ${SERVER_PORT:-22} ${SERVER_USER}@${SERVER_HOST}"
    
    cleanup_pw() { [ -n "${PW_FILE:-}" ] && shred -u "$PW_FILE" 2>/dev/null || rm -f "${PW_FILE:-}"; }
    trap cleanup_pw EXIT
    
    remote() { $SSH_CMD "$@"; }
    
    echo ""
    echo "═══════════════════════════════════════════════════════════"
    echo "  WhatsApp IP Isolation — $TENANT_NAME"
    echo "═══════════════════════════════════════════════════════════"
    echo ""
    info "Server: ${SERVER_USER}@${SERVER_HOST}:${SERVER_PORT:-22}"
    info "OpenClaw Home: ${REMOTE_OPENCLAW_HOME}"
    if [ "$SERVER_USER" != "root" ]; then
      warn "IP isolation installs system services; non-root users need passwordless privileges for /usr/local/bin, /etc/suiwarp, and systemd."
    fi
    
    # ─── Step 1: Test connection & detect architecture ───────
    info "Step 1/5: Checking server..."
    ARCH=$(remote "uname -m")
    case "$ARCH" in
      x86_64)  ARCH_SUFFIX="amd64" ;;
      aarch64) ARCH_SUFFIX="arm64" ;;
      *) err "Unsupported architecture: $ARCH"; exit 1 ;;
    esac
    log "Connected ($ARCH)"
    
    # ─── Step 2: Install wgcf + wireproxy if needed ─────────
    info "Step 2/5: Checking tools..."
    
    WGCF_VERSION="2.2.22"
    WIREPROXY_VERSION="1.0.9"
    
    remote "
      if ! command -v wgcf &>/dev/null; then
        curl -sL 'https://github.com/ViRb3/wgcf/releases/download/v${WGCF_VERSION}/wgcf_${WGCF_VERSION}_linux_${ARCH_SUFFIX}' \
          -o /usr/local/bin/wgcf && chmod +x /usr/local/bin/wgcf
        echo 'wgcf installed'
      else
        echo 'wgcf already installed'
      fi
    
      if ! command -v wireproxy &>/dev/null; then
        curl -sL 'https://github.com/pufferffish/wireproxy/releases/download/v${WIREPROXY_VERSION}/wireproxy_linux_${ARCH_SUFFIX}.tar.gz' \
          -o /tmp/wireproxy.tar.gz
        tar -xzf /tmp/wireproxy.tar.gz -C /tmp/ wireproxy 2>/dev/null || true
        mv /tmp/wireproxy /usr/local/bin/ 2>/dev/null || true
        chmod +x /usr/local/bin/wireproxy
        rm -f /tmp/wireproxy.tar.gz
        echo 'wireproxy installed'
      else
        echo 'wireproxy already installed'
      fi
    
      mkdir -p /etc/suiwarp
    "
    log "Tools ready"
    
    # ─── Step 3: Register WARP + generate WireGuard profile ─
    info "Step 3/5: Registering WARP account for $TENANT_NAME..."
    
    remote "
      CONF='/etc/suiwarp/wgcf-${TENANT_NAME}.toml'
      PROF='/etc/suiwarp/wgcf-${TENANT_NAME}.conf'
    
      if [ -f \"\$CONF\" ]; then
        echo 'WARP account already exists'
      else
        cd /tmp
        echo 'y' | wgcf register --config \"\$CONF\" 2>&1 | tail -3
      fi
    
      if [ ! -f \"\$PROF\" ]; then
        wgcf generate --config \"\$CONF\" --profile \"\$PROF\" 2>&1 | tail -2
      fi
    
      echo '---PROFILE---'
      cat \"\$PROF\"
    "
    
    log "WARP account registered"
    
    # ─── Step 4: Auto-assign port & create wireproxy service ─
    info "Step 4/5: Setting up SOCKS5 proxy..."
    
    # Auto-assign port if not specified
    if [ -z "$SOCKS_PORT" ]; then
      SOCKS_PORT=$(remote "
        # Find next available port starting from 40001
        for p in \$(seq 40001 40099); do
          if ! ss -tlnp | grep -q \":\$p \"; then
            echo \$p
            break
          fi
        done
      ")
      if [ -z "$SOCKS_PORT" ]; then
        err "No available port in range 40001-40099"
        exit 1
      fi
    fi
    
    info "  SOCKS5 port: $SOCKS_PORT"
    
    remote "
      # Extract WireGuard params
      PROF='/etc/suiwarp/wgcf-${TENANT_NAME}.conf'
      WG_PK=\$(grep PrivateKey \"\$PROF\" | awk '{print \$3}')
      WG_V4=\$(grep Address \"\$PROF\" | head -1 | awk '{print \$3}')
      WG_V6=\$(grep Address \"\$PROF\" | tail -1 | awk '{print \$3}')
      WG_PUB=\$(grep PublicKey \"\$PROF\" | awk '{print \$3}')
      WG_EP=\$(grep Endpoint \"\$PROF\" | awk '{print \$3}')
    
      # Create wireproxy config
      cat > /etc/suiwarp/wireproxy-${TENANT_NAME}.conf << WPEOF
    [Interface]
    PrivateKey = \$WG_PK
    Address = \$WG_V4
    Address = \$WG_V6
    DNS = 1.1.1.1
    MTU = 1280
    
    [Peer]
    PublicKey = \$WG_PUB
    Endpoint = \$WG_EP
    AllowedIPs = 0.0.0.0/0, ::/0
    
    [Socks5]
    BindAddress = 127.0.0.1:${SOCKS_PORT}
    WPEOF
    
      # Create systemd service
      cat > /etc/systemd/system/wireproxy-${TENANT_NAME}.service << SVCEOF
    [Unit]
    Description=WireProxy WARP - ${TENANT_NAME}
    After=network.target
    
    [Service]
    ExecStart=/usr/local/bin/wireproxy -c /etc/suiwarp/wireproxy-${TENANT_NAME}.conf
    Restart=always
    RestartSec=5
    
    [Install]
    WantedBy=multi-user.target
    SVCEOF
    
      systemctl daemon-reload
      systemctl enable wireproxy-${TENANT_NAME}
      systemctl restart wireproxy-${TENANT_NAME}
      sleep 2
    
      # Verify
      if ss -tlnp | grep -q ':${SOCKS_PORT} '; then
        echo 'SOCKS5 proxy active'
      else
        echo 'SOCKS5 proxy FAILED'
        exit 1
      fi
    "
    
    # Test exit IP
    WARP_IP=$(remote "curl -s --max-time 10 -x socks5h://127.0.0.1:${SOCKS_PORT} https://ipinfo.io/ip 2>/dev/null || echo 'pending'")
    log "WARP proxy active → exit IP: $WARP_IP"
    
    # ─── Step 5: Inject proxy into tenant container ─────────
    info "Step 5/5: Configuring tenant container..."
    
    remote "
      # Find tenant .env (Docker multi-tenant or standalone)
      ENV_FILE=''
    	  for path in \
    	    '/opt/openclaw/tenants/${TENANT_NAME}/.env' \
    	    '$REMOTE_OPENCLAW_HOME/.env'; do
        if [ -f \"\$path\" ]; then
          ENV_FILE=\"\$path\"
          break
        fi
      done
    
      if [ -n \"\$ENV_FILE\" ]; then
        # Remove old ALL_PROXY if exists
        sed -i '/^ALL_PROXY=/d' \"\$ENV_FILE\"
        echo 'ALL_PROXY=socks5://host.docker.internal:${SOCKS_PORT}' >> \"\$ENV_FILE\"
        echo \"Updated \$ENV_FILE\"
    
        # Add extra_hosts to docker-compose.yml if needed
        COMPOSE_DIR=\$(dirname \"\$ENV_FILE\")
        COMPOSE_FILE=\"\$COMPOSE_DIR/docker-compose.yml\"
        if [ -f \"\$COMPOSE_FILE\" ] && ! grep -q 'extra_hosts' \"\$COMPOSE_FILE\"; then
          sed -i '/^    networks:/i\\    extra_hosts:\\n      - \"host.docker.internal:host-gateway\"' \"\$COMPOSE_FILE\"
          echo 'Added extra_hosts to docker-compose.yml'
        fi
    
        # Restart container
        cd \"\$COMPOSE_DIR\" && docker compose up -d 2>&1 | tail -3
        echo 'Container restarted with proxy'
      else
        # Standalone mode: set env for systemd service
        echo \"No Docker .env found, setting proxy in systemd\"
    	    UNIT='$REMOTE_CONFIG_HOME/systemd/user/openclaw-gateway.service'
        if [ -f \"\$UNIT\" ] && ! grep -q 'ALL_PROXY' \"\$UNIT\"; then
          sed -i \"/\\[Service\\]/a Environment=ALL_PROXY=socks5://127.0.0.1:${SOCKS_PORT}\" \"\$UNIT\"
          systemctl --user daemon-reload
          systemctl --user restart openclaw-gateway
          echo 'Gateway restarted with proxy'
        fi
      fi
    "
    
    log "Tenant $TENANT_NAME configured"
    
    # ─── Done ────────────────────────────────────────────────
    DIRECT_IP=$(remote "curl -s --max-time 5 ifconfig.me 2>/dev/null || echo 'unknown'")
    
    echo ""
    echo "═══════════════════════════════════════════════════════════"
    echo -e "  ${GREEN}✅ IP Isolation Active: $TENANT_NAME${NC}"
    echo "═══════════════════════════════════════════════════════════"
    echo ""
    echo "  Server IP:       $DIRECT_IP"
    echo "  WARP Exit IP:    $WARP_IP"
    echo "  SOCKS5 Port:     $SOCKS_PORT"
    echo "  wireproxy RAM:   ~4MB"
    echo ""
    echo "  WhatsApp will connect through Cloudflare ($WARP_IP)"
    echo "  instead of the server's real IP ($DIRECT_IP)."
    echo ""
    echo "  Commands:"
    echo "    Status:  ssh ${SERVER_USER}@${SERVER_HOST} systemctl status wireproxy-${TENANT_NAME}"
    echo "    Logs:    ssh ${SERVER_USER}@${SERVER_HOST} journalctl -u wireproxy-${TENANT_NAME} -f"
    echo "    Test IP: ssh ${SERVER_USER}@${SERVER_HOST} curl -x socks5h://127.0.0.1:${SOCKS_PORT} ifconfig.me"
    echo ""
    
  • b2b-sdr-agent-template/deploy/skill-profiles.shcode · 3.6 KB
    #!/bin/bash
    # ═══════════════════════════════════════════════════════════
    #  B2B SDR Agent — Skill Profiles
    #  Pre-configured skill combinations for different use cases
    # ═══════════════════════════════════════════════════════════
    
    # ─── Core Skills (always installed) ──────────────────────
    SKILLS_CORE=(
      "sales"
      "supermemory"
      "tavily-search"
      "pdf"
      "find-skills"
      "customer-persona"
      "summarize"
      "lead-discovery"
      "quotation-generator"
      "capability-evolver-pro"
      "self-improving-agent"
      "memory-hygiene"
      "skillhub-preference"
      "web-tools-guide"
    )
    
    # ─── B2B Sales Skills ────────────────────────────────────
    SKILLS_B2B_SALES=(
      "cold-outreach"
      "cold-email"
      "lead-researcher"
      "ai-lead-generator-skill"
      "competitor-analysis-report"
      "go-to-market"
      "business-development"
      "apollo"
      "nyne-enrichment"
      "nyne-search"
    )
    
    # ─── Social Media Skills ─────────────────────────────────
    SKILLS_SOCIAL=(
      "postiz"
      "simplified-social-media"
      "social-media-lead-generation"
      "content-creator"
      "bird"
      "bluesky"
      "moments-copy"
      "blog-writer"
    )
    
    # ─── Advertising Skills ──────────────────────────────────
    SKILLS_ADS=(
      "meta-ads-report"
      "ad-ready"
      "google-analytics"
      "performance-reporter"
    )
    
    # ─── Research & Analytics Skills ──────────────────────────
    SKILLS_RESEARCH=(
      "lead-generation"
      "brw-linkedin-profile-optimizer"
      "social-graph"
      "data-analyst"
      "graphify"
    )
    
    # ─── Email Skills ─────────────────────────────────────────
    SKILLS_EMAIL=(
      "clawemail"
      "email-autoreply"
      "email-marketing-2"
      "daily-brief-digest"
    )
    
    # ─── Automation Skills ────────────────────────────────────
    SKILLS_AUTOMATION=(
      "agent-browser"
      "agent-browser-clawdbot"
      "listing-swarm"
      "foxreach"
      "campaign-orchestrator"
    )
    
    # ═══════════════════════════════════════════════════════════
    #  Profiles
    # ═══════════════════════════════════════════════════════════
    
    profile_b2b_trade() {
      echo "${SKILLS_CORE[@]} ${SKILLS_B2B_SALES[@]} ${SKILLS_SOCIAL[@]} ${SKILLS_ADS[@]} ${SKILLS_EMAIL[@]}"
    }
    
    profile_lite() {
      echo "${SKILLS_CORE[@]} ${SKILLS_B2B_SALES[@]}"
    }
    
    profile_social() {
      echo "${SKILLS_CORE[@]} ${SKILLS_SOCIAL[@]} ${SKILLS_ADS[@]}"
    }
    
    profile_full() {
      echo "${SKILLS_CORE[@]} ${SKILLS_B2B_SALES[@]} ${SKILLS_SOCIAL[@]} ${SKILLS_ADS[@]} ${SKILLS_RESEARCH[@]} ${SKILLS_EMAIL[@]} ${SKILLS_AUTOMATION[@]}"
    }
    
    get_skills_for_profile() {
      local profile="$1"
      case "$profile" in
        b2b_trade|b2b) profile_b2b_trade ;;
        lite|minimal)  profile_lite ;;
        social)        profile_social ;;
        full|all)      profile_full ;;
        none|skip)     echo "" ;;
        *)
          echo "⚠ Unknown skill profile '$profile', falling back to b2b_trade" >&2
          profile_b2b_trade
          ;;
      esac
    }
    
  • b2b-sdr-agent-template/docs/HANDOFF.mdmarkdown · 4.7 KB

    交接状态 · HANDOFF(b2b-sdr-agent-template)

    任何 agent 开始工作前必读,结束工作前必更新。 本文件是当前任务状态的唯一权威来源;历史决策看 docs/adr/,历史变更看 git log。

    项目速览

    仓库速览(自动提取,供冷启动)

    以下内容由 agents-enrich-handoff.py 从本仓库文件自动提取,只含事实,不含推测。 「当前目标 / 下一步」仍需人工填写——脚本无法知道你这轮要做什么。

    这是什么

    We're live on Product Hunt! → PulseAgent B2B SDR Agent Skill — Open-source AI SDR for WhatsApp, Email & Telegram. An upvote means the world to us 🙏

    (package.json 描述:Open-source B2B AI SDR template for OpenClaw deployments.)

    常用命令(来自 package.json / Makefile)

    npm test

    构建与部署设施

    • CI workflow:validate.yml(Validate Template)

    本仓库其他文档(接手时值得先扫一眼)

    docs/RUNNING-ON-KIMI.md

    目录与文件构成

    顶层:AGENTS.md、ANTI-AMNESIA.md、CHANGELOG.md、CHANGELOG.md.local、CLAUDE.md、CONTRIBUTING.md、GEMINI.md、LICENSE、README.ar.md、README.es.md、README.fr.md、README.ja.md、README.md、README.pt-BR.md、README.ru.md、README.zh-CN.md …

    主要文件类型:.md × 74、.json × 65、.sh × 10、.py × 8、.mjs × 3、.yml × 2

    如何验证(基线,动手前先跑一次)

    • 测试:npm test

    当前目标

    ⚠️ 待人工确认:下次接手的 agent 请与用户确认本轮目标与验收标准后填写,不要凭猜测动手。

    已完成(最近 10 次提交 · 自动生成于 2026-08-01)

    • 4bc6bf078b chore: add git-cliff changelog generation(2026-07-31)
    • 22d0e447aa fix: 13 篇微信队列草稿的相对链接改绝对 URL(draft/add 45166 invalid content 根因,二分定位确认)(2026-06-10)
    • deacd9858a chore(sync): v2026.6.5 README announcement + blog published(2026-06-10)
    • 38d9f8c1cf chore(sync): no new release — wechat queue drain 20→13 (run #27)(2026-06-10)
    • b4b646f130 chore(sync): 2026-06-10 run — no new release, wechat queue 20 (403 persists)(2026-06-10)
    • 8c4dbd65a2 chore(sync): no new release 2026-06-09 run8 + wechat queue update(2026-06-09)
    • a97093e8f7 chore(sync): no new release v2026.6.5 + wechat queue update (run 7)(2026-06-09)
    • 723b36ee19 chore(sync): release v2026.6.5 + wechat queue update(2026-06-09)
    • e169d46d67 chore(sync): wechat queue drain run #25 — 19/19 still 403, no new release(2026-06-09)
    • 40806abf20 chore(sync): 2026-06-09 run 6 — no new stable release, wechat queue 19→19(2026-06-09)

    进行中 / 未提交改动(自动生成于 2026-08-01)

    • 无未提交改动(工作区干净)

    已知坑 / 注意事项

    从跨会话记忆迁入。凭据只写位置不写值。

    ⚙️ 两种交付架构

    Container-per-Tenant(商业级,推荐):每租户 = 独立容器 + 独立 Gateway + 独立 API Key + 独立 WhatsApp 代理 IP。

    • 隔离维度:进程 / 数据 / API Key / WhatsApp IP / 资源(768MB + 0.5 CPU)
    • 容量:8GB VPS → 8-10 租户;16GB → 18-22 租户
    • 端口约定:Gateway = 18800+N,Proxy = 18900+N

    单租户模式:1 服务器 = 1 客户,systemd 部署,deploy.sh 仍支持。

    ⚠️ 47 上的 openclaw 与业务容器是两回事

    47 上 openclaw 是裸跑的(npm 全局包 /usr/lib/node_modules/openclaw + systemd user service openclaw-gateway.service),Gateway 仅监听 127.0.0.1:18789,不对外。

    • 大量 crontab 任务依赖这个本地 gateway(memory-agent、astock-hunter、evomap、weekly_cleanup 等)—— 升级前先确认这些任务的影响。
    • 47 同时跑 portal / PA / bots 的 Docker 业务容器,openclaw 与它们无依赖,可独立升级。
    • 升级:npm install -g openclaw@latest → systemctl --user restart openclaw-gateway。
    • Gateway token 在服务器上,不落文档。

    ⚠️ 客户 VPS 供应商坑

    advinservers / lisahost 这类小供应商续费到账不会自动恢复被停的 VM,必须登控制台手动 Start。续费后要验证机器真的起来了,别以为付了钱就好了。

    下一步

    (待补充)

    最近交接记录

    日期操作者摘要
    2026-08-01agents-handoff.sh初始化交接状态(含真实 git 基线)
  • b2b-sdr-agent-template/docs/RUNNING-ON-KIMI.mdmarkdown · 7.2 KB

    Running on Kimi K2.6 (Moonshot AI)

    This template works with any LLM provider that OpenClaw supports. If you run it on Kimi K2.6 (Moonshot AI) via the Kimi Code API key subscription, these notes will save you hours of debugging.

    TL;DR

    1. Configure Kimi auth via the interactive wizard:

      openclaw models auth login --provider moonshot --set-default
      

      Pick Moonshot AI (Kimi K2.6) → Kimi Code API key (subscription) and paste your key.

    2. If you skip the wizard and edit config files directly, make sure every auth-profiles.json is consistent — see the pitfall section below.

    3. Bump agents.defaults.contextTokens in openclaw.json to match your model's real window, otherwise auto-compaction will thrash.

    4. Tighten memorylake-openclaw plugin: topK: 3, searchThreshold: 0.7 — the defaults recall too aggressively for a 262K model and still cause overflow when system prompt + skill manifests are large.


    Pitfall 1 — Key lives in auth-profiles.json, not openclaw.json

    OpenClaw stores provider API keys per-agent in:

    ~/.openclaw/agents/<agent-id>/agent/auth-profiles.json
    

    This file overrides openclaw.json's models.providers.<name>.apiKey. Editing openclaw.json alone has no effect at runtime.

    For Kimi specifically there are two provider ids (kimi and kimi-coding) that share the same upstream plugin. Both profiles must point at the same current key, or OpenClaw's auth rotation will cycle from the good one to the stale one and emit misleading errors like:

    HTTP 401 authentication_error: The API Key appears to be invalid or may have expired.
    → rotate_profile
    → HTTP 402: We're unable to verify your membership benefits at this time.
    

    The 402 is not a real membership problem — it's OpenClaw retrying with a stale key in a sibling profile.

    Fix (non-interactive)

    NEW_KEY="sk-kimi-..."
    for agent_dir in ~/.openclaw/agents/*/agent; do
      python3 - <<PY
    import json, pathlib
    p = pathlib.Path("$agent_dir/auth-profiles.json")
    if not p.exists(): raise SystemExit
    c = json.loads(p.read_text())
    for pid in ("kimi:default", "kimi-coding:default"):
      if pid in c.get("profiles", {}):
        c["profiles"][pid]["key"] = "$NEW_KEY"
    p.write_text(json.dumps(c, indent=4))
    print("updated", p)
    PY
    done
    # clear stale failure state so the new key gets a fresh retry
    rm -f ~/.openclaw/agents/*/agent/auth-state.json
    systemctl --user restart openclaw-gateway
    

    Fix (recommended — use the wizard)

    openclaw models auth login --provider moonshot --set-default
    

    Pitfall 2 — contextTokens doesn't auto-adapt to model window

    agents.defaults.contextTokens is a total-turn budget (input + output) that OpenClaw writes during setup. It is not derived from the active model's declared contextWindow. Default values (often 60000) cap the prompt budget at roughly 20K input + 40K output, far below what Kimi K2.6 (262K) or Claude Sonnet (200K) can actually handle.

    Symptom on an "oversized" system prompt (big SKILL.md manifest, memorylake recall, long AGENTS.md):

    [context-overflow-precheck] estimatedPromptTokens=20487
    promptBudgetBeforeReserve=20000 overflowTokens=487
    → auto-compaction retries 3 times, all fail (system prompt is not compressible)
    

    Fix

    Set agents.defaults.contextTokens to roughly 75% of your model's window:

    ModelcontextWindowRecommended contextTokens
    Kimi K2.6 (kimi-code / k2p5)262,144200000
    Claude Sonnet 4.6200,000160000
    DeepSeek V3 / R1131,072100000

    Also raise agents.defaults.compaction.reserveTokensFloor to around 60000 so large replies don't starve.

    openclaw config set agents.defaults.contextTokens 200000
    openclaw config set agents.defaults.compaction.reserveTokensFloor 60000
    systemctl --user restart openclaw-gateway
    

    Pitfall 3 — memorylake-openclaw recall thrashes on big models

    With autoRecall: true (default) and no limits, memorylake injects every loosely-related memory into the turn. On Kimi K2.6 this often pushes past the effective prompt budget even when the absolute window is plenty.

    Supported config keys (from openclaw.plugin.json → configSchema):

    • topK (default 5) — max memories per recall
    • searchThreshold (default 0.3) — min similarity score
    • autoRecall / autoCapture / autoUpload (default true)
    • rerank (default true)

    Recommended settings for SDR on Kimi

    "plugins": {
      "entries": {
        "memorylake-openclaw": {
          "config": {
            "apiKey": "sk-...",
            "projectId": "proj-...",
            "topK": 3,
            "searchThreshold": 0.7
          }
        }
      }
    }
    

    Stricter threshold + fewer hits → only strongly-relevant context reaches the prompt. Agents still call memory_search explicitly when they need deeper lookups.


    Pitfall 4 — Anthropic fallbacks slow everything down after a billing lapse

    If your agents.defaults.model.fallbacks list contains a dozen anthropic/* entries and your Anthropic billing fails, each turn burns time walking through every Claude model (each marked skip_candidate reason=billing) before reaching a working DeepSeek or Kimi fallback.

    Fix

    Strip anthropic/* from fallbacks while your billing issue is open:

    openclaw config get agents.defaults.model.fallbacks
    # edit: remove entries starting with "anthropic/"
    openclaw config set agents.defaults.model.fallbacks '["deepseek/deepseek-chat","deepseek/deepseek-reasoner","kimi/kimi-code"]' --strict-json
    

    Add Anthropic back after you restore billing.


    Pitfall 5 — OpenClaw's fallback does not switch providers on 401/402

    OpenClaw's auth rotation triggers on 401 and 402 responses but only rotates between auth profiles of the same provider (e.g. kimi:default → kimi-coding:default). It does not escalate to a different provider in fallbacks for auth errors.

    Consequence: if all profiles of your primary provider have stale keys, the agent fails permanently on that turn rather than falling through to DeepSeek.

    Workaround

    • Keep primary provider auth fresh (see Pitfall 1).
    • If you want cross-provider failover on auth errors, either remove the bad secondary profile entirely or keep only one provider in the agents.list[].model.primary and let DeepSeek sit in fallbacks for non-auth errors (e.g. rate limits).

    Verification

    After configuring Kimi K2.6 as primary:

    # check active profile
    openclaw models status | grep kimi
    
    # end-to-end turn
    openclaw agent --agent <your-sdr-agent-id> \
      --session-id "kimi-check-$(date +%s)" \
      --message "Reply just: pong" \
      --timeout 60
    # expected: pong
    

    If you see membership benefits or API Key appears invalid, re-check Pitfall 1 first (stale sibling profile).


    Why this matters

    Kimi K2.6 on the Kimi Code API subscription is currently one of the cheapest 262K-context models with Claude-class quality for Chinese and English agent work. The rough edges are in the OpenClaw integration layer, not in Kimi itself — all five pitfalls above were hit in production while onboarding this template onto a Kimi-primary stack. Documenting them here so you don't have to repeat the debugging.

  • b2b-sdr-agent-template/docs/adr/0000-template.mdmarkdown · 0.4 KB

    ADR-NNNN:<决策标题>

    • 日期:YYYY-MM-DD
    • 状态:提议 / 已采纳 / 已废弃 / 被 ADR-XXXX 取代
    • 决策者:<人 / agent>

    背景

    (是什么问题逼我们做这个决策?约束是什么?)

    决策

    (我们决定做什么。一句话说清。)

    备选方案

    (考虑过什么、为什么没选。这是未来最有价值的部分。)

    后果

    • 正面:
    • 负面 / 代价:
    • 后续需要注意:
  • b2b-sdr-agent-template/docs/adr/README.mdmarkdown · 0.2 KB

    架构决策记录(ADR)

    任何"为什么这么改"的决策都写在这里,按 NNNN-标题.md 编号递增。 模板见 0000-template.md。

    对话里想通但没落盘的决策,等于没发生过。

  • b2b-sdr-agent-template/docs/internal/LAUNCH-CONTENT.mdmarkdown · 27.4 KB

    B2B SDR Agent Template — Launch Content

    All marketing copy for the open-source B2B SDR Agent Template. GitHub: https://github.com/iPythoning/b2b-sdr-agent-template


    1. Show HN Post

    Title: Show HN: Open-source AI SDR that automates full B2B export sales pipeline

    Body:

    I've been building AI agents for B2B export companies for the past year. Most "AI sales tools" are glorified chatbots — they handle one message, forget context, and fall apart after the first conversation. So I built an open-source template that handles the entire 10-stage sales pipeline, from lead capture to deal closing.

    The core idea is a 7-layer context architecture. Instead of a single system prompt, the AI reads 7 Markdown files on every conversation: Identity (who am I), Soul (how I behave), Agents (full sales workflow), User (owner's ICP and products), Heartbeat (automated pipeline inspection), Memory (3-engine recall system), and Tools (CRM, channels, integrations). This gives it deep, persistent understanding of your business.

    It runs 13 automated cron jobs — daily pipeline reports, stalled lead detection, email follow-up sequences, AI-powered lead discovery rotating across African, Middle Eastern, SEA, and Latin American markets. Dynamic ICP scoring adjusts in real-time based on buyer behavior (fast reply +1, asks for quote +2, 7 days silent -1).

    Multi-channel orchestration across WhatsApp, Telegram, and Email. The delivery-queue skill adds human-like message pacing (3-90s delays, message splitting) so it doesn't feel like a bot. Cultural adaptation for 5 market regions. Auto-detects and responds in the customer's language.

    Built on OpenClaw. Battle-tested with real export companies selling heavy vehicles, electronics, and textiles. Includes 3 industry example configs you can deploy in 5 minutes.

    MIT licensed. Markdown-driven — no code changes needed for customization.

    https://github.com/iPythoning/b2b-sdr-agent-template


    2. Reddit Posts

    r/SaaS Post

    Title: I open-sourced my AI SDR instead of charging $200/month — handles full B2B sales pipeline across WhatsApp, Email, and Telegram

    Body:

    I spent a year building AI SDR agents for B2B export clients. Watched them pay $200-500/month each for tools like Apollo, Instantly, and Smartlead — and still need 3-4 tools stitched together with Zapier.

    So I packaged everything into one open-source template. It covers the entire pipeline: lead capture, BANT qualification, CRM entry, company research, quotation generation, negotiation tracking, daily reporting, nurture campaigns, cold email sequences, and multi-channel orchestration.

    The whole thing is configured through 7 Markdown files — no code. You describe your company, products, ICP scoring criteria, and sales workflow in plain text. The AI reads all of it on every conversation.

    It runs 13 automated cron jobs (pipeline reports, stalled lead detection, email follow-ups, AI lead discovery). Has 3-engine memory so it remembers customer context across sessions. Supports WhatsApp, Telegram, and Email.

    Already battle-tested with companies selling heavy vehicles to Africa, electronics to SEA, and textiles to Europe.

    MIT license. Clone, customize 7 files, deploy.

    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template


    r/sales Post

    Title: My AI handles 10 stages of B2B sales while I sleep — lead capture through deal closing, and I open-sourced it

    Body:

    I run export sales for B2B companies. The pain: leads come in on WhatsApp at 3 AM from different time zones, follow-ups slip through cracks, and qualification takes forever with manual back-and-forth.

    Built an AI SDR that handles the full pipeline automatically:

    1. Captures leads from WhatsApp/Telegram/ads
    2. Qualifies via natural BANT conversation
    3. Logs structured data to CRM
    4. Researches the company (web scraping + analysis)
    5. Generates PDF quotes (multi-language)
    6. Tracks negotiation rounds
    7. Sends daily pipeline reports at 9 AM
    8. Runs nurture sequences for cold leads
    9. Manages personalized email outreach (Day 1/3/7/14)
    10. Coordinates across WhatsApp + Email + Telegram

    It scores leads dynamically — fast reply bumps score up, silence drops it. Hot leads (7+/10) trigger instant owner notification. It sends messages with human-like pacing so buyers never suspect automation.

    Running it for clients in heavy machinery, electronics, and textiles across Africa, Middle East, and Southeast Asia. It handles time zones, language detection, and cultural adaptation automatically.

    Open-sourced the whole thing: https://github.com/iPythoning/b2b-sdr-agent-template


    r/artificial Post

    Title: Built a 7-layer context architecture for AI sales agents — 3-engine memory, dynamic ICP scoring, multi-channel orchestration. Open-sourced it.

    Body:

    Most AI agent implementations use a single system prompt. That breaks down fast in production sales environments where the agent needs persistent knowledge about the business, products, customers, and ongoing deals.

    I built a 7-layer context system where each layer is a separate Markdown file:

    • Identity: Company info, pipeline stages, lead tiering rules
    • Soul: Personality traits, communication style, hard constraints
    • Agents: 10-stage sales workflow with decision trees
    • User: ICP scoring (5 weighted dimensions), competitor intelligence
    • Heartbeat: Automated pipeline inspection — 13-item checklist on every cycle
    • Memory: 3-engine architecture (Supermemory for semantic recall, MemoryLake for session context, MemOS for cross-session patterns)
    • Tools: CRM commands, channel configs, web research APIs

    The memory architecture is the interesting part. Supermemory uses vector embeddings (LanceDB) to store customer facts, conversation insights, market signals, and effective scripts — each with different TTLs. Before any outreach, the agent queries relevant memories and injects them into context.

    Dynamic ICP scoring starts with 5 weighted dimensions (purchase volume 30%, product match 25%, region 20%, payment capacity 15%, decision authority 10%) and auto-adjusts based on interaction signals.

    13 cron jobs handle pipeline automation. The delivery-queue skill implements human-like message timing with configurable delays and quiet hours.

    MIT licensed: https://github.com/iPythoning/b2b-sdr-agent-template


    3. X/Twitter Thread

    Tweet 1 (Hook): I open-sourced an AI SDR that handles full B2B sales — from lead capture to deal closing — across WhatsApp, Telegram, and Email.

    Not a chatbot. A complete 10-stage sales pipeline that runs 24/7.

    Here's the architecture behind it:

    Tweet 2: The problem with most AI sales tools: they handle ONE conversation. No memory. No pipeline. No follow-up.

    Real B2B sales has 10 stages. Lead capture, BANT qualification, CRM entry, research, quotation, negotiation, reporting, nurture, email outreach, multi-channel orchestration.

    This template handles all 10.

    Tweet 3: The secret: a 7-layer context system.

    Instead of cramming everything into one prompt, the AI reads 7 Markdown files:

    • Identity (company + role)
    • Soul (personality + rules)
    • Agents (sales workflow)
    • User (ICP + products)
    • Heartbeat (pipeline inspection)
    • Memory (3-engine recall)
    • Tools (CRM + channels)

    Tweet 4: The memory architecture is 3 engines deep:

    1. Supermemory — vector search for customer facts, market signals, effective scripts
    2. MemoryLake — session context and conversation summaries
    3. MemOS Cloud — cross-session behavior patterns

    Your AI SDR remembers that Ahmed from Dubai buys 50 units/quarter and prefers WhatsApp.

    Tweet 5: 13 automated cron jobs run without you touching anything:

    • Every 30 min: Gmail inbox scan
    • 9 AM: Pipeline report via WhatsApp
    • 10 AM: AI lead discovery (rotating markets)
    • 11 AM: Email follow-up check
    • 3 PM: Stalled lead detection
    • Weekly: Nurture campaigns, competitor intel, summaries

    Tweet 6: Dynamic ICP scoring that evolves with every interaction:

    Base score = 5 weighted dimensions (purchase volume, product match, region, payment capacity, decision authority)

    Then auto-adjusts:

    • Fast reply → +1
    • Asks for quote → +2
    • Mentions competitor → +2
    • 7 days silent → -1

    Hot lead (7+)? Owner gets notified instantly.

    Tweet 7: The humanizer makes it feel real:

    • Messages split into 2-3 natural chunks
    • 3-90 second delays between messages
    • Cultural adaptation for 5 regions (Middle East, Africa, SEA, LatAm, Europe)
    • Auto-detects language, responds natively
    • Quiet hours awareness
    • Never says "As an AI..."

    Tweet 8: Everything is Markdown. No code changes needed.

    Clone the repo. Edit 7 files with your business info. Deploy.

    Includes ready-to-use configs for heavy vehicles, electronics, and textiles.

    MIT licensed. Built on OpenClaw. Battle-tested with real companies.

    https://github.com/iPythoning/b2b-sdr-agent-template


    4. LinkedIn Post

    How AI Is Changing B2B Export Sales — And Why I Open-Sourced Our Solution

    I've spent the last year working with B2B export companies across heavy machinery, electronics, and textiles. The pattern is always the same:

    Leads come in from WhatsApp at 2 AM because your buyer is in Lagos. Your sales rep follows up 14 hours later. By then, they've already messaged three of your competitors. The quote sits in "pending" for a week because nobody tracked the follow-up. The CRM is half-empty because manual data entry is the first thing dropped when things get busy.

    Sound familiar?

    We built an AI SDR that handles the complete sales pipeline — not just the first message, but all 10 stages from lead capture to deal closing. It qualifies leads through natural BANT conversations, researches companies automatically, generates PDF quotes in the buyer's language, tracks negotiations, sends daily pipeline reports, runs nurture campaigns, manages email sequences, and coordinates across WhatsApp, Telegram, and Email.

    Three things make it different from typical AI tools:

    1. Deep context, not shallow prompts. A 7-layer context architecture where the AI reads your company identity, sales workflow, ICP scoring, product catalog, and competitive intelligence on every conversation. It knows your business like a veteran sales rep.

    2. Real memory. A 3-engine memory system stores customer facts, conversation insights, and market signals. Before reaching out to any lead, the AI queries its memory for relevant context. It remembers that your buyer in Dubai prefers WhatsApp, orders quarterly, and was comparing prices with your competitor last month.

    3. Human-like execution. Messages are split into natural chunks with realistic delays. Cultural adaptation for Middle Eastern, African, Southeast Asian, Latin American, and European markets. Auto-detects language. Never sends during the buyer's nighttime. The buyer never knows they're talking to AI.

    We've tested this with real export companies. It handles time zones, multi-language conversations, and cross-channel coordination without supervision.

    Today we're open-sourcing the entire system. The whole thing is configured through Markdown files — no coding required. Clone, customize 7 files with your business info, deploy in 5 minutes.

    If you're running B2B export sales and tired of leads falling through the cracks, take a look.

    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template

    #B2BExport #AIinSales #WhatsAppBusiness #OpenSource #SalesAutomation #B2BSales #ExportBusiness #ArtificialIntelligence #SalesTech


    5. Product Hunt Launch Copy

    Tagline: AI SDR for B2B export — full pipeline, open-source

    Description: Open-source AI Sales Development Representative for B2B export businesses. 7-layer context architecture, 10-stage sales pipeline, 3-engine memory, dynamic ICP scoring. Handles lead capture through deal closing across WhatsApp, Telegram, and Email. Configure with Markdown, deploy in 5 minutes.

    3 Key Features:

    1. Full 10-stage pipeline: lead capture, BANT qualification, quoting, negotiation, nurture, and closing
    2. 3-engine memory system with semantic search — your AI remembers every customer detail
    3. Multi-channel orchestration across WhatsApp, Telegram, and Email with human-like pacing

    Maker Comment:

    I started building this out of frustration. I was helping B2B export companies set up their sales processes, and the same problem kept appearing: leads coming in from different time zones on WhatsApp, falling through the cracks because the sales team couldn't respond fast enough. One client lost a $40K truck deal because they replied 16 hours late to a buyer in Nigeria.

    So I built an AI agent to handle the first response. Then qualification. Then CRM entry. Then follow-ups. Before I knew it, I had a complete 10-stage pipeline running autonomously.

    The key insight was that a single system prompt isn't enough for real sales. The AI needs to understand your company, products, pricing strategy, competitors, customer profiles, and ongoing deals — all at once. That's why I designed the 7-layer context system: each layer is a Markdown file you customize for your business.

    After testing it with companies selling heavy vehicles to Africa, electronics to Southeast Asia, and textiles to Europe, I decided to open-source the whole thing. The export industry has too many small-to-medium businesses paying $200-500/month for fragmented SaaS tools that still require manual work.

    This template is production-ready, MIT licensed, and takes 5 minutes to deploy. No code changes needed — just edit 7 Markdown files and you have an AI SDR that works 24/7 across WhatsApp, Telegram, and Email.


    6. Dev.to Article

    Title: How I Built an AI That Handles Full B2B Sales Pipeline — Architecture Deep Dive


    Most AI sales tools are glorified chatbots. They handle one conversation, forget everything, and have no concept of a sales pipeline. After a year of building AI agents for real B2B export companies, I open-sourced a production-ready template that handles the entire 10-stage sales process. Here's how the architecture works.

    The Problem

    B2B export sales is complex. A single deal involves: capturing a lead from WhatsApp at 2 AM, qualifying them through natural conversation, researching their company, generating a quote in their language, tracking negotiation rounds, following up when things stall, and coordinating across multiple messaging channels. Most AI tools handle step 1 and call it done.

    Architecture: 7-Layer Context System

    The core design decision was rejecting the single-prompt approach. Instead, the AI loads 7 Markdown files on every conversation, each serving a distinct purpose:

    +--------------------------------------------------+
    |              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  -> 13-item pipeline inspection     |
    |  MEMORY.md     -> 3-engine memory architecture    |
    |  TOOLS.md      -> CRM, channels, integrations     |
    +--------------------------------------------------+
    |  Skills        -> Extensible capabilities         |
    |  Product KB    -> Your product catalog            |
    |  Cron Jobs     -> 13 automated scheduled tasks    |
    +--------------------------------------------------+
    |  OpenClaw Gateway (WhatsApp / Telegram / Email)   |
    +--------------------------------------------------+
    

    Why Markdown? Because the people configuring this are sales directors, not developers. Every layer is a file you edit in plain text. No JSON schemas, no YAML indentation headaches, no code changes.

    Layer Deep Dive

    Identity Layer (IDENTITY.md) defines who the AI is: company name, brand, business description, target markets. It also defines the pipeline status flow (new -> contacted -> interested -> quote_sent -> negotiating -> closed_won) and lead tiering rules (hot leads get 24h first contact, warm leads 48h, cold leads go to nurture pool).

    Soul Layer (SOUL.md) sets personality and hard constraints. The AI is a "pragmatic B2B sales consultant, research-driven, not a script machine." Hard rules include: never send generic templates, price commitments require owner confirmation, customer information is strictly confidential.

    Agents Layer (AGENTS.md) contains the full 10-stage sales workflow with decision trees for each stage. This is the operational brain — it defines exactly how the AI handles qualification, when to escalate, how to structure negotiations.

    User Layer (USER.md) is the business-specific configuration: product lines, ICP scoring criteria, competitor intelligence, and communication preferences. ICP scoring uses 5 weighted dimensions:

    DimensionWeight
    Purchase Volume30%
    Product Match25%
    Region Reachability20%
    Payment Capacity15%
    Decision Authority10%

    Scores auto-adjust based on interaction: fast reply +1, asks for quote +2, mentions competitor +2, 7 days silent -1.

    The 10-Stage Pipeline

    1. Lead Capture — Auto-detect inbound messages from WhatsApp, Telegram, CTWA ads. Create CRM record.
    2. BANT Qualification — Natural conversation to assess Budget, Authority, Need, Timeline.
    3. CRM Entry — Structured data extraction: name, company, country, ICP score, product interest.
    4. Research & Enrichment — Web search via Jina AI + company website analysis. 3-layer enrichment.
    5. Quotation — Auto-generate PDF quotes, multi-language, sent 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, auto-switching between WhatsApp, Email, Telegram.

    Memory Architecture: 3 Engines

    This is where it gets interesting. A sales agent without memory is useless after the first session.

    Supermemory is a semantic memory engine backed by vector search (LanceDB). It stores 4 types of memories with different TTLs:

    • Customer facts (permanent): "Ahmed from Dubai, buys 50 units/quarter"
    • Conversation insights (90 days): "Interested in bulk pricing for Model X"
    • Market signals (30 days): "East Africa demand spike for product Y"
    • Effective scripts (permanent): "Opening with local market data gives 3x reply rate"

    Before any outreach, the agent queries Supermemory for relevant context and injects it into the conversation.

    MemoryLake handles session-level context: conversation summaries, ongoing deal status, last interaction timestamp. Auto-recalled per conversation.

    MemOS Cloud captures cross-session behavior patterns: which opening lines work best for which regions, optimal follow-up timing, common objections by industry.

    Making It Human: The SDR Humanizer

    The sdr-humanizer skill defines rules for natural conversation:

    • Break messages into 2-3 short chunks instead of walls of text
    • Add 3-90 second delays between consecutive messages via the delivery-queue skill
    • Match the customer's formality level
    • Cultural adaptation for 5 regions (Middle East: relationship-first; Europe: data-driven; LatAm: personal touch)
    • Never reply instantly (feels robotic) — simulate 1-5 minute response time during business hours
    • Quiet hours awareness: don't send during the prospect's nighttime

    Automation: 13 Cron Jobs

    The agent runs scheduled tasks without human intervention:

    • 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 Wednesday: Nurture campaign
    • Weekly Friday: Competitor intelligence gathering
    • Weekly Monday: Weekly summary report

    How to Customize It

    Clone the repo, edit 7 Markdown files, deploy:

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # Edit for your business
    vim workspace/IDENTITY.md   # Company info, pipeline stages
    vim workspace/USER.md       # Products, ICP, competitors
    vim workspace/SOUL.md       # AI personality and rules
    
    # Deploy
    cd deploy && ./deploy.sh my-company
    

    The repo includes ready-to-use industry configurations for heavy vehicles, consumer electronics, and textiles. Copy an example, customize the specifics, and you're live.

    What's Next

    This is MIT licensed and built on OpenClaw. I'm looking for contributors to add more industry templates, build new skills, and improve documentation. If you're working on AI agents for vertical use cases, I'd love to hear how you're approaching context management and memory.

    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template


    7. 知乎/公众号文章

    标题: 外贸老板的AI销售员:从线索获取到成交的全自动化实战


    每个外贸老板都遇到过的场景

    凌晨两点,一个尼日利亚客户在 WhatsApp 上询价。你的销售第二天上午十点才看到消息,回复时对方已经和三家竞品聊完了。

    一个迪拜客户询价后沉默了一周,没人跟进,线索就这么丢了。

    CRM 里的数据残缺不全,因为手动录入是销售最先放弃的事。

    月底复盘发现,本月 30 条线索,真正走完整个流程的不到 5 条。其余的要么跟丢了,要么卡在报价审批上,要么压根没做 BANT 筛选就浪费了大量时间。

    这些不是个案。在过去一年服务外贸企业的过程中,我发现这是行业通病。人工 SDR 的成本高(一个成熟外贸销售年薪 15-30 万),时差问题无解,多语言沟通能力有限,而市面上的 SaaS 工具(Apollo、Instantly、Smartlead)加起来每月 200-500 美元,还要 3-4 个工具拼接才能覆盖全流程。

    一套开源的 AI SDR 系统

    所以我把过去一年给客户搭建的 AI 销售系统,打包成了一个开源模板。

    它不是一个简单的聊天机器人。它覆盖了完整的 10 阶段销售流水线:

    阶段AI 做什么
    线索获取自动识别 WhatsApp/Telegram/广告入站消息,创建 CRM 记录
    BANT 筛选通过自然对话评估预算、决策权、需求、时间线
    CRM 录入结构化数据采集:姓名、公司、国家、ICP 评分、产品意向
    背调充实AI 搜索客户公司官网、行业信息,3 层数据充实
    自动报价生成 PDF 报价单,多语言,发给老板审批
    谈判追踪记录每轮还价,推荐策略,超出授权自动升级
    每日汇报09:00 Pipeline 报告,15:00 停滞预警,周报
    线索养育自动跟进、行业资讯推送、售后关怀、季度回访
    邮件开发个性化冷开发信序列(第1/3/7/14天),自动跟进
    多渠道协同WhatsApp + Email + Telegram 跨渠道协调,自动切换

    为什么它比普通 AI 工具靠谱?

    7 层上下文架构。普通 AI 工具用一段 system prompt 就上了。这套系统有 7 层上下文,每层是一个 Markdown 文件:身份层(公司信息)、灵魂层(人格和底线)、操作层(10 阶段工作流)、用户层(ICP 评分和竞品)、巡检层(自动 Pipeline 检查)、记忆层(三引擎记忆)、工具层(CRM 和渠道配置)。AI 每次对话都加载全部 7 层——它了解你的公司,就像一个干了三年的老销售。

    三引擎记忆。Supermemory 存储客户事实和市场洞察(语义搜索,向量数据库);MemoryLake 管理会话上下文;MemOS Cloud 捕获跨会话行为模式。外联之前,AI 会自动查询记忆库,调取相关客户信息。它记得 Ahmed 来自迪拜,每季度采购 50 台,上次在比较竞品价格。

    动态 ICP 评分。初始分数基于 5 个维度(采购量 30%、产品匹配 25%、区域 20%、支付能力 15%、决策权 10%)。然后根据互动自动调整:快速回复 +1,索要报价 +2,提及竞品 +2,7 天无回复 -1。热线索(7 分以上)自动标记,立即通知老板。

    拟人化对话。消息拆分成 2-3 条自然片段,3-90 秒延迟发送。自动检测客户语言回复。5 个市场区域的文化适配(中东讲关系、欧洲讲数据、拉美讲热情)。有安静时间设置,不在客户的深夜发消息。客户永远不会知道自己在和 AI 对话。

    13 个自动化定时任务

    不需要你操心的事:

    • 每 30 分钟扫描 Gmail 收件箱
    • 每天 09:00 Pipeline 报告推送到 WhatsApp
    • 每天 10:00 AI 主动获客(非洲/中东/东南亚/拉美轮换)
    • 每天 11:00 检查邮件跟进序列
    • 每天 15:00 检测停滞线索
    • 每周三跑养育活动
    • 每周五收集竞品情报
    • 每周一发周报

    5 分钟部署

    整套系统的配置就是编辑 7 个 Markdown 文件,不需要写代码:

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    
    # 编辑你的业务信息
    vim workspace/IDENTITY.md   # 公司信息
    vim workspace/USER.md       # 产品、ICP、竞品
    
    # 部署
    cd deploy && ./deploy.sh my-company
    

    仓库里有重型车辆、消费电子、纺织服装三个行业的现成配置,复制过来改改就能用。

    实际效果

    在已部署的客户中:

    • 线索首次响应时间从平均 14 小时降到 5 分钟以内
    • 跟进遗漏率从 60%+ 降到接近 0
    • CRM 数据完整度从不到 30% 提升到 95%+
    • 销售团队可以把时间花在真正需要人判断的谈判和关系维护上

    这不是要取代销售团队,而是让 AI 处理重复性的前端工作(获客、筛选、录入、跟进),让人专注于高价值环节。

    MIT 开源协议,随意使用。

    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template


    8. Awesome List PR Descriptions

    awesome-ai-agents

    b2b-sdr-agent-template — Open-source AI SDR template for B2B export sales. 7-layer context architecture, 10-stage pipeline (lead capture to deal closing), 3-engine memory, dynamic ICP scoring. Multi-channel orchestration across WhatsApp, Telegram, and Email. Built on OpenClaw, configured via Markdown.

    awesome-sales-tools

    b2b-sdr-agent-template — Production-ready AI Sales Development Representative for B2B export. Handles full pipeline: lead capture, BANT qualification, quotation, negotiation, nurture, and multi-channel outreach (WhatsApp/Email/Telegram). 13 automated cron jobs, dynamic lead scoring. Open-source, MIT licensed.

    awesome-chatgpt

    b2b-sdr-agent-template — AI agent template that turns LLMs into full-pipeline B2B sales reps. 7-layer context system (Identity, Soul, Agents, User, Heartbeat, Memory, Tools) with 3-engine memory architecture. Supports any AI model (OpenAI, Anthropic, Google, etc.). Open-source.

    awesome-whatsapp

    b2b-sdr-agent-template — AI-powered sales agent for WhatsApp Business. Handles full B2B sales pipeline with human-like message pacing, cultural adaptation, auto language detection, and quiet hours. Integrates with Telegram and Email for multi-channel orchestration. Open-source.

    awesome-opensource

    b2b-sdr-agent-template — Open-source AI SDR (Sales Development Representative) for B2B export businesses. Full 10-stage sales pipeline, 7-layer context architecture, 3-engine memory, multi-channel support (WhatsApp/Telegram/Email). Markdown-driven configuration, deploy in 5 minutes. MIT licensed.

  • b2b-sdr-agent-template/docs/internal/SOCIAL-PUBLISH-PROMPTS.mdmarkdown · 23.2 KB

    社媒发布提示词 — OpenClaw 直接发布

    每个平台的提示词都是独立的,复制粘贴给你的 OpenClaw agent 即可执行。


    1. Hacker News (Show HN)

    提示词

    请帮我发布一篇 Show HN 帖子到 Hacker News。
    
    标题:Show HN: Open-source AI SDR that automates full B2B export sales pipeline
    
    正文:
    
    I've been building AI agents for B2B export companies for the past year. Most "AI sales tools" are glorified chatbots — they handle one message, forget context, and fall apart after the first conversation. So I built an open-source template that handles the entire 10-stage sales pipeline, from lead capture to deal closing.
    
    The core idea is a 7-layer context architecture. Instead of a single system prompt, the AI reads 7 Markdown files on every conversation: Identity (who am I), Soul (how I behave), Agents (full sales workflow), User (owner's ICP and products), Heartbeat (automated pipeline inspection), Memory (3-engine recall system), and Tools (CRM, channels, integrations). This gives it deep, persistent understanding of your business.
    
    It runs 13 automated cron jobs — daily pipeline reports, stalled lead detection, email follow-up sequences, AI-powered lead discovery rotating across African, Middle Eastern, SEA, and Latin American markets. Dynamic ICP scoring adjusts in real-time based on buyer behavior (fast reply +1, asks for quote +2, 7 days silent -1).
    
    Multi-channel orchestration across WhatsApp, Telegram, and Email. The delivery-queue skill adds human-like message pacing (3-90s delays, message splitting) so it doesn't feel like a bot. Cultural adaptation for 5 market regions. Auto-detects and responds in the customer's language.
    
    Built on OpenClaw. Battle-tested with real export companies selling heavy vehicles, electronics, and textiles. Includes 3 industry example configs you can deploy in 5 minutes.
    
    MIT licensed. Markdown-driven — no code changes needed for customization.
    
    https://github.com/iPythoning/b2b-sdr-agent-template
    
    发布网址:https://news.ycombinator.com/submit
    

    2. Reddit — r/SaaS

    提示词

    请帮我发布一篇帖子到 Reddit 的 r/SaaS 子版块。
    
    标题:I open-sourced my AI SDR instead of charging $200/month — handles full B2B sales pipeline across WhatsApp, Email, and Telegram
    
    正文:
    
    I spent a year building AI SDR agents for B2B export clients. Watched them pay $200-500/month each for tools like Apollo, Instantly, and Smartlead — and still need 3-4 tools stitched together with Zapier.
    
    So I packaged everything into one open-source template. It covers the entire pipeline: lead capture, BANT qualification, CRM entry, company research, quotation generation, negotiation tracking, daily reporting, nurture campaigns, cold email sequences, and multi-channel orchestration.
    
    The whole thing is configured through 7 Markdown files — no code. You describe your company, products, ICP scoring criteria, and sales workflow in plain text. The AI reads all of it on every conversation.
    
    It runs 13 automated cron jobs (pipeline reports, stalled lead detection, email follow-ups, AI lead discovery). Has 3-engine memory so it remembers customer context across sessions. Supports WhatsApp, Telegram, and Email.
    
    Already battle-tested with companies selling heavy vehicles to Africa, electronics to SEA, and textiles to Europe.
    
    MIT license. Clone, customize 7 files, deploy.
    
    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template
    
    发布网址:https://www.reddit.com/r/SaaS/submit
    

    3. Reddit — r/sales

    提示词

    请帮我发布一篇帖子到 Reddit 的 r/sales 子版块。
    
    标题:My AI handles 10 stages of B2B sales while I sleep — lead capture through deal closing, and I open-sourced it
    
    正文:
    
    I run export sales for B2B companies. The pain: leads come in on WhatsApp at 3 AM from different time zones, follow-ups slip through cracks, and qualification takes forever with manual back-and-forth.
    
    Built an AI SDR that handles the full pipeline automatically:
    
    1. Captures leads from WhatsApp/Telegram/ads
    2. Qualifies via natural BANT conversation
    3. Logs structured data to CRM
    4. Researches the company (web scraping + analysis)
    5. Generates PDF quotes (multi-language)
    6. Tracks negotiation rounds
    7. Sends daily pipeline reports at 9 AM
    8. Runs nurture sequences for cold leads
    9. Manages personalized email outreach (Day 1/3/7/14)
    10. Coordinates across WhatsApp + Email + Telegram
    
    It scores leads dynamically — fast reply bumps score up, silence drops it. Hot leads (7+/10) trigger instant owner notification. It sends messages with human-like pacing so buyers never suspect automation.
    
    Running it for clients in heavy machinery, electronics, and textiles across Africa, Middle East, and Southeast Asia. It handles time zones, language detection, and cultural adaptation automatically.
    
    Open-sourced the whole thing: https://github.com/iPythoning/b2b-sdr-agent-template
    
    发布网址:https://www.reddit.com/r/sales/submit
    

    4. Reddit — r/artificial

    提示词

    请帮我发布一篇帖子到 Reddit 的 r/artificial 子版块。
    
    标题:Built a 7-layer context architecture for AI sales agents — 3-engine memory, dynamic ICP scoring, multi-channel orchestration. Open-sourced it.
    
    正文:
    
    Most AI agent implementations use a single system prompt. That breaks down fast in production sales environments where the agent needs persistent knowledge about the business, products, customers, and ongoing deals.
    
    I built a 7-layer context system where each layer is a separate Markdown file:
    
    - **Identity**: Company info, pipeline stages, lead tiering rules
    - **Soul**: Personality traits, communication style, hard constraints
    - **Agents**: 10-stage sales workflow with decision trees
    - **User**: ICP scoring (5 weighted dimensions), competitor intelligence
    - **Heartbeat**: Automated pipeline inspection — 13-item checklist on every cycle
    - **Memory**: 3-engine architecture (Supermemory for semantic recall, MemoryLake for session context, MemOS for cross-session patterns)
    - **Tools**: CRM commands, channel configs, web research APIs
    
    The memory architecture is the interesting part. Supermemory uses vector embeddings (LanceDB) to store customer facts, conversation insights, market signals, and effective scripts — each with different TTLs. Before any outreach, the agent queries relevant memories and injects them into context.
    
    Dynamic ICP scoring starts with 5 weighted dimensions (purchase volume 30%, product match 25%, region 20%, payment capacity 15%, decision authority 10%) and auto-adjusts based on interaction signals.
    
    13 cron jobs handle pipeline automation. The delivery-queue skill implements human-like message timing with configurable delays and quiet hours.
    
    MIT licensed: https://github.com/iPythoning/b2b-sdr-agent-template
    
    发布网址:https://www.reddit.com/r/artificial/submit
    

    5. X/Twitter 推文线程

    提示词

    请帮我发布一个 8 条推文的线程到 X/Twitter。逐条发布,每条发完等确认后再发下一条。
    
    第 1 条(Hook):
    I open-sourced an AI SDR that handles full B2B sales — from lead capture to deal closing — across WhatsApp, Telegram, and Email.
    
    Not a chatbot. A complete 10-stage sales pipeline that runs 24/7.
    
    Here's the architecture behind it: 🧵
    
    第 2 条:
    The problem with most AI sales tools: they handle ONE conversation. No memory. No pipeline. No follow-up.
    
    Real B2B sales has 10 stages. Lead capture, BANT qualification, CRM entry, research, quotation, negotiation, reporting, nurture, email outreach, multi-channel orchestration.
    
    This template handles all 10.
    
    第 3 条:
    The secret: a 7-layer context system.
    
    Instead of cramming everything into one prompt, the AI reads 7 Markdown files:
    
    - Identity (company + role)
    - Soul (personality + rules)
    - Agents (sales workflow)
    - User (ICP + products)
    - Heartbeat (pipeline inspection)
    - Memory (3-engine recall)
    - Tools (CRM + channels)
    
    第 4 条:
    The memory architecture is 3 engines deep:
    
    1. Supermemory — vector search for customer facts, market signals, effective scripts
    2. MemoryLake — session context and conversation summaries
    3. MemOS Cloud — cross-session behavior patterns
    
    Your AI SDR remembers that Ahmed from Dubai buys 50 units/quarter and prefers WhatsApp.
    
    第 5 条:
    13 automated cron jobs run without you touching anything:
    
    - Every 30 min: Gmail inbox scan
    - 9 AM: Pipeline report via WhatsApp
    - 10 AM: AI lead discovery (rotating markets)
    - 11 AM: Email follow-up check
    - 3 PM: Stalled lead detection
    - Weekly: Nurture campaigns, competitor intel, summaries
    
    第 6 条:
    Dynamic ICP scoring that evolves with every interaction:
    
    Base score = 5 weighted dimensions (purchase volume, product match, region, payment capacity, decision authority)
    
    Then auto-adjusts:
    - Fast reply → +1
    - Asks for quote → +2
    - Mentions competitor → +2
    - 7 days silent → -1
    
    Hot lead (7+)? Owner gets notified instantly.
    
    第 7 条:
    The humanizer makes it feel real:
    
    - Messages split into 2-3 natural chunks
    - 3-90 second delays between messages
    - Cultural adaptation for 5 regions (Middle East, Africa, SEA, LatAm, Europe)
    - Auto-detects language, responds natively
    - Quiet hours awareness
    - Never says "As an AI..."
    
    第 8 条(CTA):
    Everything is Markdown. No code changes needed.
    
    Clone the repo. Edit 7 files with your business info. Deploy.
    
    Includes ready-to-use configs for heavy vehicles, electronics, and textiles.
    
    MIT licensed. Built on OpenClaw. Battle-tested with real companies.
    
    ⭐ https://github.com/iPythoning/b2b-sdr-agent-template
    
    发布网址:https://x.com/compose/post
    

    6. LinkedIn

    提示词

    请帮我发布一篇文章到 LinkedIn。
    
    标题:How AI Is Changing B2B Export Sales — And Why I Open-Sourced Our Solution
    
    正文:
    
    I've spent the last year working with B2B export companies across heavy machinery, electronics, and textiles. The pattern is always the same:
    
    Leads come in from WhatsApp at 2 AM because your buyer is in Lagos. Your sales rep follows up 14 hours later. By then, they've already messaged three of your competitors. The quote sits in "pending" for a week because nobody tracked the follow-up. The CRM is half-empty because manual data entry is the first thing dropped when things get busy.
    
    Sound familiar?
    
    We built an AI SDR that handles the complete sales pipeline — not just the first message, but all 10 stages from lead capture to deal closing. It qualifies leads through natural BANT conversations, researches companies automatically, generates PDF quotes in the buyer's language, tracks negotiations, sends daily pipeline reports, runs nurture campaigns, manages email sequences, and coordinates across WhatsApp, Telegram, and Email.
    
    Three things make it different from typical AI tools:
    
    1. Deep context, not shallow prompts. A 7-layer context architecture where the AI reads your company identity, sales workflow, ICP scoring, product catalog, and competitive intelligence on every conversation. It knows your business like a veteran sales rep.
    
    2. Real memory. A 3-engine memory system stores customer facts, conversation insights, and market signals. Before reaching out to any lead, the AI queries its memory for relevant context. It remembers that your buyer in Dubai prefers WhatsApp, orders quarterly, and was comparing prices with your competitor last month.
    
    3. Human-like execution. Messages are split into natural chunks with realistic delays. Cultural adaptation for Middle Eastern, African, Southeast Asian, Latin American, and European markets. Auto-detects language. Never sends during the buyer's nighttime. The buyer never knows they're talking to AI.
    
    We've tested this with real export companies. It handles time zones, multi-language conversations, and cross-channel coordination without supervision.
    
    Today we're open-sourcing the entire system. The whole thing is configured through Markdown files — no coding required. Clone, customize 7 files with your business info, deploy in 5 minutes.
    
    If you're running B2B export sales and tired of leads falling through the cracks, take a look.
    
    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template
    
    #B2BExport #AIinSales #WhatsAppBusiness #OpenSource #SalesAutomation #B2BSales #ExportBusiness #ArtificialIntelligence #SalesTech
    
    发布网址:https://www.linkedin.com/feed/
    

    7. Dev.to 技术文章

    提示词

    请帮我发布一篇技术文章到 Dev.to。
    
    标题:How I Built an AI That Handles Full B2B Sales Pipeline — Architecture Deep Dive
    
    标签:ai, opensource, sales, architecture
    
    封面图:使用仓库里的 social-preview.png
    
    正文(Markdown):
    
    Most AI sales tools are glorified chatbots. They handle one conversation, forget everything, and have no concept of a sales pipeline. After a year of building AI agents for real B2B export companies, I open-sourced a production-ready template that handles the entire 10-stage sales process. Here's how the architecture works.
    
    ## The Problem
    
    B2B export sales is complex. A single deal involves: capturing a lead from WhatsApp at 2 AM, qualifying them through natural conversation, researching their company, generating a quote in their language, tracking negotiation rounds, following up when things stall, and coordinating across multiple messaging channels. Most AI tools handle step 1 and call it done.
    
    ## Architecture: 7-Layer Context System
    
    The core design decision was rejecting the single-prompt approach. Instead, the AI loads 7 Markdown files on every conversation, each serving a distinct purpose:
    
    

    +--------------------------------------------------+ | 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 -> 13-item pipeline inspection | | MEMORY.md -> 3-engine memory architecture | | TOOLS.md -> CRM, channels, integrations | +--------------------------------------------------+ | Skills -> Extensible capabilities | | Product KB -> Your product catalog | | Cron Jobs -> 13 automated scheduled tasks | +--------------------------------------------------+ | OpenClaw Gateway (WhatsApp / Telegram / Email) | +--------------------------------------------------+

    
    **Why Markdown?** Because the people configuring this are sales directors, not developers. Every layer is a file you edit in plain text.
    
    ## The 10-Stage Pipeline
    
    1. **Lead Capture** — Auto-detect inbound messages from WhatsApp, Telegram, CTWA ads
    2. **BANT Qualification** — Natural conversation to assess Budget, Authority, Need, Timeline
    3. **CRM Entry** — Structured data extraction
    4. **Research & Enrichment** — Web search via Jina AI + company website analysis
    5. **Quotation** — Auto-generate PDF quotes, multi-language
    6. **Negotiation** — Track counter-offers, recommend strategy
    7. **Reporting** — Daily pipeline reports, stalled alerts, weekly summaries
    8. **Nurture** — Automated follow-ups, industry news, quarterly check-ins
    9. **Email Outreach** — Personalized cold email sequences (Day 1/3/7/14)
    10. **Multi-Channel Orchestration** — Cross-channel coordination
    
    ## Memory Architecture: 3 Engines
    
    **Supermemory** — semantic memory backed by vector search. Stores customer facts, conversation insights, market signals, and effective scripts with different TTLs.
    
    **MemoryLake** — session-level context: conversation summaries, deal status, last interaction.
    
    **MemOS Cloud** — cross-session behavior patterns: which opening lines work, optimal timing, common objections.
    
    ## Dynamic ICP Scoring
    
    5 weighted dimensions (Purchase Volume 30%, Product Match 25%, Region 20%, Payment Capacity 15%, Decision Authority 10%) + auto-adjustment based on interaction signals.
    
    ## Getting Started
    
    ```bash
    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
    cd b2b-sdr-agent-template
    vim workspace/IDENTITY.md   # Company info
    vim workspace/USER.md       # Products, ICP, competitors
    cd deploy && ./deploy.sh my-company
    

    MIT licensed. Built on OpenClaw. Looking for contributors.

    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template

    发布网址:https://dev.to/new

    
    ---
    
    ## 8. 知乎文章
    
    ### 提示词
    
    

    请帮我发布一篇文章到知乎。

    标题:外贸老板的AI销售员:从线索获取到成交的全自动化实战

    话题标签:AI, 外贸, 销售自动化, 开源, B2B

    正文:

    每个外贸老板都遇到过的场景

    凌晨两点,一个尼日利亚客户在 WhatsApp 上询价。你的销售第二天上午十点才看到消息,回复时对方已经和三家竞品聊完了。

    一个迪拜客户询价后沉默了一周,没人跟进,线索就这么丢了。

    CRM 里的数据残缺不全,因为手动录入是销售最先放弃的事。

    月底复盘发现,本月 30 条线索,真正走完整个流程的不到 5 条。其余的要么跟丢了,要么卡在报价审批上,要么压根没做 BANT 筛选就浪费了大量时间。

    这些不是个案。在过去一年服务外贸企业的过程中,我发现这是行业通病。人工 SDR 的成本高(一个成熟外贸销售年薪 15-30 万),时差问题无解,多语言沟通能力有限,而市面上的 SaaS 工具(Apollo、Instantly、Smartlead)加起来每月 200-500 美元,还要 3-4 个工具拼接才能覆盖全流程。

    一套开源的 AI SDR 系统

    所以我把过去一年给客户搭建的 AI 销售系统,打包成了一个开源模板。它不是一个简单的聊天机器人。它覆盖了完整的 10 阶段销售流水线:

    阶段AI 做什么
    线索获取自动识别 WhatsApp/Telegram/广告入站消息,创建 CRM 记录
    BANT 筛选通过自然对话评估预算、决策权、需求、时间线
    CRM 录入结构化数据采集:姓名、公司、国家、ICP 评分
    背调充实AI 搜索客户公司官网、行业信息,3 层数据充实
    自动报价生成 PDF 报价单,多语言,发给老板审批
    谈判追踪记录每轮还价,推荐策略,超出授权自动升级
    每日汇报09:00 Pipeline 报告,15:00 停滞预警,周报
    线索养育自动跟进、行业资讯推送、售后关怀
    邮件开发个性化冷开发信序列(第1/3/7/14天)
    多渠道协同WhatsApp + Email + Telegram 跨渠道协调

    为什么它比普通 AI 工具靠谱?

    7 层上下文架构。普通 AI 工具用一段 system prompt 就上了。这套系统有 7 层上下文,每层是一个 Markdown 文件。AI 每次对话都加载全部 7 层——它了解你的公司,就像一个干了三年的老销售。

    三引擎记忆。Supermemory 存储客户事实和市场洞察(语义搜索);MemoryLake 管理会话上下文;MemOS Cloud 捕获跨会话行为模式。它记得 Ahmed 来自迪拜,每季度采购 50 台,上次在比较竞品价格。

    动态 ICP 评分。5 个维度加权打分,根据互动自动调整。热线索(7分以上)立即通知老板。

    拟人化对话。消息拆分发送,3-90秒延迟,5个市场区域文化适配,客户永远不知道在和 AI 对话。

    5 分钟部署

    整套系统配置就是编辑 7 个 Markdown 文件,不需要写代码:

    git clone https://github.com/iPythoning/b2b-sdr-agent-template.git cd b2b-sdr-agent-template vim workspace/IDENTITY.md vim workspace/USER.md cd deploy && ./deploy.sh my-company

    MIT 开源协议,随意使用。

    GitHub: https://github.com/iPythoning/b2b-sdr-agent-template

    发布网址:https://zhuanlan.zhihu.com/write

    
    ---
    
    ## 9. 微信公众号
    
    ### 提示词
    
    

    请帮我准备一篇微信公众号文章。直接输出排版好的正文内容,我会复制到公众号编辑器。

    标题:外贸老板的AI销售员:从线索获取到成交的全自动化实战

    摘要:开源 AI SDR 模板,10 阶段销售流水线,7 层上下文架构,10 个自动化定时任务,覆盖 WhatsApp、Telegram、Email 三大渠道。

    正文内容与知乎文章(第 8 节)相同,但请:

    1. 去掉 Markdown 格式,改为公众号友好的排版
    2. 表格改为列表形式
    3. 代码块用截图占位提示
    4. 末尾加「点击阅读原文查看 GitHub 仓库」
    5. 阅读原文链接:https://github.com/iPythoning/b2b-sdr-agent-template
    
    ---
    
    ## 10. Product Hunt
    
    ### 提示词
    
    

    请帮我准备 Product Hunt 发布内容。我需要手动提交到 https://www.producthunt.com/posts/new

    产品名称:B2B SDR Agent Template Tagline:AI SDR for B2B export — full pipeline, open-source 网站:https://github.com/iPythoning/b2b-sdr-agent-template 缩略图:使用 social-preview.png

    描述: Open-source AI Sales Development Representative for B2B export businesses. 7-layer context architecture, 10-stage sales pipeline, 3-engine memory, dynamic ICP scoring. Handles lead capture through deal closing across WhatsApp, Telegram, and Email. Configure with Markdown, deploy in 5 minutes.

    3 个核心功能:

    1. Full 10-stage pipeline: lead capture, BANT qualification, quoting, negotiation, nurture, and closing
    2. 3-engine memory system with semantic search — your AI remembers every customer detail
    3. Multi-channel orchestration across WhatsApp, Telegram, and Email with human-like pacing

    Maker Comment: I started building this out of frustration. I was helping B2B export companies set up their sales processes, and the same problem kept appearing: leads coming in from different time zones on WhatsApp, falling through the cracks because the sales team couldn't respond fast enough. One client lost a $40K truck deal because they replied 16 hours late to a buyer in Nigeria.

    So I built an AI agent to handle the first response. Then qualification. Then CRM entry. Then follow-ups. Before I knew it, I had a complete 10-stage pipeline running autonomously.

    The key insight was that a single system prompt isn't enough for real sales. The AI needs to understand your company, products, pricing strategy, competitors, customer profiles, and ongoing deals — all at once. That's why I designed the 7-layer context system: each layer is a Markdown file you customize for your business.

    After testing it with companies selling heavy vehicles to Africa, electronics to Southeast Asia, and textiles to Europe, I decided to open-source the whole thing. The export industry has too many small-to-medium businesses paying $200-500/month for fragmented SaaS tools that still require manual work.

    This template is production-ready, MIT licensed, and takes 5 minutes to deploy. No code changes needed — just edit 7 Markdown files and you have an AI SDR that works 24/7 across WhatsApp, Telegram, and Email.

    话题标签:Sales, Open Source, Artificial Intelligence, WhatsApp, B2B

    
    ---
    
    ## 发布顺序建议
    
    | 顺序 | 平台 | 最佳发布时间 | 备注 |
    |------|------|------------|------|
    | 1 | Hacker News | 美西时间周二/三上午 9-11 点 | 技术社区,先发 |
    | 2 | X/Twitter | HN 发布后 1 小时 | 配合 HN 热度 |
    | 3 | Reddit (3个) | 同天分散发布 | r/SaaS 先发 |
    | 4 | LinkedIn | HN 发布当天 | 专业受众 |
    | 5 | Dev.to | 第二天 | 长文沉淀 |
    | 6 | 知乎 | 中国时间上午 | 中文受众 |
    | 7 | 公众号 | 知乎同天 | 配合知乎 |
    | 8 | Product Hunt | 最后一天 | 需要集中投票 |
    
  • b2b-sdr-agent-template/examples/electronics/IDENTITY.mdmarkdown · 0.9 KB

    IDENTITY.md — Consumer Electronics

    Role: B2B Sales Representative | CRM: Google Sheets | Channels: WhatsApp / Email Identity: "Sales Specialist" — never reveal AI identity.

    Company

    • Name: TechWave Electronics Co., Ltd.
    • Brand: TechWave
    • Business: OEM/ODM manufacturer of consumer electronics — TWS earbuds, smart watches, portable speakers, power banks
    • HQ / Factory: Shenzhen, China
    • Target Markets: North America, Europe, Middle East, Latin America

    ICP

    See USER.md

    Pipeline Status Flow

    new → contacted → interested → sample_sent → quote_sent → negotiating → closed_won / closed_lost / nurture
    

    Lead Tiering

    • hot_lead (ICP ≥ 7): Same-day response, 2-day follow-up
    • warm_lead (ICP 4-6): 24h response, 4-day follow-up
    • cold_lead (ICP ≤ 3): Nurture pool, monthly touch

    Reporting Cadence

    • Daily 10:00 (UTC+8): Pipeline summary
    • Weekly Monday 09:00: Weekly report + sample tracking
  • b2b-sdr-agent-template/examples/electronics/USER.mdmarkdown · 1.5 KB

    USER.md — Consumer Electronics Owner

    Basics

    • Name: Sales Director
    • Company: TechWave Electronics Co., Ltd.
    • Brand: TechWave
    • Products: TWS earbuds, smart watches, Bluetooth speakers, power banks, charging accessories
    • Target Markets: North America, Europe, Middle East, Latin America
    • Timezone: Asia/Shanghai

    Product Lines

    Audio

    • TWS Earbuds — ANC, sport, budget ranges
    • Bluetooth Speakers — portable, waterproof, party series
    • Headphones — over-ear, on-ear, gaming

    Wearables

    • Smart Watches — fitness tracking, health monitoring
    • Smart Bands — budget fitness trackers

    Power

    • Power Banks — 5000-20000mAh
    • Wireless Chargers — Qi standard
    • USB-C Hubs & Adapters

    Ideal Customer Profile (ICP)

    • Company type: Amazon/Shopify sellers, electronics distributors, brand owners seeking OEM/ODM, retail chains
    • Purchase scale: ≥ 500 units per SKU
    • Region priority: USA, Germany, UK, UAE, Brazil, Mexico
    • Decision-maker roles: Founder, Product Manager, Purchasing Manager
    • Pain points: Quality inconsistency, MOQ too high, slow sample delivery, poor communication

    Competitors

    • Competitor A: Larger catalog but higher MOQ
    • Competitor B: Lower prices but quality issues
    • Competitor C: Fast delivery but limited customization

    Our Advantages

    • Low MOQ: 100 pcs for stock items, 500 pcs for OEM
    • Fast sampling: 3-5 days for existing molds
    • Full customization: Logo, packaging, color, app integration
    • Quality: ISO 9001, FCC, CE, RoHS certified
  • b2b-sdr-agent-template/examples/heavy-vehicles/IDENTITY.mdmarkdown · 1.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/examples/heavy-vehicles/USER.mdmarkdown · 2.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/examples/heavy-vehicles/product-kb/catalog.jsoncode · 1.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/examples/textiles/IDENTITY.mdmarkdown · 1.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/examples/textiles/USER.mdmarkdown · 1.6 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/install.shcode · 12.6 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/package.jsoncode · 0.3 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/product-kb/catalog.jsoncode · 2.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/product-kb/products/example-product/info.jsoncode · 1.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/product-kb/scripts/generate-pi.jscode · 3.1 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/scripts/daily-sync.shcode · 2.7 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/scripts/proactive-summary.mjscode · 5.7 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/scripts/validate-template.shcode · 4.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/chroma-memory/SKILL.mdmarkdown · 2.3 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/chroma-memory/chroma.mjscode · 10.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/delivery-queue/SKILL.mdmarkdown · 1.6 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/delivery-queue/deliver.shcode · 4.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/graphify/SKILL.mdmarkdown · 6.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/lead-discovery/SKILL.mdmarkdown · 3.8 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/quotation-generator/SKILL.mdmarkdown · 1.8 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/sdr-humanizer/SKILL.mdmarkdown · 2.8 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/supermemory/SKILL.mdmarkdown · 1.9 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/supermemory/sm.mjscode · 4.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/skills/telegram-toolkit/SKILL.mdmarkdown · 6.6 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/social-preview.htmlcode · 5.7 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/social-preview.pngbinary · 379.6 KB

    Binary — download to inspect.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/CUSTOMER-DELIVERY-GUIDE.mdmarkdown · 7.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/CUSTOMER-DELIVERY-GUIDE.zh-CN.mdmarkdown · 5.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/OpenClaw-knowledge-base-import.mdmarkdown · 5.9 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/README.mdmarkdown · 8.4 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/README.zh-CN.mdmarkdown · 7.4 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/UPSTREAM-POLICY.mdmarkdown · 2.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/docs/system-prompt-template.mdmarkdown · 5.8 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/samples/example-customer-profile.yamlcode · 1.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/samples/pa-config.example.jsoncode · 0.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/bootstrap.shcode · 14.8 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/bulk-embed.pycode · 6.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/customer-profile-extractor.pycode · 6.7 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/extract-android-backup.pycode · 7.4 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/extract-ios-backup.pycode · 7.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/fetch-from-pa.pycode · 4.6 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/memos-upsert.pycode · 4.1 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/mine-golden-segments.pycode · 8.9 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/requirements-extract.txtcode · 0.4 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/requirements.txtcode · 0.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/whatsapp-old-account-onboarding/scripts/whatsapp-export-parser.pycode · 6.0 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/AGENTS.mdmarkdown · 12.6 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/HEARTBEAT.mdmarkdown · 4.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/IDENTITY.mdmarkdown · 1.2 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/MEMORY.mdmarkdown · 7.5 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/SOUL.mdmarkdown · 5.3 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/TOOLS.mdmarkdown · 20.8 KB

    No inline preview for this entry.

  • b2b-sdr-agent-template/workspace/USER.mdmarkdown · 1.5 KB

    No inline preview for this entry.