explaingit

666ghj/bettafish

📈 Trending40,956PythonAudience · pm founderComplexity · 4/5ActiveLicenseSetup · moderate

TLDR

Multi-agent system that monitors Chinese social media to analyze public opinion, sentiment, and trending topics, then generates structured research reports.

Mindmap

mindmap
  root((repo))
    What it does
      Monitors social media
      Analyzes public opinion
      Generates reports
    Engines
      QueryEngine searches news
      MediaEngine handles videos
      InsightEngine analyzes data
      ReportEngine synthesizes
    How it works
      Multiple AI agents
      Debate mechanism
      Parallel processing
    Tech stack
      Python modules
      OpenAI-compatible API
      Flask web server
    Use cases
      Brand sentiment tracking
      News event analysis
      Opinion trend research

Things people build with this

USE CASE 1

Monitor brand sentiment across Chinese social media platforms in real time.

USE CASE 2

Research public reaction to news events and trending topics at scale.

USE CASE 3

Analyze opinion trends and discourse patterns across multiple social channels.

USE CASE 4

Generate automated research reports on social media sentiment for decision-making.

Tech stack

PythonFlaskOpenAI APILLM

Getting it running

Difficulty · moderate Time to first run · 30min

Requires OpenAI API key and Chinese social media data source access/credentials.

Use it freely, but any project you distribute that includes this code must also be GPL-licensed and open source.

In plain English

BettaFish is a multi-agent public opinion analysis system that monitors Chinese social media platforms and generates structured research reports about trending topics, brand sentiment, and public discourse. Its Chinese name translates roughly to Micro Debate, a wordplay on the project's fish mascot. The problem it solves is that understanding what the general public thinks about a topic, event, or brand across dozens of social media channels is extremely time-consuming to do manually. BettaFish automates this by deploying multiple specialized AI agents that work in parallel to collect, analyze, and synthesize data. The system is organized into four main engines, each implemented as a separate Python module with its own agent logic. QueryEngine searches news and websites domestically and internationally. MediaEngine handles multimodal content such as short videos and images from platforms like Douyin and Xiaohongshu. InsightEngine digs into private or internal databases for deeper analysis. ReportEngine collects everything the other agents found and generates an interactive HTML report. The agents use a forum-style debate mechanism where a moderator model prompts the agents to argue their findings against each other through multiple rounds, intended to reduce the blind spots of any single model. The system calls large language models through an OpenAI-compatible interface, so it can work with various providers. It uses Flask as the web server and supports streaming responses. You would use BettaFish if you need to monitor Chinese social media sentiment for a brand, research public reaction to news events, or analyze opinion trends at scale. It is built entirely in Python without depending on heavyweight agent frameworks, making it relatively straightforward to customize with your own models and data sources.

Copy-paste prompts

Prompt 1
How do I set up BettaFish to monitor sentiment about my brand on Chinese social media platforms?
Prompt 2
Show me how to customize the QueryEngine and MediaEngine agents to track specific topics or keywords.
Prompt 3
How does the debate mechanism between agents work, and how can I tune it to reduce bias in the analysis?
Prompt 4
Walk me through deploying BettaFish with my own LLM provider instead of OpenAI.
Prompt 5
How do I extract and visualize the sentiment data from the HTML reports BettaFish generates?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.