Skip to content
Projects

About

开源私域营销 AI 系统 | ReAct 智能体 · 10+ 渠道触达 · 数据零出域 | Go + Vue3 + pgvector | Self-hosted AI Marketing OS

Web & App Development

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+11
in 15 days
+35
in 1 month
+76

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

🐝 HiveMtk · Open-Source Self-Hosted AI Marketing System

Turn your best salesperson's playbook into every rep's daily workflow.

One workspace for every social channel. One AI agent for every customer conversation. Zero data leaving your perimeter.

Open-Source SCRM · ReAct Autonomous Agent · 10+ Channels · Zero Data Egress · 5-Minute Self-Hosting


At a Glance

94 business modules
SCRM + AI + CDP + automation
10+ reach channels
Douyin / Xiaohongshu / TikTok / WhatsApp…
45 agent tools
ReAct autonomous orchestration
0 bytes of data egress
Local inference, fully offline-capable

Screenshots

Unified Inbox AI Agent
Unified Inbox AI Agent
Marketing Canvas Customer 360°
Marketing Canvas Customer 360°
Knowledge Base RAG Dashboard Screen
Knowledge Base RAG Dashboard Screen

What Is This

HiveMtk ("Hive" + "Marketing Toolkit") is an open-source AI marketing system for private-domain operations, nailing four things in a single repo:

  1. All-channel social reach — Douyin / Kuaishou / Xiaohongshu / Xianyu / TikTok via a Chrome-extension bridge; WeCom / Telegram / WhatsApp / Email / SMS via protocol-direct; one unified inbox
  2. ReAct autonomous agents — perceive → plan → tool-call → reflect; 45 atomic tools composed on the fly, not hardcoded if-else workflows
  3. Local knowledge base RAG — pgvector 1024-dim hybrid retrieval + bge-m3 + bge-reranker-v2-m3 fine ranking
  4. Zero data egress — llama.cpp (Qwen2.5) + TEI local inference stack; conversations, knowledge base, and embeddings never leave your network

Covers the full acquisition → outreach → conversion → repurchase funnel. Not an LLM wrapper — a complete system that runs real marketing operations, plus a GEO module closing the AI-search acquisition loop. The full feature list (and known limitations) is honestly disclosed in docs/marketing-features/README.md.

Who it's for: growing teams of 5–50 · compliance-sensitive industries (finance / healthcare / government) · operators done with SaaS vendor lock-in.


How It Compares

Honest comparison, weaknesses included. No silver bullets — pick what fits.

Dimension HiveMtk (this repo) Dify / FastGPT Commercial SCRM SourceQue / MoChat
Core positioning AI marketing system General LLM app platform Commercial SaaS WeCom SCRM
Reach channels Multi-channel (10+) None built-in 1-3 1 (WeCom)
AI capability ReAct agents + 45 tools Visual Workflow Basic CS bot Simple RAG / none
Data deployment 100% on-prem + local inference Self-host / SaaS Cloud SaaS / private
License AGPL-3.0 Apache-2.0 Proprietary Partially open
Best for Teams wanting self-control, multi-channel, strong AI Pure AI app dev SMBs without IT WeCom power users

Core Capabilities

🌐 All-Channel Reach: One Workspace

Channel Outreach Smart Cards Auto-Reply RAG CS Notes
Douyin / Kuaishou / Xiaohongshu / Xianyu / TikTok ✅ ✅ ✅ ✅ Chrome-extension bridge over your own logged-in browser — no headless browser
WeChat / WeCom ✅ — ✅ ✅ Groups + Moments
Telegram ✅ — ✅ ✅ Bot protocol direct: group-lead mining + proactive DM + gate control
WhatsApp ✅ — ✅ ✅ Cloud API + template messages
Email / SMS ✅ — ✅ — SMTP; Aliyun / Tencent / Huawei

Unified CDP customer profiles, one profile reaching everywhere; unified inbox — every conversation, ticket, and DM in one place. Per-channel details and Telegram's five acquisition capabilities: docs/marketing-features/README.md.

🤖 ReAct Autonomous Agents: Not Dead Workflows

  • ReAct loop: perceive → plan → tool-call → reflect; unseen scenarios get handled by composing tools on the fly
  • 45 atomic tools across five domains (reach / projects / customers / knowledge base / business), each wrapped by a five-layer decorator chain: Permission → Retry → Timeout → RateLimit → Audit
  • Hybrid RAG: pgvector HNSW + BM25 with RRF fusion, bge-reranker fine ranking, optional HyDE / MultiQuery rewrite
  • Multi-agent collaboration: reactive answering agent + proactive outreach agent; four-layer memory (short-term / long-term / SOP state / business facts)
  • Visual workflow builder: zero-code SOP editor for marketing automation

Tool registration logic, per source: user-server/internal/aiagent/agent/tooluse/ (code as inventory).

🔒 Data Security: 100% On-Prem, Zero Egress

  • Local inference stack: llama.cpp (Qwen2.5) + TEI (bge-m3 + bge-reranker-v2-m3) — three OpenAI-compatible services (LLM / Embedding / Rerank) inside your network
  • Fully offline-capable: conversations, knowledge base, embeddings, and RAG all complete within your perimeter
  • FRP private tunneling: visitors come in from the public internet, data flows back through the tunnel — the cloud never stores a single message
  • Compliance-friendly: meets data-residency and private-deployment baselines
  • Optional cloud LLM: point LLM_BASE_URL at DeepSeek/OpenAI for stronger models; Embedding/Rerank stay strictly local

🎯 GEO Optimization: AI-Search Acquisition Loop

SEO fights for search ranking; GEO (Generative Engine Optimization) fights for a seat in the AI answer — getting your brand cited when ChatGPT Search, Perplexity, or Google SGE answers.

Brand config → Keyword distillation → Content creation → Multi-model validation → Platform syndication
                    ↑                                                  ↓
              Data feedback ← Historical validation data ←──────────────┘

Keyword distillation · E-E-A-T + Schema injection · multi-vendor LLM simulation quantifying your "AI answer seat" · RAG grounding to brand facts · high-authority platform syndication. Full guide: user-server/docs/geo-module-guide.md.


Typical Use Cases

Scenario Key Capabilities Industries
Private-domain acquisition → AI auto-selling Multi-channel lead intake + ReAct agent handles inbound + objection handling + closing Franchise / Medical aesthetics / EdTech / B2B
WeCom SCRM multi-account aggregation Unified inbox + customer asset sink + departure inheritance Chain stores / Brands
AI customer service / RAG knowledge base Hybrid retrieval + 7×24 auto-reply E-commerce / SaaS / After-sales
Marketing automation SOP Visual SOP editor + RFM segmentation + churn prediction + reactivation Membership retail / Beauty
Cross-border multi-channel outreach TikTok + WhatsApp + Email + Telegram unified Cross-border e-commerce
Compliant on-premise deployment Local inference + zero egress + row-level security + audit archive Finance / Healthcare / Government

🚀 Up and Running in 5 Minutes

Requirements: Docker 24+ with Docker Compose v2. Minimum hardware 4 cores / 8GB RAM / 50GB disk (dev tier); recommended 8 cores / 16GB (prod tier with 14B model). GPU optional — CPU-only inference works.

# 1. Clone (Gitee primary for China; GitHub mirror elsewhere)
git clone https://gitee.com/xhpmayun/hivemtk.git && cd hivemtk

# 2. One-click install: .env template + build frontends + download models + start data layer & inference stack
make install

# 3. Set 3 secrets
vim .env   # POSTGRES_PASSWORD / REDIS_PASSWORD / JWT_SECRET
           # PLATFORM_ADMIN_PASSWORD is no longer read by user-server (JWT proxy channel removed in L-1);
           # only the platform repo (hivemtk-platform) .env needs it, to seed the platform super admin

# 4. Start
make dev                    # user-server with hot reload → http://localhost:8204
cd user-web && npm run dev  # Admin workspace → http://localhost:8211 (another terminal)

For dev/prod model tiers, common commands, and backup/restore operations, see docs/DEPLOYMENT_GUIDE.md and docs/TROUBLESHOOTING.md.


FAQ

How is it different from Dify / FastGPT? HiveMtk is a marketing system focused on "all-channel reach + sales-copilot SOP + CDP + zero egress", shipping 94 business modules out of the box. Dify / FastGPT are general LLM application platforms oriented around Workflow orchestration, without built-in marketing business.

Is it really open-source? Can I use it commercially? ✅ Fully open-source under AGPL-3.0. Fork, self-host, extend, and use commercially — free. The only constraint: if you offer a modified version as a network service (SaaS / cloud API), you must release your modifications under AGPL-3.0 as well. Internal-only self-hosting never triggers this.

Does data really stay on-premise? ✅ All conversations, knowledge base, embeddings, and RAG stay inside your network. The local inference stack runs on-prem; with FRP tunneling the cloud never stores a message. Even with a cloud LLM, only prompt text is sent, and customer PII is desensitized locally first.

Which LLMs are supported? ✅ DeepSeek / Qwen / GPT-4o / GLM / local Qwen2.5. The LLM routing gateway dispatches by scenario: strong models for complex objections, light models for routine replies. Embedding/Rerank are strictly local.

Can it be used overseas? ✅ TikTok + WhatsApp + Telegram + Email cover cross-border scenarios.

Is there a SaaS version? ❌ No. We insist on private deployment and data sovereignty. For enterprise support or custom integration: [email protected].


Architecture at a Glance

   Visitor Browser (Public Internet)
       │ HTTPS / WSS (via FRP / public IP / reverse proxy)
       ▼
   ┌─────────────────────────────────────────────────┐
   │  Customer On-Prem Network                       │
   │                                                 │
   │  user-server (Go + Gin) :8204                   │
   │    ├── PostgreSQL + pgvector :8202 (1024-dim)   │
   │    └── Redis 7 :8203                            │
   │                                                 │
   │  Host Inference Stack (llama.cpp, no containers)│
   │    ├── LLM :8207 (Qwen2.5)                      │
   │    ├── Embedding :8208 (bge-m3)                 │
   │    └── Rerank :8209 (bge-reranker-v2-m3)        │
   │                                                 │
   │  user-web (Vue 3) · embed-sdk (CS Web Widget)   │
   └─────────────────────────────────────────────────┘
            ┆ HTTPS (low-frequency heartbeat: install_id / version / host info /
            ┆  runtime metrics / device fingerprint)
            ┆  -- this edge does not exist by default: the platform is an
            ┆     optional local component; with PLATFORM_ENABLED unset
            ┆     not a single request leaves the box
            ▼
   Platform (optional, self-hosted from the separate hivemtk-platform repo):
   metadata only. Never touches, stores, or accesses your business data.
   There is no merchant licensing and no merchant-identity check anywhere.

The backend strictly follows a five-layer architecture (Controller → Service → Repository → Model → DTO, no cross-layer calls, CI-enforced). Full spec: docs/architecture/GO_FIVE_LAYER_ARCHITECTURE.md; deployment split with the platform: docs/operations/MERCHANT_DEPLOYMENT.md.

Tech stack: Go 1.25 + Gin + GORM · Vue 3 + Vite + Element Plus + Pinia · PostgreSQL 15 + pgvector · Redis 7 · llama.cpp + Qwen2.5 · TEI + bge-m3 / bge-reranker-v2-m3 · Docker Compose.


Repository Layout

hivemtk/                        # User-side repo
├── user-server/                # Go backend (core business, 5-layer arch) → user-server/README.md
├── user-web/                   # Vue 3 frontend (B-side workspace) → user-web/README.md
├── embed-sdk/                  # Embeddable CS Web Widget (IIFE/ESM)
├── migrations/                 # DB migration SQL (idempotent)
├── scripts/inference-host/     # Host inference stack scripts (llama.cpp + TEI)
├── docs/                       # Docs: INDEX.md / DEPLOYMENT_GUIDE.md / marketing-features/ …
├── docker-compose.yml          # Data layer orchestration (PG + Redis)
├── Makefile                    # install / up / down / inference / dev
└── .env-example                # Env template

Documentation

Doc Entry
📖 Chinese readme README.md
📚 Doc index docs/INDEX.md
🚀 Deployment guide / Troubleshooting docs/DEPLOYMENT_GUIDE.md · docs/TROUBLESHOOTING.md
📦 94 feature modules in detail docs/marketing-features/README.md
🤝 Contributing / Security CONTRIBUTING.md · SECURITY.md

Compliance & Disclaimer

Proactive outreach (SMS / email / social DM / Telegram / WhatsApp) is a core sensitive capability; as an open-source tool, this project takes no responsibility for how users invoke it. Every proactive send prints an unclosable [COMPLIANCE] notice in server logs. Full statement: DISCLAIMER.md (English).

License: released under AGPL-3.0. Private deployment, internal use, and modification are fully free with no obligation to open-source; offering a modified version as a SaaS / cloud service / managed API triggers the copyleft obligation for your modifications. See NOTICE for copyright and contact.


Contact & Community

Channel Entry Notes
🐛 Bug / Feature Request GitHub Issues / Gitee Issues Report issues & suggestions
💬 WeChat group Apply via Issue / email Product / tech / ops Q&A; no ads, no politics
📧 Business / Support [email protected] Enterprise support, custom integration, deployment consulting
🔒 Security reports [email protected] Private disclosure, see SECURITY.md

Mirrors: Gitee primary gitee.com/xhpmayun/hivemtk (faster in China) · GitHub mirror github.com/xiaofang142/hivemtk (Actions-synced)


⭐ Star / Watch to follow along

All Channels · True AI Autonomy · Zero Data Egress

Made with ❤️ by HiveMtk Team


We compromised with life.

Fully open source, no funding, no paywall — but servers and API calls still cost money.
So we took one sponsor slot. Nothing removed, nothing locked, still AGPL-3.0.


IPWO Residential Proxies · 195+ regions · Rotating / Static / Unlimited

IPWO Residential Proxies — residential IP resources across 195+ countries and regions for overseas social media operations and cross-border marketing.
Rotating, static and unlimited plans, multi-protocol ready: multi-region access, market research and overseas business scenarios.

Free trial on rotating proxies · static proxies from ¥9.9 / month / IP · promo code 0200

→ Explore IPWO residential proxies

Explore related projects

Loading…