RTGS销售自动化
生产就绪的自主销售勘探系统 拥有漂亮的Electron桌面UI、代理AI助手,并与HubSpot、Lemlist、Explorium、Postmark和PhantomBuster完全集成。

______________________________________________________________________
✨ v2.0.0的新增功能(2025年12月)
🤖 人工智能助理
- 工具使用集成 -AI可以直接创建ICP配置文件、管理活动、触发发现
- 10个内置工具 -ICP CRUD、活动、统计、发现、丰富、CRM同步
- 代理循环 -人工智能自主地链接多个动作,直到任务完成
- 行动的 -AI执行动作,而不仅仅是解释如何执行
🐳 基于Docker的架构
- PostgreSQL -生产数据库取代SQLite
- 瑞迪斯 -缓存和作业队列
- Docker Compose -一次指挥部署
- 卷装载 -开发中的实时代码重新加载
📧 多渠道外展
- 邮戳集成 -使用webhooks发送电子邮件
- PhantomBuster -LinkedIn自动化
- 海根 -AI视频个性化(即将推出)
- Webhook处理程序 -实时交货跟踪
🎯 ICP档案管理
- 完整CRUD API -
/api/icp端点 - 可视化编辑器 -Firmographics、头衔、得分阈值
- 分级制 -核心、扩张、战略概况
- 统计数据跟踪 -发现、丰富、注册计数
______________________________________________________________________
🔌 用于Cursor IDE的MCP服务器
此存储库包括 模型上下文协议(MCP)服务器 这使得像Claude这样的人工智能助手能够直接从Cursor IDE自动化销售工作流程。
在Cursor IDE中安装
添加到光标MCP设置(~/.cursor/mcp.json 或 %APPDATA%\Cursor\mcp.json 在Windows上):
{
"mcpServers": {
"sales-automation": {
"command": "npx",
"args": ["-y", "sales-automation-mcp"],
"env": {
"HUBSPOT_API_KEY": "your_hubspot_key",
"EXPLORIUM_API_KEY": "your_explorium_key",
"LEMLIST_API_KEY": "your_lemlist_key",
"APOLLO_API_KEY": "your_apollo_key"
}
}
}
}或者从该存储库本地运行:
{
"mcpServers": {
"sales-automation": {
"command": "node",
"args": ["sales-automation-api/src/mcp-server.js"],
"cwd": "/path/to/sales-automation-mcp",
"env": {
"HUBSPOT_API_KEY": "your_hubspot_key",
"EXPLORIUM_API_KEY": "your_explorium_key",
"LEMLIST_API_KEY": "your_lemlist_key",
"APOLLO_API_KEY": "your_apollo_key"
}
}
}
}可用的MCP工具
配置后,您的AI助手可以使用30多种工具,包括:
- 先导化合物的发现:
discover_leads_icp,discover_leads_account,discover_leads_intent - 富集:
enrich_contact,enrich_company,enrich_batch,verify_email - HubSpot CRM:
hubspot_create_contact,hubspot_create_deal,hubspot_search,hubspot_log_email - 外展:
lemlist_create_campaign,lemlist_add_lead,lemlist_get_stats - YOLO模式:
yolo_enable,yolo_status,yolo_trigger_cycle(自主自动化) - 作业管理:
submit_job,get_job_status,list_jobs,cancel_job
请参阅中的完整工具列表 sales-automation-api/src/mcp-server.js.
______________________________________________________________________
🚀 快速开始
Docker部署(推荐)
# Start all services
docker-compose up -d
# Start desktop app
cd desktop-app && npm run dev接入点
- 桌面应用:电子窗口(自动启动)
- API服务器: http://localhost:3000
- 仪表盘: http://localhost:3000/dashboard
______________________________________________________________________
✨ 主要特点
🎯 电子桌面应用程序
- 现代用户界面 -React 18,Vite 5,顺风CSS
- 8完整视图 -仪表板、聊天、活动、联系人、导入、ICP、工作流、设置
- 深色主题 -专业板岩调色板
- 实时更新 -WebSocket集成
- 系统托盘 -后台操作支持
🤖 人工智能助理
- 克劳德集成 -由Claude Haiku为速度提供动力
- 工具使用 -直接执行系统中的操作
- 可用工具:
| 工具 | 说明 |
|---|---|
create_icp_profile | 创建新的ICP配置文件 |
list_icp_profiles | 查看所有配置文件 |
update_icp_profile | 修改现有配置文件 |
delete_icp_profile | 删除配置文件 |
list_campaigns | 查看活动 |
get_system_stats | 系统指标 |
discover_leads | 触发器发现 |
enrich_contacts | 丰富工作 |
sync_to_hubspot | CRM同步 |
⚡ YOLO模式(自主操作)
- 全自动流水线 -发现→ 富集→ Sync → 外展
- 智能调度 -可配置的cron周期
- 安全护栏 -质量门、费率限制、每日上限
- 紧急停止 -立即暂停自动化
📊 活动管理
- 多通道 -电子邮件(邮戳)+领英(PhantomBuster)
- 视频个性化 -HeyGen集成
- 绩效追踪 -打开、点击、回复
- A/B测试 -主题行和内容变体
🔐 安全与隐私
- API密钥哈希 -具有安全比较功能的Argon2d
- 速率限制 -全球(100个要求/15分钟)+聊天(10条消息/分钟)
- 输入验证 -所有端点上的Zod模式
- 安全标头 -头盔中间件(CSP、HSTS)
- CORS保护 -严格的原产地验证
______________________________________________________________________
🏗️ 建筑
┌─────────────────────────────────────────────────────────────────┐
│ RTGS Sales Automation │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ ┌──────────────────────────────┐ │
│ │ Desktop App │◄───────►│ API Server (Docker) │ │
│ │ (Electron) │ HTTP │ rtgs-sales-automation │ │
│ │ │ │ │ │
│ │ • React 18 │ :5173 │ • Express.js │ │
│ │ • Zustand │ ──────► │ • Sequelize ORM │ │
│ │ • Tailwind CSS │ │ • Claude AI (Tool Use) │ │
│ │ • AI Chat UI │ :3000 │ • Job Queue Workers │ │
│ │ • WebSocket │ ◄────── │ • Rate Limiters │ │
│ └──────────────────┘ └──────────────────────────────┘ │
│ │ │
│ ┌────────────────────┼────────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌─────────┐ │
│ │ PostgreSQL │ │ Redis │ │ Volumes │ │
│ │ rtgs-postgres│ │ rtgs-redis │ │ Data │ │
│ │ │ │ │ │ Logs │ │
│ │ • Contacts │ │ • Cache │ │ │ │
│ │ • Campaigns │ │ • Jobs │ │ │ │
│ │ • ICP │ │ • Sessions │ │ │ │
│ │ • API Keys │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └─────────┘ │
│ │
│ External Integrations: │
│ ┌─────────┐ ┌─────────┐ ┌──────────┐ ┌─────────┐ ┌─────────┐ │
│ │ HubSpot │ │ Lemlist │ │Explorium │ │Postmark │ │Phantom- │ │
│ │ CRM │ │Outreach │ │Enrichment│ │ Email │ │ Buster │ │
│ └─────────┘ └─────────┘ └──────────┘ └─────────┘ └─────────┘ │
└─────────────────────────────────────────────────────────────────┘______________________________________________________________________
📦 项目结构
├── desktop-app/ # Electron + React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Main view pages
│ │ ├── services/ # API client
│ │ └── stores/ # Zustand state
│ └── electron/ # Electron main process
│
├── sales-automation-api/ # Backend API server
│ ├── src/
│ │ ├── routes/ # Express route handlers
│ │ ├── models/ # Sequelize models
│ │ ├── providers/ # Integration clients
│ │ ├── middleware/ # Auth, validation, security
│ │ └── services/ # Business logic
│ └── tests/ # API tests
│
├── docs/ # Documentation
├── data/ # Data files (CSV imports)
├── scripts/ # Utility scripts
└── docker-compose.yml # Container orchestration______________________________________________________________________
🔧 配置
环境变量(.env)
# Database
POSTGRES_HOST=postgres
POSTGRES_DB=rtgs_sales_automation
POSTGRES_USER=rtgs_user
POSTGRES_PASSWORD=your_password
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# AI
ANTHROPIC_API_KEY=sk-ant-...
# Integrations
HUBSPOT_ACCESS_TOKEN=pat-...
EXPLORIUM_API_KEY=...
POSTMARK_SERVER_TOKEN=...
PHANTOMBUSTER_API_KEY=...
# Security
API_SECRET_KEY=your_secret______________________________________________________________________
🐳 Docker命令
# Start all services
docker-compose up -d
# View logs
docker logs rtgs-sales-automation -f
# Restart API after code changes
docker-compose restart rtgs-sales-automation
# Stop all services
docker-compose down
# Rebuild containers
docker-compose up -d --build______________________________________________________________________
📊 数据库模式
关键表
| 表 | 说明 |
|---|---|
contacts | 领导/联系人记录 |
campaign_templates | 电子邮件/领英活动 |
icp_profiles | 理想的客户档案 |
api_keys | 哈希API凭据 |
outreach_outcomes | 活动绩效 |
enrichment_cache | 爆炸数据缓存 |
jobs | 后台作业队列 |
______________________________________________________________________
🧪 测试
# API tests
cd sales-automation-api
npm test
# Frontend tests
cd desktop-app
npm test
# Integration tests
cd tests/integration
node test-full-pipeline.js______________________________________________________________________
🎭 E2E测试
该项目包括一个全面的基于角色的E2E测试框架,有5个用户角色和42个测试流程。
快速开始
# Run all E2E tests
./scripts/run-e2e-tests.sh
# Run single persona
docker-compose -f docker-compose.e2e.yml up persona-1人物角色
- 人物角色1:高级用户-全功能利用,YOLO模式
- 人物角色2:日常驾驶员-核心工作流程,人工智能辅助
- 女神异闻录3:活动专家-活动管理
- 女神异闻录4:不耐烦的高管-快速浏览仪表板
- 人物角色5:新手入职-首次用户体验
当前状态:100%通过率(42/42流量)
有关详细文档,请参阅:
______________________________________________________________________
📝 API 参考
ICP简介
GET /api/icp # List all profiles
GET /api/icp/:id # Get single profile
POST /api/icp # Create profile
PATCH /api/icp/:id # Update profile
DELETE /api/icp/:id # Delete profile活动
GET /api/campaigns # List campaigns
POST /api/campaigns # Create campaign
PATCH /api/campaigns/:id
DELETE /api/campaigns/:id聊天(AI助手)
POST /api/chat # Send message (with tool use)
GET /api/chat/history # Get conversation history系统
GET /api/stats/system # System statistics
POST /api/yolo/enable # Enable YOLO mode
POST /api/yolo/disable # Disable YOLO mode______________________________________________________________________
🚢 生产部署
看 生产部署指南 获取完整说明。
快速部署:
# First deployment
./scripts/deploy.sh --build --migrate
# Subsequent deployments
./scripts/deploy.sh --restart______________________________________________________________________
🔐 安全
- 认证:API密钥通过
X-API-Key头球 - 密钥存储:带前缀存储的Argon2d哈希
- 速率限制:Express速率限制中间件
- 验证:所有输入上的Zod模式
- 标头:头盔安全头
- 跨域资源共享:基于白名单的来源控制
______________________________________________________________________
📝 版本历史
v2.0.0(2025年12月)
- ✅ 具有工具使用功能的代理AI助手
- ✅ 基于Docker的架构(PostgreSQL+Redis)
- ✅ ICP概况管理API
- ✅ 多渠道外展(邮戳、PhantomBuster)
- ✅ 增强的安全性(Argon2d、Zod验证)
v1.0.0(2025年11月)
- ✅ 完整的桌面应用程序
- ✅ 基础AI聊天助手
- ✅ HubSpot、Lemlist、Explorium集成
- ✅ YOLO模式自动化
______________________________________________________________________
🤝 贡献
这是一个私人RTGS项目。联系开发团队获取访问权限。
______________________________________________________________________
📝 许可证
麻省理工学院许可证 - RTGS 团队
______________________________________________________________________
由...制作❤️ RTGS团队
