jaikydota/BullFlow

推量牛 BullFlow — 开源企业级 RAG 解决方案:从企业知识库、营销内容自动化生产到全域内容分发 | Open-source enterprise RAG solution: knowledge base → automated marketing content → omnichannel publishing. 知识库全链路本地开源模型,无需付费模型;AI Agent 创作图文 / 图片 / 视频,一键发布抖音、小红书、公众号、LinkedIn、YouTube 等 17 个平台。Commercial-grade, multi-tenant, billing & admin built in. MIT

What it solves

Generic AI writing tools don't understand your business and produce generic content; traditional matrix distribution tools only handle publishing; and between them sits a lot of manual copying, formatting, and logging into accounts. BullFlow closes this loop in one system: it turns company documents, images, audio, and video into a private knowledge base, an AI agent writes articles, images, and videos grounded in that knowledge base (with citations you can verify), and one click distributes the finished content to 17 Chinese and overseas social platforms, with publish results and account metrics flowing back for analysis. The entire RAG pipeline (OCR, semantic splitting, vectorization, reranking, image search, speech transcription) uses local open-source models, so there are no per-usage API fees and company data never leaves the internal network.

How it works

  • Knowledge base ingestion: Upload documents (12 format types including PDF, Word, Excel, PPT, Markdown, HTML, EPUB, and more), images, audio, and video. Documents go through a four-level parsing fallback chain: PaddleOCR for scanned PDFs and images, Pandoc for office formats, native parsers for direct text extraction, and a binary fallback that stores files without indexing them. Semantic sentence-boundary detection plus dynamic-programming chunking keeps tables and code blocks intact.
  • Three-store indexing: Each chunk is written to MySQL (original text), Milvus (BGE-M3 vectors), and Elasticsearch with IK tokenizer (full-text). Media assets get their own treatment: images are vectorized with OpenCLIP for text-to-image search, videos get metadata and covers, audio is transcribed with WhisperX and goes through the full RAG flow. A unified search covers documents, images, audio, and video at once.
  • Hybrid retrieval: Vector and full-text recall run in parallel and are merged with RRF (or weighted fusion), with optional BGE-Reranker re-ranking, adjacent-chunk expansion for fuller context, and an adaptive step where an LLM decides whether retrieval is even needed and rewrites the query if so. The system ships with Ragas evaluation and automatic weight tuning.
  • AI Agent creation: A LangGraph ReAct agent streams output token by token (SSE) and can chain retrieval, writing, image generation, and export in one conversation. Tools include knowledge search, article generation (with intelligent in-body image placement), image generation (1 to 9 images, reference-image driven), video generation (5/10/15 seconds, up to 1080p), PDF/Word export, and customer-profile creation. There are 56 built-in creation skills (de-AI-flavoring, viral Xiaohongshu posts, SEO writing, short-video scripts, marketing copy) plus an inspiration library.
  • Publishing gateway: A separate, independently deployable gateway connects the main app to 17 platforms (11 domestic like Douyin, Kuaishou, Xiaohongshu, WeChat Video, Bilibili, Zhihu, Weibo; 6 overseas via Composio like LinkedIn, Facebook, Instagram, Reddit, YouTube, X). Publish workflow is three steps: pick content, pick platforms (the system flags which platforms support which content form), configure scheduling. QR-code authorization, region-pinned proxy IPs (max 15 accounts per IP per platform), 20-minute health checks with auto-migration, and 14-day inactivity reclaim for cost control. Six types of webhooks (with HMAC signature and replay protection) push results back, and account metrics are collected daily.
  • Commercial backend: Token/image/video metered billing, postpaid balance protection, subscription plans (monthly/quarterly/yearly with paid upgrades), add-on packs, Alipay/WeChat payment and corporate bank transfer, invoices, referral rewards, sales-attribution, a 9-step conversion funnel, notification channels (email, Feishu, WeCom), an admin panel with 23 menus, multi-tenant data isolation, and a full security layer (JWT dual tokens, rate limiting, captcha, audit logs). Published under MIT license, free for commercial use.

Who it's for

  • Brand social-media matrix operators: one creation, published to several platforms at once; scheduled tasks keep the matrix updating automatically; one dashboard shows results.
  • Cross-border e-commerce / going-global marketers: same product materials automatically tailored for LinkedIn, Facebook, Instagram, Reddit, X, and YouTube.
  • ToB content marketers: upload whitepapers, case studies, product docs; AI writes industry articles and WeChat long-form grounded in real facts with traceable citations.
  • MCN / agency operators: multi-tenant isolation keeps each client's knowledge base, accounts, and content separate; billing and subscription systems can be resold directly.
  • Local businesses / stores: product photos plus one sentence of requirement become Xiaohongshu picture-posts with seed copy; short-video scripts and marketing copy are generated instantly.
  • Enterprise knowledge Q&A: documents, PPTs, Excel sheets, and meeting recordings go into one searchable base; natural-language questions get answers with original source mentions.

Highlights

  • The whole RAG chain (OCR, semantic splitting, text vectors, reranking, image search, speech transcription) runs on local open-source models: zero usage fees, GPU optional (only speeds things up), and models can be baked into the image at build time so there is no runtime download.
  • Industrial-grade hybrid search with RRF fusion, optional BGE-Reranker, adjacent-block expansion, adaptive retrieval decision, and built-in Ragas evaluation plus automatic weight tuning.
  • One gateway reaches 17 platforms with account-safety features: region-pinned proxy IPs, a 15-account-per-IP limit, 20-minute health checks with auto-migration, and automatic account reclaim after 14 days of inactivity.
  • Full commercial stack out of the box: precise per-token/per-image/per-second billing, subscriptions and add-on packs, Alipay/WeChat payments and bank transfer, invoices, referral rewards, sales attribution, 9-step funnel analytics, and notification channels — not a demo.
  • Private deployment with data self-ownership: all components can be self-hosted, multi-tenant isolation is enforced across MySQL, Milvus, and Elasticsearch, and the MIT license allows free commercial use, modification, and redistribution.

Related

  • Project
  • Project
  • Project
  • Project