Skip to content

smallworldxyz/popinion

Repository files navigation

Popinion

Popinion (Public Opinion) — Don't guess the future. Rehearse it.


⚡ Overview

Popinion is an AI prediction engine. It creates a "Digital Mirror World" — a simulation of your society where thousands of AI agents react to your ideas. Test a policy, a message, or a strategy here first. See how the world might react. Then act with confidence.

Core Capabilities

Feature Description
Smart Scraping AI-driven search planning with specialized crawlers (Telegram, News, etc.)
Ghost Injection Inject real-world data as a "World Agent" to seed simulations
Swarm Simulation Thousands of autonomous agents with memory, personality, and social behavior
Prediction Reports Deep analysis with agent interviews and trend forecasting

Input: Upload seed materials (news, reports, social data) + describe your prediction scenario
Output: A detailed prediction report + an interactive digital world you can query

Our Vision

Popinion enables High-Stakes Social Wargaming:

  • Policy Crash Testing: Test laws and announcements before they hit headlines
  • Diplomatic Save Game: Simulate negotiation outcomes before entering the room
  • Cognitive Vaccination: Pre-test counter-narratives against disinformation

From serious predictions to playful simulations, we let every "what if" see its outcome.

🔄 Workflow

  1. Graph Building: Seed extraction → AI Search Planning → Smart Scraping (Telegram, News, etc.) → GraphRAG construction
  2. Environment Setup: Entity extraction → Persona generation → Agent configuration
  3. Simulation: Dual-platform (Twitter + Reddit) parallel evolution with dynamic memory
  4. Report Generation: ReportAgent with Deep Insight, Panorama Search, and Agent Interview tools
  5. Deep Interaction: Chat with any agent or query the ReportAgent for custom analysis

🚀 Quick Start

Prerequisites

Note: Popinion was developed and tested on Mac and Linux. Windows compatibility is experimental.

Tool Version Description Check Installation
Bun Latest Fast JavaScript runtime & package manager bun -v
Python 3.11+ Backend runtime python --version
uv Latest Python package manager uv --version
Docker Latest For Neo4j database docker --version

1. Start Neo4j Database

# Start Neo4j using Docker Compose
docker-compose up -d

# Neo4j Browser available at: http://localhost:7474
# Default credentials: neo4j / pubop123

2. Configure Environment Variables

# Copy the example configuration file
cp .env.example .env

# Edit the .env file and fill in the required API keys

Required Environment Variables:

# LLM API Configuration (supports any LLM with OpenAI SDK format)
# Recommended: Use a capable model like GPT-4, Claude, or Qwen
LLM_API_KEY=your_api_key
LLM_BASE_URL=https://api.openai.com/v1
LLM_MODEL_NAME=gpt-4

# Neo4j Graph Database Configuration
# Use Docker Compose to start local Neo4j: docker-compose up -d
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=pubop123
NEO4J_DATABASE=neo4j

3. Install Dependencies

# One-click installation of all dependencies (root + frontend + backend)
bun run setup:all

Or install step by step:

# Install dependencies (root + frontend)
bun install

# Install Python dependencies (auto-creates virtual environment)
bun run setup:backend

4. Start Services

# Start both frontend and backend (run from project root)
bun dev

Service URLs:

  • Frontend: http://localhost:3000
  • Backend API: http://localhost:5001

Start Individually:

bun run backend   # Start backend only
bun run frontend  # Start frontend only

🛠️ Tech Stack

  • Frontend: Vue 3 + Vite + TypeScript
  • Backend: Python + Flask
  • Database: Neo4j (Graph Database)
  • Simulation: OASIS (Open Agent Social Interaction Simulations)
  • LLM Integration: OpenAI-compatible API

📄 Acknowledgments

Popinion stands on the shoulders of giants:

Project Contribution
OASIS Core multi-agent simulation engine (by CAMEL-AI)
MiroFish Social simulation architecture & workflow design
BettaFish Real-world data extraction & scraping framework

We are grateful to these open-source communities for making Popinion possible.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages